summaryrefslogtreecommitdiff
path: root/pages/admin.php
diff options
context:
space:
mode:
authordeva <deva>2008-10-06 18:13:56 +0000
committerdeva <deva>2008-10-06 18:13:56 +0000
commit415e90a2e059ea32f6851dfb9b3c018b0a731a81 (patch)
treea2e7d809f4783f521a3a985716a26a6543acfc9d /pages/admin.php
parentcce5e7710295021b41d9aaecc503a60fb99256be (diff)
Put the webpages in.
Diffstat (limited to 'pages/admin.php')
-rw-r--r--pages/admin.php78
1 files changed, 78 insertions, 0 deletions
diff --git a/pages/admin.php b/pages/admin.php
new file mode 100644
index 0000000..5305ae2
--- /dev/null
+++ b/pages/admin.php
@@ -0,0 +1,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&amp;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&amp;module=events">Events</a>
+<?php }?>
+<?php if($user->news == "on") {?>
+ <a class="admin_menu_entry<?php if($module == "news") echo "_active" ?>"
+ href="?page=admin&amp;module=news">News</a>
+<?php }?>
+<?php if($user->gallery == "on") {?>
+ <a class="admin_menu_entry<?php if($module == "gallery") echo "_active" ?>"
+ href="?page=admin&amp;module=gallery">Gallery</a>
+<?php }?>
+<?php if($user->guestbook == "on") {?>
+ <a class="admin_menu_entry<?php if($module == "guestbook") echo "_active" ?>"
+ href="?page=admin&amp;module=guestbook">Guestbook</a>
+<?php }?>
+<?php if($user->newsletter == "on") {?>
+ <a class="admin_menu_entry<?php if($module == "newsletter") echo "_active" ?>"
+ href="?page=admin&amp;module=newsletter">Newsletter</a>
+<?php }?>
+<?php if($user->pressrelease == "on") {?>
+ <a class="admin_menu_entry<?php if($module == "pressrelease") echo "_active" ?>"
+ href="?page=admin&amp;module=pressrelease">Press</a>
+<?php }?>
+<?php if($user->user == "on") {?>
+ <a class="admin_menu_entry<?php if($module == "user") echo "_active" ?>"
+ href="?page=admin&amp;module=user">Password</a>
+<?php }?>
+<?php if($user->users == "on") {?>
+ <a class="admin_menu_entry<?php if($module == "users") echo "_active" ?>"
+ href="?page=admin&amp;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&amp;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
+}
+?>