X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=doc%2Fwebserver%2Factions%2Fstep3.php;h=e75678cebc41344a6f35a70d27331b007ab4c103;hb=60cbbc5f5d7514135bc5afc02d24e77a231c47f4;hp=3b884eb6d2ea48e031f0217a51816acd27e0cfce;hpb=5ea7c19fcca768ef811e314583fc0e150cef7e82;p=privoxy.git diff --git a/doc/webserver/actions/step3.php b/doc/webserver/actions/step3.php index 3b884eb6..e75678ce 100644 --- a/doc/webserver/actions/step3.php +++ b/doc/webserver/actions/step3.php @@ -8,9 +8,32 @@ This file belongs in ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/ - $Id: step3.php,v 1.11 2002/04/06 15:54:08 swa Exp $ + $Id: step3.php,v 1.16.2.2 2002/08/23 16:46:05 oes Exp $ $Log: step3.php,v $ + Revision 1.16.2.2 2002/08/23 16:46:05 oes + Adapt to master file format + + Revision 1.16.2.1 2002/08/23 12:25:31 oes + Fixed Typo + + Revision 1.16 2002/04/13 14:34:59 oes + Include unique ID in tracker and log; Include URL in tracker summary; add more newlines in tracker + + Revision 1.15 2002/04/09 15:08:10 oes + Restoring lost text change + + Revision 1.14 2002/04/08 17:04:05 oes + Adapt to unified stylesheet + + Revision 1.13 2002/04/07 17:11:40 oes + Tracker submit via curl (no need for user to see), fixing problems, removing monster comments + + Revision 1.12 2002/04/06 18:57:38 swa + first version of the script that writes the + logfile with all submissions and additionally + submits the entries to our tracker. + Revision 1.11 2002/04/06 15:54:08 swa prework: list of what needs to be submitted to the tracker. @@ -18,18 +41,39 @@ Revision 1.10 2002/04/06 15:19:35 oes Clean-up, smarter handling of unreachable URLs + Revision 1.9 2002/04/06 11:34:44 oes + Cosmetics + + Revision 1.8 2002/04/04 19:48:11 oes + Reactivating the scripts ,-) + + Revision 1.7 2002/04/04 10:29:58 oes + Keeping feedback confidential + + Revision 1.6 2002/04/03 19:36:04 swa + consistent look + Revision 1.5 2002/04/02 07:22:43 oes Cosmetics Revision 1.4 2002/04/01 19:13:47 oes Extended, fixed bugs, beefed up design, made IE-safe + Revision 1.3 2002/03/30 20:44:46 swa + have consistent look and feel. part 2. + use correct urls. + + Revision 1.2 2002/03/30 19:49:34 swa + have consistent look and feel + Revision 1.1 2002/03/30 03:20:30 oes Added Feedback mechanism for actions file - Written by and Copyright (C) 2002 the SourceForge - Privoxy team. http://www.privoxy.org/ + Copyright (C) 2002 the SourceForge Privoxy team. + http://www.privoxy.org/ + + Written by Andreas Oesterhelt This program is free software; you can redistribute it and/or modify it under the terms of the GNU General @@ -54,9 +98,9 @@ + -
-
+
$message
@@ -151,6 +183,11 @@ if (!isset($name) || ($name == "")) $name = "anonymous"; } +/* + * Assign unique ID: + */ +$item_id = date("U"); + /* * Open the logfile or fail: @@ -166,7 +203,7 @@ if(!$fp)

Privoxy: Internal Script Error

-
+

This script was unable to open its logfile.

@@ -185,13 +222,13 @@ if(!$fp) * Write Head (type, severity, user, client-ip) * and remarks field: */ -fwrite($fp, "\n#FEEDBACK TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR VERIFIED $url_verified TIME " . date("r") ."\n"); +fwrite($fp, "\n#FEEDBACK ID $item_id TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR VERIFIED $url_confirmed TIME " . date("r") ."\n"); if (isset($remarks)) { $lines = explode("\n", $remarks); foreach ($lines as $line) { - fwrite($fp, "#REMARKS: $line\n"); + fwrite($fp, "#MASTER# REMARKS: $line\n"); } } @@ -206,20 +243,22 @@ switch ($problem) * Banner not blocked: */ case "P1": - fwrite($fp, "#BLOCK-REFERRER: $referrer_url\n"); + fwrite($fp, "#MASTER# 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"); + fwrite($fp, "#MASTER# BLOCK-URL: $image_url[$i]\n"); + $trackertext .= "Block image: $image_url[$i]\n\n"; } } } if (isset($manual_image_url) && ($manual_image_url != "")) { - fwrite($fp, "#BLOCK-URL: $manual_image_url\n"); + fwrite($fp, "#MASTER# BLOCK-URL: $manual_image_url\n"); + $trackertext .= "Block image: $manual_image_url\n\n"; } break; @@ -227,10 +266,11 @@ switch ($problem) * Innocent image blocked: */ case "P2": - fwrite($fp, "#UNBLOCK-REFERRER: $referrer_url\n"); + fwrite($fp, "#MASTER# UNBLOCK-REFERRER: $referrer_url\n"); if (isset($image_url) && ($image_url != "")) { - fwrite($fp, "#UNBLOCK-URL: $image_url\n"); + fwrite($fp, "#MASTER# UNBLOCK-URL: $image_url\n"); + $trackertext .= "Unblock image: $image_url\n\n"; } break; @@ -238,171 +278,49 @@ switch ($problem) * All other problems: */ default: - fwrite($fp, "#PROBLEM-URL: $referrer_url\n"); + fwrite($fp, "#MASTER# PROBLEM-URL: $referrer_url\n"); break; } fclose($fp); -// now fill the tracker on sf with all the necessary values: -// -//
-// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// we can either put everything in here (nicely formatted) .. -// -// -// ... or attach a file (with the html header so it gets displayed -// as if it is a html file -// -// -// -// -// - -// -// TODO: - set all variables above this point -// - evaluate alternative: file attachment -// - -// INFORMATION: -// below this point, all variables _must_ be set (no checking is performed) -// - -// need to switch the following statement for type of problem -switch($problem) -{ - case "P1": $sf_cat_id="412811"; $sf_summary="an advertisment was not blocked"; break; - case "P2": $sf_cat_id="412810"; $sf_summary="an innocent image was blocked"; break; - case "P3": $sf_cat_id="412812"; $sf_summary="the whole page was erraneously blocked"; break; - case "P4": $sf_cat_id="412813"; $sf_summary="the page needs popups but they don't work"; break; - case "P5": $sf_cat_id="412814"; $sf_summary="a problem occured"; break; - default: $sf_cat_id="412814"; $sf_summary="AN UNPROCESSABLE PROBLEM OCCURED"; break; -} -// need to switch the following statement for action file version -$sf_agroup_id="195870"; // assume 1.0 for the time being -// this is always set to nobody -$sf_assigned_to="100"; -// need to set values from [1...9] -switch($severity) -{ - case "1": $sf_prio="1"; break; // low - case "2": $sf_prio="5"; break; // medium - case "3": $sf_prio="9"; break; // high - default: $sf_cat_id="1"; break; -} -// here comes the beef -$sf_trackertext="\n\n\nIt would be awesome if the links below were clickable :-)\n\n"; -$sf_trackertext=$sf_trackertext . "This item was submitted by $name\n\n"; -$sf_trackertext=$sf_trackertext . "Where did it happen?\n$referrer_url\n\n"; -$sf_trackertext=$sf_trackertext . "What happened?\n$sf_summary (" . date("r") . ")\n\n"; +/* + * Notify our SF tracker that new data is waiting to be + * processed + */ switch($problem) { - case "P1": - $sf_trackertext=$sf_trackertext."These URLs are likely advertisements\n"; - for($i=0; $i < $num_images; $i++) - { - if (isset($block_image[$i])) - { - $sf_trackertext = $sf_trackertext . "$image_url[$i]\n\n"; - } - } - if ($manual_image_url != "") - { - $sf_trackertext=$sf_trackertext . "$manual_image_url"; - } - $sf_trackertext= $sf_trackertext . "\n\n"; - break; - case "P2": $sf_trackertext= $sf_trackertext . "The URL of the image that was incorrectly blocked:\n$image_url\n\n"; break; - case "P3": $sf_trackertext= $sf_trackertext . "\n\n"; break; - case "P4": $sf_trackertext= $sf_trackertext . "\n\n"; break; - case "P5": $sf_trackertext= $sf_trackertext . "\n\n"; break; - default: $sf_trackertext= $sf_trackertext . "\n\n"; break; break; + case "P1": $category_id="412811"; $summary = "Ad not blocked "; break; + case "P2": $category_id="412810"; $summary = "Image blocked ";break; + case "P3": $category_id="412812"; $summary = "Page blocked ";break; + case "P4": $category_id="412813"; $summary = "Popups blocked ";break; + case "P5": $category_id="412814"; $summary = "Other problem ";break; + default: $category_id="412814"; $summary = "IMPOSSIBLE ";break; } -$sf_trackertext= $sf_trackertext . "Remarks:\n--------\n$remarks\n\n\n"; -?> +$summary .= "on " . $referrer_url . " (" .$item_id . ")"; +$priority = 3 * $severity; -
-

-Privoxy Action List Feedback - Step 3 of 4. -

-
- - -
-

-Thank you. We have preliminary validated you input. Please click on "Submit" -to transfer you feedback to our tracker. -

-

- - - - - - - - - -

-The script will take you to Sourceforge where all submissions are collected. -

-
-

Valid HTML 4.01 Transitional

- - +$details = urlencode("On " . date("r") . " new data was received from $name:\n\n" + ."URL: $referrer_url\n\n$trackertext\nRemarks:\n$remarks"); + +$postfields = ( "group_id=11118&atid=460288&func=postadd&category_id=$category_id&artifact_group_id=195890" . + "&priority=$priority&summary=$summary&details=$details" ); + +$ch = curl_init ("http://sourceforge.net/tracker/index.php"); +curl_setopt($ch, CURLOPT_HEADER, 0); +curl_setopt($ch, CURLOPT_FAILONERROR, 1); +curl_setopt($ch, CURLOPT_TIMEOUT, 20); +curl_setopt($ch, CURLOPT_POST, 1); +curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); - \ No newline at end of file