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.16 by pjm2, Sun Mar 11 21:56:23 2001 UTC vs.
Revision 1.21 by pjm2, Tue Mar 13 20:21:11 2001 UTC

# Line 10 | Line 10 | include("latest_config.inc.php");
10   #
11   # END CONFIGURATION
12  
13 + include("iutils.inc.php");
14  
14 # return an array of subdirectories from a directory.
15 function getdirArray($dir='./',$sort='asort') {
16    global $dir_file_count;
17    if ( is_dir($dir) ) {
18        $fd = @opendir($dir);
19        while ( ($part = @readdir($fd)) == TRUE ) {
20            clearstatcache();
21            if ($part != "." && $part != "..") {
22                $dir_array[] = $part;
23            }
24        }
25        if($fd == TRUE) {
26            closedir($fd);
27        }
28        if (is_array($dir_array)) {
29            $sort($dir_array);
30            $dir_file_count = count($dir_array);
31            Return $dir_array;
32        } else {
33            Return FALSE;
34        }
35    } else {
36        Return FALSE;
37    }
38 }
39
15   function printLine($title) {
16 <    echo "<hr color=\"#9999ff\">";
16 >    echo "<hr style=\"color:#9999ff;\">";
17      echo "<b>$title</b>";
18   }
19  
# Line 60 | Line 35 | function showStat($title, $value, $input) {
35   }
36  
37  
38 + function linkToHistory($report) {
39 +    global $machine;
40 +    $yesterday = date("Y-m-d", time() - 86400);
41 +    echo <<<EOT
42 +        <a href="browser.php?machine_name=$machine&report=$report&day=$yesterday&submit=Show"><img src="minichart.gif" width="20" height="20" border="0"></a>
43 + EOT;
44 + }
45 +
46 +
47   # show a bar-represented value.
48   function showBar($title, $value, $max, $units, $input) {
49  
# Line 93 | Line 77 | function showBar($title, $value, $max, $units, $input)
77              <td align="right"><?=$max?><?=$units?></td>
78            </tr>
79            <tr>
80 +            <td colspan="2"><? linkToHistory($value); ?> View yesterday's graph</td>
81 +          </tr>
82 +          <tr>
83              <td colspan="2">&nbsp;</td>
84            </tr>
85          </table>
# Line 132 | Line 119 | function showBar($title, $value, $max, $units, $input)
119         clearstatcache();
120         $data_age = time() - $last_modified;
121  
122 <       $last_modified = strftime("%a %d %b %Y at %T", $last_modified);
122 >       $last_modified = date("l jS F - g:ia", $last_modified);
123  
124         if ($data_age > $warning_age) {
125             $warning = <<<EOT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines