diff --git a/admin/index.php b/admin/index.php index 239dfa79..d80bf66c 100644 --- a/admin/index.php +++ b/admin/index.php @@ -43,7 +43,16 @@ include ("../config.inc.php"); */ include ("auth-admin.php"); - include ("../functions/functions.xhtml.php"); +/* + * XHTML file + */ +include ("../functions/functions.xhtml.php"); + +/* + * Operator functions + */ +include ("../functions/functions.operator.php"); + $username = $_SESSION['user']; $g = 0; if (isset($_GET['g'])) @@ -81,7 +90,7 @@ include ("auth-admin.php");
diff --git a/admin/operatorlist.php b/admin/operatorlist.php index 972becac..42ee50b2 100644 --- a/admin/operatorlist.php +++ b/admin/operatorlist.php @@ -55,10 +55,11 @@ $msg = ""; if (isset($_POST['submit'])) { $operator_id = intval($_POST['operator_id']); - $chat_enable = $voip = $enabled = 0; + $superadmin = $chat_enable = $voip = $enabled = 0; if (isset($_POST['voip'])) $voip = 1; if (isset($_POST['chat_enable'])) $chat_enable = 1; if (isset($_POST['enabled'])) $enabled = 1; + if (isset($_POST['admin'])) $superadmin = 1; //get username $sql = "SELECT username @@ -70,7 +71,8 @@ if (isset($_POST['submit'])) $sql = "UPDATE " . LIME_PREFIX . "users SET users_name = " . $db->qstr($_POST['username']) . ", email = " . $db->qstr($_POST['email']) . ", - full_name = " . $db->qstr($_POST['firstName']); + full_name = " . $db->qstr($_POST['firstName']) . ", + superadmin = $superadmin"; if (!empty($_POST['password'])) { @@ -143,7 +145,7 @@ if (isset($_GET['edit'])) $operator_id = intval($_GET['edit']); - $sql = "SELECT o.*,l.superadmin,l.email + $sql = "SELECT o.*,l.superadmin,l.email,l.parent_id FROM operator as o, " . LIME_PREFIX ."users as l WHERE o.operator_id = $operator_id AND l.users_name = o.username"; @@ -264,7 +266,7 @@ function generate() {