Reactivating the scripts ,-)
[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.10 2002/04/03 19:36:04 swa Exp $
12
13   $Log: index.php,v $
14   Revision 1.10  2002/04/03 19:36:04  swa
15   consistent look
16
17   Revision 1.9  2002/04/02 19:32:45  oes
18   Adding temporary fix for missing curl support on SF (step 2 + 3 on oesterhelt.org)
19
20   Revision 1.8  2002/04/02 08:45:22  oes
21   Made script location indepandant
22
23   Revision 1.7  2002/04/02 07:21:34  oes
24   Using relative link for step2
25
26   Revision 1.5  2002/04/01 19:13:47  oes
27   Extended, fixed bugs, beefed up design, made IE-safe
28
29   Revision 1.2  2002/03/30 03:35:48  oes
30   Updated bookmarklet
31
32   Revision 1.1  2002/03/30 03:20:30  oes
33   Added Feedback mechanism for actions file
34
35
36   Written by and Copyright (C) 2002 the SourceForge
37   Privoxy team. http://www.privoxy.org/
38
39   This program is free software; you can redistribute it
40   and/or modify it under the terms of the GNU General
41   Public License as published by the Free Software
42   Foundation; either version 2 of the License, or (at
43   your option) any later version.
44
45   This program is distributed in the hope that it will
46   be useful, but WITHOUT ANY WARRANTY; without even the
47   implied warranty of MERCHANTABILITY or FITNESS FOR A
48   PARTICULAR PURPOSE.  See the GNU General Public
49   License for more details.
50
51   The GNU General Public License should be included with
52   this file.  If not, you can view it at
53   http://www.gnu.org/copyleft/gpl.html
54   or write to the Free Software Foundation, Inc., 59
55   Temple Place - Suite 330, Boston, MA  02111-1307, USA.
56
57  -->
58
59  <head>
60   <link rel="stylesheet" type="text/css" href="../p_feedback.css">
61 <?php
62
63 /*
64  * MUST be updated in sync with actions file:
65  */
66 $required_actions_file_version = "1.0";
67 $required_privoxy_version = "2.9.13";
68 $actions_file_download = "http://www.privoxy.org/actions/testdrive.action";
69
70
71 /*
72  * For testing: 
73  */
74 //phpinfo();
75 //error_reporting(E_ALL);
76 error_reporting(E_NONE);
77
78
79 /*
80  * Bookmarklet that leads here:
81  */
82 $my_address = "http://" . $HTTP_SERVER_VARS["HTTP_HOST"] . $PHP_SELF;
83 $bookmarklet = "javascript:void(window.open('$my_address?url='+escape(location.href),'Feedback'," .
84                "'width=600,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());";
85
86
87 /* 
88  * Provide default if URL unset
89  */
90 if (!isset($url))
91 {
92    $url = "http://www.example.com/";
93 }
94
95
96 /* 
97  * Deny feedback which is not based on our latest
98  * distribution:
99  */
100 $headers = getallheaders();
101
102 if (!isset($headers["X-Actions-File-Version"]) || $headers["X-Actions-File-Version"] < $required_actions_file_version)
103 {
104    echo ("<title>Invalid Privoxy Action List Feedback</title>
105           </head>
106           <body><div class=\"title\">Invalid Feedback Submission</div>
107            <div align=\"center\">
108             <div class=\"errorbox\" align=\"left\"><p>As much as we welcome your feedback, please note that
109              we can only accept problem reports based on:
110              <ul>
111               <li><a href=\"http://www.privoxy.org/\">Privoxy</a> version $required_privoxy_version or later</li>
112               <li><a href=\"$actions_file_download\">Actionsfile</a> version  version $required_actions_file_version or later</li>
113              </ul>
114              <p>We hope you will understand that we feel unable to maintain concurrent versions of the file.</p>
115             </div>
116            </div>
117           </body>
118          </html>");
119    exit;
120 }
121
122 ?>
123
124   <title>Privoxy Action List Feedback - Step 1 of 2</title>
125  </head>
126
127  <body>
128   <div class="title"><a href="http://www.privoxy.org/" target="_blank">Privoxy</a> Action List Feedback - Step 1 of 2</div>
129
130   <div class="box">
131    <p>
132     <b>Thank you for reporting a missing or invalid action!</b> 
133     <br>The Privoxy team relies on <b>your</b> feedback to maintain an efficient actions file!
134    </p>
135
136    <p>
137     Please fill the below form and click to proceed to step 2.
138    </p>
139   </div>
140
141   <div class="box">
142    <!-- FIXME: This must become action="step2.php" as soon as SF supports curl in PHP -->
143    <form action="http://www.oesterhelt.org/actions/step2.php" method="post">
144
145     <table border="0" cellpadding="0" cellspacing="4">
146
147      <tr>
148       <td align="right">URL:</td>
149       <td>
150        <input name="referrer_url" value="<?php echo ($url); ?>" type="text" size="45" maxlength="255">
151       </td>
152      </tr>
153
154      <tr>
155       <td align="right">Nature of the problem:</td>
156       <td>
157        <select name="problem" size="1">
158         <option selected value="INVALID">Please select...</option>
159         <option value="P1">An advertisment was NOT blocked</option>
160         <option value="P2">An innocent image WAS blocked</option>
161         <option value="P3">The whole page was erraneously blocked</option>
162         <option value="P4">The page needs popups but they don't work</option>
163         <option value="P5">Other problem</option>
164        </select>
165       </td>
166      </tr>
167
168      <tr>
169       <td>&nbsp;</td>
170       <td>
171        <input type=submit value="Proceed to step 2">
172       </td>
173      </tr>
174
175     </table>
176    </form>
177   </div>
178
179   <div align=center>
180    <div class="infobox" width="60%" align=\"left\">
181     <p>
182      <big>
183       <b>Using <a href="http://www.bookmarklets.com" target="_blank">Bookmarklets</a> for Feedback</b>
184      </big>
185     </p>
186     <p>
187      To make it even easier for you, we provide a bookmarklet which will not only take you here from
188      any troubled page you might be surfing, but also pre-fill the form!
189     </p>
190     <p>
191      Please right-click the following link and choose "Add to Favorites" (IE) or "Add Bookmark for Link" (Netscape): 
192      <a href="<?php echo($bookmarklet); ?>">Privoxy-Submit</a>
193     </p>
194
195     <p>
196      <i>You might get a warning that the bookmark "may not be safe" (IE) - just click OK.
197      For even faster access, you can put it on the "Links" bar (IE) or the "Personal Toolbar" (Netscape),
198      and submit feedback with a single click!</i>
199     </p>
200    </div>
201   </div>
202
203  </body>
204 </html>