-<?php
-
-error_reporting(E_NONE);
-#error_reporting(E_ALL);
-
-
-// File : $Source: /cvsroot/ijbswa/current/doc/webserver/actions/step2.php,v $
-//
-// Purpose : Submit form for actions file feedback (step 2)
-// This file belongs in
-// ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
-//
-// $Id: step2.php,v 1.1 2002/03/30 03:20:30 oes Exp $
-//
-// $Log: step2.php,v $
-// Revision 1.1 2002/03/30 03:20:30 oes
-// Added Feedback mechanism for actions file
-//
-//
-// Written by and Copyright (C) 2001 the SourceForge
-// Privoxy team. http://www.privoxy.org/
-//
-// Based on the Internet Junkbuster originally written
-// by and Copyright (C) 1997 Anonymous Coders and
-// Junkbusters Corporation. http://www.junkbusters.com
-//
-// This program is free software; you can redistribute it
-// and/or modify it under the terms of the GNU General
-// Public License as published by the Free Software
-// Foundation; either version 2 of the License, or (at
-// your option) any later version.
-//
-// This program is distributed in the hope that it will
-// be useful, but WITHOUT ANY WARRANTY; without even the
-// implied warranty of MERCHANTABILITY or FITNESS FOR A
-// PARTICULAR PURPOSE. See the GNU General Public
-// License for more details.
-//
-// The GNU General Public License should be included with
-// this file. If not, you can view it at
-// http://www.gnu.org/copyleft/gpl.html
-// or write to the Free Software Foundation, Inc., 59
-// Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-//
-
-/*
- * For testing:
- */
-#$base_url = "http://www.oesterhelt.org/actions";
-$base_url = "http://www.privoxy.org/actions";
-
-/*
- * Cannot start with step 2:
- */
-if (!isset($referrer_url))
-{
- echo ("<html><head><title>Invalid Feedback Submission</title>
- <link rel=\"stylesheet\" type=\"text/css\" href=\"../p_web.css\">
- </head>
- <body><h2>Invalid Feedback Submission</h2>
- <p>When submitting your feedback please start with
- <a href=\"index.php\">step 1</a>.</p>
- </body>
- </html>");
- exit;
-}
-
-/*
- * Cannot work on unknown problem:
- */
-if (!isset($problem) || $problem == "INVALID")
-{
- echo ("<html><head><title>Invalid Feedback Submission</title>
- <link rel=\"stylesheet\" type=\"text/css\" href=\"../p_web.css\">
- </head>
- <body><h2>Invalid Feedback Submission</h2>
- <p>You need to select the nature of the problem in
- <a href=\"javascript:back()\">step 1</a>.</p>
- </body>
- </html>");
- exit;
-}
-
-
-/*
- * Check if URL really exists and buffer its contents:
- */
-
-$ch = curl_init ($referrer_url);
-curl_setopt ($ch, CURLOPT_HEADER, 0);
-curl_setopt ($ch, CURLOPT_FAILONERROR, 1);
-
-ob_start();
-$success = curl_exec ($ch);
-$page = ob_get_contents();
-ob_end_clean();
-
-curl_close ($ch);
-
-if (!$success)
-{
- echo ("<html><head><title>Invalid Feedback Submission</title>
- <link rel=\"stylesheet\" type=\"text/css\" href=\"../p_web.css\">
- </head>
- <body><h2>Invalid Feedback Submission</h2>
- <p>The URL that you entered (<a href=\"$referrer_url\">$referrer_url</a>)
- <br>could not be retrieved.</p>
- <p>Make sure the URL is correct and publicly accessible.</p>
- <p><a href=\"javascript:back()\">Back to step 1</a></p>
-
- </body>
- </html>");
- exit;
-}
-
-/*
- * Create description from problem code:
- */
-switch($problem)
-{
- case "P1": $problem_description="an advertisment was not blocked"; break;
- case "P2": $problem_description="an innocent image was blocked"; break;
- case "P3": $problem_description="the whole page was erraneously blocked"; break;
- case "P4": $problem_description="the page needs popups but they don't work"; break;
- case "P5": $problem_description="a problem occured"; break;
- default: $problem_description="AN UNPROCESSABLE PROBLEM OCCURED";
-}
-
-?>
-