cvs: php-gtk-web / admin-login.php
[email protected] ("Steph Fox") Sun, 09 Jul 2006 08:43:24 -0000
| Newsgroups | php.gtk.webmaster |
|---|---|
| Message-ID | <cvssfox1152434604@cvsserver> |
sfox Sun Jul 9 08:43:24 2006 UTC
Modified files:
/php-gtk-web admin-login.php
Log:
Flesh out some admin rights
http://cvs.php.net/viewvc.cgi/php-gtk-web/admin-login.php?r1=1.11&r2=1.12&diff_format=u
Index: php-gtk-web/admin-login.php
diff -u php-gtk-web/admin-login.php:1.11 php-gtk-web/admin-login.php:1.12
--- php-gtk-web/admin-login.php:1.11 Fri Jul 7 13:21:33 2006
+++ php-gtk-web/admin-login.php Sun Jul 9 08:43:24 2006
@@ -2,14 +2,12 @@
// rather than have login pages spread throughout the site let's have one place for logging in
// that's easy to remember
-
-require_once('config.inc');
require_once('cvs-auth.inc');
commonHeader("Administration Login");
print "<br />\n";
-if (!isset($_COOKIE['GTK'])) {
+if (!isset($_COOKIE['PHP-GTK'])) {
if (isset($_POST['submit']) && isset($_POST['pass'])) {
verify_password($_POST['user'], $_POST['pass']);
} else {
@@ -19,8 +17,8 @@
<form action = "<?php echo $_SERVER['PHP_SELF'];?>" method = 'POST'>
<table border='0' cellpadding='3' bgcolor='#e0e0e0' width=<?php echo isset($SIDEBAR_DATA) ? '50%' : '40%'; ?>>
<tr>
- <td>User name:</td>
- <td><input type = 'text' name = 'user' value = "<?php echo $user;?>"><br /></td>
+ <td><br />User name:</td>
+ <td><br /><input type = 'text' name = 'user' value = "<?php echo $user;?>"><br /></td>
<tr>
<td>Password:</td>
<td><input type = 'password' name = 'pass' value = '' size = '12'><br /></td>
@@ -31,6 +29,8 @@
</form>
<?php
+ print stretchPage(3);
+ print " </div>\n";
}
} else {
unset($user);
@@ -42,12 +42,17 @@
<li>Application Administration (currently offline)<br /></li>
<li><a href='manual/browse-notes.php'>Notes Administration</a><br /></li>
<li><a href='info.php'>Check phpinfo()</a><br /></li>
+ <li><a href='manual/admin-notes.php'>Switch public access to user notes
+ <b>".(file_exists($okfile) ? 'off' : 'on')."</b></a> (restricted)<br /></li>
+ <li><a href='manual/admin-notes.php?test'>Set up test environment</a>
+ (restricted) <b>".(isset($_COOKIE[get_user()]) ? 'Test mode enabled' :
+ 'Test mode disabled')."</b><br /></li>
<li><a href='admin-logout.php'>Log out</a></li>
</ul>
");
}
-print stretchPage(11);
+print stretchPage(8);
print " </div>\n";
commonFooter();