echo '<input type="submit" name="listall" value="listall">'; echo '<table class="list" border="0" cellspacing="3" cellpadding="2" width="500">' . "\n"; echo "<tr><th>page name</th><th>error / reason</th></tr>\n"; foreach ($selected as $id => $reason) { echo '<tr><td>'; #-- checkbox echo '<input type="checkbox" value="1" name="remove[' . rawurlencode($id) . ']"> '; #-- link & id if (strpos($id, EWIKI_IDF_INTERNAL) === false) { echo '<a href="' . ewiki_script("", $id) . '">'; } else { echo '<a href="' . ewiki_script_binary("", $id) . '">'; } echo htmlentities($id) . '</a></td>'; #-- print reason echo '<td>' . $reason . "</td>"; echo "</tr>\n"; } echo '</table><br><input type="submit" value=" delete selected pages "></form>'; } else { echo "<ul>\n"; foreach ($_REQUEST["remove"] as $id => $uu) { $id = rawurldecode($id); echo "<li>purging »" . htmlentities($id) . "«...</li>"; $data = ewiki_db::GET($id); for ($version = 1; $version <= $data["version"]; $version++) { ewiki_db::delete($id, $version); } } echo "</ul>\n"; }