wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1 | <?php // php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder> ?> |
| 2 | <?php |
| 3 | // (C) Copyright 2001 |
Wolfgang Denk | 2c9dfca | 2005-08-12 23:20:59 +0200 | [diff] [blame] | 4 | // Murray Jensen <Murray.Jensen@csiro.au> |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 5 | // CSIRO Manufacturing Science and Technology, Preston Lab |
| 6 | |
| 7 | // edit page (hymod_bddb / boards) |
| 8 | |
| 9 | require("defs.php"); |
| 10 | |
| 11 | pg_head("$bddb_label - New Board Registration"); |
| 12 | ?> |
| 13 | <form action=donew.php method=POST> |
| 14 | <p></p> |
| 15 | <?php |
Wolfgang Denk | 804ecb1 | 2005-08-12 23:27:18 +0200 | [diff] [blame] | 16 | $serno=intval($serno); |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 17 | // if a serial number was supplied, fetch the record |
| 18 | // and use its contents as defaults |
| 19 | if ($serno != 0) { |
| 20 | $r=mysql_query("select * from boards where serno=$serno"); |
| 21 | $row=mysql_fetch_array($r); |
| 22 | if(!$row)die("no record of serial number '$serno' in database"); |
| 23 | } |
| 24 | else |
| 25 | $row = array(); |
| 26 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 27 | begin_table(5); |
| 28 | |
| 29 | // date date |
| 30 | print_field("date", array('date' => date("Y-m-d"))); |
| 31 | |
| 32 | // batch char(32) |
| 33 | print_field("batch", $row, 32); |
| 34 | |
| 35 | // type enum('IO','CLP','DSP','INPUT','ALT-INPUT','DISPLAY') |
| 36 | print_enum("type", $row, $type_vals, 0); |
| 37 | |
| 38 | // rev tinyint(3) unsigned zerofill |
| 39 | print_field("rev", $row, 3, 'rev_filter'); |
| 40 | |
| 41 | // sdram[0-3] enum('32M','64M','128M','256M') |
| 42 | print_enum_multi("sdram", $row, $sdram_vals, 4, array(2)); |
| 43 | |
| 44 | // flash[0-3] enum('4M','8M','16M','32M','64M') |
| 45 | print_enum_multi("flash", $row, $flash_vals, 4, array(2)); |
| 46 | |
| 47 | // zbt[0-f] enum('512K','1M','2M','4M') |
| 48 | print_enum_multi("zbt", $row, $zbt_vals, 16, array(2, 2)); |
| 49 | |
| 50 | // xlxtyp[0-3] enum('XCV300E','XCV400E','XCV600E') |
| 51 | print_enum_multi("xlxtyp", $row, $xlxtyp_vals, 4, array(1), 1); |
| 52 | |
| 53 | // xlxspd[0-3] enum('6','7','8') |
| 54 | print_enum_multi("xlxspd", $row, $xlxspd_vals, 4, array(1), 1); |
| 55 | |
| 56 | // xlxtmp[0-3] enum('COM','IND') |
| 57 | print_enum_multi("xlxtmp", $row, $xlxtmp_vals, 4, array(1), 1); |
| 58 | |
| 59 | // xlxgrd[0-3] enum('NORMAL','ENGSAMP') |
| 60 | print_enum_multi("xlxgrd", $row, $xlxgrd_vals, 4, array(1), 1); |
| 61 | |
Wolfgang Denk | 804ecb1 | 2005-08-12 23:27:18 +0200 | [diff] [blame] | 62 | // cputyp enum('MPC8260(HIP3)','MPC8260A(HIP4)','MPC8280(HIP7)') |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 63 | print_enum("cputyp", $row, $cputyp_vals, 1); |
| 64 | |
Wolfgang Denk | 804ecb1 | 2005-08-12 23:27:18 +0200 | [diff] [blame] | 65 | // cpuspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ','233MHZ','266MHZ') |
| 66 | print_enum_select("cpuspd", $row, $clk_vals, 4); |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 67 | |
Wolfgang Denk | 804ecb1 | 2005-08-12 23:27:18 +0200 | [diff] [blame] | 68 | // cpmspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ','233MHZ','266MHZ') |
| 69 | print_enum_select("cpmspd", $row, $clk_vals, 4); |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 70 | |
Wolfgang Denk | 804ecb1 | 2005-08-12 23:27:18 +0200 | [diff] [blame] | 71 | // busspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ','233MHZ','266MHZ') |
| 72 | print_enum_select("busspd", $row, $clk_vals, 2); |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 73 | |
| 74 | // hstype enum('AMCC-S2064A') |
| 75 | print_enum("hstype", $row, $hstype_vals, 1); |
| 76 | |
| 77 | // hschin enum('0','1','2','3','4') |
| 78 | print_enum("hschin", $row, $hschin_vals, 4); |
| 79 | |
| 80 | // hschout enum('0','1','2','3','4') |
| 81 | print_enum("hschout", $row, $hschout_vals, 4); |
| 82 | |
| 83 | end_table(); |
| 84 | ?> |
| 85 | <p></p> |
| 86 | <table width="100%"> |
| 87 | <tr> |
| 88 | <td align=center colspan=3> |
| 89 | Allocate |
| 90 | <input type=text name=quant size=2 maxlength=2 value=" 1"> |
| 91 | board serial number(s) |
| 92 | </td> |
| 93 | </tr> |
| 94 | <tr> |
| 95 | <td align=center colspan=3> |
| 96 | <input type=checkbox name=geneths checked> |
| 97 | Generate Ethernet Address(es) |
| 98 | </td> |
| 99 | </tr> |
| 100 | <tr> |
| 101 | <td colspan=3> |
| 102 | |
| 103 | </td> |
| 104 | </tr> |
| 105 | <tr> |
| 106 | <td align=center> |
| 107 | <input type=submit value="Register Board"> |
| 108 | </td> |
| 109 | <td> |
| 110 | |
| 111 | </td> |
| 112 | <td align=center> |
| 113 | <input type=reset value="Reset Form Contents"> |
| 114 | </td> |
| 115 | </tr> |
| 116 | </table> |
| 117 | </form> |
| 118 | <?php |
| 119 | pg_foot(); |
| 120 | ?> |