-
- <div class="title"><a href="http://www.privoxy.org" target="_blank">Privoxy</a> Action List Feedback - Step 2 of 2</div>
-
- <div class="box">
- <b>You are about to report that <?php echo ($problem_description) ?> on
- <a href="<?php echo ($referrer_url) ?>"><?php echo ($referrer_url) ?></a>.</b>
- </div>
-
- <div class="box">
- <form action="step3.php" method="post">
- <p>
- <input type="hidden" name="problem" value="<?php echo ($problem) ?>">
- <input type="hidden" name="referrer_url" value="<?php echo ($referrer_url) ?>">
- </p>
-
- <dl>
-
-<?php
-
-/*
- * Create / suppress for elements depending on type of
- * problem
- */
-if ($problem != "P1")
-{
- echo ("<!--");
-}
-else
-{
- /*
- * Extract all image links from page, make them
- * absolute, and present them (scaled to reasonable size)
- * in a table for the user to select
- */
- preg_match_all('|<img\s+[^>]*?src=[\'"]?(.*?)[\'" >]|i', $page, $matches);
- $image_urls = array_values(array_unique($matches[1]));
- $count = count($image_urls);
-
- if ($count > 0)
- {
- /*
- * Base URL ends in slash: don't touch.
- */
- if (strpos(strrev($referrer_url), '/') == 0)
- {
- $referrer_base = $referrer_url;
- }
- /*
- * Else grab URL up to last slash as base.
- */
- else
- {
- $referrer_base = substr($referrer_url, 0, -strpos(strrev($referrer_url), '/'));
- }
-
- /*
- * Get the protocol + host info for relative links
- * that start with slash. FIXME: Cut trailing slash off!
- */
- $referrer_host = "http://".strrev(strrchr(strrev(substr($referrer_url, 7)), "/"));
-
- /*
- * Open section in <dl>; Open table:
- */
- echo (" <dt><b>Choose the images you want blocked from the following list:</b></dt>
- <dd>
- <p>
- <input type=\"hidden\" name=\"num_images\" value=\"$count\">
- <table border=\"0\" cellpadding=\"0\" cellspacing=\"4\">\n");
- /*
- * Print one table row for each image found:
- */
- for ($i=0; $i< $count; $i++)
- {
- $image_url = $image_urls[$i];
-
- /*
- * Make image URLs absolute:
- */
- if (strncmp("http://", $image_url, 7))
- {
- if ($image_url{0} == "/")
- {
- $image_url = $referrer_host.$image_url;
- }
- else
- {
- $image_url = $referrer_base.$image_url;
- }
- }
-
- /*
- * Print the row(s):
- */
- echo (" <tr>
- <td rowspan=2>
- <input type=\"checkbox\" name=\"block_image[$i]\" value=\"off\">
- </td>
- <td>
- <a href=\"$image_url\">$image_url</a>:
- </td>
- <td>
- <input type=\"hidden\" name=\"image_url[$i]\" value=\"$image_url\">
- </td>
- </tr>
- <tr>
- <td>
- <img onload=\"prettyscale(this);\" src=\"$image_url\" alt=\"banner or not?\">
- </td>
- </tr>\n");
- }
- echo (" </table>
- </dd>
-
- <dt>
- <b>If the banner that you saw is not listed above, enter the URL here</b>\n");
- }
- else
- {
- echo (" <dt>
- <b>URL of the advertisment image:</b>\n");
- }
-}
-
-?>
-
- <br><i>Hint: right-click the image, select "Copy image location" and paste the URL here.</i>
- </dt>
- <dd>
- <p>
- <input name="manual_image_url" type="text" size="45" maxlength="255">
- </p>
- </dd>
-
-<?php if($problem != "P1") echo ("-->") ?>
-
-<?php if($problem != "P2") echo ("<!--") ?>
-
- <dt>
- <p><b>URL of the innocent image:</b>
- <br><i>Hint: right-click the image, select "Copy image location" and paste the URL here.
- <br>This may not work if the image was blocked by size or if +image-blocker is set to redirect.</i>
- </p>
- </dt>
- <dd>
- <p>
- <input name="image_url" value="unknown" type="text" size="45" maxlength="255">
- </p>
- </dd>
-
-<?php if($problem != "P2") echo ("-->") ?>
-
- <dt><b>Severity:</b></dt>
- <dd>
- <p>
- <select name="severity">
- <option value="3">drives me crazy</option>
- <option selected value="2">normal</option>
- <option value="1">cosmetic</option>
- </select>
- </p>
- </dd>
-
- <dt>
- <b>Remarks:</b> <i>(optional)</i>
- </dt>
- <dd>
- <p>
- <textarea wrap="hard" style="font-size: 10px" name="remarks" cols="35" rows="3">None.</textarea>
- </p>
- </dd>
-
- <dt>
- <b>Your Name:</b> <i>(optional)</i>
- </dt>
- <dd>
- <p>
- <input name="name" size="45">
- </p>
- </dd>
-
- <dt> </dt>
- <dd>
- <input type=submit value="Submit">
- </dd>
-
- </dl>
- </form>
- </div>
-