1 <?php // php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder> ?>
4 // Murray Jensen <Murray.Jensen@csiro.au>
5 // CSIRO Manufacturing Science and Technology, Preston Lab
7 // doedit page (hymod_bddb / boards)
11 pg_head("$bddb_label - Edit Log Entry Results");
13 if (!isset($_REQUEST['serno']) || $_REQUEST['serno'] == '')
14 die("the board serial number was not specified");
15 $serno=intval($_REQUEST['serno']);
17 if (!isset($_REQUEST['logno']) || $_REQUEST['logno'] == '')
18 die("log number not specified!");
19 $logno=intval($_REQUEST['logno']);
21 $query="update log set";
23 if (isset($_REQUEST['date'])) {
24 $date=$_REQUEST['date'];
25 list($y, $m, $d) = split("-", $date);
26 if (!checkdate($m, $d, $y) || $y < 1999)
27 die("date is invalid (input '$date', " .
28 "yyyy-mm-dd '$y-$m-$d')");
29 $query.=" date='$date'";
32 if (isset($_REQUEST['who'])) {
33 $who=$_REQUEST['who'];
34 $query.=", who='" . $who . "'";
37 if (isset($_REQUEST['details'])) {
38 $details=$_REQUEST['details'];
39 $query.=", details='" . rawurlencode($details) . "'";
42 $query.=" where serno=$serno and logno=$logno";
46 $errstr = mysql_error();
47 echo "\t<font size=+4>\n";
49 echo "\t\t\tThe following error was encountered:\n";
51 echo "\t\t<center>\n";
52 printf("\t\t\t<b>%s</b>\n", $errstr);
53 echo "\t\t</center>\n";
57 echo "\t<font size=+2>\n";
59 echo "\t\t\tThe log entry with log number <b>$logno</b> and\n";
60 echo "\t\t\tserial number <b>$serno</b> ";
61 echo "was successfully updated\n";
68 <table align=center width="100%">
70 <td align=center><a href="brlog.php?serno=<?php echo "$serno"; ?>">Back to Log</a></td>
71 <td align=center><a href="index.php">Back to Start</a></td>