blob: 4839e36e60e3acad6cf1758dffb9ca7c15616390 [file] [log] [blame]
wdenkfe8c2802002-11-03 00:38:21 +00001<?php // php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder> ?>
2<?php
3 // (C) Copyright 2001
Wolfgang Denkb3b0fd52005-08-12 23:20:59 +02004 // Murray Jensen <Murray.Jensen@csiro.au>
wdenkfe8c2802002-11-03 00:38:21 +00005 // 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
Wolfgang Denkd992daf2005-08-12 23:27:18 +020013 if (!isset($_REQUEST['serno']))
wdenkfe8c2802002-11-03 00:38:21 +000014 die("the board serial number was not specified");
Wolfgang Denkd992daf2005-08-12 23:27:18 +020015 $serno=intval($_REQUEST['serno']);
wdenkfe8c2802002-11-03 00:38:21 +000016
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?>