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 |
| 4 | // Murray Jensen <Murray.Jensen@cmst.csiro.au> |
| 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 |
| 16 | // if a serial number was supplied, fetch the record |
| 17 | // and use its contents as defaults |
| 18 | if ($serno != 0) { |
| 19 | $r=mysql_query("select * from boards where serno=$serno"); |
| 20 | $row=mysql_fetch_array($r); |
| 21 | if(!$row)die("no record of serial number '$serno' in database"); |
| 22 | } |
| 23 | else |
| 24 | $row = array(); |
| 25 | |
| 26 | echo "<input type=hidden name=serno value=0>\n"; |
| 27 | |
| 28 | begin_table(5); |
| 29 | |
| 30 | // date date |
| 31 | print_field("date", array('date' => date("Y-m-d"))); |
| 32 | |
| 33 | // batch char(32) |
| 34 | print_field("batch", $row, 32); |
| 35 | |
| 36 | // type enum('IO','CLP','DSP','INPUT','ALT-INPUT','DISPLAY') |
| 37 | print_enum("type", $row, $type_vals, 0); |
| 38 | |
| 39 | // rev tinyint(3) unsigned zerofill |
| 40 | print_field("rev", $row, 3, 'rev_filter'); |
| 41 | |
| 42 | // sdram[0-3] enum('32M','64M','128M','256M') |
| 43 | print_enum_multi("sdram", $row, $sdram_vals, 4, array(2)); |
| 44 | |
| 45 | // flash[0-3] enum('4M','8M','16M','32M','64M') |
| 46 | print_enum_multi("flash", $row, $flash_vals, 4, array(2)); |
| 47 | |
| 48 | // zbt[0-f] enum('512K','1M','2M','4M') |
| 49 | print_enum_multi("zbt", $row, $zbt_vals, 16, array(2, 2)); |
| 50 | |
| 51 | // xlxtyp[0-3] enum('XCV300E','XCV400E','XCV600E') |
| 52 | print_enum_multi("xlxtyp", $row, $xlxtyp_vals, 4, array(1), 1); |
| 53 | |
| 54 | // xlxspd[0-3] enum('6','7','8') |
| 55 | print_enum_multi("xlxspd", $row, $xlxspd_vals, 4, array(1), 1); |
| 56 | |
| 57 | // xlxtmp[0-3] enum('COM','IND') |
| 58 | print_enum_multi("xlxtmp", $row, $xlxtmp_vals, 4, array(1), 1); |
| 59 | |
| 60 | // xlxgrd[0-3] enum('NORMAL','ENGSAMP') |
| 61 | print_enum_multi("xlxgrd", $row, $xlxgrd_vals, 4, array(1), 1); |
| 62 | |
| 63 | // cputyp enum('MPC8260') |
| 64 | print_enum("cputyp", $row, $cputyp_vals, 1); |
| 65 | |
| 66 | // cpuspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ') |
| 67 | print_enum("cpuspd", $row, $clk_vals, 4); |
| 68 | |
| 69 | // cpmspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ') |
| 70 | print_enum("cpmspd", $row, $clk_vals, 4); |
| 71 | |
| 72 | // busspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ') |
| 73 | print_enum("busspd", $row, $clk_vals, 2); |
| 74 | |
| 75 | // hstype enum('AMCC-S2064A') |
| 76 | print_enum("hstype", $row, $hstype_vals, 1); |
| 77 | |
| 78 | // hschin enum('0','1','2','3','4') |
| 79 | print_enum("hschin", $row, $hschin_vals, 4); |
| 80 | |
| 81 | // hschout enum('0','1','2','3','4') |
| 82 | print_enum("hschout", $row, $hschout_vals, 4); |
| 83 | |
| 84 | end_table(); |
| 85 | ?> |
| 86 | <p></p> |
| 87 | <table width="100%"> |
| 88 | <tr> |
| 89 | <td align=center colspan=3> |
| 90 | Allocate |
| 91 | <input type=text name=quant size=2 maxlength=2 value=" 1"> |
| 92 | board serial number(s) |
| 93 | </td> |
| 94 | </tr> |
| 95 | <tr> |
| 96 | <td align=center colspan=3> |
| 97 | <input type=checkbox name=geneths checked> |
| 98 | Generate Ethernet Address(es) |
| 99 | </td> |
| 100 | </tr> |
| 101 | <tr> |
| 102 | <td colspan=3> |
| 103 | |
| 104 | </td> |
| 105 | </tr> |
| 106 | <tr> |
| 107 | <td align=center> |
| 108 | <input type=submit value="Register Board"> |
| 109 | </td> |
| 110 | <td> |
| 111 | |
| 112 | </td> |
| 113 | <td align=center> |
| 114 | <input type=reset value="Reset Form Contents"> |
| 115 | </td> |
| 116 | </tr> |
| 117 | </table> |
| 118 | </form> |
| 119 | <?php |
| 120 | pg_foot(); |
| 121 | ?> |