}
if (ftp_login($ftp, "anonymous",
- "buildlogs-iface@pld.org.pl") == false) {
+ "buildlogs-iface@pld-linux.org") == false) {
ftp_quit($ftp);
mydie("cannot ftp login to $buildlogs_server");
return false;
function list_archs()
{
- global $addr, $url;
+ global $addr, $url, $idx;
echo "<table width=100% border=0>\n";
echo "<tr><td bgcolor=#cccccc nowrap=1>Failed</td><td bgcolor=#cccccc>Ok</td></tr>\n";
"</tr>\n";
echo "</table><hr />\n";
echo "<div align=\"center\"><a href=\"$url\">main()</a><hr />\n";
- echo "<a href=\"http://www.pld.org.pl/\"><img src=powpld.png ".
+ echo "<a href=\"http://www.pld-linux.org/\"><img src=powpld.png ".
"alt=\"Powered by PLD Linux\" border=0></a><br />\n" .
"<small>(c) 2002 ".
"<a href=\"mailto:feedback@pld.org.pl\">PLD Team</a>\n".
}
echo "</small></div>";
+
+ global $qa_addr;
+
+ if ($qa_addr[$idx] != "") {
+ echo "<form action=\"index.php\" method=\"post\">";
+ echo "<input type=hidden name=idx value=$idx />";
+ echo "<input type=hidden name=action value=sqa />";
+ echo "<input type=text size=14 name=str /><br/>";
+ echo "<input type=submit name=submit value=\"Search rpmqa!\" />";
+ echo "</form>";
+ }
+
}
-function dump_qa($plain)
+function get_qa()
{
- global $url, $idx, $qa_addr, $qa_base;
+ global $idx, $qa_addr, $qa_base;
if (!isset($idx) || !isset($qa_addr[$idx]))
return false;
$a = $qa_addr[$idx];
+ if ($qa_addr[$idx] == "")
+ return false;
+ else
+ return fopen("$qa_base$qa_addr[$idx]", "r");
+}
+
+function search_qa()
+{
+ global $url, $idx, $qa_addr, $str;
+
+ $f = get_qa();
+ echo "<h1>Search results for '$str' in $qa_addr[$idx]</h1>";
+
+ 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, $idx, $qa_addr;
+
+ $a = $qa_addr[$idx];
+
+ $f = get_qa();
+
if ($plain) {
header("Content-type: text/plain");
echo "# rpm -qa of $a\n";
start_pre();
}
- if ($qa_addr[$idx] == "") {
- echo "Sorry... not found.";
+ if ($f == 0) {
+ echo "Sorry, cannot open.";
} else {
- $f = fopen("$qa_base$qa_addr[$idx]", "r");
- if ($f == 0) {
- echo "Sorry, cannot open $qa_base$qa_addr[$idx]";
- } else
- while (($s = fgets($f, 1000)) != false) {
- echo $s;
- }
+ while (($s = fgets($f, 1000)) != false) {
+ echo $s;
+ }
}
if (!$plain)
<p>Welcome to PLD Build Logs WWW interface.</p><p>
Feel free to email bug reports, complaints and feature requests
<!-- ech... niech strace... -->
-<a href="mailto:malekith (at) pld org pl">to us</a>. Positive opinions are also
-<a href="mailto:malekith (at) pld org pl">welcome</a> ;)</p>
-<p>Version: $Id: index.php,v 1.7 2002/05/04 19:23:30 kloczek Exp $</p>
+<a href="mailto:malekith /at/ pld-linux org">to us</a>. Positive opinions are also
+<a href="mailto:malekith /at/ pld-linux org">welcome</a> ;)</p>
+<p>Version: $Id: index.php,v 1.8 2002/05/11 13:51:18 malekith Exp $</p>
</td><td width=20%> </td></tr>
</table>
<?php
flush();
if ($action == "qa")
dump_qa(0);
+ else if ($action == "sqa")
+ search_qa();
else if (isset($id))
local_dump_log($action == "tail");
else if (isset($idx))