// // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. session_start(); ?> User Administration loadUsers(); $op = isset($_POST['op']) ? $_POST['op'] : ""; $index = isset($_POST['index']) ? floor($_POST['index']) : -1; if (strcmp($op, "add") == 0) { $user = new User; $user->name = $_POST['name']; $user->level = floor($_POST['level']); $user->passwordHash = md5($_POST['password']); $users->addUser($user); } elseif (strcmp($op, "remove") == 0) { $users->removeUser($index); } elseif (strcmp($op, "promote") == 0) { $users->alterLevel($index, 5); } elseif (strcmp($op, "demote") == 0) { $users->alterLevel($index, -5); } readOnlyWarning(); ?> <== back to admin

Users for

users); $i++) { ?>
users[$i]->level) { case 5: print("Editor"); break; case 10: print("Administrator"); break; default: print("Unknown - " . $users->users[$i]->level); break; } ?> [remove] [promote] [demote]
users) == 0) print("(none)
"); ?>

Add User

Name:
Level:
Password:

Change Password

TODO