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