3 error_reporting(E_NONE);
4 #error_reporting(E_ALL);
6 // File : $Source: /cvsroot/ijbswa/current/doc/webserver/actions/step3.php,v $
8 // Purpose : Submit form for actions file feedback (step 1)
9 // This file belongs in
10 // ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
12 // $Id: step3.php,v 1.1 2002/03/30 03:20:30 oes Exp $
14 // $Log: step3.php,v $
15 // Revision 1.1 2002/03/30 03:20:30 oes
16 // Added Feedback mechanism for actions file
19 // Written by and Copyright (C) 2001 the SourceForge
20 // Privoxy team. http://www.privoxy.org/
22 // Based on the Internet Junkbuster originally written
23 // by and Copyright (C) 1997 Anonymous Coders and
24 // Junkbusters Corporation. http://www.junkbusters.com
26 // This program is free software; you can redistribute it
27 // and/or modify it under the terms of the GNU General
28 // Public License as published by the Free Software
29 // Foundation; either version 2 of the License, or (at
30 // your option) any later version.
32 // This program is distributed in the hope that it will
33 // be useful, but WITHOUT ANY WARRANTY; without even the
34 // implied warranty of MERCHANTABILITY or FITNESS FOR A
35 // PARTICULAR PURPOSE. See the GNU General Public
36 // License for more details.
38 // The GNU General Public License should be included with
39 // this file. If not, you can view it at
40 // http://www.gnu.org/copyleft/gpl.html
41 // or write to the Free Software Foundation, Inc., 59
42 // Temple Place - Suite 330, Boston, MA 02111-1307, USA.
47 * Cannot start with step 3:
49 if (!isset($referrer_url))
51 echo ("<html><head><title>Invalid Feedback Submission</title>
52 <link rel=\"stylesheet\" type=\"text/css\" href=\"../p_web.css\">
54 <body><h2>Invalid Feedback Submission</h2>
55 <p>When submitting your feedback please start with
56 <a href=\"test.php\">step 1</a>.</p>
63 * Cannot work on unknown problem:
67 echo ("<html><head><title>Invalid Feedback Submission</title>
68 <link rel=\"stylesheet\" type=\"text/css\" href=\"../p_web.css\">
70 <body><h2>Invalid Feedback Submission</h2>
71 <p>You need to select the nature of the problem in
72 <a href=\"test.php\">step 1</a>.</p>
79 * Handle optional text fields:
89 $logfile = "feedback-data.txt";
90 $fp = fopen($logfile, "a");
94 echo ("<html><head><title>Internal Script Error</title>
95 <link rel=\"stylesheet\" type=\"text/css\" href=\"../p_web.css\">
97 <body><h2>Internal Script Error</h2>
98 <p>This script was unable to open its logfile.</p>
99 <p>Please <a href=\"mailto:info@privoxy.org?SUBJECT=Feedback-Script-Broken\">mail its owner</a>!</p>
106 * Write Head and remarks field:
108 fwrite($fp, "#FEEDBACK TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR\n");
111 $lines = explode("\n", $remarks);
112 foreach ($lines as $line)
114 fwrite($fp, "#REMARKS: $line\n");
119 * Depending on the type of problem reported,
120 * we need to write additional data:
125 fwrite($fp, "#BLOCK-REFERRER: $referrer_url\n");
126 if (isset($num_images))
128 for($i=0; $i < $num_images; $i++)
130 if (isset($block_image[$i]))
132 fwrite($fp, "#BLOCK-URL: $image_url[$i]\n");
136 if (isset($manual_image_url) && ($manual_image_url != ""))
138 fwrite($fp, "#BLOCK-URL: $manual_image_url\n");
143 fwrite($fp, "#UNBLOCK-REFERRER: $referrer_url\n");
144 if (isset($manual_image_url) && ($manual_image_url != ""))
146 fwrite($fp, "#UNBLOCK-URL: image_url\n");
159 <title>Privoxy Action List Feedback - Result</title>
160 <link rel="stylesheet" type="text/css" href="../p_web.css">
163 <h2><a href="http://www.privoxy.org" target="_blank">Privoxy</a> Action List Feedback - Result</h2>
165 <p><b>Thank you very much for taking the time to submit your feedback!</b></p>
167 <p>It will be reviewed by the developers and used to improve the
168 distribution actions file.</p>
170 <input type="submit" value="Close this window" onClick="window.close()">