1 <?php // php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder> ?>
4 // Murray Jensen <Murray.Jensen@csiro.au>
5 // CSIRO Manufacturing Science and Technology, Preston Lab
7 // list page (hymod_bddb / boards)
17 pg_head("$bddb_label - Browse database" . ($verbose?" (verbose)":""));
22 $limit=abs(isset($limit)?$limit:20);
23 $offset=abs(isset($offset)?$offset:0);
24 $lr=mysql_query("select count(*) as n from boards");
25 $lrow=mysql_fetch_array($lr);
26 if($lrow['n']>$limit){
27 $preoffset=max(0,$offset-$limit);
28 $postoffset=$offset+$limit;
29 echo "<table width=\"100%\">\n<tr align=center>\n";
30 printf("<td><%sa href=\"%s?offset=%d\"><img border=0 alt=\"<\" src=\"/icons/left.gif\"></a></td>\n", $offset>0?"":"no", $PHP_SELF, $preoffset);
31 printf("<td><%sa href=\"%s?offset=%d\"><img border=0 alt=\">\" src=\"/icons/right.gif\"></a></td>\n", $postoffset<$lrow['n']?"":"no", $PHP_SELF, $postoffset);
32 echo "</tr>\n</table>\n";
34 mysql_free_result($lr);
37 <table align=center border=1 cellpadding=10>
49 echo "<th>comments</th>\n";
50 echo "<th>sdram</th>\n";
51 echo "<th>flash</th>\n";
52 echo "<th>zbt</th>\n";
53 echo "<th>xlxtyp</th>\n";
54 echo "<th>xlxspd</th>\n";
55 echo "<th>xlxtmp</th>\n";
56 echo "<th>xlxgrd</th>\n";
57 echo "<th>cputyp</th>\n";
58 echo "<th>cpuspd</th>\n";
59 echo "<th>cpmspd</th>\n";
60 echo "<th>busspd</th>\n";
61 echo "<th>hstype</th>\n";
62 echo "<th>hschin</th>\n";
63 echo "<th>hschout</th>\n";
69 $r=mysql_query("select * from boards order by serno limit $offset,$limit");
71 $r=mysql_query("select * from boards where serno=$serno");
73 function print_cell($str) {
76 echo "\t<td>$str</td>\n";
79 while($row=mysql_fetch_array($r)){
80 foreach ($columns as $key) {
81 if (!key_in_array($key, $row))
86 print_cell("<a href=\"brlog.php?serno=$row[serno]\">Log</a>");
87 print_cell("<a href=\"edit.php?serno=$row[serno]\">$row[serno]</a>");
88 print_cell($row['ethaddr']);
89 print_cell($row['date']);
90 print_cell($row['batch']);
91 print_cell($row['type']);
92 print_cell($row['rev']);
93 print_cell($row['location']);
95 print_cell("<pre>\n" . urldecode($row['comments']) .
97 print_cell(gather_enum_multi_print("sdram", 4, $row));
98 print_cell(gather_enum_multi_print("flash", 4, $row));
99 print_cell(gather_enum_multi_print("zbt", 16, $row));
100 print_cell(gather_enum_multi_print("xlxtyp", 4, $row));
101 print_cell(gather_enum_multi_print("xlxspd", 4, $row));
102 print_cell(gather_enum_multi_print("xlxtmp", 4, $row));
103 print_cell(gather_enum_multi_print("xlxgrd", 4, $row));
104 print_cell($row['cputyp']);
105 print_cell($row['cpuspd']);
106 print_cell($row['cpmspd']);
107 print_cell($row['busspd']);
108 print_cell($row['hstype']);
109 print_cell($row['hschin']);
110 print_cell($row['hschout']);
119 <td align=center><?php
121 echo "<a href=\"browse.php?verbose=0\">Terse Listing</a>";
123 echo "<a href=\"browse.php?verbose=1\">Verbose Listing</a>";
125 <td align=center><a href="index.php">Back to Start</a></td>