]> git.pld-linux.org Git - projects/buildlogs.git/blobdiff - obsolete/buildlogs/index.php
- fixed few undefined variables
[projects/buildlogs.git] / obsolete / buildlogs / index.php
index 49a632fba93a17ba01029483be057c18b09e04e7..655180d7f159ae072770fdff7c268779e5fdb47d 100644 (file)
@@ -1,35 +1,49 @@
 <?php
-$buildlogs_server = "buildlogs.pld.org.pl";
+$buildlogs_server = "buildlogs.pld-linux.org";
 $url = "index.php";
 $addr = array(
-       "/nest/athlon",
-       "/nest/i386",
-       "/nest/i586",
-       "/nest/i686",
-       "/nest/ppc",
+       "/ac/i386",
+       "/ac/i586",
+       "/ac/i686",
+       "/ac/athlon",
+       "/ac/alpha",    
+       "/ac/sparc",
+       "/ac/ppc",
        "/ra/i386",
        "/ra/i586",
        "/ra/i686",
-       "/ra/alpha",
+       "/ra/alpha",    
        "/ra/sparc",
-       "/ra/ppc"
+       "/ra/ppc",
+       "/nest/i386",
+       "/nest/i586",
+       "/nest/i686",
+       "/nest/athlon",
+       "/nest/ppc"
 );
-$qa_base = "http://ftp.pld.org.pl/.stat/builder";
+$qa_base = "http://ftp.pld-linux.org/.stat/builder";
 $qa_addr = array(
+       "/ep/rpmqa-ac-i386.txt",
+       "/ep/rpmqa-ac-i386.txt",
+       "/ep/rpmqa-ac-i386.txt",
        "",
-       "/kenny/rpmqa-nest-i386.txt",
-       "/kenny/rpmqa-nest-i586.txt",
-       "/kenny/rpmqa-nest-i686.txt",
+       "/alpha/rpmqa-ac-alpha.txt",    
+       "/newboss/rpmqa-ac-sparc.txt",
        "",
        "/ep/rpmqa-ra-i386.txt",
        "/ep/rpmqa-ra-i586.txt",
        "/ep/rpmqa-ra-i686.txt",
-       "/mifgate/rpmqa-ra-alpha.txt",
+       "/mifgate/rpmqa-ra-alpha.txt",  
        "/team/rpmqa-ra-sparc.txt",
+       "",
+       "/kenny/rpmqa-nest-i386.txt",
+       "/kenny/rpmqa-nest-i586.txt",
+       "/kenny/rpmqa-nest-i686.txt",
+       "",
        ""
 );
 $local = 1; /* $local=0 for FTP */ 
-$root_directory = "/home/services/ftp/pub/logs";
+$root_directory = "/home/services/ftp/pub/pld-buildlogs";
 $ftp_conn = 0;
 /* It should be set */
 
@@ -65,9 +79,12 @@ textdomain("messages");
 
 if (isset($_GET["idx"]))$idx=$_GET["idx"];
 if (isset($_GET["ok"]))$ok=$_GET["ok"];
+else $ok="";
 if (isset($_GET["ns"]))$ns=$_GET["ns"];
+else $ns="";
 if (isset($_GET["cnt"]))$cnt=$_GET["cnt"];
 if (isset($_GET["action"]))$action=$_GET["action"];
+else $action="";
 if (isset($_GET["off"]))$off=$_GET["off"];
 if (isset($_GET["id"]))$id=$_GET["id"];
 
@@ -170,7 +187,7 @@ function open_ftp($pidx="", $pok="")
        }
 
        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;
@@ -219,6 +236,7 @@ function directory_list($pidx="",$pok="")
 
        $dir = opendir("$root_directory$a");
        $i = 0;
