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.1 2002/03/30 03:20:30 oes Exp $
14 Revision 1.1 2002/03/30 03:20:30 oes
15 Added Feedback mechanism for actions file
18 Written by and Copyright (C) 2002 the SourceForge
19 Privoxy team. http://www.privoxy.org/
21 This program is free software; you can redistribute it
22 and/or modify it under the terms of the GNU General
23 Public License as published by the Free Software
24 Foundation; either version 2 of the License, or (at
25 your option) any later version.
27 This program is distributed in the hope that it will
28 be useful, but WITHOUT ANY WARRANTY; without even the
29 implied warranty of MERCHANTABILITY or FITNESS FOR A
30 PARTICULAR PURPOSE. See the GNU General Public
31 License for more details.
33 The GNU General Public License should be included with
34 this file. If not, you can view it at
35 http://www.gnu.org/copyleft/gpl.html
36 or write to the Free Software Foundation, Inc., 59
37 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
42 <style type="text/css">
43 body, div, p, h1, h2, ul, ol, li, td, th, dl, dt, dd { font-family:helvetica,helv,arial,sans-serif; font-size:10px }
44 body { background-color: #ffffff }
45 div.title { background-color:#dddddd; border:solid black 1px; margin:20px; min-width: 80%; padding:20px; font-size:15px; font-weight:bold }
46 div.box { background-color:#eeeeee; border:solid black 1px; margin:20px; min-width: 80%; padding:20px; font-size:10px }
47 div.infobox { background-color:#ccccff; border:solid black 1px; margin:20px; min-width: 60%; max-width: 60%; padding:20px; font-size:10px; }
48 div.errorbox { background-color:#ffdddd; border:solid black 1px; margin:20px; min-width: 60%; max-width: 60%; padding:20px; font-size:10px; }
56 error_reporting(E_NONE);
57 //error_reporting(E_ALL);
62 * Cannot start with step 3:
64 if (!isset($referrer_url))
66 echo (" <title>Invalid Feedback Submission</title>
69 <div class=\"title\">Invalid Feedback Submission</div>
70 <div align=\"center\">
71 <div class=\"errorbox\" align=\"left\">
72 When submitting your feedback please start with <a href=\"index.php\">step 1</a>.
82 * Cannot work on unknown problem:
86 echo (" <title>Invalid Feedback Submission</title>
89 <div class=\"title\">Invalid Feedback Submission</div>
90 <div align=\"center\">
91 <div class=\"errorbox\" align=\"left\">
92 You need to select the nature of the problem in <a href=\"index.php\">step 1</a>.
102 * Handle optional text fields:
104 if (!isset($name) || ($name == ""))
111 * Open the logfile or fail:
113 $logfile = "feedback-data.txt";
114 $fp = fopen($logfile, "a");
118 echo (" <title>Internal Script Error</title>
121 <div class=\"title\">Internal Script Error</div>
122 <div align=\"center\">
123 <div class=\"errorbox\" align=\"left\">
125 This script was unable to open its logfile.
128 Please <a href=\"mailto:info@privoxy.org?SUBJECT=Feedback-Script-Broken\">mail its owner</a>!
139 * Write Head (type, severity, user, client-ip)
142 fwrite($fp, "\n#FEEDBACK TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR\n");
145 $lines = explode("\n", $remarks);
146 foreach ($lines as $line)
148 fwrite($fp, "#REMARKS: $line\n");
154 * Depending on the type of problem reported,
155 * we need to write additional data:
160 * Banner not blocked:
163 fwrite($fp, "#BLOCK-REFERRER: $referrer_url\n");
164 if (isset($num_images))
166 for($i=0; $i < $num_images; $i++)
168 if (isset($block_image[$i]))
170 fwrite($fp, "#BLOCK-URL: $image_url[$i]\n");
174 if (isset($manual_image_url) && ($manual_image_url != ""))
176 fwrite($fp, "#BLOCK-URL: $manual_image_url\n");
181 * Innocent image blocked:
184 fwrite($fp, "#UNBLOCK-REFERRER: $referrer_url\n");
185 if (isset($image_url) && ($image_url != ""))
187 fwrite($fp, "#UNBLOCK-URL: $image_url\n");
192 * All other problems:
195 fwrite($fp, "#PROBLEM-URL: $referrer_url\n");
203 <title>Privoxy Action List Feedback - Result</title>
208 <a href="http://www.privoxy.org" target="_blank">Privoxy</a> Action List Feedback - Result
213 <b>Thank you very much for taking the time to submit your feedback!</b>
217 It will be reviewed by the developers and used to improve the
218 distribution actions file.
222 <input type="submit" value="Close this window" onclick="window.close();">