edlog.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. // edit page (hymod_bddb / boards)
  7. require("defs.php");
  8. pg_head("$bddb_label - Edit Board Log Entry");
  9. if ($serno == 0)
  10. die("serial number not specified!");
  11. if (!isset($logno) || $logno == 0)
  12. die("log number not specified!");
  13. $pserno = sprintf("%010d", $serno);
  14. $plogno = sprintf("%010d", $logno);
  15. echo "<center><b><font size=+2>";
  16. echo "Board Serial Number: $pserno, Log Number: $plogno";
  17. echo "</font></b></center>\n";
  18. ?>
  19. <p>
  20. <form action=doedlog.php method=POST>
  21. <?php
  22. echo "<input type=hidden name=serno value=$serno>\n";
  23. echo "<input type=hidden name=logno value=$logno>\n";
  24. $r=mysql_query("select * from log where serno=$serno and logno=$logno");
  25. $row=mysql_fetch_array($r);
  26. if(!$row)
  27. die("no record of log entry with serial number '$serno' " .
  28. "and log number '$logno' in database");
  29. begin_table(3);
  30. // date date
  31. print_field("date", $row);
  32. // who char(20)
  33. print_field("who", $row);
  34. // details text
  35. print_field_multiline("details", $row, 60, 10, 'text_filter');
  36. end_table();
  37. echo "<p>\n";
  38. echo "<center><b>";
  39. echo "<font color=#ff0000>WARNING: NO UNDO ON DELETE!</font>";
  40. echo "<br></br>\n";
  41. echo "<tt>[ <a href=\"dodellog.php?serno=$serno&logno=$logno\">delete</a> ]</tt>";
  42. echo "</b></center>\n";
  43. echo "</p>\n";
  44. ?>
  45. <p>
  46. <table align=center width="100%">
  47. <tr>
  48. <td align=center>
  49. <input type=submit value=Edit>
  50. </td>
  51. <td>
  52. &nbsp;
  53. </td>
  54. <td align=center>
  55. <input type=reset value=Reset>
  56. </td>
  57. <td>
  58. &nbsp;
  59. </td>
  60. <td align=center>
  61. <a href="index.php">Back to Start</a>
  62. </td>
  63. </tr>
  64. </table>
  65. </p>
  66. </form>
  67. <?php
  68. pg_foot();
  69. ?>