+       $list = array ();
        while ($file = readdir($dir)) {
                if (($file != ".") && ($file != "..")) {
                        $list[$i] = "$a/$file";
@@ -245,20 +263,21 @@ function list_logs()
 
        if ($ok == 1) {
                echo "<h1>"._("Listing of")." $addr[$idx]/OK "
-                       ."(<a href=\"$big_url&amp;ok=0\">"._("fail")."</a>)</h1>";
+                       ."(<a href=\"$big_url&amp;ok=0\">"._("fail")."</a>)</h1>\n";
        } else {
                echo "<h1>"._("Listing of")." $addr[$idx]/FAIL "
-                       ."(<a href=\"$big_url&amp;ok=1\">"._("ok")."</a>)</h1>";
+                       ."(<a href=\"$big_url&amp;ok=1\">"._("ok")."</a>)</h1>\n";
        }
 
-       echo "<div align=\"center\"><table border=\"0\" cellspacing=\"1\" ".
+       echo "<div align=\"center\"><table cols=\"4\" border=\"0\" cellspacing=\"1\" ".
                "cellpadding=\"3\" bgcolor=\"#000000\" width=\"90%\">\n";
-       echo "<tr><th bgcolor=\"#CCCCFF\" align=\"left\" width=\"60%\">"._("Log File").
+       echo "<tr><th bgcolor=\"#CCCCFF\" align=\"right\" width=\"1%\">"._("No.")."</th>".
+                "<th bgcolor=\"#CCCCFF\" align=\"left\" width=\"80%\">"._("Log File").
                        "[<a href=\"$big_url&amp;ns=1\">"._("sort")."</a>]</th>".
-                "<th bgcolor=\"#CCCCFF\" align=\"right\" width=\"15%\">"._("Size")."</th> ".
+                "<th bgcolor=\"#CCCCFF\" align=\"right\" width=\"15%\">"._("Size")."</th> ".
                 "<th bgcolor=\"#CCCCFF\" align=\"left\">"._("Age").
                         "[<a href=\"$big_url&amp;ns=0\">"._("sort")."</a>]</th>".
-                "</th></tr>";
+                "</tr>";
 
        function cmp($f1, $f2) {
                global $ftp_conn, $root_directory, $local;
@@ -269,7 +288,7 @@ function list_logs()
 
        if ($ns != 1) {
                $ns = 0;
-               usort($list, cmp);
+               usort($list, "cmp");
        } else {
                sort($list);
        }
@@ -294,18 +313,18 @@ function list_logs()
                        if ($t >= 24) {
                                $t /= 24;
                                $t = round($t);
-                               $t = $t . ngettext(" day"," days",$t);
+                               $t = $t . "&nbsp;" . ngettext("day","days",$t);
                        } else {
                                $t = round($t);
-                               $t = $t . ngettext(" hour"," hours",$t);
+                               $t = $t . "&nbsp;" . ngettext("hour","hours",$t);
                        }
                } else {
                        $t = round($t);
-                       $t = $t . ngettext(" minute"," minutes",$t);
+                       $t = $t . "&nbsp;" . ngettext("minute","minutes",$t);
                }
                $u = "$big_url&amp;off=$off&amp;id=$h";
-               echo "<tr><td bgcolor=\"#CCCCCC>\"><a href=\"$u\">".
-                    "$f</a> ".
+               echo "<tr><td bgcolor=\"#CCCCCC\" align=\"right\">".($i+1).".</td>".
+                    "<td bgcolor=\"#CCCCCC\"><a href=\"$u\">$f</a> ".
                     "[<a href=\"$u&amp;action=text\">"._("text")."</a> | ".
                      "<a href=\"$u&amp;action=tail\">"._("tail")."</a>]".
                     "</td><td bgcolor=\"#CCCCCC\" align=\"right\">".
@@ -547,7 +566,10 @@ function dump_text()
 
 function list_archs()
 {
-       global $addr, $url, $idx;
+       global $addr, $url, $idx, $cnt,$ok,$ns;
+
+       if (!isset($cnt))
+               $cnt = 16;
 
        $big_url = "$url?idx=$idx&amp;ok=$ok&amp;ns=$ns&amp;cnt=$cnt";
 
@@ -555,8 +577,8 @@ function list_archs()
        echo "<tr><td bgcolor=\"#cccccc\" nowrap=\"nowrap\">"._("Failed")."</td><td bgcolor=\"#cccccc\">"._("Ok")."</td></tr>\n";
        for ($i = 0; $i < count($addr); $i++)
                echo "<tr><td nowrap=\"nowrap\">".
-                    "<a href=\"$url?idx=$i&amp;ok=0\">$addr[$i]</a></td><td nowrap=\"nowrap\">".
-                    "[<a href=\"$url?idx=$i&amp;ok=1\">OK</a>]</td>".
+                    "<a href=\"$url?idx=$i&amp;ok=0&amp;cnt=$cnt\">$addr[$i]</a></td><td nowrap=\"nowrap\">".
+                    "[<a href=\"$url?idx=$i&amp;ok=1&amp;cnt=$cnt\">OK</a>]</td>".
                     #"<td>[<a href=\"$url?idx=$i&amp;action=qa\">qa</a>]</td>".
                     "</tr>\n";
        echo "</table><hr />\n";
@@ -565,10 +587,10 @@ function list_archs()
        echo "<a href=\"$big_url&amp;action=adv_search\">"._("Advanced Search")."</a><br />\n";
        
        echo "<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&nbsp;Team</a>\n".
+            "<a href=\"mailto:feedback@pld-linux.org\">PLD&nbsp;Team</a>\n".
             "</small></div>\n";
 
        # smile ;)
@@ -586,7 +608,9 @@ function list_archs()
                     "Real Operating System", "Real Computer",
                     "computron", "bogon", "quantum bogodynamics",
                     "BOFH", "/dev/ill", "nasi tu byli",
-                    "Paranoid Android", "Lunatic Corp"
+                    "Paranoid Android", "Lunatic Corp", "Parallel thinking",
+                    "sfistak", "Linus", "The Golden Path", "Dark Side of the Force",
+                    "Przewodniczacego Lepper-a", "KDE", "Microsoft Windows 2003"
                     # feel free to add sth if you change this file ;)
                     );
        echo _("Powered by")." ";
@@ -601,7 +625,7 @@ function list_archs()
 
        global $qa_addr;
 
-       if ($qa_addr[$idx] != "") {
+       if (isset($qa_addr[$idx]) && $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 />";
@@ -709,8 +733,8 @@ function adv_search()
   echo "</tr>\n";
 
   echo "<tr>\n";
-  echo "<td>"._("OK")."</td>\n";
   echo "<td>"._("Failed")."</td>\n";
+  echo "<td>"._("OK")."</td>\n";
   echo "</tr>\n";
 
   for ($i = 0; $i < count($addr); $i++)
@@ -839,14 +863,14 @@ function adv_search()
                        if ($t >= 24) {
                                $t /= 24;
                                $t = round($t);
-                               $t = $t . ngettext(" day"," days",$t);
+                               $t = $t . "&nbsp;" . ngettext("day","days",$t);
                        } else {
                                $t = round($t);
-                               $t = $t . ngettext(" hour"," hours",$t);
+                               $t = $t . "&nbsp;" . ngettext("hour","hours",$t);
                        }
                } else {
                        $t = round($t);
-                       $t = $t . ngettext(" minute"," minutes",$t);
+                       $t = $t . "&nbsp;" . ngettext("minute","minutes",$t);
                }
                 $big_url = "$url?idx=$i&amp;ok=$j&amp;ns=$ns&amp;cnt=$cnt";
                $u = "$big_url&amp;off=$off&amp;id=$h";
@@ -920,9 +944,9 @@ function welcome()
 <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:feedback@pld.org.pl"><?=_("to us")?></a>. <?=_("Positive opinions are also")?> 
-<a href="mailto:feedback@pld.org.pl"><?=_("welcome")?></a> ;)</p>
-<p>Version: $Id: index.php,v 1.39 2002/10/08 12:05:12 ggodlewski Exp $</p>
+<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.62 2003/06/07 17:18:35 blues Exp $</p>
 </td><td width="20%">&nbsp;</td></tr>
 </table>
 <?php
This page took 1.564164 seconds and 4 git commands to generate.