[cvs] / gkbweb / htdocs / kernel.php  

cvs: gkbweb/htdocs/kernel.php


1 : tobias 1.4 <?php
2 :     include($DOCUMENT_ROOT."/shared/inc/global.inc");
3 :    
4 :     error_reporting(E_ERROR | E_WARNING | E_PARSE);
5 :    
6 :     if (isset($id)) {
7 :     $whereclause="builds.id=$id";
8 :     } elseif (isset($safename)) {
9 :     $whereclause="builds.safename='$safename'";
10 :     }
11 :    
12 :     if (isset($whereclause)) {
13 :     if (!($dbh = dbconnect())) {
14 :     echo "FATAL ERROR: dbconnect() failed.";
15 :     exit;
16 :     }
17 :    
18 :     if ($q = mysql_query("select name, safename, fullname, description, patchfile, configfile,configpath from builds, mastertrees where $whereclause and mastertrees.name=builds.mastertree", $dbh)) {
19 :     if ($r = mysql_fetch_object($q)) {
20 :     $title = "ppckernel.org: ".$r->fullname;
21 :     include($layout_top);
22 :     echo "<table border=\"0\" cellpadding=\"5\" cellspacing=\"0\">\n";
23 :     showkernel($r->name, $r->safename, $r->fullname, $r->description, $r->patchfile, $r->configfile, $r->configpath);
24 :     echo "</table>\n";
25 :     }
26 :     }
27 :    
28 :     if (!isset($title)) {
29 :     $title = "Error";
30 :     $page = "error";
31 :     include($layout_top);
32 :     echo "<h2>Error</h2>\n";
33 :     echo "<p>Sorry, I couldn't find that kernel.</p>\n";
34 :     echo "<p>" . mysql_error($dbh) . "</p>\n";
35 :     }
36 :     } else {
37 :     $title = "Error";
38 :     $page = "error";
39 :     include($layout_top);
40 :    
41 :     echo "<h2>Error</h2>\n";
42 :     echo "<p>No kernel ID was specified. What exactly do you want me to do here?</p>\n";
43 :     }
44 :    
45 :     include($layout_tail);
46 :     ?>

Tobias McNulty

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help