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