c6ba857caa6d7b41ec92e7b7f2f505d980954700
[privoxy.git] / doc / webserver / actions / index.php
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3  <!--
4
5   File :  $Source: /cvsroot/ijbswa/current/doc/webserver/actions/index.php,v $
6
7   Purpose  :  Submit form for actions file feedback (step 1)
8               This file belongs in
9               ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
10
11   $Id: index.php,v 1.25.2.7 2004/01/30 17:16:44 oes Exp $
12
13   $Log: index.php,v $
14   Revision 1.25.2.7  2004/01/30 17:16:44  oes
15   Require AF 1.8
16
17   Revision 1.25.2.6  2003/11/30 11:39:52  oes
18   Fixed typo
19
20   Revision 1.25.2.5  2003/09/01 15:20:45  oes
21   Require AF 1.7
22
23   Revision 1.25.2.4  2003/03/19 14:00:20  oes
24   Require AF 1.6
25
26   Revision 1.25.2.3  2002/08/27 16:33:39  oes
27   Require AF 1.5 & Privoxy 3.0
28
29   Revision 1.25.2.2  2002/08/06 08:39:09  oes
30   Require AF 1.4; link to new AF download location
31
32   Revision 1.25.2.1  2002/07/27 18:47:49  oes
33   Require Privoxy 2.9.16 and AF 1.3
34
35   Revision 1.25  2002/04/29 17:30:20  oes
36   Fixed BML link text
37
38   Revision 1.24  2002/04/28 16:56:47  swa
39   bookmarklet text
40
41   Revision 1.23  2002/04/13 14:13:19  oes
42   Require exact AF version; Added hint where to go for BRs, FRs and SRs
43
44   Revision 1.22  2002/04/11 10:11:04  oes
45   Actionsfile Version 1.2
46
47   Revision 1.21  2002/04/10 13:51:19  oes
48   Updated to new Bookmarklet
49
50   Revision 1.20  2002/04/10 00:07:35  oes
51   Moved window sizing and positioning code to Bookmarklet
52
53   Revision 1.19  2002/04/09 13:06:29  oes
54   Resize and jump to the right on load
55
56   Revision 1.18  2002/04/08 17:03:29  oes
57    - Fixed problem with spaces in URLs
58    - Adapt to unified stylesheet
59
60   Revision 1.17  2002/04/08 10:32:00  oes
61   cosmetics again
62
63   Revision 1.16  2002/04/08 08:11:04  oes
64   Bumped up actions file number
65
66   Revision 1.15  2002/04/07 17:13:08  oes
67   Ooops: fixing submit target url
68
69   Revision 1.14  2002/04/07 15:10:12  oes
70   Restoring CVS history
71
72   Revision 1.13  2002/04/06 15:19:35  oes
73   Clean-up, smarter handling of unreachable URLs
74
75   Revision 1.12  2002/04/06 11:34:44  oes
76   Cosmetics
77
78   Revision 1.11  2002/04/04 19:48:11  oes
79   Reactivating the scripts ,-)
80
81   Revision 1.10  2002/04/03 19:36:04  swa
82   consistent look
83
84   Revision 1.9  2002/04/02 19:32:45  oes
85   Adding temporary fix for missing curl support on SF (step 2 + 3 on oesterhelt.org)
86
87   Revision 1.8  2002/04/02 08:45:22  oes
88   Made script location indepandant
89
90   Revision 1.7  2002/04/02 07:21:34  oes
91   Using relative link for step2
92
93   Revision 1.6  2002/04/02 06:14:22  oes
94   Fixed bookmarklet
95
96   Revision 1.5  2002/04/01 19:13:47  oes (based on 1.2)
97   Extended, fixed bugs, beefed up design, made IE-safe
98
99   Revision 1.4  2002/03/30 20:44:44  swa
100   have consistent look and feel. part 2.
101   use correct urls.
102
103   Revision 1.3  2002/03/30 19:49:34  swa
104   have consistent look and feel
105
106   Revision 1.2  2002/03/30 03:35:48  oes
107   Updated bookmarklet
108
109   Revision 1.1  2002/03/30 03:20:30  oes
110   Added Feedback mechanism for actions file
111
112
113   Copyright (C) 2002 the SourceForge Privoxy team. 
114   http://www.privoxy.org/
115
116   Written by Andreas Oesterhelt
117
118   This program is free software; you can redistribute it
119   and/or modify it under the terms of the GNU General
120   Public License as published by the Free Software
121   Foundation; either version 2 of the License, or (at
122   your option) any later version.
123
124   This program is distributed in the hope that it will
125   be useful, but WITHOUT ANY WARRANTY; without even the
126   implied warranty of MERCHANTABILITY or FITNESS FOR A
127   PARTICULAR PURPOSE.  See the GNU General Public
128   License for more details.
129
130   The GNU General Public License should be included with
131   this file.  If not, you can view it at
132   http://www.gnu.org/copyleft/gpl.html
133   or write to the Free Software Foundation, Inc., 59
134   Temple Place - Suite 330, Boston, MA  02111-1307, USA.
135
136  -->
137
138  <head>
139   <meta http-equiv="Content-Style-Type" content="text/css">
140   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
141   <meta http-equiv="Content-Script-Type" content="text/javascript">
142   <link rel="stylesheet" type="text/css" href="../privoxy.css">
143   <link rel="stylesheet" type="text/css" href="../p_feedback.css">
144
145 <?php
146
147 /*
148  * Config:
149  */
150 $required_actions_file_version = "1.8";
151 $required_privoxy_version = "3.0";
152 $actions_file_download = "http://sourceforge.net/project/showfiles.php?group_id=11118&release_id=147447";
153 $submit_target = "http://www.oesterhelt.org/actions/step2.php";
154
155
156 /*
157  * Debug:
158  */
159 //phpinfo();
160 //error_reporting(E_ALL);
161 error_reporting(E_NONE);
162
163 /*
164  * Function: error_abort
165  * Purpose:  Return an error page with $title and $message
166  */
167 function error_abort($title, $message)
168 {
169    if ($title == "invalid") /* shortcut */
170    {
171       $title = "Invalid Feedback Submission";
172    }
173
174    echo ("  <title>Privoxy: $title</title>
175            </head>
176            <body>
177             <div class=\"title\">
178              <h1>
179               <a href=\"http://www.privoxy.org/\">Privoxy</a>: $title
180               </h1>
181              </div>
182             <center>
183              <div class=\"warning\">
184               $message
185              </div>
186             </center>
187             <p>Valid <a href=\"http://validator.w3.org/\">HTML 4.01 Transitional</a></p>
188            </body>
189           </html>\n");
190    exit; 
191 }
192
193
194 /*
195  * Bookmarklet that leads here:
196  */
197 $my_address = "http://" . $HTTP_SERVER_VARS["HTTP_HOST"] . $PHP_SELF;
198 $bookmarklet = "javascript:w=Math.floor(screen.width/2);h=Math.floor(screen.height*0.9);void(window.open('$my_address?url='+escape(location.href)," .
199                "'Feedback','screenx='+w+',width='+w+',height='+h+',scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no," .
200                "copyhistory=no').focus());";
201
202 /* 
203  * Provide default if URL unset
204  */
205 if (!isset($url))
206 {
207    $url = "http://www.example.com/";
208 }
209 else
210 {
211    $url = strtr($url, " ", "+");
212 }
213
214 /* 
215  * Deny feedback which is not based on our latest
216  * distribution:
217  */
218 $headers = getallheaders();
219
220 if (!isset($headers["X-Actions-File-Version"]) || $headers["X-Actions-File-Version"] != $required_actions_file_version)
221 {
222
223    error_abort("invalid", "<p><b>Thank you for using <a href=\"http://www.privoxy.org/\" target=\"_blank\">Privoxy</a>'s
224                feedback reporting mechanism!</b> However, in order to make optimal use of our limited development resources,
225                we regret that we can at this time only accept problem reports based on:
226                </p>
227                <ul>
228                 <li><a href=\"http://www.privoxy.org/\" target=\"_blank\">Privoxy</a> version $required_privoxy_version or later</li>
229                 <li><a href=\"$actions_file_download\">Actionsfile</a> version version $required_actions_file_version</li>
230                </ul>
231                <p>We hope you will understand that we feel unable to maintain concurrent versions of the file.</p>
232                <p><i>Hint: To upgrade your actions file, follow the above link to download the file, then save as
233                   default.action in your Privoxy config directory</i>
234                </p>");
235 }
236
237 ?>
238
239   <title>Privoxy Action List Feedback - Step 1 of 2</title>
240  </head>
241
242  <body>
243   <div class="title">
244     <h1>
245       <a href="http://www.privoxy.org" target="_blank">Privoxy</a> Action List Feedback - Step 1 of 2
246     </h1>
247   </div>
248
249   <div class="box">
250    <p>
251     <b>Thank you for reporting a missing or invalid action!</b> 
252    </p>
253
254    <p>
255     The Privoxy team relies on <b>your</b> feedback to maintain an efficient actions file!
256     <br>Please fill the below form and click to proceed to step 2.
257    </p>
258
259    <p>
260     Please keep in mind that this is <b>not</b> the place for
261     <a href="http://sourceforge.net/tracker/?group_id=11118&amp;atid=211118" target="_blank">support requests</a>,
262     <br><a href="http://sourceforge.net/tracker/?group_id=11118&amp;atid=111118" target="_blank">bug reports</a> or
263     <a href="http://sourceforge.net/tracker/?atid=361118&amp;group_id=11118" target="_blank">feature requests</a>.
264    </p>
265
266   </div>
267
268   <div class="box">
269    <form action="<?php echo($submit_target); ?>" method="post">
270
271     <table border="0" cellpadding="0" cellspacing="4">
272
273      <tr>
274       <td align="right">URL:</td>
275       <td>
276        <input name="referrer_url" value="<?php echo($url); ?>" type="text" size="45" maxlength="255">
277       </td>
278      </tr>
279
280      <tr>
281       <td align="right">Nature of the problem:</td>
282       <td>
283        <select name="problem" size="1">
284         <option selected value="INVALID">Please select...</option>
285         <option value="P1">An advertisment was NOT blocked</option>
286         <option value="P2">An innocent image WAS blocked</option>
287         <option value="P3">The whole page was erroneously blocked</option>
288         <option value="P4">The page needs popups but they don't work</option>
289         <option value="P5">Other problem</option>
290        </select>
291       </td>
292      </tr>
293
294      <tr>
295       <td>&nbsp;</td>
296       <td>
297        <input type=submit value="Proceed to step 2">
298       </td>
299      </tr>
300
301     </table>
302    </form>
303   </div>
304
305   <center>
306    <div class="info">
307     <h2>Using <a href="http://www.bookmarklets.com" target="_blank">Bookmarklets</a> for Feedback</h2>
308     <p>
309      To make it even easier for you, we provide a bookmarklet which will not only take you here from
310      any troubled page you might be surfing, but also pre-fill the form!
311     </p>
312     <p>
313      Please right-click the following link and choose "Add to Favorites" (IE) or "Add Bookmark for Link" (Netscape): 
314      <a href="<?php echo($bookmarklet); ?>">Privoxy - Submit Actions File Feedback</a>
315     </p>
316
317     <p>
318      <i>You might get a warning that the bookmark "may not be safe" (IE) - just click OK.
319      For even faster access, you can put it on the "Links" bar (IE) or the "Personal Toolbar" (Netscape),
320      and submit feedback with a single click!</i>
321     </p>
322    </div>
323   </center>
324
325   <p>Valid <a href="http://validator.w3.org/">HTML 4.01 Transitional</a></p>
326
327  </body>
328 </html>