Author: witekfl                      Date: Sun Nov 18 10:00:22 2007 GMT
Module: PLD-doc                       Tag: HEAD
---- Log message:
- adjusted to the sqlite3

---- Files affected:
PLD-doc/PLD_www_res/buildlogs.sql:
   addlog.php (1.1 -> 1.2) , migration.php (1.1 -> 1.2) , index.php (1.1 -> 
1.2) 

---- Diffs:

================================================================
Index: PLD-doc/PLD_www_res/buildlogs.sql/addlog.php
diff -u PLD-doc/PLD_www_res/buildlogs.sql/addlog.php:1.1 
PLD-doc/PLD_www_res/buildlogs.sql/addlog.php:1.2
--- PLD-doc/PLD_www_res/buildlogs.sql/addlog.php:1.1    Tue Oct  3 20:32:27 2006
+++ PLD-doc/PLD_www_res/buildlogs.sql/addlog.php        Sun Nov 18 11:00:17 2007
@@ -1,35 +1,33 @@
 #!/usr/bin/php.cli
 <?php
-$user = 'mysql';
-$password = '';
+// $Revision$, $Date$
+$database = 'sqlite:/home/services/ftp/buildlogs.db';
 $root_directory = '/home/services/ftp/pub/pld-buildlogs';
 // parameter: argv[1] - full path to the log file.
 // Keep in sync with database
-$dist = array("ac" => 1, "th" => 2);
 $result = array("FAIL" => 0, "OK" => 1);
 $arch = array(
-       "th/SRPMS" => 0,
-       "th/i486" => 1,
-       "th/i686" => 2,
-       "th/athlon" => 3,
-       "th/x86_64" => 4,
-       "th/ia64" => 5,
-       "th/alpha" => 6,
-       "th/ppc" => 7,
-       "th/sparc" => 8,
-       "ac/SRPMS" => 9,
-       "ac/i386" => 10,
-       "ac/i586" => 11,
-       "ac/i686" => 12,
-       "ac/athlon" => 13,
-       "ac/amd64" => 14,
-       "ac/alpha" => 15,
-       "ac/ppc" => 16,
-       "ac/sparc" => 17,
-       "ac/sparc64" => 18
+       "th/SRPMS" => 1,
+       "th/i486" => 2,
+       "th/i686" => 3,
+       "th/athlon" => 4,
+       "th/x86_64" => 5,
+       "th/ia64" => 6,
+       "th/alpha" => 7,
+       "th/ppc" => 8,
+       "th/sparc" => 9,
+       "ac/SRPMS" => 10,
+       "ac/i386" => 11,
+       "ac/i586" => 12,
+       "ac/i686" => 13,
+       "ac/athlon" => 14,
+       "ac/amd64" => 15,
+       "ac/alpha" => 16,
+       "ac/ppc" => 17,
+       "ac/sparc" => 18,
+       "ac/sparc64" => 19
 );
 
-
 preg_match("|$root_directory/(.*/.*)/(.*)/(.*)\.bz2|", $argv[1], $matches);
 
 $arch_name = $matches[1];
@@ -43,35 +41,24 @@
 $spec_name = $matches[3];
 if ($spec_name == '') exit;
 
-$spec_name = mysql_escape_string($spec_name);
+$spec_name = addslashes($spec_name);
 $size = filesize($argv[1]);
 $mtime = filemtime($argv[1]);
 
