Exemplo n.º 1
0
 if ($op == "delete") {
     if (isset($_GET['id'])) {
         $name = $_GET['id'];
         $err = delete_group($name);
         if (strlen($err) > 0) {
             header('Location: error.php?msg=' . urlencode($err));
         } else {
             header('Location: group_list.php');
         }
     } else {
         header('Location: error.php?msg=No id');
     }
 } elseif ($op == "add") {
     $name = $_POST['name'];
     $desc = $_POST['description'];
     $err = insert_group($name, $desc);
     if (strlen($err) > 0) {
         header('Location: error.php?msg=' . urlencode($err));
     } else {
         header('Location: group_list.php');
     }
 } elseif ($op == "edit") {
     if (isset($_POST['id'])) {
         $name = $_POST['id'];
         $new_name = $_POST['name'];
         $desc = $_POST['description'];
         $err = edit_group($name, $new_name, $desc);
         if (strlen($err) > 0) {
             header('Location: error.php?msg=' . urlencode($err));
         } else {
             header('Location: group_list.php');
Exemplo n.º 2
0
 }
 // Printer
 if (substr($split, 0, 7) == "printer") {
     insert_printer($split);
 }
 // Shares
 if (substr($split, 0, 6) == "shares") {
     insert_shares($split);
 }
 // Mapped Drives
 if (substr($split, 0, 6) == "mapped") {
     insert_mapped($split);
 }
 // Local Groups
 if (substr($split, 0, 7) == "l_group") {
     insert_group($split);
 }
 // Local Users
 if (substr($split, 0, 6) == "l_user") {
     insert_user($split);
 }
 // Startup Programs
 if (substr($split, 0, 7) == "startup") {
     insert_startup($split);
 }
 // Services
 if (substr($split, 0, 7) == "service") {
     insert_service($split);
 }
 // Hotfixes
 if (substr($split, 0, 6) == "hotfix") {