X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fspamcop%2Foptions.php;h=9e350ec24a036909e1f4f7de501ef5666efb7cb4;hp=31d17ac133847c0965ee1f609311aacbe6b8b3c5;hb=d4e46166df04792c6b939356ea5dfda8e47bba7b;hpb=43404bdc46f6fa524bf5ec308a997393ce10d812 diff --git a/plugins/spamcop/options.php b/plugins/spamcop/options.php index 31d17ac1..9e350ec2 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") . '
'; @@ -213,7 +187,7 @@ echo _("The SpamCop service will display information as it finds it, so scroll d echo "

\n"; echo '

' . _("SpamCop service type") . '
'; -echo _("Service type option allows selecting which spamcop services you are using. Member services use different web reporting forms and does not display nags. You can purchase these services, if you want to support SpamCop."); +echo _("Service type option allows selecting which SpamCop services you are using. Member services use different web reporting forms and does not display nags. You can purchase these services, if you want to support SpamCop."); echo "

\n"; echo '

' . _("More information") . '
';