blob: aa3be9c2b696e4e2c6076c0d9465108c9a49ea34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
<?php
header("Content-Type: text/html; charset=UTF-8");
include_once("config.php");
// Check login
include_once($UTIL_DIR . "/login.php");
checklogin();
// Catch the modes that must not output any html.
if($current_user) {
switch($mode) {
case "imagecache":
include_once($UTIL_DIR. "/imagecache.php");
getCachedImage($uri);
return;
case "file":
include_once($UTIL_DIR. "/file.php");
if($preview) getFilePreview($fid);
else getFile($fid);
return;
}
}
include_once($UTIL_DIR . "/clientinfo.php");
?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $FORUM_TITLE; ?></title>
<meta name="MSSmartTagsPreventParsing" content="true"/>
<meta http-equiv="Content-Type" content="text/html"/>
<link rel="author" title="Bent Bisballe Nyeng" href="http://www.aasimon.org"/>
<link rel="stylesheet" type="text/css" href="forum.css"/>
<?php if($mode == "editor") {?><script language="javascript" src="lib.js" type="text/javascript"></script><?php } ?>
</head>
<body>
<div class="menu">
<a href="?mode=forum">Forum</a>
<a href="?mode=filehandler">Filehandler</a>
<a href="?mode=calendar">Calendar</a>
<a href="?mode=profile">Profile</a><?php
if($current_user->uid == 0) {
?> <a href="?mode=diagnostics">Diagnostics</a><?php
}
?></div>
<?php
// Globals:
// $fid
// $tid
// $pid
// $task
if($current_user) {
echo "<p>Logged in as: " . $current_user->name . " - <a href=\"?action=logout\">Logout</a></p>";
switch($mode) {
case "profile":
include_once($UTIL_DIR. "/profile.php");
break;
case "calendar":
include_once($UTIL_DIR. "/calendar.php");
break;
case "editor":
include_once($UTIL_DIR. "/editor.php");
break;
case "edit":
include_once($UTIL_DIR. "/edit.php");
break;
case "filehandler":
include_once($UTIL_DIR. "/filehandler.php");
break;
case "diagnostics":
include_once($UTIL_DIR. "/diagnostics.php");
break;
case "view":
default:
include_once($UTIL_DIR. "/view.php");
break;
}
} else {
?>
<form action="?action=login" method="post">
<p>UserID: <input name="current_username"/></p>
<p>Password: <input name="current_password" type="password"/></p>
<p><button type="submit">Login</button></p>
</form>
<?php
}
?>
</body>
</html>
|