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 | // dodelete page (hymod_bddb / boards) |
| 8 | |
| 9 | require("defs.php"); |
| 10 | |
| 11 | pg_head("$bddb_label - Delete Log Entry Results"); |
| 12 | |
Wolfgang Denk | 804ecb1 | 2005-08-12 23:27:18 +0200 | [diff] [blame] | 13 | if (!isset($_REQUEST['serno'])) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 14 | die("the board serial number was 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'] == 0) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 18 | die("the log entry number not specified!"); |
Wolfgang Denk | 804ecb1 | 2005-08-12 23:27:18 +0200 | [diff] [blame] | 19 | $logno=$_REQUEST['logno']; |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 20 | |
| 21 | mysql_query("delete from log where serno=$serno and logno=$logno"); |
| 22 | |
| 23 | if(mysql_errno()) { |
| 24 | $errstr = mysql_error(); |
| 25 | echo "\t<font size=+4>\n"; |
| 26 | echo "\t\t<p>\n"; |
| 27 | echo "\t\t\tThe following error was encountered:\n"; |
| 28 | echo "\t\t</p>\n"; |
| 29 | echo "\t\t<center>\n"; |
| 30 | printf("\t\t\t<b>%s</b>\n", $errstr); |
| 31 | echo "\t\t</center>\n"; |
| 32 | echo "\t</font>\n"; |
| 33 | } |
| 34 | else { |
| 35 | echo "\t<font size=+2>\n"; |
| 36 | echo "\t\t<p>\n"; |
| 37 | echo "\t\t\tThe log entry with log number <b>$logno</b>\n"; |
| 38 | echo "\t\t\tand serial number <b>$serno</b> "; |
| 39 | echo "was successfully deleted\n"; |
| 40 | echo "\t\t</p>\n"; |
| 41 | echo "\t</font>\n"; |
| 42 | } |
| 43 | ?> |
| 44 | <p> |
| 45 | <table width="100%"> |
| 46 | <tr> |
| 47 | <td align=center> |
| 48 | <a href="brlog.php?serno=<?php echo "$serno"; ?>">Back to Log</a> |
| 49 | </td> |
| 50 | <td align=center> |
| 51 | <a href="index.php">Back to Start</a> |
| 52 | </td> |
| 53 | </tr> |
| 54 | </table> |
| 55 | <?php |
| 56 | pg_foot(); |
| 57 | ?> |