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.5 2002/04/02 07:22:43 oes Exp $
14 Revision 1.5 2002/04/02 07:22:43 oes
17 Revision 1.4 2002/04/01 19:13:47 oes
18 Extended, fixed bugs, beefed up design, made IE-safe
20 Revision 1.1 2002/03/30 03:20:30 oes
21 Added Feedback mechanism for actions file
24 Written by and Copyright (C) 2002 the SourceForge
25 Privoxy team. http://www.privoxy.org/
27 This program is free software; you can redistribute it
28 and/or modify it under the terms of the GNU General
29 Public License as published by the Free Software
30 Foundation; either version 2 of the License, or (at
31 your option) any later version.
33 This program is distributed in the hope that it will
34 be useful, but WITHOUT ANY WARRANTY; without even the
35 implied warranty of MERCHANTABILITY or FITNESS FOR A
36 PARTICULAR PURPOSE. See the GNU General Public
37 License for more details.
39 The GNU General Public License should be included with
40 this file. If not, you can view it at
41 http://www.gnu.org/copyleft/gpl.html
42 or write to the Free Software Foundation, Inc., 59
43 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
48 <meta http-equiv="Content-Style-Type" content="text/css">
49 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
50 <link rel="stylesheet" type="text/css" href="../p_feedback.css">
58 $logfile = "results/actions-feedback.txt";
65 //error_reporting(E_ALL);
66 error_reporting(E_NONE);
69 * Function: error_abort
70 * Purpose: Return an error page with $title and $message
72 function error_abort($title, $message)
74 if ($title == "invalid") /* shortcut */
76 $title = "Invalid Feedback Submission";
79 echo (" <title>Privoxy: $title</title>
84 <a href=\"http://www.privoxy.org/\">Privoxy</a>: $title
88 <div class=\"errorbox\">
92 <p>Valid <a href=\"http://validator.w3.org/\">HTML 4.01 Transitional</a></p>
100 * Cannot start with step 3:
102 if (!isset($referrer_url))
104 error_abort("invalid", "When submitting your feedback please start with <a href=\"index.php\">step 1</a>.");
109 * Cannot work on unknown problem:
111 if (!isset($problem))
113 error_abort("invalid", "You need to select the nature of the problem in <a href=\"index.php\">step 1</a>.");
118 * Don't accept unconfirmed URLs
120 if (!isset($url_confirmed))
122 error_abort("invalid", "When submitting URLs that this script can't retrieve, you need to check \"Yes, I'm sure\"
123 <a href=\"javascript:history.back();\">step 2</a>.");
128 * Handle optional text fields:
130 if (!isset($name) || ($name == ""))
137 * Open the logfile or fail:
139 $fp = fopen($logfile, "a");
143 echo (" <title>Internal Script Error</title>
146 <div class=\"title\">
147 <h1><a href=\"http://www.privoxy.org/\">Privoxy</a>: Internal Script Error</h1>
150 <div class=\"errorbox\">
152 This script was unable to open its logfile.
155 Please <a href=\"mailto:info@privoxy.org?SUBJECT=Feedback-Script-Broken\">mail its owner</a>!
166 * Write Head (type, severity, user, client-ip)
169 fwrite($fp, "\n#FEEDBACK TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR VERIFIED $url_verified TIME " . date("r") ."\n");
172 $lines = explode("\n", $remarks);
173 foreach ($lines as $line)
175 fwrite($fp, "#REMARKS: $line\n");
181 * Depending on the type of problem reported,
182 * we need to write additional data:
187 * Banner not blocked:
190 fwrite($fp, "#BLOCK-REFERRER: $referrer_url\n");
191 if (isset($num_images))
193 for($i=0; $i < $num_images; $i++)
195 if (isset($block_image[$i]))
197 fwrite($fp, "#BLOCK-URL: $image_url[$i]\n");
201 if (isset($manual_image_url) && ($manual_image_url != ""))
203 fwrite($fp, "#BLOCK-URL: $manual_image_url\n");
208 * Innocent image blocked:
211 fwrite($fp, "#UNBLOCK-REFERRER: $referrer_url\n");
212 if (isset($image_url) && ($image_url != ""))
214 fwrite($fp, "#UNBLOCK-URL: $image_url\n");
219 * All other problems:
222 fwrite($fp, "#PROBLEM-URL: $referrer_url\n");
230 <title>Privoxy Action List Feedback - Result</title>
236 <a href="http://www.privoxy.org" target="_blank">Privoxy</a> Action List Feedback - Result
242 <b>Thank you very much for taking the time to submit your feedback!</b>
246 It will be reviewed by the developers and used to improve the
247 distribution actions file.
251 <input type="submit" value="Close this window" onclick="window.close();">
256 <p>Valid <a href="http://validator.w3.org/">HTML 4.01 Transitional</a></p>