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