ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/php/historical/browser.php
(Generate patch)

Comparing projects/cms/source/reports/php/historical/browser.php (file contents):
Revision 1.3 by pjm2, Sat Feb 3 22:51:48 2001 UTC vs.
Revision 1.10 by pjm2, Sun Feb 25 14:48:44 2001 UTC

# Line 1 | Line 1
1   <?php
2  
3 < // A test navigation thingy.
3 > // Navigation for the i-scream reports.
4   // pjm2@ukc.ac.uk
5  
6  
# Line 29 | Line 29 | function getdirArray($dir='./',$sort='asort') {
29      }
30   }
31  
32    include("day.inc");
33
32   ?>
33  
34 < <html>
37 < <body bgcolor="eeeeff">
34 > <? include("title.inc"); ?>
35  
36 < <font face="arial, sans-serif">
37 < <h4>I-scream report browser [trial 2.0]</h4>
38 < </font>
36 >    <form method="GET" action="">
37 >     <select size="1" name="machine_name">
38 >      <option selected value="">[select machine]</option>
39 >      <? #include("machine_name.inc"); ?>
40 >     </select>
41  
42 < <hr>
42 >     <select size="1" name="report">
43 >      <option selected value="">[select report]</option>
44 >      <? #include("report.inc"); ?>
45 >     </select>
46  
47 < <font face="arial, sans-serif" size="2">
48 < <b>View reports for <? echo "$day" ?></b>
47 < </font>
47 >     <input type="submit" name="submit" value="Show">
48 >    </form>
49  
50 < <p>
50 >    </p>
51  
51 <form method="GET" action="">
52  <select size="1" name="machine_name">
53   <? include("machine_name.inc"); ?>
54  </select>
52  
56  <select size="1" name="report">
57   <? include("report.inc"); ?>
58  </select>
59
60  <input type="submit" name="submit" value="bung">
61
62 </form>
63
64 </p>
65
53   <?
54 <    if ($submit == "bung") {
54 >    if ($submit == "Show" && $machine_name && $report) {
55          $url = escapeshellcmd("$day/$machine_name/$report/chart.gif");
56          if (file_exists($url)) {
57 <            echo "<p><img src=\"$url\" width=\"500\" height=\"250\"><br><img src=\"24hour.gif\" width=\"500\" height=\"39\"></p>";
57 >            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>";
58          }
59          else {
60              echo "<p>The report could not be found.</p>";
# Line 78 | Line 65 | function getdirArray($dir='./',$sort='asort') {
65  
66   <hr>
67  
81 <p>
82 <font face="arial, sans-serif" size="2">
83 <b>Or browse all dates</b>
84 </font>
85 </p>
86
68   <?
69  
70 <    $file_array = getdirArray('/home/cut/pjm2/webpages/reports','asort');
70 >    $file_array = getdirArray('/home/cut/pjm2/webpages/reports','rsort');
71 >    print "<ul>";
72      foreach($file_array as $file_name) {
73          if (is_dir($file_name)) {
74 <            print "+ <a href=\"$file_name\">$file_name</a><br>";
74 >            print "<li><a href=\"$file_name\">$file_name</a>";
75          }
76      }
77 +    print "</ul>";
78  
79   ?>
80  
81 < </body>
99 < </html>
81 > <? include("bottom.inc"); ?>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines