From 92ab0fed73ebb1f5a03d3950ae27ca2cdca25a2b Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 21 Aug 2015 20:22:07 +0200 Subject: Delete shellcmd_edit.php --- config/shellcmd/shellcmd_edit.php | 303 -------------------------------------- 1 file changed, 303 deletions(-) delete mode 100644 config/shellcmd/shellcmd_edit.php (limited to 'config/shellcmd/shellcmd_edit.php') diff --git a/config/shellcmd/shellcmd_edit.php b/config/shellcmd/shellcmd_edit.php deleted file mode 100644 index 5ae466d5..00000000 --- a/config/shellcmd/shellcmd_edit.php +++ /dev/null @@ -1,303 +0,0 @@ -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(); - shellcmd_sync_package(); - header("Location: shellcmd.php"); - exit; - break; - case "shellcmd": - $a_shellcmd = &$config['system']['shellcmd']; - unset($a_shellcmd[$_GET['id']]); - write_config(); - shellcmd_sync_package(); - header("Location: shellcmd.php"); - exit; - break; - case "afterfilterchangeshellcmd": - // $a_afterfilterchangeshellcmd = &$config['system']['afterfilterchangeshellcmd']; - // unset($a_afterfilterchangeshellcmd[$_GET['id']]); - // write_config(); - // shellcmd_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(); - shellcmd_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) { ?> - - - -
-
- -
-
-
-
-
-
- -
- -
- - - - -- cgit v1.2.3