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 | b3b0fd5 | 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 Board Results"); |
| 12 | |
| 13 | if (!($serno=intval($serno))) |
| 14 | die("the board serial number was not specified"); |
| 15 | |
| 16 | mysql_query("delete from boards where serno=$serno"); |
| 17 | |
| 18 | if(mysql_errno()) { |
| 19 | $errstr = mysql_error(); |
| 20 | echo "\t<font size=+4>\n"; |
| 21 | echo "\t\t<p>\n"; |
| 22 | echo "\t\t\tThe following error was encountered:\n"; |
| 23 | echo "\t\t</p>\n"; |
| 24 | echo "\t\t<center>\n"; |
| 25 | printf("\t\t\t<b>%s</b>\n", $errstr); |
| 26 | echo "\t\t</center>\n"; |
| 27 | echo "\t</font>\n"; |
| 28 | } |
| 29 | else { |
| 30 | echo "\t<font size=+2>\n"; |
| 31 | echo "\t\t<p>\n"; |
| 32 | echo "\t\t\tThe board with serial number <b>$serno</b> was" |
| 33 | . " successfully deleted\n"; |
| 34 | mysql_query("delete from log where serno=$serno"); |
| 35 | if (mysql_errno()) { |
| 36 | $errstr = mysql_error(); |
| 37 | echo "\t\t\t<font size=+4>\n"; |
| 38 | echo "\t\t\t\t<p>\n"; |
| 39 | echo "\t\t\t\t\tBut the following error occurred " . |
| 40 | "when deleting the log entries:\n"; |
| 41 | echo "\t\t\t\t</p>\n"; |
| 42 | echo "\t\t\t\t<center>\n"; |
| 43 | printf("\t\t\t\t\t<b>%s</b>\n", $errstr); |
| 44 | echo "\t\t\t\t</center>\n"; |
| 45 | echo "\t\t\t</font>\n"; |
| 46 | } |
| 47 | echo "\t\t</p>\n"; |
| 48 | echo "\t</font>\n"; |
| 49 | } |
| 50 | ?> |
| 51 | <p> |
| 52 | <table width="100%"> |
| 53 | <tr> |
| 54 | <td align=center> |
| 55 | <a href="browse.php">Back to Browse</a> |
| 56 | </td> |
| 57 | <td align=center> |
| 58 | <a href="index.php">Back to Start</a> |
| 59 | </td> |
| 60 | </tr> |
| 61 | </table> |
| 62 | <?php |
| 63 | pg_foot(); |
| 64 | ?> |