1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
5 File : $Source: /cvsroot/ijbswa/current/doc/webserver/actions/step3.php,v $
7 Purpose : Submit form for actions file feedback (step 1)
9 ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
11 $Id: step3.php,v 1.10 2002/04/06 15:19:35 oes Exp $
14 Revision 1.10 2002/04/06 15:19:35 oes
15 Clean-up, smarter handling of unreachable URLs
17 Revision 1.5 2002/04/02 07:22:43 oes
20 Revision 1.4 2002/04/01 19:13:47 oes
21 Extended, fixed bugs, beefed up design, made IE-safe
23 Revision 1.1 2002/03/30 03:20:30 oes
24 Added Feedback mechanism for actions file
27 Written by and Copyright (C) 2002 the SourceForge
28 Privoxy team. http://www.privoxy.org/
30 This program is free software; you can redistribute it
31 and/or modify it under the terms of the GNU General
32 Public License as published by the Free Software
33 Foundation; either version 2 of the License, or (at
34 your option) any later version.
36 This program is distributed in the hope that it will
37 be useful, but WITHOUT ANY WARRANTY; without even the
38 implied warranty of MERCHANTABILITY or FITNESS FOR A
39 PARTICULAR PURPOSE. See the GNU General Public
40 License for more details.
42 The GNU General Public License should be included with
43 this file. If not, you can view it at
44 http://www.gnu.org/copyleft/gpl.html
45 or write to the Free Software Foundation, Inc., 59
46 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
51 <meta http-equiv="Content-Style-Type" content="text/css">
52 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
53 <link rel="stylesheet" type="text/css" href="../p_feedback.css">
61 $logfile = "results/actions-feedback.txt";
68 //error_reporting(E_ALL);
69 error_reporting(E_NONE);
72 * Function: error_abort
73 * Purpose: Return an error page with $title and $message
75 function error_abort($title, $message)
77 if ($title == "invalid") /* shortcut */
79 $title = "Invalid Feedback Submission";
82 echo (" <title>Privoxy: $title</title>
87 <a href=\"http://www.privoxy.org/\">Privoxy</a>: $title
91 <div class=\"errorbox\">
95 <p>Valid <a href=\"http://validator.w3.org/\">HTML 4.01 Transitional</a></p>
103 * Cannot start with step 3:
105 if (!isset($referrer_url))
107 error_abort("invalid", "When submitting your feedback please start with <a href=\"index.php\">step 1</a>.");
112 * Cannot work on unknown problem:
114 if (!isset($problem))
116 error_abort("invalid", "You need to select the nature of the problem in <a href=\"index.php\">step 1</a>.");
121 * Don't accept unconfirmed URLs
123 if (!isset($url_confirmed))
125 error_abort("invalid", "When submitting URLs that this script can't retrieve, you need to check \"Yes, I'm sure\"
126 <a href=\"javascript:history.back();\">step 2</a>.");
131 * Handle optional text fields:
133 if (!isset($name) || ($name == ""))
140 * Open the logfile or fail:
142 $fp = fopen($logfile, "a");
146 echo (" <title>Internal Script Error</title>
149 <div class=\"title\">
150 <h1><a href=\"http://www.privoxy.org/\">Privoxy</a>: Internal Script Error</h1>
153 <div class=\"errorbox\">
155 This script was unable to open its logfile.
158 Please <a href=\"mailto:info@privoxy.org?SUBJECT=Feedback-Script-Broken\">mail its owner</a>!
169 * Write Head (type, severity, user, client-ip)
172 fwrite($fp, "\n#FEEDBACK TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR VERIFIED $url_verified TIME " . date("r") ."\n");
175 $lines = explode("\n", $remarks);
176 foreach ($lines as $line)
178 fwrite($fp, "#REMARKS: $line\n");
184 * Depending on the type of problem reported,
185 * we need to write additional data:
190 * Banner not blocked:
193 fwrite($fp, "#BLOCK-REFERRER: $referrer_url\n");
194 if (isset($num_images))
196 for($i=0; $i < $num_images; $i++)
198 if (isset($block_image[$i]))
200 fwrite($fp, "#BLOCK-URL: $image_url[$i]\n");
204 if (isset($manual_image_url) && ($manual_image_url != ""))
206 fwrite($fp, "#BLOCK-URL: $manual_image_url\n");
211 * Innocent image blocked:
214 fwrite($fp, "#UNBLOCK-REFERRER: $referrer_url\n");
215 if (isset($image_url) && ($image_url != ""))
217 fwrite($fp, "#UNBLOCK-URL: $image_url\n");
222 * All other problems:
225 fwrite($fp, "#PROBLEM-URL: $referrer_url\n");
231 // now fill the tracker on sf with all the necessary values:
233 // <FORM ACTION="/tracker/index.php?group_id=11118&atid=460288" METHOD="POST" enctype="multipart/form-data">
234 // <INPUT TYPE="HIDDEN" NAME="func" VALUE="postadd">
236 // <SELECT NAME="category_id">
237 // <OPTION VALUE="100">None</OPTION>
238 // <OPTION VALUE="412811">filter: ad-incorrectly-blocked</OPTION>
239 // <OPTION VALUE="412810">filter: ad-not-blocked</OPTION>
240 // <OPTION VALUE="412814">filter: other problem</OPTION>
241 // <OPTION VALUE="412812">filter: page-incorrectly-block</OPTION>
242 // <OPTION VALUE="412813">filter: popups-incorrectly blo</OPTION>
244 // <SELECT NAME="artifact_group_id">
245 // <OPTION VALUE="100">None</OPTION>
246 // <OPTION VALUE="195870">action file version 1.0</OPTION>
247 // <OPTION VALUE="195871">action file version 1.1</OPTION>
248 // <OPTION VALUE="195872">action file version 1.2</OPTION>
249 // <OPTION VALUE="195873">action file version 1.3</OPTION>
250 // <OPTION VALUE="195874">action file version 1.4</OPTION>
251 // <OPTION VALUE="195875">action file version 1.5</OPTION>
252 // <OPTION VALUE="195876">action file version 1.6</OPTION>
253 // <OPTION VALUE="195877">action file version 1.7</OPTION>
254 // <OPTION VALUE="195878">action file version 1.8</OPTION>
255 // <OPTION VALUE="195879">action file version 1.9</OPTION>
256 // <OPTION VALUE="195880">action file version 2.0</OPTION>
258 // <SELECT NAME="assigned_to">
259 // <OPTION VALUE="100">None</OPTION>
260 // <OPTION VALUE="128588">bart1803</OPTION>
261 // <OPTION VALUE="249980">david__schmidt</OPTION>
262 // <OPTION VALUE="79346">gliptak</OPTION>
263 // <OPTION VALUE="322640">hal9</OPTION>
264 // <OPTION VALUE="108873">joergs</OPTION>
265 // <OPTION VALUE="199289">jongfoster</OPTION>
266 // <OPTION VALUE="10857">morcego</OPTION>
267 // <OPTION VALUE="78811">oes</OPTION>
268 // <OPTION VALUE="43129">roro</OPTION>
269 // <OPTION VALUE="249832">steudten</OPTION>
270 // <OPTION VALUE="74317">swa</OPTION>
272 // <SELECT NAME="priority">
273 // <OPTION VALUE="1">1 - Lowest</OPTION>
274 // <OPTION VALUE="2">2</OPTION>
275 // <OPTION VALUE="3">3</OPTION>
276 // <OPTION VALUE="4">4</OPTION>
277 // <OPTION VALUE="5" SELECTED>5 - Medium</OPTION>
278 // <OPTION VALUE="6">6</OPTION>
279 // <OPTION VALUE="7">7</OPTION>
280 // <OPTION VALUE="8">8</OPTION>
281 // <OPTION VALUE="9">9 - Highest</OPTION>
284 // we can either put everything in here (nicely formatted) ..
285 // <TEXTAREA NAME="details" ROWS="30" COLS="55" WRAP="HARD"></TEXTAREA>
287 // ... or attach a file (with the html header so it gets displayed
288 // as if it is a html file
289 // <input type="checkbox" name="add_file" VALUE="1">
290 // <input type="file" name="input_file" size="30">
291 // <input type="text" name="file_description" size="40" maxlength="255">
293 // <INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="SUBMIT">
297 <title>Privoxy Action List Feedback - Result</title>
303 <a href="http://www.privoxy.org" target="_blank">Privoxy</a> Action List Feedback - Result
309 <b>Thank you very much for taking the time to submit your feedback!</b>
313 It will be reviewed by the developers and used to improve the
314 distribution actions file.
318 <input type="submit" value="Close this window" onclick="window.close();">
323 <p>Valid <a href="http://validator.w3.org/">HTML 4.01 Transitional</a></p>