From 55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Fri, 6 Feb 2009 19:18:00 -0600 Subject: mv packages to config dir to match web layout --- packages/dspam/www/dspam-settings-prefs.php | 197 ---------------------------- 1 file changed, 197 deletions(-) delete mode 100644 packages/dspam/www/dspam-settings-prefs.php (limited to 'packages/dspam/www/dspam-settings-prefs.php') diff --git a/packages/dspam/www/dspam-settings-prefs.php b/packages/dspam/www/dspam-settings-prefs.php deleted file mode 100644 index c30cb7bd..00000000 --- a/packages/dspam/www/dspam-settings-prefs.php +++ /dev/null @@ -1,197 +0,0 @@ - - foo - foo desc - - - bar - bar desc - -*/ - -if (!is_array($config['installedpackages']['dspam']['config'][0]['preference'])) { - $config['installedpackages']['dspam']['config'][0]['preference'] = array(); -} - -$t_prefs = &$config['installedpackages']['dspam']['config'][0]['preference']; - -/* ID is only set if the user wants to edit an existing entry */ -$id = $_GET['id']; -$sectionid = $_GET['sectionid']; -if (isset($_POST['id'])) - $id = $_POST['id']; -if (isset($_POST['sectionid'])) - $sectionid = $_POST['sectionid']; - -if (isset($id) && $t_prefs[$id]) { - $pconfig['value'] = $t_prefs[$id]['value']; - $pconfig['descr'] = $t_prefs[$id]['descr']; -} else { - $pconfig['value'] = $_GET['pvalue']; - $pconfig['descr'] = $_GET['descr']; -} - -if ($_POST) { - - unset($input_errors); - $pconfig = $_POST; - - /* input validation */ - $reqdfields = explode(" ", "pvalue"); - $reqdfieldsn = explode(",", "DSPAM Algorithm Name"); - - do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); - - /* check for overlaps */ - foreach ($t_prefs as $pref) { - if (isset($id) && ($t_prefs[$id]) && ($t_prefs[$id] === $pref)) { - continue; - } - if ($pref['value'] == $_POST['pvalue']) { - $input_errors[] = gettext("This preference value already exists."); - break; - } - } - - /* if this is an AJAX caller then handle via JSON */ - if(isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - - if (!$input_errors) { - $pref = array(); - $pref['value'] = $_POST['pvalue']; - $pref['descr'] = $_POST['descr']; - - if (isset($id) && $t_prefs[$id]) - $t_prefs[$id] = $pref; - else - $t_prefs[] = $pref; - - write_config(); - - $retval = 0; - config_lock(); - $retval = dspam_configure(); - config_unlock(); - - $savemsg = get_std_save_message($retval); - - isset($sectionid) ? $header = "dspam-settings.php?sectionid={$sectionid}" : $header = "dspam-settings.php"; - pfSenseHeader($header); - exit; - } -} - -/* if ajax is calling, give them an update message */ -if(isAjax()) - print_info_box_np($savemsg); - -include("head.inc"); -/* put your custom HTML head content here */ -/* using some of the $pfSenseHead function calls */ -echo $pfSenseHead->getHTML(); - -?> - - - - -
-
- - - - - - - - - - - - - -
- -
- -
  - "> " onclick="history.back()"> - - - - - - -
-
- -getHTML(); -?> - - - - - - - - -
Access denied for:
- - - - -- cgit v1.2.3