[cvs] / gkbweb / htdocs / specialized.php  

cvs: gkbweb/htdocs/specialized.php


1 : tmcnulty 1.1 <?php
2 :     include($DOCUMENT_ROOT."/shared/inc/global.inc");
3 :     $page = "specialized";
4 :     $title = "Specialized Kernels";
5 :    
6 :     $host = "www.ppckernel.org";
7 :    
8 :     if (!($dbh = dbconnect())) {
9 :     echo "FATAL ERROR: dbconnect() failed.";
10 :     exit;
11 :     }
12 :    
13 :     include($layout_top);
14 :     ?>
15 :     <h2>Specialized Kernels</h2>
16 :     <p>Welcome to the specialized kernel section of the PowerPC Kernel Archives. We have carefully selected a set of specialized kernels that work well with specific hardware setups or PowerPC Linux distributions. Please browse the list below for more information on the specific kernels.</p>
17 :     <?php
18 : tmcnulty 1.6 if (!isset($category))
19 :     $category="";
20 :    
21 :     if (!empty($category))
22 :     $catclause="category='$category' and";
23 :     else
24 :     $catclause="";
25 : tmcnulty 1.7 if ($q = mysql_query("select safename,name,descr from buildcategories where safename!='default' order by name")) {
26 :     echo "<form type='get' action='specialized.php'>\n";
27 :     echo "<p><b>Build Categories:</b> ";
28 :     echo "<select name='category' onchange='this.form.submit()'>";
29 :     echo "<option value=''>All</option>";
30 : tmcnulty 1.5 while ($r = mysql_fetch_object($q)) {
31 :     echo "<option value='$r->safename'";
32 : tmcnulty 1.7 if ($category == $r->safename) {
33 : tmcnulty 1.5 echo " selected";
34 : tmcnulty 1.7 $descr = $r->descr;
35 :     }
36 : tmcnulty 1.5 echo ">$r->name</option>";
37 :    
38 :     }
39 : tmcnulty 1.7 echo "</select>\n";
40 :     echo " <input type='submit' name='display' value='Display'>\n";
41 :     if (isset($descr)) {
42 :     echo "<br><br>";
43 :     echo $descr;
44 :     }
45 : tmcnulty 1.5 }
46 :     echo "</p>";
47 :     echo "</form>";
48 : tmcnulty 1.4 /*
49 : tmcnulty 1.3 if ($q = mysql_query("select id, safename, fullname, summary from builds where $catclause (configpath != '' or configfile != \"\" or patchfile != \"\") and status!='disabled' order by fullname", $dbh)) {
50 : tmcnulty 1.1 $i = 0;
51 :     while ($r = mysql_fetch_object($q)) {
52 :     $i++;
53 :     $info = new buildinfo($r->safename);
54 :    
55 :     dlstart($r->fullname, $info->version);
56 :    
57 :     if ($info->version != "None") {
58 :     echo "<p>$r->summary</p>\n";
59 :     echo "<p><b>Latest build:</b> $info->version<br>\n";
60 :     echo "<b>Built on:</b> $info->date</p>\n";
61 :    
62 :     } else {
63 :     echo "<p>There are currently no builds of this kernel available.</p>";
64 :     }
65 :    
66 :     echo "<p><a href=\"kernel.php?id=$r->id\">More info...</a></p>\n";
67 :    
68 :     dlend();
69 :    
70 :     if ($i < mysql_num_rows($q))
71 :     echo "<tr><td colspan=\"2\">&nbsp;</td></tr>\n";
72 :     }
73 :     }
74 : tmcnulty 1.4 */
75 :     if ($q = mysql_query("select name, safename, fullname, description, patchfile, configfile,configpath from builds, mastertrees where $catclause (configpath != '' or configfile != \"\" or patchfile != \"\") and status!='disabled' and mastertrees.name=builds.mastertree order by fullname", $dbh)) {
76 : tmcnulty 1.5 if (mysql_num_rows($q) > 0) {
77 :     echo "<table border=\"0\" cellpadding=\"5\" cellspacing=\"0\">\n";
78 :     $i=0;
79 :     while ($r = mysql_fetch_object($q)) {
80 :     $i++;
81 :     showkernel($r->name, $r->safename, $r->fullname, $r->description, $r->patchfile, $r->configfile, $r->configpath);
82 :     if ($i < mysql_num_rows($q))
83 :     echo "<tr><td colspan=\"2\">&nbsp;</td></tr>\n";
84 :     }
85 :     echo "</table>\n";
86 :     } else {
87 :     echo "<p>No kernels found.</p>\n";
88 : tmcnulty 1.4 }
89 :     }
90 :    
91 : tmcnulty 1.1
92 :     include($layout_tail);
93 :     ?>

Tobias McNulty

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help