Example #1
0
                 $tpl->assign('tool_alert_message', "/!\\ Error: did you just try to delete yourself ?!");
             } else {
                 tool_admin_users_del($tool_user_delete_id);
             }
             break;
         case 'create':
             /*
              * -------------------------------------------------------------------------------------------
              *  Create a new User
              * -------------------------------------------------------------------------------------------
              */
             $tool_user_create_name = $_POST['tool_form_user_name'];
             $tool_user_create_password = $_POST['tool_form_user_password'];
             $tool_user_create_group = $_POST['tool_form_user_group'];
             $tool_user_create_active = $_POST['tool_form_user_active'];
             $tool_error = tool_admin_users_add($tool_user_create_name, $tool_user_create_password, $tool_user_create_group, $tool_user_create_active);
             if ($tool_error != "") {
                 $tpl->assign('tool_alert_message', $tool_error);
             }
             break;
     }
     $tool_group_list = tool_admin_groups_get_list();
     $tool_user_list = tool_admin_users_get_list($tool_group_list);
     $tpl->assign('tool_user_list', $tool_user_list);
     $tpl->assign('tool_group_list', $tool_group_list);
     break;
 case 'groups':
     /*
      * ###################################################################################################
      *  Group Admin
      * ###################################################################################################
Example #2
0
         } catch (Exception $e) {
             printalert("danger", "Failed to include NeL <em>admin/common.php</em>");
             $continue = false;
         }
     }
     if ($continue) {
         try {
             require_once 'functions_tool_administration.php';
         } catch (Exception $e) {
             printalert("danger", "Failed to include NeL <em>admin/functions_tool_administration.php</em>");
             $continue = false;
         }
     }
     if ($continue) {
         $adminGroup = 1;
         $result = tool_admin_users_add($_POST["toolsAdminUsername"], $_POST["toolsAdminPassword"], (string) $adminGroup, (string) 1);
         if ($result == "") {
             printalert("success", "Added shard admin to NeL tools database");
         } else {
             printalert("danger", "Failed to add shard admin to NeL tools database<br>" . htmlentities($result));
             $continue = false;
         }
     }
     if (!chdir("../")) {
         printalert("danger", "Cannot change to public PHP root directory");
         $continue = false;
     }
 }
 if ($roleSupport) {
     // Load AMS Library
     if ($continue) {