$module) { //create an array of module sections to display if (isset($module['items']) && is_array($module['items'])) { foreach($module['items'] as $itemKey => $item) { $listKey = (!empty($item['display']) ? $item['display'] : $itemKey); $module_list[ $listKey ] = $item; } } } } // extensions vs device/users ... module_list setting if (isset($amp_conf["AMPEXTENSIONS"]) && ($amp_conf["AMPEXTENSIONS"] == "deviceanduser")) { unset($module_list["extensions"]); } else { unset($module_list["devices"]); unset($module_list["users"]); } // no more adding the APPLY Changes bar to module list because array_multisort messes up integer array keys // $module_list['99'] = array('category' => NULL, 'name' => _("Apply Changes Bar")); // changed from $module_name to $admin_module_name because the former is used by framework foreach ($module_list as $key => $row) { $module_category[$key] = $row['category']; $admin_module_name[$key] = $row['name']; } array_multisort($module_category, SORT_ASC, $admin_module_name, SORT_ASC, $module_list); $sections = array(); if (isset($_REQUEST["sections"])) { if (is_array($_REQUEST["sections"])) { $sections = $_REQUEST["sections"]; } else { //TODO do we even need this?? $sections = explode(";",$_REQUEST["sections"]); } } //if submitting form, update database switch ($action) { case "addampuser": core_ampusers_add($username, $password, $extension_low, $extension_high, $deptname, $sections); //indicate 'need reload' link in footer.php needreload(); redirect_standard(); break; case "editampuser": core_ampusers_del($userdisplay); core_ampusers_add($username, $password, $extension_low, $extension_high, $deptname, $sections); //indicate 'need reload' link in footer.php needreload(); redirect_standard('userdisplay'); break; case "delampuser": core_ampusers_del($userdisplay); //indicate 'need reload' link in footer.php needreload(); $userdisplay = ""; // go "add" screen redirect_standard(); break; } ?>
"._("Edit Administrator").""; $user = getAmpUser($userdisplay); $username = $user["username"]; $password = $user["password"]; $extension_high = $user["extension_high"]; $extension_low = $user["extension_low"]; $deptname = $user["deptname"]; $sections = $user["sections"]; ?>

"._("Add Administrator").""; } ?>

'._("NOTE:").''._("AUTHTYPE is not set to 'database' in /etc/amportal.conf - note that this module is not currently providing access control, and changing passwords here or adding users will have no effect unless AUTHTYPE is set to 'database'.") ?>

Create a unique username for this new user")?>:
Create a password for this new user")?>:

Restrict this user's view of Digital Receptionist menus and System Recordings to only those for this department.")?>:
Restrict this user's view to only Extensions, Ring Groups, and Queues within this range.")?>:  to
Select the Admin Sections this user should have access to.")?>:
" onclick="checkAmpUser(ampuserEdit, '')">