[llvm-commits] CVS: nightlytest-serverside/EmailReport.php
Jim Laskey
jlaskey at apple.com
Tue Sep 12 04:37:22 PDT 2006
Changes in directory nightlytest-serverside:
EmailReport.php updated: 1.6 -> 1.7
---
Log message:
testing
---
Diffs of the changes: (+22 -26)
EmailReport.php | 48 ++++++++++++++++++++++--------------------------
1 files changed, 22 insertions(+), 26 deletions(-)
Index: nightlytest-serverside/EmailReport.php
diff -u nightlytest-serverside/EmailReport.php:1.6 nightlytest-serverside/EmailReport.php:1.7
--- nightlytest-serverside/EmailReport.php:1.6 Fri Sep 8 19:24:04 2006
+++ nightlytest-serverside/EmailReport.php Tue Sep 12 06:37:07 2006
@@ -1,21 +1,18 @@
+<html>
+<body>
<?php
-if ($argc != 3) {
- print "Not enough arguments\n";
- die();
-}
-
-$machine_id = $argv[1];
-if(!is_numeric($machine_id)) {
- print "Incorrect machine id\n";
- die();
+if(!isset($HTTP_GET_VARS['machine']) || !is_numeric($HTTP_GET_VARS['machine'])){
+ print "Error: Incorrect URL!\n";
+ die();
}
+$machine_id = $HTTP_GET_VARS['machine'];
-$night_id = $argv[2];
-if(!is_numeric($night_id)) {
- print "Incorrect night id\n";
- die();
+if(!isset($HTTP_GET_VARS['night']) || !is_numeric($HTTP_GET_VARS['night'])){
+ print "Error: Incorrect URL!\n";
+ die();
}
+$night_id = $HTTP_GET_VARS['night'];
if(!(include "NightlyTester.php")) {
@@ -31,20 +28,19 @@
$mysql_link=mysql_connect("127.0.0.1","llvm","ll2002vm") or die("Error: could not connect to database!\n");
mysql_select_db("nightlytestresults");
-$row = getMachineInfo($machine_id);
-$today_row = getNightInfo($night_id);
-$cur_date=$today_row['added'];
-
-$today_query = getSuccessfulNightsHistory($machine_id,$night_id);
-$today_row = mysql_fetch_array($today_query);
-$yesterday_row = mysql_fetch_array($today_query);
-mysql_free_result($today_query);
-$previous_succesful_id = $yesterday_row['id'];
-
-$email = getEmailReport($night_id, $previous_succesful_id);
-
-print $email;
+$query = "SELECT * FROM night WHERE machine = \"$machine_id\"";
+$night_query = mysql_query($query) or die (mysql_error());
+if ($row = mysql_fetch_array($night_query) or die (mysql_error())) {
+ while ($value = current($row)) {
+ $key_name = key($row);
+ print "$key_name = $value<br>\n";
+ next($row);
+ }
+}
+mysql_free_result($night_query);
mysql_close($mysql_link);
?>
+</body>
+</html>
More information about the llvm-commits
mailing list