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 <style type="text/css">
49 body, div, p, h1, h2, ul, ol, li, td, th, dl, dt, dd { font-family:helvetica,helv,arial,sans-serif; font-size:10px }
50 body { background-color: #ffffff }
51 div.title { background-color:#dddddd; border:solid black 1px; margin:20px; min-width: 80%; padding:20px; font-size:15px; font-weight:bold }
52 div.box { background-color:#eeeeee; border:solid black 1px; margin:20px; min-width: 80%; padding:20px; font-size:10px }
53 div.infobox { background-color:#ccccff; border:solid black 1px; margin:20px; min-width: 60%; max-width: 60%; padding:20px; font-size:10px; }
54 div.errorbox { background-color:#ffdddd; border:solid black 1px; margin:20px; min-width: 60%; max-width: 60%; padding:20px; font-size:10px; }
63 //error_reporting(E_ALL);
64 error_reporting(E_NONE);
69 * Cannot start with step 3:
71 if (!isset($referrer_url))
73 echo (" <title>Invalid Feedback Submission</title>
76 <div class=\"title\">Invalid Feedback Submission</div>
77 <div align=\"center\">
78 <div class=\"errorbox\" align=\"left\">
79 When submitting your feedback please start with <a href=\"index.php\">step 1</a>.
89 * Cannot work on unknown problem:
93 echo (" <title>Invalid Feedback Submission</title>
96 <div class=\"title\">Invalid Feedback Submission</div>
97 <div align=\"center\">
98 <div class=\"errorbox\" align=\"left\">
99 You need to select the nature of the problem in <a href=\"index.php\">step 1</a>.
109 * Handle optional text fields:
111 if (!isset($name) || ($name == ""))
118 * Open the logfile or fail:
120 $logfile = "feedback-data.txt";
121 $fp = fopen($logfile, "a");
125 echo (" <title>Internal Script Error</title>
128 <div class=\"title\">Internal Script Error</div>
129 <div align=\"center\">
130 <div class=\"errorbox\" align=\"left\">
132 This script was unable to open its logfile.
135 Please <a href=\"mailto:info@privoxy.org?SUBJECT=Feedback-Script-Broken\">mail its owner</a>!
146 * Write Head (type, severity, user, client-ip)
149 fwrite($fp, "\n#FEEDBACK TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR\n");
152 $lines = explode("\n", $remarks);
153 foreach ($lines as $line)
155 fwrite($fp, "#REMARKS: $line\n");
161 * Depending on the type of problem reported,
162 * we need to write additional data:
167 * Banner not blocked:
170 fwrite($fp, "#BLOCK-REFERRER: $referrer_url\n");
171 if (isset($num_images))
173 for($i=0; $i < $num_images; $i++)
175 if (isset($block_image[$i]))
177 fwrite($fp, "#BLOCK-URL: $image_url[$i]\n");
181 if (isset($manual_image_url) && ($manual_image_url != ""))
183 fwrite($fp, "#BLOCK-URL: $manual_image_url\n");
188 * Innocent image blocked:
191 fwrite($fp, "#UNBLOCK-REFERRER: $referrer_url\n");
192 if (isset($image_url) && ($image_url != ""))
194 fwrite($fp, "#UNBLOCK-URL: $image_url\n");
199 * All other problems:
202 fwrite($fp, "#PROBLEM-URL: $referrer_url\n");
210 <title>Privoxy Action List Feedback - Result</title>
215 <a href="http://www.privoxy.org" target="_blank">Privoxy</a> Action List Feedback - Result
220 <b>Thank you very much for taking the time to submit your feedback!</b>
224 It will be reviewed by the developers and used to improve the
225 distribution actions file.
229 <input type="submit" value="Close this window" onclick="window.close();">