X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fspamcop%2Foptions.php;h=2d0d839f8c2000efa93f94714dc4363952bdd23c;hb=701e7beed3baca980039f978c6d536dd91cae775;hp=146e8308095c2c6add7add12fb29b3e7e6795275;hpb=74091b64ffddec9db154d7a76c202b98401b1117;p=squirrelmail.git diff --git a/plugins/spamcop/options.php b/plugins/spamcop/options.php index 146e8308..2d0d839f 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_delete,'save','delete'),'','','valign="top"'); - ?> - - - - + + + - - - - - - - " . - '(' . _("see below") . ')','right','','valign="top"'); - ?> - - + echo sprintf(' ', $selected, _("Web-based form")); + + ?> + + + \n"; + ?> + + + + " . + '(' . _("see below") . ')','right','','valign="top"'); + ?> + +
-
-
+ + - - \n"; - ?> -
-
- - ' . - '\n"; - ?> -
- - - \n"; - ?> -
+ + + \n"; + ?> +
' . _("About SpamCop") . '
'; @@ -212,8 +186,8 @@ echo '

'; echo _("The SpamCop service will display information as it finds it, so scroll down until you see a form button. It might pause a little while it is looking up information, so be a little patient. Read what it says, and submit the spam. Close the browser window. Press Cancel or click on the appropriate mail folder to see messages and/or delete the spam."); 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 '

' . _("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 "

\n"; echo '

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