diff -r c72d6d51f3d3 -r c255196bc447 users.php --- a/users.php Wed Mar 12 20:45:56 2008 +0000 +++ b/users.php Tue Mar 25 22:45:31 2008 +0000 @@ -20,144 +20,80 @@ */ require_once("inc/toolkit.inc.php"); +include_once("inc/header.inc.php"); +verify_permission(user_view_others) ? $perm_view_others = "1" : $perm_view_others = "0" ; +verify_permission(user_edit_own) ? $perm_edit_own = "1" : $perm_edit_own = "0" ; +verify_permission(user_edit_others) ? $perm_edit_others = "1" : $perm_edit_others = "0" ; +verify_permission(templ_perm_edit) ? $perm_templ_perm_edit = "1" : $perm_templ_perm_edit = "0" ; +verify_permission(is_ueberuser) ? $perm_is_godlike = "1" : $perm_is_godlike = "0" ; -if(isset($_POST["submit"]) -&& isset($_POST['username']) && $_POST["username"] != "" -&& isset($_POST['password']) && $_POST["password"] != "" -&& isset($_POST['fullname']) && $_POST["fullname"] != "" -&& isset($_POST['email']) && $_POST["email"] != "" -&& isset($_POST['level']) && $_POST["level"] > 0) -{ - if(substr_count($_POST["username"], " ") == 0) - { - if(strlen($_POST["password"]) < 8) - { - $error = _('Password length should be at least 8 characters.'); - } - else - { - add_user($_POST["username"], $_POST["password"], $_POST["fullname"], $_POST["email"], $_POST["level"], $_POST["description"], $_POST["active"]); - clean_page("users.php"); - } +if (isset($_POST['commit'])) { + foreach ($_POST['user'] as $user) { + update_user_details($user); } - else - { - $error = _('Usernames can\'t contain spaces'); - } -} -elseif(isset($_POST["submit"])) -{ - $error = _('Please fill in all fields'); } -include_once("inc/header.inc.php"); -if (isset($error) && $error != "") -{ -?> -
- - - - - +$users = get_user_detail_list(""); +echo "