-mysql_connect('localhost', "$user", "$password") or die ("connect error" . 
mysql_error());
-mysql_select_db("buildlogs");
-$row = mysql_query("SELECT spec_id FROM specs WHERE spec='$spec_name' LIMIT 
1") or die("SELECT 1" . mysql_error());
-if (mysql_num_rows($row) == 0) {
-       mysql_query("INSERT INTO specs(spec) VALUES ('$spec_name')") or 
die("INSERT 1" . mysql_error());
-       $row = mysql_query("SELECT spec_id FROM specs WHERE spec='$spec_name' 
LIMIT 1") or die("SELECT 1" . mysql_error());
-       if (mysql_num_rows($row) == 0) {
-               mysql_close($link);
-               exit;
-       }
+try {
+       $dbh = new PDO("$database");
+} catch (PDOException $e) {
+       die (e.getMessage());
 }
-$linia = mysql_fetch_object($row);
-$spec_id = $linia->spec_id;
-mysql_free_result($row);
-
-$row = mysql_query("SELECT log_id FROM logs WHERE spec_id=$spec_id AND 
arch_id=$arch_id LIMIT 1");
-if (mysql_num_rows($row) == 0) {
-       mysql_query("INSERT INTO logs(arch_id, spec_id, result, size, mtime) "
-       . "VALUES ($arch_id, $spec_id, $result_id, $size, $mtime)") or 
die("INSERT 2" . mysql_error());
+$result = $dbh->query("SELECT log_id FROM logs WHERE spec = '$spec_name' AND 
arch_id = $arch_id AND result = $result_id LIMIT 1")->fetchAll();
+if (count($result) == 1) {
+       foreach ($result as $row) {
+               $query = "UPDATE logs SET result = $result_id, size = $size, 
mtime = $mtime WHERE log_id = $row[log_id]";
+               break;
+       }
 } else {
-       $linia = mysql_fetch_object($row);
-       mysql_query("UPDATE logs SET result = $result_id, size = $size, mtime = 
$mtime WHERE log_id = $linia->log_id")
-       or die ("UPDATE" . mysql_error());
+       $query = "INSERT INTO logs(arch_id, result, size, mtime, spec) 
VALUES($arch_id, $result_id, $size, $mtime, '$spec_name')";
 }
-mysql_free_result($row);
-mysql_close();
-echo "OK $linia->log_id $argv[1]\n";
+echo "$query\n";
+$dbh->exec("$query");
 ?>

================================================================
Index: PLD-doc/PLD_www_res/buildlogs.sql/migration.php
diff -u PLD-doc/PLD_www_res/buildlogs.sql/migration.php:1.1 
PLD-doc/PLD_www_res/buildlogs.sql/migration.php:1.2
--- PLD-doc/PLD_www_res/buildlogs.sql/migration.php:1.1 Tue Oct  3 20:32:27 2006
+++ PLD-doc/PLD_www_res/buildlogs.sql/migration.php     Sun Nov 18 11:00:17 2007
@@ -1,48 +1,43 @@
 #!/usr/bin/php.cli
 <?php
-// parameter: argv[1] - full path to the log file eg. 
/home/services/ftp/pub/pld-buildlogs/ac/athlon/kernel.log.bz2
-$user = 'mysql';
-$password = '';
+// $Revision$, $Date$
 $root_directory = '/home/services/ftp/pub/pld-buildlogs';
-
-// Keep in sync with database
+$query = " CREATE TABLE LOGS(log_id INTEGER PRIMARY KEY, arch_id INTEGER, 
result INTEGER, size INTEGER, mtime INTEGER, spec TEXT);";
+try {
+       $dbhandle = new PDO('sqlite:/home/services/ftp/buildlogs.db');
+} catch (PDOException $e) {
+       die("new PDO: ". $e->getMessage());
+}
 
 $result = array("FAIL" => 0, "OK" => 1);
 $arch = array(
-       "th/SRPMS" => 0,
-       "th/i486" => 1,
-       "th/i686" => 2,
-       "th/athlon" => 3,
-       "th/x86_64" => 4,
-       "th/ia64" => 5,
-       "th/alpha" => 6,
-       "th/ppc" => 7,
-       "th/sparc" => 8,
-       "ac/SRPMS" => 9,
-       "ac/i386" => 10,
-       "ac/i586" => 11,
-       "ac/i686" => 12,
-       "ac/athlon" => 13,
-       "ac/amd64" => 14,
-       "ac/alpha" => 15,
-       "ac/ppc" => 16,
-       "ac/sparc" => 17,
-       "ac/sparc64" => 18
+       "th/SRPMS" => 1,
+       "th/i486" => 2,
+       "th/i686" => 3,
+       "th/athlon" => 4,
+       "th/x86_64" => 5,
+       "th/ia64" => 6,
+       "th/alpha" => 7,
+       "th/ppc" => 8,
+       "th/sparc" => 9,
+       "ac/SRPMS" => 10,
+       "ac/i386" => 11,
+       "ac/i586" => 12,
+       "ac/i686" => 13,
+       "ac/athlon" => 14,
+       "ac/amd64" => 15,
+       "ac/alpha" => 16,
+       "ac/ppc" => 17,
+       "ac/sparc" => 18,
+       "ac/sparc64" => 19
 );
 
-$list1 = `find "$root_directory/th $root_directory/ac" -name "*.bz2"`;
-$lista = explode("\n", $list1);
-$counter = 0;
-mysql_connect('localhost', "$user", "$password") or die ("connect error" . 
mysql_error());
-mysql_select_db("buildlogs");
+$list1 = `find $root_directory/th $root_directory/ac -name '*.bz2'`;
+$lista = explode("\n", rtrim($list1));
+$list1 = '';
 foreach ($lista as $file) {
        preg_match("|$root_directory/(.*/.*)/(.*)/(.*)\.bz2|", $file, $matches);
 
-       $counter = ($counter + 1) % 100;
-       if ($counter == 0) {
-               echo(".");
-       }
-
        $arch_name = $matches[1];
        if (!array_key_exists($arch_name, $arch)) continue;
        else $arch_id = $arch[$arch_name];
@@ -54,34 +49,11 @@
        $spec_name = $matches[3];
        if ($spec_name == '') continue;
 
-       $spec_name = mysql_escape_string($spec_name);
        $size = filesize($file);
        $mtime = filemtime($file);
-
-       $row = mysql_query("SELECT spec_id FROM specs WHERE spec='$spec_name' 
LIMIT 1") or die("SELECT 1" . mysql_error());
-       if (mysql_num_rows($row) == 0) {
-               mysql_query("INSERT INTO specs(spec) VALUES ('$spec_name')") or 
die("INSERT 1" . mysql_error());
-               $row = mysql_query("SELECT spec_id FROM specs WHERE 
spec='$spec_name' LIMIT 1") or die("SELECT 1" . mysql_error());
-               if (mysql_num_rows($row) == 0) {
-                       mysql_close();
-                       exit;
-               }
-       }
-
-       $linia = mysql_fetch_object($row);
-       $spec_id = $linia->spec_id;
-       mysql_free_result($row);
-
-       $row = mysql_query("SELECT log_id FROM logs WHERE spec_id=$spec_id AND 
arch_id=$arch_id LIMIT 1");
-       if (mysql_num_rows($row) == 0) {
-               mysql_query("INSERT INTO logs(arch_id, spec_id, result, size, 
mtime) "
-               . "VALUES ($arch_id, $spec_id, $result_id, $size, $mtime)") or 
die("INSERT 2" . mysql_error());
-       } else {
-               $linia = mysql_fetch_object($row);
-               mysql_query("UPDATE logs SET result = $result_id, size = $size, 
mtime = $mtime WHERE log_id = $linia->log_id")
-               or die ("UPDATE" . mysql_error());
-       }
-       mysql_free_result($row);
+       $query .= " INSERT INTO LOGS(arch_id, result, size, mtime, spec) VALUES 
($arch_id, $result_id, $size, $mtime, '$spec_name');";
 }
-mysql_close();
+$dbhandle->beginTransaction();
+$dbhandle->exec("$query");
+$dbhandle->commit();
 ?>

================================================================
Index: PLD-doc/PLD_www_res/buildlogs.sql/index.php
diff -u PLD-doc/PLD_www_res/buildlogs.sql/index.php:1.1 
PLD-doc/PLD_www_res/buildlogs.sql/index.php:1.2
--- PLD-doc/PLD_www_res/buildlogs.sql/index.php:1.1     Tue Oct  3 20:32:27 2006
+++ PLD-doc/PLD_www_res/buildlogs.sql/index.php Sun Nov 18 11:00:17 2007
@@ -1,7 +1,9 @@
 <?php
+ob_start("ob_gzhandler");
 $buildlogs_server = "buildlogs.pld-linux.org";
 $url = "index.php";
 $addr = array(
+       "",
        "th/SRPMS",
        "th/i486",
        "th/i686",
@@ -33,6 +35,7 @@
        "/nest/ppc"
 */
 );
+$fail_or_ok = array( "FAIL", "OK" );
 $qa_addr = array(
        "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";,
@@ -65,6 +68,8 @@
        "http://ftp.nest.pld-linux.org/.stat/builder/an2/rpmqa-nest-ppc.txt";
 */
 );
+$database = 'sqlite:/home/services/ftp/buildlogs.db';
+
 $local = 1; /* $local=0 for FTP */ 
 $root_directory = "/home/services/ftp/pub/pld-buildlogs";
 $ftp_conn = 0;
@@ -107,7 +112,7 @@
        if (isset($_GET["arch"]))
        {
                $arch=$_GET["arch"];
-               for ($i = 0; $i < count($addr); $i++)
+               for ($i = 1; $i < count($addr); $i++)
                {
                        if ($addr[$i]==$dist."/".$arch)
                                $idx=$i;
@@ -286,6 +291,7 @@
 
 function list_logs()
 {
+       global $database;
        global $idx, $addr, $ok;
        global $ftp_conn, $big_url, $ns, $qa_addr;
        global $off, $cnt, $local, $root_directory, $url;
@@ -341,20 +347,23 @@
        if (!isset($ok)) $ok = 0;
        if (!isset($off)) $off = 0;
        if (!isset($cnt)) $cnt = 50;
-       if ($ns == 0) $order = "logs.mtime DESC";
-       else $order = "specs.spec";
-
-       $query = "SELECT specs.spec, logs.log_id, logs.mtime, logs.size FROM 
specs, logs WHERE "
-       . "specs.spec_id = logs.spec_id AND logs.arch_id = $idx AND logs.result 
= $ok ORDER BY $order LIMIT $cnt OFFSET $off";
+       if ($ns == 0) $order = "mtime DESC";
+       else $order = "spec";
 
-       mysql_connect("localhost", "mysql", "") or die(mysql_error());
-       mysql_select_db("buildlogs") or die(mysql_error()); 
-       $result = mysql_query("$query") or die(mysql_error());
-       $count = mysql_num_rows($result);
+       $query = "SELECT spec, log_id, mtime, size FROM logs WHERE "
+       . "arch_id = $idx AND result = $ok ORDER BY $order LIMIT $cnt OFFSET 
$off";
 
+       try {
+               $dbh = new PDO("$database");
+       } catch (PDOException $e) {
+               mydie("new PDO: " . $e->getMessage());
+       }
        $now = time();
-       for ($i = $off; $i < $count + $off; $i++) {
-               $row = mysql_fetch_assoc($result);
+       $i = $off;
+       foreach ($dbh->query("$query") as $row) {
+//     $now = time();
+//     for ($i = $off; $i < $count + $off; $i++) {
+//             $row = mysql_fetch_assoc($result);
                $f = $row["spec"];
                $t = $now - $row["mtime"];
                $s = $row["size"];
@@ -396,7 +405,9 @@
                      "<a href=\"$u&amp;action=tail\">"._("tail")."</a>]".
                     "</td><td bgcolor=\"#CCCCCC\" align=\"right\">".
                     "$s</td><td bgcolor=\"#CCCCCC\">$t</td></tr>\n";
+               $i++;
        }
+       $count = $i - $off;
        echo "</table></div>\n";
 
        $backarr = "&lt;&lt;&lt;&nbsp;";
@@ -436,8 +447,6 @@
                echo "$forward</td><td align=right width=1%>$forwardarr";
        }
        echo "</td>\n</tr></table></p>";
-       mysql_free_result($result);
-       mysql_close();
 //     if ($local == 0) {
 //             ftp_quit($ftp_conn);
 //             $ftp_conn = 0;
@@ -446,20 +455,16 @@
 
 function file_name_log($l)
 {
-       mysql_connect("localhost", "mysql", "") or die(mysql_error());
-       mysql_select_db("buildlogs") or die(mysql_error());
-       $query = "SELECT a.name, result.name as res, specs.spec FROM specs, 
architectures a, result, logs WHERE "
-       . "logs.log_id = $l AND specs.spec_id = logs.spec_id AND a.arch_id = 
logs.arch_id AND "
-       . "result.result_id = logs.result LIMIT 1";
-       $result = mysql_query($query) or die(mysql_error());
-       if (mysql_num_rows($result) == 1) {
-               $row = mysql_fetch_assoc($result);
-               $f = $row["name"] . "/" . $row["res"] . "/" . $row["spec"] . 
".bz2";
-       } else {
-               $f = false;
+       global $database, $addr, $fail_or_ok;
+       try {
+               $dbh = new PDO($database);
+       } catch (PDOException $e) {
+               mydie("new PDO: " . $e.getMessage());
+       }
+       $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";
        }
-       mysql_free_result($result);
-       mysql_close();
        return $f;
 }
 
@@ -670,7 +675,7 @@
 
        echo "<table width=\"100%\" border=\"0\">\n";
        echo "<tr><td bgcolor=\"#cccccc\" 
nowrap=\"nowrap\">"._("Failed")."</td><td 
bgcolor=\"#cccccc\">"._("Ok")."</td></tr>\n";
-       for ($i = 0; $i < count($addr); $i++)
+       for ($i = 1; $i < count($addr); $i++)
                echo "<tr><td nowrap=\"nowrap\">".
                     "<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>".
@@ -706,7 +711,7 @@
                     "BOFH", "/dev/ill", "nasi tu byli",
                     "Paranoid Android", "Lunatic Corp", "Parallel thinking",
                     "sfistak", "Linus", "The Golden Path", "Dark Side of the 
Force",
-                    "Przewodniczacego Lepper-a", "KDE", "Microsoft Windows 
2003", "MySQL"
+                    "Przewodniczacego Lepper-a", "KDE", "Microsoft Windows 
2003", "sqlite3"
                     # feel free to add sth if you change this file ;)
                     );
        echo _("Powered by")." ";
@@ -799,10 +804,18 @@
 
 function adv_search()
 {
-  global $addr, $url, $local, $_POST, $off, $cnt, $root_directory, $idx, $ok, 
$ns;
+  global $database, $addr, $fail_or_ok, $url, $local, $_POST, $off, $cnt, 
$root_directory, $idx, $ok, $ns;
 
   $big_url = "$url?idx=$idx&amp;ok=$ok&amp;ns=$ns&amp;cnt=$cnt";
 
+  echo "<script><!--\n".
+       "function checkboxToggle() {\n".
+       "for (var i=0;i<document.forms[0].elements.length;i++) {\n".
+       "var e = document.forms[0].elements[i];\n".
+       "if ((e.name != 'all') && (e.type=='checkbox'))\n".
+       "e.checked = document.forms[0].all.checked;\n".
+       "}\n }\n -->\n </script>\n";
+
   echo "<form action=\"index.php?action=adv_search\" method=\"post\">";
 
   echo "<div align=\"center\">";
@@ -833,20 +846,28 @@
   echo "<td>"._("OK")."</td>\n";
   echo "</tr>\n";
 
-  for ($i = 0; $i < count($addr); $i++)
+  for ($i = 1; $i < count($addr); $i++)
   {
     echo "<tr>\n";
     $name="as0_".$i;
-    $check=" checked=\"on\"";
-    echo "<td><input name=\"$name\" 
type=\"checkbox\"$check>".$addr[$i]."</input></td>\n";
+    if (!isset($_POST["$name"])) {
+       $check = " ";
+    } else {
+       $check=" checked=\"on\"";
+    }
+    echo "<td><input name=\"$name\" id=\"$name\" type=\"checkbox\"$check 
/><label for=\"$name\">".$addr[$i]."</label></td>\n";
     $name="as1_".$i;
-    $check=" checked=\"on\"";
-    echo "<td><input name=\"$name\" 
type=\"checkbox\"$check>".$addr[$i]."</input></td>\n";
+    if (!isset($_POST["$name"])) {
+       $check = " ";
+    } else {
+       $check=" checked=\"on\"";
+    }
+    echo "<td><input name=\"$name\" id=\"$name\" type=\"checkbox\"$check 
/><label for=\"$name\">".$addr[$i]."</label></td>\n";
     echo "</tr>\n";
   }
        
   echo "<tr>\n";
-  echo "<td><input type=\"submit\" name=\"submit\" value=\""._("Search!")."\" 
/></td>";
+  echo "<td><input name=\"all\" type=\"checkbox\" checked=\"on\" 
onClick=\"checkboxToggle()\">"._("Toggle checkboxes")."&nbsp;<input 
type=\"submit\" name=\"submit\" value=\""._("Search!")."\" /></td>";
   echo "</tr>\n";
 
   echo "</table>\n";
@@ -856,12 +877,9 @@
   if (($_POST["name"]!="") || ($_POST["age1"]!="") || ($_POST["age2"]!="") ||
     ($_POST["size1"]!="") || ($_POST["size2"]!=""))
   {
-       $query = "SELECT specs.spec, logs.mtime, logs.arch_id, logs.result, 
logs.log_id, a.name as arch, logs.size, "
-       . "result.name as res FROM specs, logs, "
-       . "architectures a, result WHERE specs.spec_id = logs.spec_id AND 
logs.arch_id = a.arch_id AND "
-       . "logs.result = result.result_id ";
+       $query = "SELECT spec, mtime, arch_id, result, log_id, size FROM logs 
WHERE 1 ";
        if ($_POST["name"] != "") {
-               $n = mysql_escape_string($_POST["name"]);
+               $n = addslashes($_POST["name"]);
                $query .= "AND spec LIKE '$n%' ";
        }
        $now = time();
@@ -887,10 +905,10 @@
        }
 
        $or = "AND (";
-       for ($i = 0; $i < count($addr); $i++) {
+       for ($i = 1; $i < count($addr); $i++) {
                for ($j = 0; $j < 2; $j++) {
                        if (isset($_POST["as" . $j . "_" .$i])) {
-                               $query .= "$or (logs.arch_id = $i AND 
logs.result = $j)";
+                               $query .= "$or (arch_id = $i AND result = $j)";
                                $or = " OR ";
                        }
                }
@@ -907,17 +925,19 @@
                        $query .= " ORDER BY spec";
                        break;
                case 2:
-                       $query .= " ORDER BY arch, spec";
+                       $query .= " ORDER BY arch_id, spec";
                        break;
        }
        $query .= " LIMIT $cnt OFFSET $off ";
 
-       mysql_connect("localhost", "mysql", "") or die(mysql_error());
-       mysql_select_db("buildlogs") or die(mysql_error());
-       $result = mysql_query("$query") or die("$query " . mysql_error());
-       $count = mysql_num_rows($result);
+       try {
+               $dbh = new PDO("$database");
+       } catch (PDOException $e) {
+               mydie("new PDO: " . $e.getMessage());
+       }
+       $result = $dbh->query("$query")->fetchAll();
 
-       if ($count == 0) {
+       if ($result == FALSE) {
                echo _("Nothing found");
        } else {
                echo "<table border=\"0\" cellspacing=\"1\" ".
@@ -930,8 +950,9 @@
                         "<th bgcolor=\"#CCCCFF\" align=\"left\">"._("Age").
                         "[<a 
href=\"$big_url&amp;ns=0\">"._("sort")."</a>]</th>".
                         "</th></tr>";
-               for ($i = $off; $i < $off + $count; $i++) {
-                       $row = mysql_fetch_assoc($result);
+               $i = $off;
+               foreach ($result as $row) {
+//             for ($i = $off; $i < $off + $count; $i++) {
                        $f = $row["spec"];
                        $t = $now - $row["mtime"];
                        $s = $row["size"];
@@ -958,7 +979,7 @@
                        $ok = $row["result"];
                        $b = 
"$url?idx=$arch_id&amp;ok=$ok&amp;ns=$ns&amp;off=$off&amp;cnt=$cnt";
 
-                       $builder=$row["arch"]."/". $row["res"];
+                       $builder = $addr[$arch_id]."/". $fail_or_ok[$ok];
                        echo "<tr>";
                        echo "<td bgcolor=\"#CCCCCC\"><a 
href=\"$b\">$builder</a></td>";
                        echo "<td bgcolor=\"#CCCCCC\"><a href=\"$u\">$f</a> ".
@@ -966,6 +987,7 @@
                        "<a href=\"$u&amp;action=tail\">"._("tail")."</a>]".
                        "</td><td bgcolor=\"#CCCCCC\" align=\"right\">".
                        "$s</td><td bgcolor=\"#CCCCCC\">$t</td></tr>\n";
+                       $i++;
                }
                echo "</table></div>\n";
 
@@ -975,9 +997,6 @@
                $forwardarr = "&nbsp;&gt;&gt;&gt;";
 
        }
-       mysql_free_result($result);
-       mysql_close();
-
 // FIXME
 /*
        echo "<p><table width=\"90%\" align=\"center\"><tr><td align=left 
width=1%>";
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/PLD-doc/PLD_www_res/buildlogs.sql/addlog.php?r1=1.1&r2=1.2&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/PLD-doc/PLD_www_res/buildlogs.sql/migration.php?r1=1.1&r2=1.2&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/PLD-doc/PLD_www_res/buildlogs.sql/index.php?r1=1.1&r2=1.2&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to