ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/php/historical/browser.php
Revision: 1.6
Committed: Sun Feb 4 13:13:20 2001 UTC (23 years, 8 months ago) by pjm2
Branch: MAIN
Changes since 1.5: +28 -23 lines
Log Message:
Now uses the include files for layout out the i-scream design.

File Contents

# User Rev Content
1 pjm2 1.1 <?php
2    
3     // A test navigation thingy.
4     // pjm2@ukc.ac.uk
5    
6    
7     function getdirArray($dir='./',$sort='asort') {
8     global $dir_file_count;
9     if ( is_dir($dir) ) {
10     $fd = @opendir($dir);
11     while ( ($part = @readdir($fd)) == TRUE ) {
12     clearstatcache();
13     if ($part != "." && $part != "..") {
14     $dir_array[] = $part;
15     }
16     }
17     if($fd == TRUE) {
18     closedir($fd);
19     }
20     if (is_array($dir_array)) {
21     $sort($dir_array);
22     $dir_file_count = count($dir_array);
23     Return $dir_array;
24     } else {
25     Return FALSE;
26     }
27     } else {
28     Return FALSE;
29     }
30     }
31    
32     include("day.inc");
33    
34     ?>
35    
36     <html>
37 pjm2 1.4 <body bgcolor="#ffffff">
38 pjm2 1.1
39 pjm2 1.6 <table border="0" align="center" cellpadding="2" cellspacing="5">
40     <tr>
41     <td>
42     <? include("left.inc"); ?>
43     </td>
44     <td>
45     <? include("title.inc"); ?>
46    
47    
48     <font face="arial, sans-serif" size="2">
49     <b>View reports for <? echo "$day" ?></b>
50     </font>
51    
52     <p>
53    
54     <form method="GET" action="">
55     <select size="1" name="machine_name">
56     <? include("machine_name.inc"); ?>
57     </select>
58    
59     <select size="1" name="report">
60     <? include("report.inc"); ?>
61     </select>
62 pjm2 1.1
63 pjm2 1.6 <input type="submit" name="submit" value="bung">
64     </form>
65 pjm2 1.1
66 pjm2 1.6 </p>
67 pjm2 1.1
68 pjm2 1.2
69     <?
70     if ($submit == "bung") {
71     $url = escapeshellcmd("$day/$machine_name/$report/chart.gif");
72     if (file_exists($url)) {
73 pjm2 1.5 echo "<p><b>$machine_name - $report</b><br><img src=\"$url\" width=\"500\" height=\"250\"><br><img src=\"24hour.gif\" width=\"500\" height=\"39\"></p>";
74 pjm2 1.2 }
75     else {
76     echo "<p>The report could not be found.</p>";
77     }
78     }
79    
80     ?>
81 pjm2 1.1
82     <hr>
83    
84     <p>
85     <font face="arial, sans-serif" size="2">
86     <b>Or browse all dates</b>
87     </font>
88     </p>
89    
90     <?
91    
92     $file_array = getdirArray('/home/cut/pjm2/webpages/reports','asort');
93     foreach($file_array as $file_name) {
94     if (is_dir($file_name)) {
95     print "+ <a href=\"$file_name\">$file_name</a><br>";
96     }
97     }
98    
99     ?>
100 pjm2 1.6
101     <? include("bottom.inc"); ?>
102 pjm2 1.1
103     </body>
104 pjm2 1.3 </html>