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