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.4 2002/04/01 19:13:47 oes Exp $
14 Revision 1.4 2002/04/01 19:13:47 oes
15 Extended, fixed bugs, beefed up design, made IE-safe
17 Revision 1.1 2002/03/30 03:20:30 oes
18 Added Feedback mechanism for actions file
21 Written by and Copyright (C) 2002 the SourceForge
22 Privoxy team. http://www.privoxy.org/
24 This program is free software; you can redistribute it
25 and/or modify it under the terms of the GNU General
26 Public License as published by the Free Software
27 Foundation; either version 2 of the License, or (at
28 your option) any later version.
30 This program is distributed in the hope that it will
31 be useful, but WITHOUT ANY WARRANTY; without even the
32 implied warranty of MERCHANTABILITY or FITNESS FOR A
33 PARTICULAR PURPOSE. See the GNU General Public
34 License for more details.
36 The GNU General Public License should be included with
37 this file. If not, you can view it at
38 http://www.gnu.org/copyleft/gpl.html
39 or write to the Free Software Foundation, Inc., 59
40 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
45 <style type="text/css">
46 body, div, p, h1, h2, ul, ol, li, td, th, dl, dt, dd { font-family:helvetica,helv,arial,sans-serif; font-size:10px }
47 body { background-color: #ffffff }
48 div.title { background-color:#dddddd; border:solid black 1px; margin:20px; min-width: 80%; padding:20px; font-size:15px; font-weight:bold }
49 div.box { background-color:#eeeeee; border:solid black 1px; margin:20px; min-width: 80%; padding:20px; font-size:10px }
50 div.infobox { background-color:#ccccff; border:solid black 1px; margin:20px; min-width: 60%; max-width: 60%; padding:20px; font-size:10px; }
51 div.errorbox { background-color:#ffdddd; border:solid black 1px; margin:20px; min-width: 60%; max-width: 60%; padding:20px; font-size:10px; }
60 //error_reporting(E_ALL);
61 error_reporting(E_NONE);
66 * Cannot start with step 3:
68 if (!isset($referrer_url))
70 echo (" <title>Invalid Feedback Submission</title>
73 <div class=\"title\">Invalid Feedback Submission</div>
74 <div align=\"center\">
75 <div class=\"errorbox\" align=\"left\">
76 When submitting your feedback please start with <a href=\"index.php\">step 1</a>.
86 * Cannot work on unknown problem:
90 echo (" <title>Invalid Feedback Submission</title>
93 <div class=\"title\">Invalid Feedback Submission</div>
94 <div align=\"center\">
95 <div class=\"errorbox\" align=\"left\">
96 You need to select the nature of the problem in <a href=\"index.php\">step 1</a>.
106 * Handle optional text fields:
108 if (!isset($name) || ($name == ""))
115 * Open the logfile or fail:
117 $logfile = "feedback-data.txt";
118 $fp = fopen($logfile, "a");
122 echo (" <title>Internal Script Error</title>
125 <div class=\"title\">Internal Script Error</div>
126 <div align=\"center\">
127 <div class=\"errorbox\" align=\"left\">
129 This script was unable to open its logfile.
132 Please <a href=\"mailto:info@privoxy.org?SUBJECT=Feedback-Script-Broken\">mail its owner</a>!
143 * Write Head (type, severity, user, client-ip)
146 fwrite($fp, "\n#FEEDBACK TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR\n");
149 $lines = explode("\n", $remarks);
150 foreach ($lines as $line)
152 fwrite($fp, "#REMARKS: $line\n");
158 * Depending on the type of problem reported,
159 * we need to write additional data:
164 * Banner not blocked:
167 fwrite($fp, "#BLOCK-REFERRER: $referrer_url\n");
168 if (isset($num_images))
170 for($i=0; $i < $num_images; $i++)
172 if (isset($block_image[$i]))
174 fwrite($fp, "#BLOCK-URL: $image_url[$i]\n");
178 if (isset($manual_image_url) && ($manual_image_url != ""))
180 fwrite($fp, "#BLOCK-URL: $manual_image_url\n");
185 * Innocent image blocked:
188 fwrite($fp, "#UNBLOCK-REFERRER: $referrer_url\n");
189 if (isset($image_url) && ($image_url != ""))
191 fwrite($fp, "#UNBLOCK-URL: $image_url\n");
196 * All other problems:
199 fwrite($fp, "#PROBLEM-URL: $referrer_url\n");
207 <title>Privoxy Action List Feedback - Result</title>
212 <a href="http://www.privoxy.org" target="_blank">Privoxy</a> Action List Feedback - Result
217 <b>Thank you very much for taking the time to submit your feedback!</b>
221 It will be reviewed by the developers and used to improve the
222 distribution actions file.
226 <input type="submit" value="Close this window" onclick="window.close();">