Commit 15a08771 authored by Frank Lichtenheld's avatar Frank Lichtenheld

Delete unused script

Originally used by jvw for debugging, but I never used it and jvw hasn't
done anything in years, so remove that cruft.
parent f99a4acd
<h2><a name="search_packages" id="search_packages">Search package directories</a></h2>
<form method="GET" action="search">
<p>
<label for="kw">Keyword:</label>
<input type="text" size="30" name="keywords" id="kw">
<input type="submit" value="Search"> <input type="reset" value="Reset">
<br>
Search on:
<input type="radio" name="searchon" value="names" id="onlynames" checked="checked">
<label for="onlynames">Package names only</label>&nbsp;&nbsp;
<input type="radio" name="searchon" value="all" id="descs">
<label for="descs">Descriptions</label>
<input type="radio" name="searchon" value="sourcenames" id="src">
<label for="src">Source package names</label>
<br>
Distribution:
<select name="version">
<option value="experimental">experimental</option>
<option value="unstable">unstable</option>
<option value="testing">testing</option>
<option value="stable">stable</option>
<option value="oldstable">oldstable</option>
<option value="all" selected="selected">any</option>
</select>
Section:
<select name="release">
<option value="main">main</option>
<option value="contrib">contrib</option>
<option value="non-free">non-free</option>
<option value="all" selected="selected">any</option>
</select>
</p>
</form>
<p>There are shortcuts for some searches available:</p>
<ul>
<li><code>http://packages.debian.org/<var>name</var></code> for
the search on package names.</li>
<li><code>http://packages.debian.org/src:<var>name</var></code>
for the search on source package names.</li>
</ul>
<HR>
<h2><a name="search_contents" id="search_contents">Search the contents of packages</a></h2>
<P>This search engine allows you to search the contents of Debian
distributions for any files (or just parts of file names) that are
part of packages.
You can also get a full list of files in a given package.
<BR>
<form method="GET" action="http://packages.debian.org/cgi-bin/search_contents.pl">
<p>
<label for="keyword">Keyword:</label>
<input type="text" size="30" name="word" id="keyword"> &nbsp;
<input type="submit" value="Search">
&nbsp;<input type="reset" value="Reset">
<br>
Display:
<br>
<input type="radio" name="searchmode" value="searchfiles" id="searchfiles" checked="checked">
<label for="searchfiles">packages that contain files named like this</label>
<br>
<input type="radio" name="searchmode" value="searchfilesanddirs" id="searchfilesanddirs">
<label for="searchfilesanddirs">packages that contain files or directories named like this</label>
<br>
<input type="radio" name="searchmode" value="searchword" id="searchword">
<label for="searchword">packages that contain files or directories whose names contain the keyword</label>
<br>
<input type="radio" name="searchmode" value="filelist" id="filelist">
<label for="filelist">all files in this package</label>
<br>
<label for="casesens">Case sensitive:</label>
<select name="case" id="casesens">
<option value="insensitive" selected="selected">no</option>
<option value="sensitive">yes</option>
</select>
<label for="distro">Distribution:</label>
<select name="version" id="distro">
<option value="oldstable">oldstable</option>
<option value="stable" selected="selected">stable</option>
<option value="testing">testing</option>
<option value="unstable">unstable</option>
</select>
<label for="architecture">Architecture:</label>
<select name="arch" id="architecture">
<option value="i386" selected="selected">Intel x86</option>
<option value="m68k">Motorola 680x0</option>
<option value="alpha">Alpha</option>
<option value="amd64">AMD64</option>
<option value="sparc">SPARC</option>
<option value="powerpc">PowerPC</option>
<option value="arm">ARM</option>
<option value="hppa">HP PA/RISC</option>
<option value="ia64">Intel IA-64</option>
<option value="mips">MIPS</option>
<option value="mipsel">MIPS (DEC)</option>
<option value="s390">IBM S/390</option>
<option value="hurd-i386">Hurd (i386)</option>
</select>
</p>
</form>
<div class="clr"></div>
</div> <!-- end inner -->
<?
function go($script)
{
$pipes = null;
$proc = proc_open("./$script php", array(
0 => array('pipe', 'r'),
1 => array('pipe', 'w'),
2 => array('pipe', 'w')
), $pipes);
foreach ($_GET as $k => $v) {
fwrite($pipes[0], urlencode($k)."=".urlencode($v)."\n");
}
fclose($pipes[0]);
fpassthru($pipes[1]);
$stderr = fread($pipes[2], 4096);
$exit = proc_close($proc);
if ($exit) {
echo "<h1>Error happened, code $exit</h1>\n";
}
echo "<pre>".htmlspecialchars($stderr);
echo "</pre>";
}
$SUITES = array('oldstable', 'stable', 'testing', 'unstable', 'experimental');
$pi = substr($_SERVER["PATH_INFO"], 1);
$elems = explode('/', $pi);
if ($pi == "") {
readfile("index.html");
exit;
} elseif ($pi == 'search') {
go("search_packages.pl");
} elseif ($elems[0] == 'package' && count($elems) == 2) {
$_GET['searchon'] = 'names';
$_GET['keywords'] = $elems[1];
$_GET['suite'] = 'all';
$_GET['exact'] = 1;
go("search_packages.pl");
} elseif ($elems[0] == 'source' && count($elems) == 2) {
$_GET['searchon'] = 'sourcenames';
$_GET['keywords'] = $elems[1];
$_GET['suite'] = 'all';
$_GET['exact'] = 1;
go("search_packages.pl");
} elseif (in_array($elems[0], $SUITES) && count($elems) == 2) {
$_GET['package'] = $elems[1];
$_GET['suite'] = $elems[0];
go("show_package.pl");
} elseif (in_array($elems[0], $SUITES) && count($elems) == 3) {
header("Location: http://merkel.debian.org/~jeroen/pdo/$elems[0]/".urlencode($elems[2]));
exit;
} elseif (substr($pi, 0, 4) == 'src:') {
header("Location: http://merkel.debian.org/~jeroen/pdo/source/".urlencode(substr($pi,4)));
exit;
} elseif (!eregi('[^a-z0-9+.-]', $pi)) {
header("Location: http://merkel.debian.org/~jeroen/pdo/package/".urlencode($pi));
exit;
} else {
echo "404 not found";
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment