- <style type="text/css">
- body, div, p, h1, h2, ul, ol, li, td, th, dl, dt, dd { font-family:helvetica,helv,arial,sans-serif; font-size:10px }
- body { background-color: #ffffff }
- div.title { background-color:#dddddd; border:solid black 1px; margin:20px; min-width: 80%; padding:20px; font-size:15px; font-weight:bold }
- div.box { background-color:#eeeeee; border:solid black 1px; margin:20px; min-width: 80%; padding:20px; font-size:10px }
- div.infobox { background-color:#ccccff; border:solid black 1px; margin:20px; min-width: 60%; max-width: 60%; padding:20px; font-size:10px; }
- div.errorbox { background-color:#ffdddd; border:solid black 1px; margin:20px; min-width: 60%; max-width: 60%; padding:20px; font-size:10px; }
- </style>
-
-<?php
-
-/*
- * For testing:
- */
-//phpinfo();
-//error_reporting(E_ALL);
-error_reporting(E_NONE);
-
-
-
-/*
- * Cannot start with step 3:
- */
-if (!isset($referrer_url))
-{
- echo (" <title>Invalid Feedback Submission</title>
- </head>
- <body>
- <div class=\"title\">Invalid Feedback Submission</div>
- <div align=\"center\">
- <div class=\"errorbox\" align=\"left\">
- When submitting your feedback please start with <a href=\"index.php\">step 1</a>.
- </div>
- </div>
- </body>
- </html>");
- exit;
-}
-
-
-/*
- * Cannot work on unknown problem:
- */
-if (!isset($problem))
-{
- echo (" <title>Invalid Feedback Submission</title>
- </head>
- <body>
- <div class=\"title\">Invalid Feedback Submission</div>
- <div align=\"center\">
- <div class=\"errorbox\" align=\"left\">
- You need to select the nature of the problem in <a href=\"index.php\">step 1</a>.
- </div>
- </div>
- </body>
- </html>");
- exit;
-}
-
-
-/*
- * Handle optional text fields:
- */
-if (!isset($name) || ($name == ""))
-{
- $name = "anonymous";
-}
-
-
-/*
- * Open the logfile or fail:
- */
-$logfile = "feedback-data.txt";
-$fp = fopen($logfile, "a");
-
-if(!$fp)
-{
- echo (" <title>Internal Script Error</title>
- </head>
- <body>
- <div class=\"title\">Internal Script Error</div>
- <div align=\"center\">
- <div class=\"errorbox\" align=\"left\">
- <p>
- This script was unable to open its logfile.
- </p>
- <p>
- Please <a href=\"mailto:info@privoxy.org?SUBJECT=Feedback-Script-Broken\">mail its owner</a>!
- </p>
- </div>
- </div>
- </body>
- </html>");
- exit;
-}
-
-
-/*
- * Write Head (type, severity, user, client-ip)
- * and remarks field:
- */
-fwrite($fp, "\n#FEEDBACK TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR\n");
-if (isset($remarks))
-{
- $lines = explode("\n", $remarks);
- foreach ($lines as $line)
- {
- fwrite($fp, "#REMARKS: $line\n");
- }
-}
-
-
-/*
- * Depending on the type of problem reported,
- * we need to write additional data:
- */
-switch ($problem)
-{
- /*
- * Banner not blocked:
- */
- case "P1":
- fwrite($fp, "#BLOCK-REFERRER: $referrer_url\n");
- if (isset($num_images))
- {
- for($i=0; $i < $num_images; $i++)
- {
- if (isset($block_image[$i]))
- {
- fwrite($fp, "#BLOCK-URL: $image_url[$i]\n");
- }
- }
- }
- if (isset($manual_image_url) && ($manual_image_url != ""))
- {
- fwrite($fp, "#BLOCK-URL: $manual_image_url\n");
- }
- break;
-
- /*
- * Innocent image blocked:
- */
- case "P2":
- fwrite($fp, "#UNBLOCK-REFERRER: $referrer_url\n");
- if (isset($image_url) && ($image_url != ""))
- {
- fwrite($fp, "#UNBLOCK-URL: $image_url\n");
- }
- break;
-
- /*
- * All other problems:
- */
- default:
- fwrite($fp, "#PROBLEM-URL: $referrer_url\n");
- break;
-}
-
-fclose($fp);
-
-?>
-
- <title>Privoxy Action List Feedback - Result</title>