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"];
79 echo '<' . '?xml version="1.0" encoding="' . _("ISO-8859-1") .'"?' . ">\n";
80 echo '<' . '?xml-stylesheet href="#internalStyle" type="text/css"?' . ">\n";
82 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
83 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
84 <html xmlns="http://www.w3.org/1999/xhtml">
86 <title>PLD Build Logs</title>
87 <?php echo '<meta http-equiv="Content-type" content="text/html; charset=' . _("ISO-8859-1") .'"/>' ."\n";?>
88 <style type="text/css"><!--
89 A { text-decoration: none; }
90 A:hover { text-decoration: underline; }
91 H1 { font-family: arial,helvetica,sans-serif;
94 H2 { font-family: arial,helvetica,sans-serif;
97 BODY,TD { font-family: arial,helvetica,sans-serif;
99 TH { font-family: arial,helvetica,sans-serif;
102 /* error lines from build logs */
104 background-color: #b00;
111 background-color: #161;
116 <!-- Diffrent color for visited link doesn't make much sense here...
117 this page is autogenerated and it might be misleading after some
118 build log changes. -->
119 <body bgcolor="#ffffff" text="#000000" link="#5f26cd" vlink="#5f26cd">
125 echo "<table cellpadding=\"10\"><tr><td bgcolor=\"#000000\">".
126 "<font color=\"#cccccc\"><pre style=\"width: 2048px;overflow: scroll\">";
131 echo "</pre></font></td></tr></table>\n";
136 echo "</body></html>";
142 echo "Fatal error: $msg";
150 global $arch, $dist, $ok;
151 global $big_url, $ns;
152 global $off, $cnt, $root_directory, $url;
154 $big_url = "$url?dist=$dist&arch=$arch&ok=$ok&ns=$ns&cnt=$cnt";
157 echo "<h1>"._("Listing of")." $dist/$arch/OK "
158 ."(<a href=\"$big_url&ok=0\">"._("fail")."</a>)</h1>\n";
160 echo "<h1>"._("Listing of")." $dist/$arch/FAIL "
161 ."(<a href=\"$big_url&ok=1\">"._("ok")."</a>)</h1>\n";
164 echo "<div align=\"center\"><table cols=\"4\" border=\"0\" cellspacing=\"1\" ".
165 "cellpadding=\"3\" bgcolor=\"#000000\" width=\"90%\">\n";
166 echo "<tr><th bgcolor=\"#CCCCFF\" align=\"right\" width=\"1%\">"._("No.")."</th>".
167 "<th bgcolor=\"#CCCCFF\" align=\"left\" width=\"80%\">"._("Log File").
168 "[<a href=\"$big_url&ns=1\">"._("sort")."</a>]</th>".
169 "<th bgcolor=\"#CCCCFF\" align=\"right\" width=\"15%\">"._("Size")."</th> ".
170 "<th bgcolor=\"#CCCCFF\" align=\"left\">"._("Age").
171 "[<a href=\"$big_url&ns=0\">"._("sort")."</a>]</th>".
174 if ($ns != 1) $ns = 0;
175 if (!isset($ok)) $ok = 0;
176 // if (!isset($off)) $off = 0;
177 // if (!isset($cnt)) $cnt = 50;
178 if ($ns == 0) $order = "mtime DESC";
179 else $order = "name";
181 $query = "SELECT log_id, dist, arch, ok, name, mtime, size, id FROM logs WHERE "
182 . "dist = '$dist' AND arch = '$arch' AND ok = $ok ORDER BY $order LIMIT $cnt OFFSET $off";
185 $dbh = new PDO("$database");
186 } catch (PDOException $e) {
187 mydie("new PDO: " . $e->getMessage());
191 foreach ($dbh->query("$query") as $row) {
192 $name = $row["name"];
194 $dist = $row["dist"];
195 $arch = $row["arch"];
197 $name_url = urlencode($name);
198 $t = $now - $row["mtime"];
208 $t = $t . " " . ngettext("day","days",$t);
211 $t = $t . " " . ngettext("hour","hours",$t);
215 $t = $t . " " . ngettext("minute","minutes",$t);
217 $u = "$url?dist=$dist&arch=$arch&ok=$ok&name=$name_url&id=$id";
218 echo "<tr><td bgcolor=\"#CCCCCC\" align=\"right\">".($i+1).".</td>".
219 "<td bgcolor=\"#CCCCCC\"><a href=\"$u\">$f</a> ".
220 "[<a href=\"$u&action=text\">"._("text")."</a> | ".
221 "<a href=\"$u&action=tail\">"._("tail")."</a>]".
222 "</td><td bgcolor=\"#CCCCCC\" align=\"right\">".
223 "$s</td><td bgcolor=\"#CCCCCC\">$t</td></tr>\n";
227 echo "</table></div>\n";
229 $backarr = "<<< ";
230 $back = _("Page back");
231 $forward = _("Page forward");
232 $forwardarr = " >>>";
234 echo "<p><table width=\"90%\" align=\"center\"><tr><td align=\"left\" width=\"1%\">";
237 $noff = $off - $count;
240 $hrefurl = "<a href=\"$big_url&off=$noff\">";
241 echo "$hrefurl$backarr</a></td><td align=\"left\">$hrefurl$back</a>";
243 echo "$backarr</td><td align=\"left\">$back";
246 echo "</td>\n<td align=\"center\">";
248 if (isset($dist) && isset($arch)) {
249 echo "[<a href=\"$big_url&action=qa\">"._("View <quot>rpm -qa</quot> of builder")."</a>]";
254 echo "</td>\n<td align=right>";
255 if ($cnt == $count) {
259 $hrefurl = "<a href=\"$big_url&off=$noff\">";
260 echo "$hrefurl$forward</a></td><td align=right width=1%>$hrefurl$forwardarr</a>";
262 echo "$forward</td><td align=right width=1%>$forwardarr";
264 echo "</td>\n</tr></table></p>";
269 global $ok, $dist, $arch, $name, $name_url, $id;
271 if (isset($name) && isset($ok) && isset($arch) && isset($dist)) {
272 if (isset($id) && $id != '') {
273 $name = $name . ",$id";
275 $w = $ok ? "OK" : "FAIL";
276 return "$dist/$arch/$w/$name.bz2";
280 function dump_log($tail)
282 global $ok, $url, $dist, $arch, $name, $name_url;
283 global $root_directory, $big_url, $ns, $id, $cnt, $off;
284 global $buildlogs_server;
291 $df = preg_replace("/.*\/([^\/]*)$/", "\\1", $f);
292 $df = preg_replace("/\.(bz2|gz)$/", "", $df);
296 echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#000000\">";
298 function one_item($h, $t) {
299 echo "<tr><td bgcolor=\"#ccccff\">$h:</td>".
300 "<td bgcolor=\"#cccccc\">$t</td></tr>";
303 function href($h, $c) {
304 return "<a href=\"$h\">$c</a>";
307 one_item(_("Status"), ($ok == 1 ?
308 "<font color=\"green\"><b>"._("OK")."</b></font>" :
309 "<font color=\"red\"><b>"._("Failed")."</b></a>"));
310 one_item(_("Source URL"),
311 href("ftp://$buildlogs_server/$f",
312 "ftp://$buildlogs_server/$f"));
314 $big_url = "$url?dist=$dist&arch=$arch&ok=$ok&ns=$ns&cnt=$cnt";
315 $bu = "$big_url&off=$off";
317 one_item(_("text/plain URL"),
318 href("$bu&name=$name_url&id=$id&action=text",
321 one_item(_("full text"),
322 href("$bu&name=$name_url&id=$id",
326 if (isset($dist) && isset($arch)) {
327 one_item(_("rpm -qa of builder"), href("$bu&action=qa", _("View!")));
329 one_item(_("rpm -qa of builder"), _("Not available"));
331 one_item("Date", date("Y/m/d H:i:s", filemtime("$root_directory/$f")));
333 echo "<tr><td>Here:</td><td>" .
334 "<a href=\"$url?idx=$idx&ok=$ok&id=$id\">".
335 "http://" . getenv("SERVER_NAME") .
336 getenv("SCRIPT_NAME") . "?idx=$idx&ok=$ok&id=$id</a>" .
341 # what can I say beside PHP suxx? how the fuck should I create
342 # bidirectional pipe? gotta use wget
344 if (preg_match("/\.bz2$/", $f)) {
346 } elseif (preg_match("/\.gz$/", $f)) {
352 $cmd = "$filter '$root_directory/$f'";
354 $cmd = "$cmd | tail -n 100";
355 $fd = popen($cmd, "r");
359 while (($s = fgets($fd, 102400)) != false) {
360 if (strlen($s) > 800) {
361 $s = chunk_split($s, 800, "\n ");
364 $s = htmlspecialchars($s);
366 if (preg_match("/errors?:/i", $s)) {
368 $toc[] = "error $err_count";
370 $s = "<span class=error id=error-$err_count>$s</span>";
371 } elseif (substr($s, 0, 2) == "+ ") {
373 $s = "<span class=verbose>$s</span>";
374 } elseif (preg_match("/^Executing\(%(?P<section>\w+)\)/", $s, $m)) {
376 $toc[] = $m['section'];
378 $s = "<span class=section id={$m['section']}>$s</span>";
379 } elseif (preg_match("/^Processing files: (?P<pkg>(?P<name>.+)-[^-]+-[^-]+)/", $s, $m)) {
381 $toc[] = "files ".$m['name'];
383 $s = "<span class=section id=files-{$m['name']}>$s</span>";
388 $code = ob_get_contents();
394 echo "<h2>"._("Toc:")."</h2>";
395 echo "<ul class=toc>";
396 foreach ($toc as $i => $section) {
397 $id = str_replace(" ", "-", $section);
398 echo "<li><a href=#{$id}>{$section}</a></li>";
399 echo "<code>{$err[$i]}</code>";
404 echo "<h2>"._("Content:")."</h2>";
414 [<a href="<?php echo $bu; ?>"><?=_("Back to list of logs")?></a>]
417 [<a href="<?php echo "$bu&action=qa"
418 ?>"><?=_("View rpm -qa of builder")?></a>]
428 global $root_directory;
429 global $buildlogs_server;
431 header("Content-type: text/plain");
437 echo "# src : ftp://$buildlogs_server/$f\n";
439 date("Y/m/d H:i:s", filemtime("$root_directory/$f")) . "\n";
441 if (preg_match("/\.bz2$/", $f)) {
443 } elseif (preg_match("/\.gz$/", $f)) {
449 $cmd = "$filter '$root_directory/$f'";
450 $fd = popen($cmd, "r");
451 while (($s = fgets($fd, 1000)) != false) {
457 function list_archs()
459 global $addr, $url, $cnt,$ok,$ns;
464 $big_url = "$url?ok=$ok&ns=$ns&cnt=$cnt";
466 echo "<table width=\"100%\" border=\"0\">\n";
467 echo "<tr><td bgcolor=\"#cccccc\" nowrap=\"nowrap\">"._("Failed")."</td><td bgcolor=\"#cccccc\">"._("Ok")."</td></tr>\n";
468 foreach ($addr as $dist => $ddist) {
469 foreach ($ddist as $arch) {
470 echo "<tr><td nowrap=\"nowrap\">".
471 "<a href=\"$url?dist=$dist&arch=$arch&ok=0&cnt=$cnt\">
472 $dist/$arch</a></td><td nowrap=\"nowrap\">".
473 "[<a href=\"$url?dist=$dist&arch=$arch&ok=1&cnt=$cnt\">OK</a>]</td>".
474 #"<td>[<a href=\"$url?idx=$i&action=qa\">qa</a>]</td>".
478 echo "</table><hr />\n";
480 echo "<div align=\"center\">";
481 echo "<a href=\"$big_url&action=adv_search\">"._("Advanced Search")."</a><br />\n";
483 echo "<a href=\"$url\">main()</a><hr />\n";
484 echo "<a href=\"http://www.pld-linux.org/\"><img src=\"powpld.png\" ".
485 "alt=\""._("Powered by PLD Linux")."\" border=\"0\" /></a><br />\n" .
487 "<a href=\"mailto:feedback@pld-linux.org\">PLD Team</a><br />\n".
492 echo "<div align=\"center\"><small>";
493 $pow = array("vim", "php", "brain", "power", "electricity",
494 "coffee", "ufo", "penguin", "GNOME", "ELF", "DWARF",
495 "voodoo magic", "Linux", "x-files", "X", "foobar",
496 "/dev/null", "/dev/zero", "/dev/drzewo",
497 "Leppe'", "matrix", "Neo", "PDP-11",
498 "Ken", "GNU antilope", "PDP-7", "ITS", "Multics",
499 "foobarbaz", "ed", "Joe", "Unix conspiracy",
500 "overclock", "The Right Thing",
501 "The Bad Thing", "Star Treck", "NSA", "NASA",
502 "achelon", "VAX", "Real Programmer",
503 "Real Operating System", "Real Computer",
504 "computron", "bogon", "quantum bogodynamics",
505 "BOFH", "/dev/ill", "nasi tu byli",
506 "Paranoid Android", "Lunatic Corp", "Parallel thinking",
507 "sfistak", "Linus", "The Golden Path", "Dark Side of the Force",
508 "Przewodniczacego Lepper-a", "KDE", "Microsoft Windows 2003", "sqlite3",
509 "synergy", "six Cray XMT Supercomputers"
510 # feel free to add sth if you change this file ;)
512 echo _("Powered by")." ";
514 for ($i = 0; $i < $max; $i++) {
515 $x = rand(0, count($pow) - 1);
516 if ($pow[$x] == "") $i--;
517 else echo $pow[$x] . ($i == $max - 1 ? "." : ", ");
520 echo "</small></div>";
522 echo "<div align=\"center\"><small>";
523 echo "Your IP: " . $_SERVER['REMOTE_ADDR'];
524 echo "</small></div>";
526 if (isset($dist) && isset($arch)) {
527 echo "<form action=\"index.php\" method=\"post\">";
528 echo "<input type=\"hidden\" name=\"dist\" value=\"$dist\" />";
529 echo "<input type=\"hidden\" name=\"arch\" value=\"$arch\" />";
530 echo "<input type=\"hidden\" name=\"action\" value=\"sqa\" />";
531 echo "<input type=\"text\" size=\"14\" name=\"str\" /><br />";
532 echo "<input type=\"submit\" name=\"submit\" value=\""._("Search rpmqa!")."\" />";
541 if (!isset($dist) || !isset($arch))
543 $addr = "http://ftp1.pld-linux.org/dists/$dist/.stat/builder/$dist/rpmqa-$arch.txt";
544 return fopen("$addr", "r");
549 global $url, $str, $dist, $arch;
552 echo "<h1>"._("Search results for")." '$str' "._("in")." $dist/$arch</h1>";
557 echo _("Sorry, cannot open.");
559 while (($s = fgets($f, 1000)) != false) {
560 if (stristr($s, $str))
568 function dump_qa($plain)
570 global $url, $dist, $arch;
575 header("Content-type: text/plain");
576 echo _("# rpm -qa of")." $dist/$arch\n";
578 echo "<h1>"._("rpm -qa of")." $a</h1>";
579 echo "<a href=\"$url?dist=$dist&arch=$arch&action=qatxt\">"._("text/plain version")."</a>";
584 echo _("Sorry, cannot open.");
586 while (($s = fgets($f, 1000)) != false) {
596 function adv_search()
598 global $database, $addr, $fail_or_ok, $url, $_POST, $off, $cnt, $root_directory, $ok, $ns;
600 $big_url = "$url?ok=$ok&ns=$ns&cnt=$cnt";
602 echo "<script><!--\n".
603 "function checkboxToggle() {\n".
604 "for (var i=0;i<document.forms[0].elements.length;i++) {\n".
605 "var e = document.forms[0].elements[i];\n".
606 "if ((e.name != 'all') && (e.type=='checkbox'))\n".
607 "e.checked = document.forms[0].all.checked;\n".
608 "}\n }\n -->\n </script>\n";
610 /* Shut up warnings */
611 if (!isset($_POST["n2"])) $_POST["n2"] = "";
612 if (!isset($_POST["age1"])) $_POST["age1"] = "";
613 if (!isset($_POST["age2"])) $_POST["age2"] = "";
614 if (!isset($_POST["size1"])) $_POST["size1"] = "";
615 if (!isset($_POST["size2"])) $_POST["size2"] = "";
617 echo "<form action=\"index.php?action=adv_search\" method=\"post\">";
619 echo "<div align=\"center\">";
620 echo "<table border=\"0\">\n";
622 echo "<td>"._("Package name")."</td>\n";
623 echo "<td><input type=\"text\" size=\"20\" name=\"n2\" value=\"". $_POST["name"] ."\"/></td>\n";
627 echo "<td>"._("Days")."</td>\n";
628 echo "<td>"._("From").": <input type=\"text\" size=\"20\" name=\"age1\" value=\"". $_POST["age1"] ."\" /></td>\n";
629 echo "<td>"._("To").": <input type=\"text\" size=\"20\" name=\"age2\" value=\"". $_POST["age2"] ."\" /></td>\n";
633 echo "<td>"._("Size")."</td>\n";
634 echo "<td>"._("From").": <input type=\"text\" size=\"20\" name=\"size1\" value=\"". $_POST["size1"] ."\" /></td>\n";
635 echo "<td>"._("To").": <input type=\"text\" size=\"20\" name=\"size2\" value=\"". $_POST["size2"] ."\" /></td>\n";
639 echo "<td>"._("Search logs:")."</td>\n";
643 echo "<td>"._("Failed")."</td>\n";
644 echo "<td>"._("OK")."</td>\n";
648 foreach ($addr as $dist => $ddist) {
649 foreach ($ddist as $arch) {
652 if (!isset($_POST["$name"])) {
655 $check=" checked='checked'";
657 echo "<td><input name=\"$name\" id=\"$name\" type=\"checkbox\"$check /><label for=\"$name\">". "$dist/$arch" ."</label></td>\n";
659 if (!isset($_POST["$n2"])) {
662 $check=" checked='checked'";
664 echo "<td><input name=\"$name\" id=\"$name\" type=\"checkbox\"$check /><label for=\"$name\">". "$dist/$arch" ."</label></td>\n";
671 echo "<td><label><input name=\"all\" type=\"checkbox\" checked=\"on\" onClick=\"checkboxToggle()\">"._("Toggle checkboxes")."</label> <input type=\"submit\" name=\"submit\" value=\""._("Search!")."\" /></td>";
676 // if (isset($_POST["name"]) || isset($_POST["age1"]) || isset($_POST["age2"]) ||
677 // isset($_POST["size1"]) || isset($_POST["size2"])
678 if (($_POST["n2"]!="") || ($_POST["age1"]!="") || ($_POST["age2"]!="") ||
679 ($_POST["size1"]!="") || ($_POST["size2"]!=""))
681 $query = "SELECT log_id, dist, arch, ok, name, size, mtime, id FROM logs WHERE 1 ";
682 if ($_POST["n2"] != "") {
683 $n = addslashes($_POST["n2"]);
684 $query .= "AND name LIKE '$n%' ";
688 if ($_POST["age1"] != "") {
689 $age = $now - (int)$_POST["age1"] * 24 * 3600;
690 $query .= "AND mtime > $age ";
693 if ($_POST["age2"] != "") {
694 $age = $now - (int)$_POST["age2"] * 24 * 3600;
695 $query .= "AND mtime < $age ";
698 if ($_POST["size1"] != "") {
699 $size = (int)$_POST["size1"];
700 $query .= "AND size > $size ";
703 if ($_POST["size2"] != "") {
704 $size = (int)$_POST["size2"];
705 $query .= "AND size < $size ";
710 foreach ($addr as $dist => $ddist) {
711 foreach ($ddist as $arch) {
712 for ($j = 0; $j < 2; $j++) {
713 if (isset($_POST["as" . $j . "_" .$i])) {
714 $query .= "$or (dist = '$dist' AND arch = '$arch' AND ok = $j)";
721 if ($or == " OR ") $query .= ")";
722 // if (!isset($cnt)) $cnt = 50;
723 // if (!isset($off)) $off = 0;
724 if (!isset($ns)) $ns = 0;
727 $query .= " ORDER BY mtime DESC";
730 $query .= " ORDER BY name";
733 $query .= " ORDER BY dist, arch, name";
736 $query .= " LIMIT $cnt OFFSET $off ";
739 $dbh = new PDO("$database");
740 } catch (PDOException $e) {
741 mydie("new PDO: " . $e->getMessage());
743 $result = $dbh->query("$query")->fetchAll();
745 if ($result == FALSE) {
746 echo _("Nothing found");
748 echo "<table border=\"0\" cellspacing=\"1\" ".
749 "cellpadding=3 bgcolor=\"#000000\" width=\"90%\">\n";
750 echo "<tr><th bgcolor=\"#CCCCFF\" align=\"left\" width=\"10%\">"._("Builder").
751 "[<a href=\"$big_url&ns=2\">"._("sort")."</a>]</th>";
752 echo "<th bgcolor=\"#CCCCFF\" align=\"left\" width=\"60%\">"._("Log File").
753 "[<a href=\"$big_url&ns=1\">"._("sort")."</a>]</th>".
754 "<th bgcolor=\"#CCCCFF\" align=\"right\" width=\"15%\">"._("Size")."</th> ".
755 "<th bgcolor=\"#CCCCFF\" align=\"left\">"._("Age").
756 "[<a href=\"$big_url&ns=0\">"._("sort")."</a>]</th>".
759 // for ($i = $off; $i < $off + $count; $i++) {
760 foreach ($result as $row) {
761 $dist = $row["dist"];
762 $arch = $row["arch"];
763 $name = $row["name"];
764 $name_url = urlencode($name);
767 $t = $now - $row["mtime"];
775 $t = $t . " " . ngettext("day","days",$t);
778 $t = $t . " " . ngettext("hour","hours",$t);
782 $t = $t . " " . ngettext("minute","minutes",$t);
785 // $big_url = "$url?idx=$i&ok=$j&ns=$ns&cnt=$cnt";
787 $u = "$url?dist=$dist&arch=$arch&name=$name_url&ok=$ok&id=$id";
788 $b = "$url?dist=$dist&arch=$arch&ok=$ok&ns=$ns&off=$off&cnt=$cnt";
790 $builder = "$dist/$arch/". $fail_or_ok[$ok];
792 echo "<td bgcolor=\"#CCCCCC\"><a href=\"$b\">$builder</a></td>";
793 echo "<td bgcolor=\"#CCCCCC\"><a href=\"$u\">$f</a> ".
794 "[<a href=\"$u&action=text\">"._("text")."</a> | ".
795 "<a href=\"$u&action=tail\">"._("tail")."</a>]".
796 "</td><td bgcolor=\"#CCCCCC\" align=\"right\">".
797 "$s</td><td bgcolor=\"#CCCCCC\">$t</td></tr>\n";
800 echo "</table></div>\n";
802 $backarr = "<<< ";
803 $back = _("Page back");
804 $forward = _("Page forward");
805 $forwardarr = " >>>";
810 echo "<p><table width=\"90%\" align=\"center\"><tr><td align=left width=1%>";
816 $hrefurl = "<a href=\"$big_url&off=$noff\">";
817 echo "$hrefurl$backarr</a></td><td align=left>$hrefurl$back</a>";
819 echo "$backarr</td><td align=left>$back";
822 echo "</td>\n<td align=\"center\">";
823 echo "</td>\n<td align=\"right\">";
825 if ($off + $cnt < count($list))
830 $hrefurl = "<a href=\"$big_url&off=$noff\">";
831 echo "$hrefurl$forward</a></td><td align=\"right\" width=\"1%\">$hrefurl$forwardarr</a>";
835 echo "$forward</td><td align=\"right\" width=\"1%\">$forwardarr";
838 echo "</td>\n</tr></table></p>";
842 echo _("Enter something!");
844 echo "</div></form>\n";
850 <table border="0" width="100%"><tr><td width="20%"> </td><td>
851 <h1><?=_("Welcome!")?></h1>
852 <p><?=_("Welcome to PLD Build Logs WWW interface.")?></p><p>
853 <?=_("Feel free to email bug reports, complaints and feature requests ")?>
854 <!-- ech... niech strace... -->
855 <a href="mailto:feedback@pld-linux.org"><?=_("to us")?></a>. <?=_("Positive opinions are also")?>
856 <a href="mailto:feedback@pld-linux.org"><?=_("welcome")?></a> ;)</p>
857 <p>Version: $Id: index.php,v 1.21 2013/09/07 16:58:53 glen Exp $</p>
858 </td><td width="20%"> </td></tr>
863 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
864 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
865 header("Cache-Control: no-cache, must-revalidate");
866 header("Pragma: no-cache");
869 if ($action == "text") {
871 } else if ($action == "adv_search") {
875 } else if ($action == "qatxt") {
879 echo "<table cellpadding=\"10\" width=\"100%\"><tr><td valign=\"top\" width=\"10%\">";
881 echo "</td><td valign=\"top\">";
885 else if ($action == "sqa")
887 else if (isset($id) || isset($name))
888 dump_log($action == "tail");
889 else if (isset($dist))
893 echo "</td></tr></table>";