have consistent look and feel. part 2.
[privoxy.git] / doc / webserver / actions / index.php
1 <?php
2
3 error_reporting(E_NONE);
4 #error_reporting(E_ALL);
5
6 //  File :  $Source: /cvsroot/ijbswa/current/doc/webserver/actions/index.php,v $
7 //
8 //  Purpose  :  Submit form for actions file feedback (step 1)
9 //              This file belongs in
10 //              ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
11 //
12 //  $Id: index.php,v 1.3 2002/03/30 19:49:34 swa Exp $
13 //
14 //  $Log: index.php,v $
15 //  Revision 1.3  2002/03/30 19:49:34  swa
16 //  have consistent look and feel
17 //
18 //  Revision 1.2  2002/03/30 03:35:48  oes
19 //  Updated bookmarklet
20 //
21 //  Revision 1.1  2002/03/30 03:20:30  oes
22 //  Added Feedback mechanism for actions file
23 //
24 //
25 //  Written by and Copyright (C) 2001 the SourceForge
26 //  Privoxy team. http://www.privoxy.org/
27 //
28 //  Based on the Internet Junkbuster originally written
29 //  by and Copyright (C) 1997 Anonymous Coders and
30 //  Junkbusters Corporation.  http://www.junkbusters.com
31 //
32 //  This program is free software; you can redistribute it
33 //  and/or modify it under the terms of the GNU General
34 //  Public License as published by the Free Software
35 //  Foundation; either version 2 of the License, or (at
36 //  your option) any later version.
37 //
38 //  This program is distributed in the hope that it will
39 //  be useful, but WITHOUT ANY WARRANTY; without even the
40 //  implied warranty of MERCHANTABILITY or FITNESS FOR A
41 //  PARTICULAR PURPOSE.  See the GNU General Public
42 //  License for more details.
43 //
44 //  The GNU General Public License should be included with
45 //  this file.  If not, you can view it at
46 //  http://www.gnu.org/copyleft/gpl.html
47 //  or write to the Free Software Foundation, Inc., 59
48 //  Temple Place - Suite 330, Boston, MA  02111-1307, USA.
49 //
50 //
51
52 /*
53  * MUST be updated in sync with actions file:
54  */
55 $current_actions_file_version = "1.0";
56
57 /*
58  * For testing: 
59  */
60 #$base_url = "http://www.oesterhelt.org/actions";
61 $base_url = "http://www.privoxy.org/actions";
62 #$base_url = "http://localhost/actions";
63
64
65 /* 
66  * Provide default if unset
67  */
68 if (!isset($url))
69 {
70    $url = "http://www.example.com/";
71 }
72
73 /* 
74  * Deny feedback which is not based on our latest
75  * distribution:
76  */
77 $headers = getallheaders();
78
79 if (!isset($headers["X-Actions-File-Version"]) || $headers["X-Actions-File-Version"] < $current_actions_file_version)
80 {
81    echo ("<html><head><title>Invalid Privoxy Action List Feedback</title>
82             <link rel=\"stylesheet\" type=\"text/css\" href=\"../p_web.css\">
83                 </head><body><h2>Invalid Feedback Submission</h2>
84                       <p>You are either not using Privoxy at all, or using an
85                          actions file which is not based on the recent
86                          distribution actions file (version $current_actions_file_version).</p>
87                       <p>As much as we welcome your feedback, we are unable to process
88                          input for the actions file if not based on our distribution. Sorry.</p>
89                       <p>You can <a href=\"http://www.privoxy.org/\">download the latest version of
90                          Privoxy here.</a></p>
91                  </body>
92           </html>");
93    exit;
94 }
95
96 ?>
97
98 <html>
99   <head>
100     <title>Privoxy Action List Feedback - Step 1 of 2</title>
101     <link rel="stylesheet" type="text/css" href="../p_web.css">
102 </head>
103
104 <h2><a href="http://www.privoxy.org" target="_blank">Privoxy</a> Action List Feedback - Step 1 of 2</h2>
105
106 <p>
107 <b>Thank you for reporting a missing or invalid action!</b>
108 </p>
109 <p>
110 Please fill the below form and click to
111 proceed to Step 2.
112 </p>
113
114 <form action="<?php echo($base_url); ?>/step2.php" method="post">
115
116 <table border="0" cellpadding="0" cellspacing="4">
117
118 <tr>
119 <td align="right">URL:</td>
120 <td>
121 <input name="referrer_url" value="<?php echo ($url); ?>" type="text" size="45" maxlength="255">
122 </td>
123 </tr>
124
125 <tr>
126 <td align="right">Nature of the problem:</td>
127 <td>
128 <select name="problem" size="1">
129 <option selected value="INVALID">Please select...</option>
130 <option value="P1">An advertisment was NOT blocked</option>
131 <option value="P2">An innocent image WAS blocked</option>
132 <option value="P3">The whole page was erraneously blocked</option>
133 <option value="P4">The page needs popups but they don't work</option>
134 <option value="P5">Other problem</option>
135 </select>
136 </td>
137 </tr>
138
139 <tr>
140 <td align="right"></td>
141 <td>
142 <input type=submit value="Proceed to step 2">
143 </td>
144 <td></td>
145 </tr>
146
147 </table>
148 </form>
149 </p>
150
151 <p> 
152 This special page helps the Privoxy team to improve the filters. Once
153 you have bookmarked the page, surf to a troubled page and click on the
154 bookmark, which will take you here and pre-fill the URL field.</p>
155
156 <p>Use the following link as a bookmark:
157 <a href="javascript:void(window.open('http://privoxy.org/actions/?url='+escape(location.href),'Feedback','width=600,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy-Submit</a>.
158
159 Right-click the link and choose "Add to Favorites" (IE) or "Add Bookmark" (Netscape). You will get a warning that the bookmark "may not be safe" - just click OK.  For even faster access, you can put them on the "Links" bar (IE) or the "Personal Toolbar" (Netscape), and submit feedback with a single click.
160 </p>
161
162 </body>
163 </html>