2 ob_start("ob_gzhandler", 1);
3 $buildlogs_server = "buildlogs.pld-linux.org";
5 $fail_or_ok = array( "FAIL", "OK" );
7 $database = 'sqlite:/home/services/ftp/buildlogs2.db';
8 $root_directory = "/home/services/ftp/pub/pld-buildlogs";
11 // $database, $root_directory and others are taken from buildlogs.inc
12 include('buildlogs.inc');
14 /* It should be set */
16 $langs["en_US"]["charset"]="ISO-8859-1";
17 $langs["pl_PL"]["charset"]="ISO-8859-2";
20 if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]))
22 $rows=explode(";",$_SERVER["HTTP_ACCEPT_LANGUAGE"]);
23 $rows=explode(",",$rows[0]);
24 $lang_detected=rtrim($rows[0]);
25 } else if (preg_match("/opera/i",$_SERVER["HTTP_USER_AGENT"]))
27 $lang_detected=preg_replace("/.*\[(.*)\].*/i","\\1",$_SERVER["HTTP_USER_AGENT"]);
31 $lang_detected=preg_replace("/^pl$/i","pl_PL",$lang_detected);
33 if (isset($lang_detected) && isset($langs[$lang_detected]))
38 if (isset($_GET["lang"]))$_SESSION["lang"]=$_GET["lang"];
39 if (isset($_SESSION["lang"]))$lang=$_SESSION["lang"];
42 setlocale(LC_ALL,$lang);
43 bindtextdomain("messages","locale");
44 textdomain("messages");
46 if (isset($_GET["dist"]) && isset($_GET["arch"]))
48 $dist = basename($_GET["dist"]);
49 $arch = basename($_GET["arch"]);
52 if (isset($_POST["dist"])) $dist = basename($_POST["dist"]);
53 if (isset($_POST["arch"])) $arch = basename($_POST["arch"]);
55 if (isset($_GET["name"])) {
56 $name_url = urlencode($_GET["name"]);
57 $name = basename($_GET["name"]);
59 if (isset($_GET["ok"]))$ok=(int)$_GET["ok"];
61 if (isset($_GET["ns"]))$ns=(int)$_GET["ns"];
63 if (isset($_GET["cnt"]))$cnt=(int)$_GET["cnt"];
65 if (isset($_GET["action"]))$action=$_GET["action"];
67 if (isset($_GET["off"]))$off=(int)$_GET["off"];
69 if (isset($_GET["id"]))$id=$_GET["id"];
71 if (isset($_POST["str"]))$str=$_POST["str"];
72 if (isset($_POST["action"]))$action=$_POST["action"];
76 echo '<' . '?xml version="1.0" encoding="' . _("ISO-8859-1") .'"?' . ">\n";
77 echo '<' . '?xml-stylesheet href="#internalStyle" type="text/css"?' . ">\n";
79 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
80 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
81 <html xmlns="http://www.w3.org/1999/xhtml">
83 <title>PLD Build Logs</title>
84 <?php echo '<meta http-equiv="Content-type" content="text/html; charset=' . _("ISO-8859-1") .'"/>' ."\n";?>
85 <style type="text/css"><!--
86 A { text-decoration: none; }
87 A:hover { text-decoration: underline; }
88 H1 { font-family: arial,helvetica,sans-serif;
91 H2 { font-family: arial,helvetica,sans-serif;
94 BODY,TD { font-family: arial,helvetica,sans-serif;
96 TH { font-family: arial,helvetica,sans-serif;
102 <!-- Diffrent color for visited link doesn't make much sense here...
103 this page is autogenerated and it might be misleading after some
104 build log changes. -->
105 <body bgcolor="#ffffff" text="#000000" link="#5f26cd" vlink="#5f26cd">
111 echo "<table cellpadding=\"10\"><tr><td bgcolor=\"#000000\">".
112 "<font color=\"#cccccc\"><pre style=\"width: 2048px;overflow: scroll\">";
117 echo "</pre></font></td></tr></table>\n";
122 echo "</body></html>";
128 echo "Fatal error: $msg";
136 global $arch, $dist, $ok;
137 global $big_url, $ns;
138 global $off, $cnt, $root_directory, $url;
140 $big_url = "$url?dist=$dist&arch=$arch&ok=$ok&ns=$ns&cnt=$cnt";
143 echo "<h1>"._("Listing of")." $dist/$arch/OK "
144 ."(<a href=\"$big_url&ok=0\">"._("fail")."</a>)</h1>\n";
146 echo "<h1>"._("Listing of")." $dist/$arch/FAIL "
147 ."(<a href=\"$big_url&ok=1\">"._("ok")."</a>)</h1>\n";
150 echo "<div align=\"center\"><table cols=\"4\" border=\"0\" cellspacing=\"1\" ".
151 "cellpadding=\"3\" bgcolor=\"#000000\" width=\"90%\">\n";
152 echo "<tr><th bgcolor=\"#CCCCFF\" align=\"right\" width=\"1%\">"._("No.")."</th>".
153 "<th bgcolor=\"#CCCCFF\" align=\"left\" width=\"80%\">"._("Log File").
154 "[<a href=\"$big_url&ns=1\">"._("sort")."</a>]</th>".
155 "<th bgcolor=\"#CCCCFF\" align=\"right\" width=\"15%\">"._("Size")."</th> ".
156 "<th bgcolor=\"#CCCCFF\" align=\"left\">"._("Age").
157 "[<a href=\"$big_url&ns=0\">"._("sort")."</a>]</th>".
160 if ($ns != 1) $ns = 0;
161 if (!isset($ok)) $ok = 0;
162 // if (!isset($off)) $off = 0;
163 // if (!isset($cnt)) $cnt = 50;
164 if ($ns == 0) $order = "mtime DESC";
165 else $order = "name";
167 $query = "SELECT log_id, dist, arch, ok, name, mtime, size, id FROM logs WHERE "
168 . "dist = '$dist' AND arch = '$arch' AND ok = $ok ORDER BY $order LIMIT $cnt OFFSET $off";
171 $dbh = new PDO("$database");
172 } catch (PDOException $e) {
173 mydie("new PDO: " . $e->getMessage());
177 foreach ($dbh->query("$query") as $row) {
178 $name = $row["name"];
180 $dist = $row["dist"];
181 $arch = $row["arch"];
183 $name_url = urlencode($name);
184 $t = $now - $row["mtime"];
194 $t = $t . " " . ngettext("day","days",$t);
197 $t = $t . " " . ngettext("hour","hours",$t);
201 $t = $t . " " . ngettext("minute","minutes",$t);
203 $u = "$url?dist=$dist&arch=$arch&ok=$ok&name=$name_url&id=$id";
204 echo "<tr><td bgcolor=\"#CCCCCC\" align=\"right\">".($i+1).".</td>".
205 "<td bgcolor=\"#CCCCCC\"><a href=\"$u\">$f</a> ".
206 "[<a href=\"$u&action=text\">"._("text")."</a> | ".
207 "<a href=\"$u&action=tail\">"._("tail")."</a>]".
208 "</td><td bgcolor=\"#CCCCCC\" align=\"right\">".
209 "$s</td><td bgcolor=\"#CCCCCC\">$t</td></tr>\n";
213 echo "</table></div>\n";
215 $backarr = "<<< ";
216 $back = _("Page back");
217 $forward = _("Page forward");
218 $forwardarr = " >>>";
220 echo "<p><table width=\"90%\" align=\"center\"><tr><td align=\"left\" width=\"1%\">";
223 $noff = $off - $count;
226 $hrefurl = "<a href=\"$big_url&off=$noff\">";
227 echo "$hrefurl$backarr</a></td><td align=\"left\">$hrefurl$back</a>";
229 echo "$backarr</td><td align=\"left\">$back";
232 echo "</td>\n<td align=\"center\">";
234 if (isset($dist) && isset($arch)) {
235 echo "[<a href=\"$big_url&action=qa\">"._("View <quot>rpm -qa</quot> of builder")."</a>]";
240 echo "</td>\n<td align=right>";
241 if ($cnt == $count) {
245 $hrefurl = "<a href=\"$big_url&off=$noff\">";
246 echo "$hrefurl$forward</a></td><td align=right width=1%>$hrefurl$forwardarr</a>";
248 echo "$forward</td><td align=right width=1%>$forwardarr";
250 echo "</td>\n</tr></table></p>";
255 global $ok, $dist, $arch, $name, $name_url, $id;
257 if (isset($name) && isset($ok) && isset($arch) && isset($dist)) {
258 if (isset($id) && $id != '') {
259 $name = $name . ",$id";
261 $w = $ok ? "OK" : "FAIL";
262 return "$dist/$arch/$w/$name.bz2";
266 function dump_log($tail)
268 global $ok, $url, $dist, $arch, $name, $name_url;
269 global $root_directory, $big_url, $ns, $id, $cnt, $off;
270 global $buildlogs_server;
277 $df = preg_replace("/.*\/([^\/]*)$/", "\\1", $f);
278 $df = preg_replace("/\.(bz2|gz)$/", "", $df);
282 echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#000000\">";
284 function one_item($h, $t) {
285 echo "<tr><td bgcolor=\"#ccccff\">$h:</td>".
286 "<td bgcolor=\"#cccccc\">$t</td></tr>";
289 function href($h, $c) {
290 return "<a href=\"$h\">$c</a>";
293 one_item(_("Status"), ($ok == 1 ?
294 "<font color=\"green\"><b>"._("OK")."</b></font>" :
295 "<font color=\"red\"><b>"._("Failed")."</b></a>"));
296 one_item(_("Source URL"),
297 href("ftp://$buildlogs_server/$f",
298 "ftp://$buildlogs_server/$f"));
300 $big_url = "$url?dist=$dist&arch=$arch&ok=$ok&ns=$ns&cnt=$cnt";
301 $bu = "$big_url&off=$off";
303 one_item(_("text/plain URL"),
304 href("$bu&name=$name_url&id=$id&action=text",
307 one_item(_("full text"),
308 href("$bu&name=$name_url&id=$id",
312 if (isset($dist) && isset($arch)) {
313 one_item(_("rpm -qa of builder"), href("$bu&action=qa", _("View!")));
315 one_item(_("rpm -qa of builder"), _("Not available"));
317 one_item("Date", date("Y/m/d H:i:s", filemtime("$root_directory/$f")));
319 echo "<tr><td>Here:</td><td>" .
320 "<a href=\"$url?idx=$idx&ok=$ok&id=$id\">".
321 "http://" . getenv("SERVER_NAME") .
322 getenv("SCRIPT_NAME") . "?idx=$idx&ok=$ok&id=$id</a>" .
325 echo "</table><h2>"._("Content:")."</h2>";
328 # what can I say beside PHP suxx? how the fuck should I create
329 # bidirectional pipe? gotta use wget
331 if (preg_match("/\.bz2$/", $f)) {
333 } elseif (preg_match("/\.gz$/", $f)) {
339 $cmd = "$filter '$root_directory/$f'";
341 $cmd = "$cmd | tail -n 100";
342 $fd = popen($cmd, "r");
344 while (($s = fgets($fd, 102400)) != false) {
345 if (strlen($s) > 800) {
346 $s = chunk_split($s, 800, "\n ");
349 $s = htmlspecialchars($s);
359 [<a href="<?php echo $bu; ?>"><?=_("Back to list of logs")?></a>]
362 [<a href="<?php echo "$bu&action=qa"
363 ?>"><?=_("View rpm -qa of builder")?></a>]
373 global $root_directory;
374 global $buildlogs_server;
376 header("Content-type: text/plain");
382 echo "# src : ftp://$buildlogs_server/$f\n";
384 date("Y/m/d H:i:s", filemtime("$root_directory/$f")) . "\n";
386 if (preg_match("/\.bz2$/", $f)) {
388 } elseif (preg_match("/\.gz$/", $f)) {
394 $cmd = "$filter '$root_directory/$f'";
395 $fd = popen($cmd, "r");
396 while (($s = fgets($fd, 1000)) != false) {
402 function list_archs()
404 global $addr, $url, $cnt,$ok,$ns;
409 $big_url = "$url?ok=$ok&ns=$ns&cnt=$cnt";
411 echo "<table width=\"100%\" border=\"0\">\n";
412 echo "<tr><td bgcolor=\"#cccccc\" nowrap=\"nowrap\">"._("Failed")."</td><td bgcolor=\"#cccccc\">"._("Ok")."</td></tr>\n";
413 foreach ($addr as $dist => $ddist) {
414 foreach ($ddist as $arch) {
415 echo "<tr><td nowrap=\"nowrap\">".
416 "<a href=\"$url?dist=$dist&arch=$arch&ok=0&cnt=$cnt\">
417 $dist/$arch</a></td><td nowrap=\"nowrap\">".
418 "[<a href=\"$url?dist=$dist&arch=$arch&ok=1&cnt=$cnt\">OK</a>]</td>".
419 #"<td>[<a href=\"$url?idx=$i&action=qa\">qa</a>]</td>".
423 echo "</table><hr />\n";
425 echo "<div align=\"center\">";
426 echo "<a href=\"$big_url&action=adv_search\">"._("Advanced Search")."</a><br />\n";
428 echo "<a href=\"$url\">main()</a><hr />\n";
429 echo "<a href=\"http://www.pld-linux.org/\"><img src=\"powpld.png\" ".
430 "alt=\""._("Powered by PLD Linux")."\" border=\"0\" /></a><br />\n" .
432 "<a href=\"mailto:feedback@pld-linux.org\">PLD Team</a><br />\n".
437 echo "<div align=\"center\"><small>";
438 $pow = array("vim", "php", "brain", "power", "electricity",
439 "coffee", "ufo", "penguin", "GNOME", "ELF", "DWARF",
440 "voodoo magic", "Linux", "x-files", "X", "foobar",
441 "/dev/null", "/dev/zero", "/dev/drzewo",
442 "Leppe'", "matrix", "Neo", "PDP-11",
443 "Ken", "GNU antilope", "PDP-7", "ITS", "Multics",
444 "foobarbaz", "ed", "Joe", "Unix conspiracy",
445 "overclock", "The Right Thing",
446 "The Bad Thing", "Star Treck", "NSA", "NASA",
447 "achelon", "VAX", "Real Programmer",
448 "Real Operating System", "Real Computer",
449 "computron", "bogon", "quantum bogodynamics",
450 "BOFH", "/dev/ill", "nasi tu byli",
451 "Paranoid Android", "Lunatic Corp", "Parallel thinking",
452 "sfistak", "Linus", "The Golden Path", "Dark Side of the Force",
453 "Przewodniczacego Lepper-a", "KDE", "Microsoft Windows 2003", "sqlite3",
454 "synergy", "six Cray XMT Supercomputers"
455 # feel free to add sth if you change this file ;)
457 echo _("Powered by")." ";
459 for ($i = 0; $i < $max; $i++) {
460 $x = rand(0, count($pow) - 1);
461 if ($pow[$x] == "") $i--;
462 else echo $pow[$x] . ($i == $max - 1 ? "." : ", ");
465 echo "</small></div>";
467 echo "<div align=\"center\"><small>";
468 echo "Your IP: " . $_SERVER['REMOTE_ADDR'];
469 echo "</small></div>";
471 if (isset($dist) && isset($arch)) {
472 echo "<form action=\"index.php\" method=\"post\">";
473 echo "<input type=\"hidden\" name=\"dist\" value=\"$dist\" />";
474 echo "<input type=\"hidden\" name=\"arch\" value=\"$arch\" />";
475 echo "<input type=\"hidden\" name=\"action\" value=\"sqa\" />";
476 echo "<input type=\"text\" size=\"14\" name=\"str\" /><br />";
477 echo "<input type=\"submit\" name=\"submit\" value=\""._("Search rpmqa!")."\" />";
486 if (!isset($dist) || !isset($arch))
489 $addr = "http://ftp.pld-linux.org/dists/$dist/.stat/builder/$dist/rpmqa-$arch.txt";
491 $addr = "http://ftp.pld-linux.org/branches/titanium/.stat/builder/$dist/rpmqa-$arch.txt";
493 return fopen("$addr", "r");
498 global $url, $str, $dist, $arch;
501 echo "<h1>"._("Search results for")." '$str' "._("in")." $dist/$arch</h1>";
506 echo _("Sorry, cannot open.");
508 while (($s = fgets($f, 1000)) != false) {
509 if (stristr($s, $str))
517 function dump_qa($plain)
519 global $url, $dist, $arch;
524 header("Content-type: text/plain");
525 echo _("# rpm -qa of")." $dist/$arch\n";
527 echo "<h1>"._("rpm -qa of")." $a</h1>";
528 echo "<a href=\"$url?dist=$dist&arch=$arch&action=qatxt\">"._("text/plain version")."</a>";
533 echo _("Sorry, cannot open.");
535 while (($s = fgets($f, 1000)) != false) {
545 function adv_search()
547 global $database, $addr, $fail_or_ok, $url, $_POST, $off, $cnt, $root_directory, $ok, $ns;
549 $big_url = "$url?ok=$ok&ns=$ns&cnt=$cnt";
551 echo "<script><!--\n".
552 "function checkboxToggle() {\n".
553 "for (var i=0;i<document.forms[0].elements.length;i++) {\n".
554 "var e = document.forms[0].elements[i];\n".
555 "if ((e.name != 'all') && (e.type=='checkbox'))\n".
556 "e.checked = document.forms[0].all.checked;\n".
557 "}\n }\n -->\n </script>\n";
559 /* Shut up warnings */
560 if (!isset($_POST["n2"])) $_POST["n2"] = "";
561 if (!isset($_POST["age1"])) $_POST["age1"] = "";
562 if (!isset($_POST["age2"])) $_POST["age2"] = "";
563 if (!isset($_POST["size1"])) $_POST["size1"] = "";
564 if (!isset($_POST["size2"])) $_POST["size2"] = "";
566 echo "<form action=\"index.php?action=adv_search\" method=\"post\">";
568 echo "<div align=\"center\">";
569 echo "<table border=\"0\">\n";
571 echo "<td>"._("Package name")."</td>\n";
572 echo "<td><input type=\"text\" size=\"20\" name=\"n2\" value=\"". $_POST["name"] ."\"/></td>\n";
576 echo "<td>"._("Days")."</td>\n";
577 echo "<td>"._("From").": <input type=\"text\" size=\"20\" name=\"age1\" value=\"". $_POST["age1"] ."\" /></td>\n";
578 echo "<td>"._("To").": <input type=\"text\" size=\"20\" name=\"age2\" value=\"". $_POST["age2"] ."\" /></td>\n";
582 echo "<td>"._("Size")."</td>\n";
583 echo "<td>"._("From").": <input type=\"text\" size=\"20\" name=\"size1\" value=\"". $_POST["size1"] ."\" /></td>\n";
584 echo "<td>"._("To").": <input type=\"text\" size=\"20\" name=\"size2\" value=\"". $_POST["size2"] ."\" /></td>\n";
588 echo "<td>"._("Search logs:")."</td>\n";
592 echo "<td>"._("Failed")."</td>\n";
593 echo "<td>"._("OK")."</td>\n";
597 foreach ($addr as $dist => $ddist) {
598 foreach ($ddist as $arch) {
601 if (!isset($_POST["$name"])) {
604 $check=" checked=\"on\"";
606 echo "<td><input name=\"$name\" id=\"$name\" type=\"checkbox\"$check /><label for=\"$name\">". "$dist/$arch" ."</label></td>\n";
608 if (!isset($_POST["$n2"])) {
611 $check=" checked=\"on\"";
613 echo "<td><input name=\"$name\" id=\"$name\" type=\"checkbox\"$check /><label for=\"$name\">". "$dist/$arch" ."</label></td>\n";
620 echo "<td><label><input name=\"all\" type=\"checkbox\" checked=\"on\" onClick=\"checkboxToggle()\">"._("Toggle checkboxes")."</label> <input type=\"submit\" name=\"submit\" value=\""._("Search!")."\" /></td>";
625 // if (isset($_POST["name"]) || isset($_POST["age1"]) || isset($_POST["age2"]) ||
626 // isset($_POST["size1"]) || isset($_POST["size2"])
627 if (($_POST["n2"]!="") || ($_POST["age1"]!="") || ($_POST["age2"]!="") ||
628 ($_POST["size1"]!="") || ($_POST["size2"]!=""))
630 $query = "SELECT log_id, dist, arch, ok, name, size, mtime, id FROM logs WHERE 1 ";
631 if ($_POST["n2"] != "") {
632 $n = addslashes($_POST["n2"]);
633 $query .= "AND name LIKE '$n%' ";
637 if ($_POST["age1"] != "") {
638 $age = $now - (int)$_POST["age1"] * 24 * 3600;
639 $query .= "AND mtime > $age ";
642 if ($_POST["age2"] != "") {
643 $age = $now - (int)$_POST["age2"] * 24 * 3600;
644 $query .= "AND mtime < $age ";
647 if ($_POST["size1"] != "") {
648 $size = (int)$_POST["size1"];
649 $query .= "AND size > $size ";
652 if ($_POST["size2"] != "") {
653 $size = (int)$_POST["size2"];
654 $query .= "AND size < $size ";
659 foreach ($addr as $dist => $ddist) {
660 foreach ($ddist as $arch) {
661 for ($j = 0; $j < 2; $j++) {
662 if (isset($_POST["as" . $j . "_" .$i])) {
663 $query .= "$or (dist = '$dist' AND arch = '$arch' AND ok = $j)";
670 if ($or == " OR ") $query .= ")";
671 // if (!isset($cnt)) $cnt = 50;
672 // if (!isset($off)) $off = 0;
673 if (!isset($ns)) $ns = 0;
676 $query .= " ORDER BY mtime DESC";
679 $query .= " ORDER BY name";
682 $query .= " ORDER BY dist, arch, name";
685 $query .= " LIMIT $cnt OFFSET $off ";
688 $dbh = new PDO("$database");
689 } catch (PDOException $e) {
690 mydie("new PDO: " . $e->getMessage());
692 $result = $dbh->query("$query")->fetchAll();
694 if ($result == FALSE) {
695 echo _("Nothing found");
697 echo "<table border=\"0\" cellspacing=\"1\" ".
698 "cellpadding=3 bgcolor=\"#000000\" width=\"90%\">\n";
699 echo "<tr><th bgcolor=\"#CCCCFF\" align=\"left\" width=\"10%\">"._("Builder").
700 "[<a href=\"$big_url&ns=2\">"._("sort")."</a>]</th>";
701 echo "<th bgcolor=\"#CCCCFF\" align=\"left\" width=\"60%\">"._("Log File").
702 "[<a href=\"$big_url&ns=1\">"._("sort")."</a>]</th>".
703 "<th bgcolor=\"#CCCCFF\" align=\"right\" width=\"15%\">"._("Size")."</th> ".
704 "<th bgcolor=\"#CCCCFF\" align=\"left\">"._("Age").
705 "[<a href=\"$big_url&ns=0\">"._("sort")."</a>]</th>".
708 // for ($i = $off; $i < $off + $count; $i++) {
709 foreach ($result as $row) {
710 $dist = $row["dist"];
711 $arch = $row["arch"];
712 $name = $row["name"];
713 $name_url = urlencode($name);
716 $t = $now - $row["mtime"];
724 $t = $t . " " . ngettext("day","days",$t);
727 $t = $t . " " . ngettext("hour","hours",$t);
731 $t = $t . " " . ngettext("minute","minutes",$t);
734 // $big_url = "$url?idx=$i&ok=$j&ns=$ns&cnt=$cnt";
736 $u = "$url?dist=$dist&arch=$arch&name=$name_url&ok=$ok&id=$id";
737 $b = "$url?dist=$dist&arch=$arch&ok=$ok&ns=$ns&off=$off&cnt=$cnt";
739 $builder = "$dist/$arch/". $fail_or_ok[$ok];
741 echo "<td bgcolor=\"#CCCCCC\"><a href=\"$b\">$builder</a></td>";
742 echo "<td bgcolor=\"#CCCCCC\"><a href=\"$u\">$f</a> ".
743 "[<a href=\"$u&action=text\">"._("text")."</a> | ".
744 "<a href=\"$u&action=tail\">"._("tail")."</a>]".
745 "</td><td bgcolor=\"#CCCCCC\" align=\"right\">".
746 "$s</td><td bgcolor=\"#CCCCCC\">$t</td></tr>\n";
749 echo "</table></div>\n";
751 $backarr = "<<< ";
752 $back = _("Page back");
753 $forward = _("Page forward");
754 $forwardarr = " >>>";
759 echo "<p><table width=\"90%\" align=\"center\"><tr><td align=left width=1%>";
765 $hrefurl = "<a href=\"$big_url&off=$noff\">";
766 echo "$hrefurl$backarr</a></td><td align=left>$hrefurl$back</a>";
768 echo "$backarr</td><td align=left>$back";
771 echo "</td>\n<td align=\"center\">";
772 echo "</td>\n<td align=\"right\">";
774 if ($off + $cnt < count($list))
779 $hrefurl = "<a href=\"$big_url&off=$noff\">";
780 echo "$hrefurl$forward</a></td><td align=\"right\" width=\"1%\">$hrefurl$forwardarr</a>";
784 echo "$forward</td><td align=\"right\" width=\"1%\">$forwardarr";
787 echo "</td>\n</tr></table></p>";
791 echo _("Enter something!");
799 <table border="0" width="100%"><tr><td width="20%"> </td><td>
800 <h1><?=_("Welcome!")?></h1>
801 <p><?=_("Welcome to PLD Build Logs WWW interface.")?></p><p>
802 <?=_("Feel free to email bug reports, complaints and feature requests ")?>
803 <!-- ech... niech strace... -->
804 <a href="mailto:feedback@pld-linux.org"><?=_("to us")?></a>. <?=_("Positive opinions are also")?>
805 <a href="mailto:feedback@pld-linux.org"><?=_("welcome")?></a> ;)</p>
806 <p>Version: $Id: index.php,v 1.9 2009/03/02 11:10:33 glen Exp $</p>
807 </td><td width="20%"> </td></tr>
812 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
813 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
814 header("Cache-Control: no-cache, must-revalidate");
815 header("Pragma: no-cache");
818 if ($action == "text") {
820 } else if ($action == "adv_search") {
824 } else if ($action == "qatxt") {
828 echo "<table cellpadding=\"10\" width=\"100%\"><tr><td valign=\"top\" width=\"10%\">";
830 echo "</td><td valign=\"top\">";
834 else if ($action == "sqa")
836 else if (isset($id) || isset($name))
837 dump_log($action == "tail");
838 else if (isset($dist))
842 echo "</td></tr></table>";