[llvm-commits] CVS: nightlytest-serverside/EmailReport.php

Jim Laskey jlaskey at apple.com
Fri Sep 8 16:09:15 PDT 2006



Changes in directory nightlytest-serverside:

EmailReport.php added (r1.1)
---
Log message:

reuse code for e-mail report #10

---
Diffs of the changes:  (+61 -0)

 EmailReport.php |   61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+)


Index: nightlytest-serverside/EmailReport.php
diff -c /dev/null nightlytest-serverside/EmailReport.php:1.1
*** /dev/null	Fri Sep  8 18:09:11 2006
--- nightlytest-serverside/EmailReport.php	Fri Sep  8 18:09:01 2006
***************
*** 0 ****
--- 1,61 ----
+ <?php
+ 
+ if(!isset($HTTP_GET_VARS['machine']) || !is_numeric($HTTP_GET_VARS['machine'])){
+         print "Error: Incorrect URL!\n";
+         die();
+ }
+ $machine_id = $HTTP_GET_VARS['machine'];
+ 
+ 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")){
+         print "Error: could not load necessary files!\n";
+         die();
+ }
+ 
+ if(!(include"ProgramResults.php")){
+         print "Error: could not load necessary files!\n";
+         die();
+ }
+ 
+ $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 = htmlifyTestResults(getEmailReport($night_id, $previous_succesful_id));
+ 
+ ?>
+ <html>
+ <head>
+ <title>Testing Email Report</title>
+ <STYLE TYPE="text/css">
+ <!--
+   @import url(style.css);
+ -->
+ </STYLE>
+ </head>
+ <body>
+ <?php
+ print $email;
+ ?>
+ 
+ </body>
+ <?php
+ 
+ mysql_close($mysql_link);
+ ?>
+ 






More information about the llvm-commits mailing list