0) { $id = $_POST['id']; } $type = $_GET['t']; if (strlen($_POST['t'])>0) { $type = $_POST['t']; } if ($_GET['act'] == "del") { if ($_GET['type'] == 'cmd') { switch (htmlspecialchars($type)) { case "earlyshellcmd": $a_earlyshellcmd = &$config['system']['earlyshellcmd']; unset($a_earlyshellcmd[$_GET['id']]); write_config(); php_sync_package(); header("Location: shellcmd.php"); exit; break; case "shellcmd": $a_shellcmd = &$config['system']['shellcmd']; unset($a_shellcmd[$_GET['id']]); write_config(); php_sync_package(); header("Location: shellcmd.php"); exit; break; case "afterfilterchangeshellcmd": // $a_afterfilterchangeshellcmd = &$config['system']['afterfilterchangeshellcmd']; // unset($a_afterfilterchangeshellcmd[$_GET['id']]); // write_config(); // php_sync_package(); // header("Location: shellcmd.php"); // exit; break; default: break; } } } //get value for the form edit value if (strlen($id) > 0) { switch (htmlspecialchars($type)) { case "earlyshellcmd": $a_earlyshellcmd = &$config['system']['earlyshellcmd']; if ($a_earlyshellcmd[$id]) { $pconfig['command'] = $a_earlyshellcmd[$id]; } break; case "shellcmd": $a_shellcmd = &$config['system']['shellcmd']; if ($a_shellcmd[$id]) { $pconfig['command'] = $a_shellcmd[$id]; } break; case "afterfilterchangeshellcmd": //$a_afterfilterchangeshellcmd = &$config['system']['afterfilterchangeshellcmd']; //if ($a_afterfilterchangeshellcmd[$id]) { // $pconfig['command'] = $a_afterfilterchangeshellcmd[$id]; //} break; default: break; } // previous version of shellcmd wrapped all commands in a -xmltag, unnesting this for backwards compatibility if (is_array($pconfig['command'])) $pconfig['command'] = $pconfig['command']['command']; } if ($_POST) { unset($input_errors); if (!$input_errors) { if (strlen($_POST['command']) > 0) { $ent = $_POST['command']; if (strlen($id)>0) { //update switch (htmlspecialchars($type)) { case "earlyshellcmd": $a_earlyshellcmd = &$config['system']['earlyshellcmd']; if ($a_earlyshellcmd[$id]) { $a_earlyshellcmd[$id] = $ent; } break; case "shellcmd": $a_shellcmd = &$config['system']['shellcmd']; if ($a_shellcmd[$id]) { $a_shellcmd[$id] = $ent; } break; case "afterfilterchangeshellcmd": //$a_afterfilterchangeshellcmd = &$config['system']['afterfilterchangeshellcmd']; //if ($a_afterfilterchangeshellcmd[$id]) { // $a_afterfilterchangeshellcmd[$id] = $ent; //} break; default: break; } } else { //add switch (htmlspecialchars($type)) { case "earlyshellcmd": $a_earlyshellcmd = &$config['system']['earlyshellcmd']; $a_earlyshellcmd[] = $ent; break; case "shellcmd": $a_shellcmd = &$config['system']['shellcmd']; $a_shellcmd[] = $ent; break; case "afterfilterchangeshellcmd": //$a_afterfilterchangeshellcmd = &$config['system']['afterfilterchangeshellcmd']; //$a_afterfilterchangeshellcmd[] = $ent; break; default: break; } } write_config(); php_sync_package(); } header("Location: shellcmd.php"); exit; } } include("head.inc"); ?>

Shellcmd: Edit


Command
Type \n"; echo " \n"; switch (htmlspecialchars($type)) { case "earlyshellcmd": echo " \n"; echo " \n"; //echo " \n"; break; case "shellcmd": echo " \n"; echo " \n"; //echo " \n"; break; case "afterfilterchangeshellcmd": //echo " \n"; //echo " \n"; //echo " \n"; break; default: echo " \n"; echo " \n"; echo " \n"; //echo " \n"; break; } echo " \n"; ?>
  0) { ?>