.+)-[^-]+-[^-]+)/", $s, $m)) {
// processing files
$s = "$s";
$toc[] = "files ".$m['name'];
}
echo $s;
}
pclose($fd);
$code = ob_get_contents();
ob_end_clean();
if (!empty($toc)) {
echo ""._("Toc:")."
";
echo "";
foreach ($toc as $section) {
$id = str_replace(" ", "-", $section);
echo "- {$section}
";
}
echo "
";
}
echo ""._("Content:")."
";
start_pre();
echo $code;
end_pre();
?>
\n";
echo ""._("Failed")." | "._("Ok")." |
\n";
foreach ($addr as $dist => $ddist) {
foreach ($ddist as $arch) {
echo "".
"
$dist/$arch | ".
"[OK] | ".
#"[qa] | ".
"
\n";
}
}
echo "
\n";
echo "\n";
# smile ;)
echo "";
$pow = array("vim", "php", "brain", "power", "electricity",
"coffee", "ufo", "penguin", "GNOME", "ELF", "DWARF",
"voodoo magic", "Linux", "x-files", "X", "foobar",
"/dev/null", "/dev/zero", "/dev/drzewo",
"Leppe'", "matrix", "Neo", "PDP-11",
"Ken", "GNU antilope", "PDP-7", "ITS", "Multics",
"foobarbaz", "ed", "Joe", "Unix conspiracy",
"overclock", "The Right Thing",
"The Bad Thing", "Star Treck", "NSA", "NASA",
"achelon", "VAX", "Real Programmer",
"Real Operating System", "Real Computer",
"computron", "bogon", "quantum bogodynamics",
"BOFH", "/dev/ill", "nasi tu byli",
"Paranoid Android", "Lunatic Corp", "Parallel thinking",
"sfistak", "Linus", "The Golden Path", "Dark Side of the Force",
"Przewodniczacego Lepper-a", "KDE", "Microsoft Windows 2003", "sqlite3",
"synergy", "six Cray XMT Supercomputers"
# feel free to add sth if you change this file ;)
);
echo _("Powered by")." ";
$max = 1;
for ($i = 0; $i < $max; $i++) {
$x = rand(0, count($pow) - 1);
if ($pow[$x] == "") $i--;
else echo $pow[$x] . ($i == $max - 1 ? "." : ", ");
$pow[$x] = "";
}
echo "
";
echo "";
echo "Your IP: " . $_SERVER['REMOTE_ADDR'];
echo "
";
if (isset($dist) && isset($arch)) {
echo "";
}
}
function get_qa()
{
global $dist, $arch;
if (!isset($dist) || !isset($arch))
return false;
$addr = "http://ftp1.pld-linux.org/dists/$dist/.stat/builder/$dist/rpmqa-$arch.txt";
return fopen("$addr", "r");
}
function search_qa()
{
global $url, $str, $dist, $arch;
$f = get_qa();
echo ""._("Search results for")." '$str' "._("in")." $dist/$arch
";
start_pre();
if ($f == 0) {
echo _("Sorry, cannot open.");
} else {
while (($s = fgets($f, 1000)) != false) {
if (stristr($s, $str))
echo $s;
}
echo "/* EOF */";
}
end_pre();
}
function dump_qa($plain)
{
global $url, $dist, $arch;
$f = get_qa();
if ($plain) {
header("Content-type: text/plain");
echo _("# rpm -qa of")." $dist/$arch\n";
} else {
echo ""._("rpm -qa of")." $a
";
echo ""._("text/plain version")."";
start_pre();
}
if ($f == 0) {
echo _("Sorry, cannot open.");
} else {
while (($s = fgets($f, 1000)) != false) {
echo $s;
}
}
if (!$plain)
end_pre();
}
function adv_search()
{
global $database, $addr, $fail_or_ok, $url, $_POST, $off, $cnt, $root_directory, $ok, $ns;
$big_url = "$url?ok=$ok&ns=$ns&cnt=$cnt";
echo "\n";
/* Shut up warnings */
if (!isset($_POST["n2"])) $_POST["n2"] = "";
if (!isset($_POST["age1"])) $_POST["age1"] = "";
if (!isset($_POST["age2"])) $_POST["age2"] = "";
if (!isset($_POST["size1"])) $_POST["size1"] = "";
if (!isset($_POST["size2"])) $_POST["size2"] = "";
echo "\n";
}
function welcome()
{
?>
|
=_("Welcome!")?>
=_("Welcome to PLD Build Logs WWW interface.")?>
=_("Feel free to email bug reports, complaints and feature requests ")?>
=_("to us")?>. =_("Positive opinions are also")?>
=_("welcome")?> ;)
Version: $Id: index.php,v 1.19 2012/03/21 11:45:04 glen Exp $
| |
";
list_archs();
echo " | ";
flush();
if ($action == "qa")
dump_qa(0);
else if ($action == "sqa")
search_qa();
else if (isset($id) || isset($name))
dump_log($action == "tail");
else if (isset($dist))
list_logs();
else
welcome();
echo " |
";
trailer();
}
?>