X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fspamcop%2Foptions.php;h=8e186181f09727711fab1fde402d1d0ac669e08d;hp=d722d0d55e1354914e23fe15acd610f85e8428ee;hb=24024eb7a3db834ca68720cd30fec275af758237;hpb=e1728a7ada03ba597fc2f8a800773cb427a711ce diff --git a/plugins/spamcop/options.php b/plugins/spamcop/options.php index d722d0d5..8e186181 100755 --- a/plugins/spamcop/options.php +++ b/plugins/spamcop/options.php @@ -1,40 +1,31 @@ " . _("Disable it") . ")\n"; - } else { - $ret = _("Disabled") . "(" . _("Enable it") . ")\n"; - } - return $ret; -} +require('../../include/init.php'); +/* plugin functions */ +include_once(SM_PATH . 'plugins/spamcop/functions.php'); + +displayPageHeader($color); + +/** is spamcop plugin disabled */ +// option changes do nothing, if read_body_header_right hook is not active. -displayPageHeader($color, 'None'); - /* globals */ sqgetGlobalVar('action', $action); sqgetGlobalVar('meth', $meth); -sqgetGlobalVar('type', $type); sqgetGlobalVar('ID' , $ID); sqgetGlobalVar('username', $username, SQ_SESSION); @@ -55,16 +46,17 @@ switch ($action) { case 'delete': setPref($data_dir, $username, 'spamcop_delete', 1); break; + case 'keep': + setPref($data_dir, $username, 'spamcop_save', 0); + break; + case 'dontkeep': + setPref($data_dir, $username, 'spamcop_save', 1); + break; case 'meth': if (isset($meth)) { setPref($data_dir, $username, 'spamcop_method', $meth); } break; - case 'type': - if (isset($type)) { - setPref($data_dir, $username, 'spamcop_type', $type); - } - break; case 'save_id': if (isset($ID)) { $ID = trim($ID); @@ -75,107 +67,89 @@ switch ($action) { break; } -global $spamcop_enabled, $spamcop_delete, $spamcop_quick_report; -spamcop_load(); +global $spamcop_enabled, $spamcop_delete, $spamcop_save, $spamcop_quick_report; +spamcop_load_function(); ?>
-
- -
+
+ +

- + - - + + + + \n" . + '(' . _("Only works with email-based reporting") . ')', + 'right','','valign="top"'); + echo html_tag('td', spamcop_enable_disable($spamcop_delete,'save','delete'),'','','valign="top"'); + ?> + + + \n" . + '(' . _("Only works with email-based reporting") . ')', + 'right','','valign="top"'); + echo html_tag('td', spamcop_enable_disable($spamcop_save,'keep','dontkeep'),'','','valign="top"'); + ?> + + + + + - \n" . - '(' . _("Only works with email-based reporting") . ')', - 'right','','valign="top"'); - echo html_tag('td', spamcop_enable_disable($spamcop_delete,'save','delete'),'','','valign="top"'); - ?> - - - - - - - - - - - " . - '(' . _("see below") . ')','right','','valign="top"'); - ?> - - + " . + '(' . _("see below") . ')','right','','valign="top"'); + ?> + +
+
+ + + \n"; + ?> +
-
- - - \n"; - ?> -
-
- - ' . - '\n"; - ?> -
- - - \n"; - ?> -
+ + + \n"; + ?> +
' . _("About SpamCop") . '
';