<?php // configuration require_once "../includes/config.php"; if (isset($_POST["user_to_admin"])) { if (!isset($_POST["admin_reason"])) { apologize("Must provide a reason for the promotion."); } if (make_admin($_POST["user_to_admin"], $_POST["admin_reason"]) === false) { apologize("Something went wrong."); } } elseif (isset($_POST["user_to_deadmin"])) { if (!isset($_POST["deadmin_reason"])) { apologize("Must provide a reason for the demotion."); } if (del_admin($_POST["user_to_deadmin"], $_POST["deadmin_reason"]) === false) { apologize("Something went wrong."); } } // assoc array $admins = get_admin_list(); render_mult(["admin_common.php", "admins.php"], ["title" => $title . " - View Admins", "admins" => $admins]);
document_header(); echo include_javascript_dir("js", $debug); echo include_stylesheet_dir("stylesheets", $debug); check_validated(); //Any pre-page logic should go here! //If a user was deleted... if (isset($_POST['deluser-submit'])) { delete_user($_POST['deluser-id']); } //If a user was undeleted... if (isset($_POST['undeluser-submit'])) { undelete_user($_POST['undeluser-id']); } //If a user was made admin if (isset($_POST['makeadmin-submit'])) { make_admin($_POST['makeadmin-id']); } //If a user was unmade admin if (isset($_POST['unmakeadmin-submit'])) { unmake_admin($_POST['unmakeadmin-id']); } //If a user was made super if (isset($_POST['makesuper-submit'])) { make_super($_POST['makesuper-id']); } //If a user was unmade super if (isset($_POST['unmakesuper-submit'])) { unmake_super($_POST['unmakesuper-id']); } //If a user had his password reset if (isset($_POST['pwreset-submit'])) {