edit.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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
  6. // edit page (hymod_bddb / boards)
  7. require("defs.php");
  8. pg_head("$bddb_label - Edit Board Registration");
  9. if ($serno == 0)
  10. die("serial number not specified or invalid!");
  11. $pserno = sprintf("%010d", $serno);
  12. echo "<center><b><font size=+2>";
  13. echo "Board Serial Number: $pserno";
  14. echo "</font></b></center>\n";
  15. ?>
  16. <p>
  17. <form action=doedit.php method=POST>
  18. <?php
  19. echo "<input type=hidden name=serno value=$serno>\n";
  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. begin_table(5);
  24. // ethaddr char(17)
  25. print_field("ethaddr", $row, 17);
  26. // date date
  27. print_field("date", $row);
  28. // batch char(32)
  29. print_field("batch", $row, 32);
  30. // type enum('IO','CLP','DSP','INPUT','ALT-INPUT','DISPLAY')
  31. print_enum("type", $row, $type_vals);
  32. // rev tinyint(3) unsigned zerofill
  33. print_field("rev", $row, 3, 'rev_filter');
  34. // location char(64)
  35. print_field("location", $row, 64);
  36. // comments text
  37. print_field_multiline("comments", $row, 60, 10, 'text_filter');
  38. // sdram[0-3] enum('32M','64M','128M','256M')
  39. print_enum_multi("sdram", $row, $sdram_vals, 4, array());
  40. // flash[0-3] enum('4M','8M','16M','32M','64M')
  41. print_enum_multi("flash", $row, $flash_vals, 4, array());
  42. // zbt[0-f] enum('512K','1M','2M','4M')
  43. print_enum_multi("zbt", $row, $zbt_vals, 16, array());
  44. // xlxtyp[0-3] enum('XCV300E','XCV400E','XCV600E')
  45. print_enum_multi("xlxtyp", $row, $xlxtyp_vals, 4, array(), 1);
  46. // xlxspd[0-3] enum('6','7','8')
  47. print_enum_multi("xlxspd", $row, $xlxspd_vals, 4, array(), 1);
  48. // xlxtmp[0-3] enum('COM','IND')
  49. print_enum_multi("xlxtmp", $row, $xlxtmp_vals, 4, array(), 1);
  50. // xlxgrd[0-3] enum('NORMAL','ENGSAMP')
  51. print_enum_multi("xlxgrd", $row, $xlxgrd_vals, 4, array(), 1);
  52. // cputyp enum('MPC8260(HIP3)','MPC8260A(HIP4)','MPC8280(HIP7)')
  53. print_enum("cputyp", $row, $cputyp_vals);
  54. // cpuspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ','233MHZ','266MHZ')
  55. print_enum_select("cpuspd", $row, $clk_vals);
  56. // cpmspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ','233MHZ','266MHZ')
  57. print_enum_select("cpmspd", $row, $clk_vals);
  58. // busspd enum('33MHZ','66MHZ','100MHZ','133MHZ','166MHZ','200MHZ','233MHZ','266MHZ')
  59. print_enum_select("busspd", $row, $clk_vals);
  60. // hstype enum('AMCC-S2064A')
  61. print_enum("hstype", $row, $hstype_vals);
  62. // hschin enum('0','1','2','3','4')
  63. print_enum("hschin", $row, $hschin_vals);
  64. // hschout enum('0','1','2','3','4')
  65. print_enum("hschout", $row, $hschout_vals);
  66. end_table();
  67. echo "<p>\n";
  68. echo "<center><b>";
  69. echo "<font color=#ff0000>WARNING: NO UNDO ON DELETE!</font>";
  70. echo "<br></br>\n";
  71. echo "<tt>[ <a href=\"dodelete.php?serno=$serno\">delete</a> ]</tt>";
  72. echo "</b></center>\n";
  73. echo "</p>\n";
  74. ?>
  75. <p>
  76. <table align=center width="100%">
  77. <tr>
  78. <td align=center>
  79. <input type=submit value=Edit>
  80. </td>
  81. <td>
  82. &nbsp;
  83. </td>
  84. <td align=center>
  85. <input type=reset value=Reset>
  86. </td>
  87. <td>
  88. &nbsp;
  89. </td>
  90. <td align=center>
  91. <a href="index.php">Back to Start</a>
  92. </td>
  93. </tr>
  94. </table>
  95. </p>
  96. </form>
  97. <?php
  98. pg_foot();
  99. ?>