Eliminated all eveil chdir statements.
[squirrelmail.git] / plugins / spamcop / options.php
1 <?php
2
3 define('SM_PATH','../../');
4 require_once(SM_PATH . 'include/validate.php');
5
6 displayPageHeader($color, "None");
7
8 $action = (!isset($action) ? '' : $action);
9
10 switch ($action) {
11 case 'enable':
12 setPref($data_dir, $username, 'spamcop_enabled', 1);
13 break;
14 case 'disable':
15 setPref($data_dir, $username, 'spamcop_enabled', '');
16 break;
17 case 'save':
18 setPref($data_dir, $username, 'spamcop_delete', '');
19 break;
20 case 'delete':
21 setPref($data_dir, $username, 'spamcop_delete', 1);
22 break;
23 case 'meth':
24 if (isset($meth)) {
25 setPref($data_dir, $username, 'spamcop_method', $meth);
26 }
27 break;
28 case 'save_id':
29 if (isset($ID)) {
30 setPref($data_dir, $username, 'spamcop_id', $ID);
31 }
32 break;
33 }
34
35 global $spamcop_enabled, $spamcop_delete;
36 spamcop_load();
37
38 ?>
39 <br>
40 <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>">
41 <center><b><?php echo _("Options") ?> - Message Filtering</b></center>
42 </td></tr></table>
43 <br>
44
45 <table align=center>
46 <tr>
47 <td align=right>SpamCop link is:</td>
48 <td><?PHP if ($spamcop_enabled) {
49 ?>Enabled (<a href="options.php?action=disable">Disable it</a>)
50 <?PHP } else {
51 ?>Disabled (<a href="options.php?action=enable">Enable it</a>)
52 <?PHP }
53 ?></td>
54 </tr>
55 <tr>
56 <td align=right valign=top>Delete spam when reported:<br>
57 <font size="-2">(Only works with email-based reporting)</font>
58 </td>
59 <td valign=top><?PHP if ($spamcop_delete) {
60 ?>Enabled (<a href="options.php?action=save">Disable it</a>)
61 <?PHP } else {
62 ?>Disabled (<a href="options.php?action=delete">Enable it</a>)
63 <?PHP }
64 ?></td>
65 </tr>
66 <tr>
67 <td align=right>Spam Reporting Method:</td>
68 <form method=post action=options.php><td>
69 <select name=meth>
70 <option value="quick_email"<?PHP
71 if ($spamcop_method == 'quick_email') echo ' SELECTED'
72 ?>>Quick email-based reporting</option>
73 <option value="thorough_email"<?PHP
74 if ($spamcop_method == 'thorough_email') echo ' SELECTED'
75 ?>>Thorough email-based reporting</option>
76 <option value="web_form"<?PHP
77 if ($spamcop_method == 'web_form') echo ' SELECTED'
78 ?>>Web-based form</option>
79 </select>
80 <input type=hidden name=action value=meth>
81 <input type=submit value="Save Method">
82 </td></form>
83 </tr>
84 <tr>
85 <td valign=top align=right>Your SpamCop authorization code:<br>
86 <font size="-2">(see below)</font>
87 </td>
88 <form method=post action=options.php><td valign=top>
89 <input type=text size=30 name="ID" value="<?PHP
90 echo htmlspecialchars($spamcop_id) ?>">
91 <input type=hidden name=action value=save_id>
92 <input type=submit value="Save ID">
93 </td></form>
94 </tr>
95 </table>
96
97 <p>SpamCop is a free service that greatly assists in finding the true source
98 of the spam and helps in letting the proper people know about the abuse.</p>
99
100 <p>To use it, you must get a SpamCop authorization code. There is a free <a
101 href="http://spamcop.net/anonsignup.shtml">sign up page</a> so you can use
102 SpamCop.</p>
103
104 <p><b>Before you sign up, be warned:</b> Some users have reported that the
105 email addresses used with SpamCop find their way onto spam lists. To be
106 safe, you can just create an email forwarding account and have all SpamCop
107 reports get sent to there. Also, if it gets flooded with spam, you can then
108 just delete that account with no worries about losing your real email address.
109 Just go create an email forwarder somewhere (<a
110 href="http://www.yahoo.com/">Yahoo!</a> has a <a
111 href="http://dir.yahoo.com/Business_and_Economy/Business_to_Business/Communications_and_Networking/Internet_and_World_Wide_Web/Email_Providers/Forwarding_Services/Free_Forwarding/">list
112 of places</a>) so that messages from system administrators and whatnot can
113 be sent to you.</p>
114
115 <p>Once you have signed up with SpamCop and have received your SpamCop
116 authorization code, you need to enable this plugin -- just click the link
117 above. Once enabled, you go about your normal life. If you encounter a
118 spam message in your mailbox, just view it. On the right-hand side, near
119 the top of where the message is displayed, you will see a link to report
120 this message as spam. Clicking on it brings you to a confirmation page.
121 Confirming that you want the spam report sent will do different things with
122 different reporting methods.</p>
123
124 <p><b>Email-based Reporting</b><br>
125 Pressing the button forwards the message to the SpamCop service and will
126 optionally delete the message. From there, you just need to go to your
127 INBOX and quite soon a message should appear from SpamCop. (It gets sent to
128 the account you registered with, so make sure that your mail forwarder works!)
129 Open it up, click on the appropriate link at the top, and a new browser
130 window will open.</p>
131
132 <p>Currently, the quick reporting just forwards the request to the thorough
133 reporting. Also, it appears that this is for members (non-free) only.
134 Hopefully this will change soon.</p>
135
136 <p><b>Web-based Reporting</b><br>
137 When you press the button on the confirmation page, this will pop open a new
138 browser window and the SpamCop service should appear inside. The message
139 will not be deleted (working on that part), but you won't need to wait for a
140 response email to start the spam reporting.</p>
141
142 <p>The SpamCop service will display information as it finds it, so scroll
143 down until you see a form button. It might pause a little while it is
144 looking up information, so be a little patient. Read what it says, and
145 submit the spam. Close the browser window. Press Cancel or click on the
146 appropriate mail folder to see messages and/or delete the spam.</p>
147
148 <p><b>For more information</b> about SpamCop, it's services, spam in general,
149 and many related topics, try reading through SpamCop's <a
150 href="http://spamcop.net/help.shtml">Help and Feedback</a> section.</p>
151
152 </body></html>