Fixed tools/env utilities
[u-boot-openmoko/mini2440.git] / tools / bddb / edit.php
blobdd8c26c5cd356288ee5539a656c5d21e56bfd0a9
1 <?php // php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder> ?>
2 <?php
3 // (C) Copyright 2001
4 // Murray Jensen <Murray.Jensen@csiro.au>
5 // CSIRO Manufacturing Science and Technology, Preston Lab
7 // edit page (hymod_bddb / boards)
9 require("defs.php");
11 pg_head("$bddb_label - Edit Board Registration");
13 if ($serno == 0)
14 die("serial number not specified or invalid!");
16 $pserno = sprintf("%010d", $serno);
18 echo "<center><b><font size=+2>";
19 echo "Board Serial Number: $pserno";
20 echo "</font></b></center>\n";
23 <p>
24 <form action=doedit.php method=POST>
25 <?php
26 echo "<input type=hidden name=serno value=$serno>\n";
28 $r=mysql_query("select * from boards where serno=$serno");
29 $row=mysql_fetch_array($r);
30 if(!$row) die("no record of serial number '$serno' in database");
32 begin_table(5);
34 // ethaddr char(17)
35 print_field("ethaddr", $row, 17);
37 // date date
38 print_field("date", $row);
40 // batch char(32)
41 print_field("batch", $row, 32);
43 // type enum('IO','CLP','DSP','INPUT','ALT-INPUT','DISPLAY')
44 print_enum("type", $row, $type_vals);
46 // rev tinyint(3) unsigned zerofill
47 print_field("rev", $row, 3, 'rev_filter');
49 // location char(64)
50 print_field("location", $row, 64);
52 // comments text
53 print_field_multiline("comments", $row, 60, 10, 'text_filter');
55 // sdram[0-3] enum('32M','64M','128M','256M')
56 print_enum_multi("sdram", $row, $sdram_vals, 4, array());
58 // flash[0-3] enum('4M','8M','16M','32M','64M')
59 print_enum_multi("flash", $row, $flash_vals, 4, array());
61 // zbt[0-f] enum('512K','1M','2M','4M')
62 print_enum_multi("zbt", $row, $zbt_vals, 16, array());
64 // xlxtyp[0-3] enum('XCV300E','XCV400E','XCV600E')
65 print_enum_multi("xlxtyp", $row, $xlxtyp_vals, 4, array(), 1);
67 // xlxspd[0-3] enum('6','7','8')
68 print_enum_multi("xlxspd", $row, $xlxspd_vals, 4, array(), 1);
70 // xlxtmp[0-3] enum('COM','IND')
71 print_enum_multi("xlxtmp", $row, $xlxtmp_vals, 4, array(), 1);
73 // xlxgrd[0-3] enum('NORMAL','ENGSAMP')
74 print_enum_multi("xlxgrd", $row, $xlxgrd_vals, 4, array(), 1);
76 // cputyp enum('MPC8260(HIP3)','MPC8260A(HIP4)','MPC8280(HIP7)')
77 print_enum("cputyp", $row, $cputyp_vals);
79 // cpuspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ','233MHZ','266MHZ')
80 print_enum_select("cpuspd", $row, $clk_vals);
82 // cpmspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ','233MHZ','266MHZ')
83 print_enum_select("cpmspd", $row, $clk_vals);
85 // busspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ','233MHZ','266MHZ')
86 print_enum_select("busspd", $row, $clk_vals);
88 // hstype enum('AMCC-S2064A')
89 print_enum("hstype", $row, $hstype_vals);
91 // hschin enum('0','1','2','3','4')
92 print_enum("hschin", $row, $hschin_vals);
94 // hschout enum('0','1','2','3','4')
95 print_enum("hschout", $row, $hschout_vals);
97 end_table();
99 echo "<p>\n";
100 echo "<center><b>";
101 echo "<font color=#ff0000>WARNING: NO UNDO ON DELETE!</font>";
102 echo "<br></br>\n";
103 echo "<tt>[ <a href=\"dodelete.php?serno=$serno\">delete</a> ]</tt>";
104 echo "</b></center>\n";
105 echo "</p>\n";
108 <table align=center width="100%">
109 <tr>
110 <td align=center>
111 <input type=submit value=Edit>
112 </td>
113 <td>
114 &nbsp;
115 </td>
116 <td align=center>
117 <input type=reset value=Reset>
118 </td>
119 <td>
120 &nbsp;
121 </td>
122 <td align=center>
123 <a href="index.php">Back to Start</a>
124 </td>
125 </tr>
126 </table>
127 </p>
128 </form>
129 <?php
130 pg_foot();