blob: 5305ae27563c767f894f933f801187535a9c02b4 (
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
|
<?php
if($loggedin == true) {
?>
<?php
$users = new Users($DATA_DIR . "/users.xml");
if($userid) $UID = $userid;
else $UID = $HTTP_COOKIE_VARS["UserID"];
$user = $users->findUser($UID);
?>
<div class="header">
<div class="header_admin">
<div class="header_text">Admin</div>
</div>
</div>
<div class="logout">
<a href="?page=admin&action=logout">Logout <em><?php echo $UID;?></em></a>
</div>
<div class="admin_menu">
<?php if($user->events == "on") {?>
<a class="admin_menu_entry<?php if($module == "events") echo "_active" ?>"
href="?page=admin&module=events">Events</a>
<?php }?>
<?php if($user->news == "on") {?>
<a class="admin_menu_entry<?php if($module == "news") echo "_active" ?>"
href="?page=admin&module=news">News</a>
<?php }?>
<?php if($user->gallery == "on") {?>
<a class="admin_menu_entry<?php if($module == "gallery") echo "_active" ?>"
href="?page=admin&module=gallery">Gallery</a>
<?php }?>
<?php if($user->guestbook == "on") {?>
<a class="admin_menu_entry<?php if($module == "guestbook") echo "_active" ?>"
href="?page=admin&module=guestbook">Guestbook</a>
<?php }?>
<?php if($user->newsletter == "on") {?>
<a class="admin_menu_entry<?php if($module == "newsletter") echo "_active" ?>"
href="?page=admin&module=newsletter">Newsletter</a>
<?php }?>
<?php if($user->pressrelease == "on") {?>
<a class="admin_menu_entry<?php if($module == "pressrelease") echo "_active" ?>"
href="?page=admin&module=pressrelease">Press</a>
<?php }?>
<?php if($user->user == "on") {?>
<a class="admin_menu_entry<?php if($module == "user") echo "_active" ?>"
href="?page=admin&module=user">Password</a>
<?php }?>
<?php if($user->users == "on") {?>
<a class="admin_menu_entry<?php if($module == "users") echo "_active" ?>"
href="?page=admin&module=users">Users</a>
<?php }?>
</div>
<div class="admin_form">
<?php
if($user->events == "on" && $module == "events") include($UTIL_DIR."/admin_events.php");
if($user->news == "on" && $module == "news") include($UTIL_DIR."/admin_news.php");
if($user->gallery == "on" && $module == "gallery") include($UTIL_DIR."/admin_gallery.php");
if($user->guestbook == "on" && $module == "guestbook") include($UTIL_DIR."/admin_guestbook.php");
if($user->newsletter == "on" && $module == "newsletter") include($UTIL_DIR."/admin_newsletter.php");
if($user->pressrelease == "on" && $module == "pressrelease") include($UTIL_DIR."/admin_pressrelease.php");
if($user->user == "on" && $module == "user") include($UTIL_DIR."/admin_user.php");
if($user->users == "on" && $module == "users") include($UTIL_DIR."/admin_users.php");
if($module == "") {
echo "Welcome <em>". $UID ."</em>. Please select administration module.";
}
echo "</div>\n";
} else {
?>
<div class="admin_form">
<div class="small_header">Login</div>
<form action="?page=admin&action=login" method="post">
<p>UserID: <input name="userid"/></p>
<p>Password: <input name="password" type="password"/></p>
<p><button type="submit">Login</button></p>
</form>
</div>
<?php
}
?>
|