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