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

Comparing projects/cms/source/reports/php/latest/latest.php (file contents):
Revision 1.1 by pjm2, Thu Mar 8 21:22:05 2001 UTC vs.
Revision 1.6 by pjm2, Thu Mar 8 22:13:16 2001 UTC

# Line 37 | Line 37 | function getdirArray($dir='./',$sort='asort') {
37      }
38   }
39  
40 + function printLine() {
41 +    echo "<hr color=\"#9999ff\">";
42 + }
43  
44 +
45   function showStat($title, $value, $input) {
46 <    preg_match("/$value=([^\,]*)\,/", $input, $matches);
46 >    preg_match("/$value=([^\,]*)[\,|\}]/", $input, $matches);
47      $value = $matches[1];
48      if (empty($value)) {
49          $value = "<i>unknown</i>";
# Line 102 | Line 106 | function showBar($title, $value, $max, $input) {
106   <form method="<? echo $formMethod ?>" action="<? echo $thisPage ?>">
107   <?
108  
109 <    $file_array = getdirArray($latestDirectory,'rsort');
109 >    $file_array = getdirArray($latestDirectory,'asort');
110      print "<select size=\"1\" name=\"machine\">";
111      if ($machine) { ?>
112          <option selected value="<? echo $machine ?>"><? echo $machine ?></option>
113          <option value="">----------------</option>
114      <? }
115      foreach($file_array as $file_name) {
116 <        if (is_dir($file_name)) {
113 <            $i++;
116 >        #if (is_dir($file_name)) {
117              print "<option value=\"$file_name\">$file_name</option>";
118 <        }
118 >        #}
119      }
120      print "</select>";
121  
# Line 126 | Line 129 | function showBar($title, $value, $max, $input) {
129  
130         # Read the file.
131         #$input = "packet.attributes.machine_name=raptor.ukc.ac.uk,packet.memory.free=10,packet.memory.total=100,";
132 <       $input = file("$latestDirectory/$machine/latest_data");
132 >       $input = file("$latestDirectory/$machine/$latestData");
133         # All we need is the first line if there is more than one line.
134         $input = $input[0];
135  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines