edlog.php 1.9 KB

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