Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / u-boot / tools / bddb / doedlog.php
1 <?php // php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder> ?>
2 <?php
3         // (C) Copyright 2001
4         // Murray Jensen <Murray.Jensen@csiro.au>
5         // CSIRO Manufacturing Science and Technology, Preston Lab
6
7         // doedit page (hymod_bddb / boards)
8
9         require("defs.php");
10
11         pg_head("$bddb_label - Edit Log Entry Results");
12
13         if (!isset($_REQUEST['serno']) || $_REQUEST['serno'] == '')
14                 die("the board serial number was not specified");
15         $serno=intval($_REQUEST['serno']);
16
17         if (!isset($_REQUEST['logno']) || $_REQUEST['logno'] == '')
18                 die("log number not specified!");
19         $logno=intval($_REQUEST['logno']);
20
21         $query="update log set";
22
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'";
30         }
31
32         if (isset($_REQUEST['who'])) {
33                 $who=$_REQUEST['who'];
34                 $query.=", who='" . $who . "'";
35         }
36
37         if (isset($_REQUEST['details'])) {
38                 $details=$_REQUEST['details'];
39                 $query.=", details='" . rawurlencode($details) . "'";
40         }
41
42         $query.=" where serno=$serno and logno=$logno";
43
44         mysql_query($query);
45         if(mysql_errno()) {
46                 $errstr = mysql_error();
47                 echo "\t<font size=+4>\n";
48                 echo "\t\t<p>\n";
49                 echo "\t\t\tThe following error was encountered:\n";
50                 echo "\t\t</p>\n";
51                 echo "\t\t<center>\n";
52                 printf("\t\t\t<b>%s</b>\n", $errstr);
53                 echo "\t\t</center>\n";
54                 echo "\t</font>\n";
55         }
56         else {
57                 echo "\t<font size=+2>\n";
58                 echo "\t\t<p>\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";
62                 echo "\t\t</p>\n";
63                 echo "\t</font>\n";
64         }
65
66 ?>
67 <p>
68 <table align=center width="100%">
69 <tr>
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>
72 </tr>
73 </table>
74 <?php
75         pg_foot();
76 ?>