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