diff options
author | Brian Evans <grknight@gentoo.org> | 2018-01-29 16:07:33 -0500 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2018-01-29 16:07:33 -0500 |
commit | b167721d5746c0d1791febbb213da0a0aed21aa2 (patch) | |
tree | e1c1c0af4b8d937f22b533b6edf0d1eeaf0083e4 /php/admin/users.php | |
parent | Import existing bouncer.g.o into git (diff) | |
download | bouncer-b167721d5746c0d1791febbb213da0a0aed21aa2.tar.gz bouncer-b167721d5746c0d1791febbb213da0a0aed21aa2.tar.bz2 bouncer-b167721d5746c0d1791febbb213da0a0aed21aa2.zip |
Modernize the database and mirror libraries
Diffstat (limited to 'php/admin/users.php')
-rw-r--r-- | php/admin/users.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/php/admin/users.php b/php/admin/users.php index 3017c49..4926117 100644 --- a/php/admin/users.php +++ b/php/admin/users.php @@ -9,7 +9,7 @@ require_once('../cfg/init.php'); // add user if (!empty($_POST['add-submit'])&&!empty($_POST['username'])&&!empty($_POST['password'])&&!empty($_POST['rpassword'])) { - if (mirror_insert_user($_POST['username'],$_POST['password'],$_POST['rpassword'],$_POST['user_firstname'],$_POST['user_lastname'],$_POST['user_email'])) { + if (Mirror::insert_user($_POST['username'],$_POST['password'],$_POST['rpassword'],$_POST['user_firstname'],$_POST['user_lastname'],$_POST['user_email'])) { set_msg('User added successfully.'); header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/users.php'); exit; @@ -24,7 +24,7 @@ if (!empty($_POST['submit'])) { switch($_POST['action']) { case 'edit': if (!empty($_POST['doit'])) { - if (mirror_update_user($_POST['user_id'],$_POST['username'],$_POST['password'],$_POST['rpassword'],$_POST['user_firstname'],$_POST['user_lastname'],$_POST['user_email'])) { + if (Mirror::update_user($_POST['user_id'],$_POST['username'],$_POST['password'],$_POST['rpassword'],$_POST['user_firstname'],$_POST['user_lastname'],$_POST['user_email'])) { set_msg('User updated successfully.'); header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/users.php'); exit; @@ -36,7 +36,7 @@ if (!empty($_POST['submit'])) { $nav = INC.'/admin_nav.php'; require_once(HEADER); echo '<h2>Edit User</h2>'; - $posts = mirror_get_one_user($_POST['user_id']); + $posts = Mirror::get_one_user($_POST['user_id']); form_start(); include_once(INC.'/forms/user.php'); form_hidden('doit','1'); @@ -51,7 +51,7 @@ if (!empty($_POST['submit'])) { case 'delete': if ($_POST['user_id']==$_SESSION['user']['user_id']) { set_error('You cannot delete yourself.'); - } elseif (mirror_delete_user($_POST['user_id'])) { + } elseif (Mirror::delete_user($_POST['user_id'])) { set_msg('User deleted successfully.'); } else { set_error('User could not be deleted because of an error.'); @@ -71,7 +71,7 @@ echo '<h2>Users</h2>'; show_error(); show_msg(); -$users = mirror_get_users(); +$users = Mirror::get_users(); $_GET['sort'] = (!empty($_GET['sort']))?$_GET['sort']:'user_lastname'; $_GET['order'] = (!empty($_GET['order']))?$_GET['order']:'ASC'; |