<?php
-ob_start("ob_gzhandler");
+ob_start("ob_gzhandler", 1);
$buildlogs_server = "buildlogs.pld-linux.org";
$url = "index.php";
$addr = array(
- "",
+ "", /* must be first */
"th/SRPMS",
"th/i486",
"th/i686",
);
$fail_or_ok = array( "FAIL", "OK" );
$qa_addr = array(
+ "", /* must be first */
"http://ftp.pld-linux.org/dists/th/.stat/builder/th/rpmqa-SRPMS.txt",
"http://ftp.pld-linux.org/dists/th/.stat/builder/th/rpmqa-i486.txt",
"http://ftp.pld-linux.org/dists/th/.stat/builder/th/rpmqa-i686.txt",
$local = 1; /* $local=0 for FTP */
$root_directory = "/home/services/ftp/pub/pld-buildlogs";
+
+// $database and $root_directory are taken from buildlogs.inc
+include_once('buildlogs.inc');
+
$ftp_conn = 0;
/* It should be set */
if (isset($_GET["ns"]))$ns=(int)$_GET["ns"];
else $ns="";
if (isset($_GET["cnt"]))$cnt=(int)$_GET["cnt"];
+else $cnt = 50;
if (isset($_GET["action"]))$action=$_GET["action"];
else $action="";
if (isset($_GET["off"]))$off=(int)$_GET["off"];
+else $off = 0;
if (isset($_GET["id"]))$id=$_GET["id"];
if (isset($_GET["log"]))$log=(int)$_GET["log"];
}
*/
if ($ns != 1) $ns = 0;
- if (!isset($idx)) $idx = 0;
+ if (!isset($idx)) $idx = 1;
if (!isset($ok)) $ok = 0;
- if (!isset($off)) $off = 0;
- if (!isset($cnt)) $cnt = 50;
+// if (!isset($off)) $off = 0;
+// if (!isset($cnt)) $cnt = 50;
if ($ns == 0) $order = "mtime DESC";
else $order = "spec";
function file_name_log($l)
{
- global $database, $addr, $fail_or_ok;
+ global $database, $addr, $fail_or_ok, $idx, $ok;
try {
$dbh = new PDO($database);
} catch (PDOException $e) {
$f = false;
foreach ($dbh->query("SELECT arch_id, result, spec FROM logs WHERE log_id = $l LIMIT 1") as $row) {
$f = $addr[$row["arch_id"]] . "/" . $fail_or_ok[$row["result"]] . "/" . $row["spec"] . ".bz2";
+ $idx = $row["arch_id"]; /* for rpmqa */
+ $ok = $row["result"]; /* for status */
}
return $f;
}
if ($tail) {
one_item(_("full text"),
href(isset($log) ? "$url?log=$log" : "$bu&id=$id",
- "View!"));
+ _("View!")));
}
if ($qa_addr[$idx] != "") {
"alt=\""._("Powered by PLD Linux")."\" border=\"0\" /></a><br />\n" .
"<small>(c) 2002 ".
"<a href=\"mailto:feedback@pld-linux.org\">PLD Team</a><br />\n".
- '$Revision: 1.1 $'.
+ '$Revision: 1.2 $'.
"</small></div>\n";
# smile ;)
"e.checked = document.forms[0].all.checked;\n".
"}\n }\n -->\n </script>\n";
+/* Shut up warnings */
+ if (!isset($_POST["name"])) $_POST["name"] = "";
+ 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 "<form action=\"index.php?action=adv_search\" method=\"post\">";
echo "<div align=\"center\">";
echo "<table border=\"0\">\n";
echo "<tr>\n";
echo "<td>"._("Package name")."</td>\n";
- echo "<td><input type=\"text\" size=\"20\" name=\"name\" value=\"".$_POST["name"]."\"/></td>\n";
+ echo "<td><input type=\"text\" size=\"20\" name=\"name\" value=\"". $_POST["name"] ."\"/></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>"._("Days")."</td>\n";
- echo "<td>"._("From").": <input type=\"text\" size=\"20\" name=\"age1\" value=\"".$_POST["age1"]."\" /></td>\n";
- echo "<td>"._("To").": <input type=\"text\" size=\"20\" name=\"age2\" value=\"".$_POST["age2"]."\" /></td>\n";
+ echo "<td>"._("From").": <input type=\"text\" size=\"20\" name=\"age1\" value=\"". $_POST["age1"] ."\" /></td>\n";
+ echo "<td>"._("To").": <input type=\"text\" size=\"20\" name=\"age2\" value=\"". $_POST["age2"] ."\" /></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>"._("Size")."</td>\n";
- echo "<td>"._("From").": <input type=\"text\" size=\"20\" name=\"size1\" value=\"".$_POST["size1"]."\" /></td>\n";
- echo "<td>"._("To").": <input type=\"text\" size=\"20\" name=\"size2\" value=\"".$_POST["size2"]."\" /></td>\n";
+ echo "<td>"._("From").": <input type=\"text\" size=\"20\" name=\"size1\" value=\"". $_POST["size1"] ."\" /></td>\n";
+ echo "<td>"._("To").": <input type=\"text\" size=\"20\" name=\"size2\" value=\"". $_POST["size2"] ."\" /></td>\n";
echo "</tr>\n";
echo "<tr>\n";
}
}
if ($or == " OR ") $query .= ")";
- if (!isset($cnt)) $cnt = 50;
- if (!isset($off)) $off = 0;
+// if (!isset($cnt)) $cnt = 50;
+// if (!isset($off)) $off = 0;
if (!isset($ns)) $ns = 0;
switch ($ns) {
case 0:
"[<a href=\"$big_url&ns=0\">"._("sort")."</a>]</th>".
"</th></tr>";
$i = $off;
- foreach ($result as $row) {
// for ($i = $off; $i < $off + $count; $i++) {
+ foreach ($result as $row) {
$f = $row["spec"];
$t = $now - $row["mtime"];
$s = $row["size"];
<!-- ech... niech strace... -->
<a href="mailto:feedback@pld-linux.org"><?=_("to us")?></a>. <?=_("Positive opinions are also")?>
<a href="mailto:feedback@pld-linux.org"><?=_("welcome")?></a> ;)</p>
-<p>Version: $Id: index.php,v 1.1 2006-10-03 18:32:27 witekfl Exp $</p>
+<p>Version: $Id: index.php,v 1.2 2007-11-18 10:00:17 witekfl Exp $</p>
</td><td width="20%"> </td></tr>
</table>
<?php