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.37 by tdb, Sat May 18 18:15:57 2002 UTC vs.
Revision 1.41 by tdb, Tue May 21 16:47:15 2002 UTC

# Line 2 | Line 2
2  
3   #
4   # i-scream central monitoring system
5 + # http://www.i-scream.org.uk
6   # Copyright (C) 2000-2002 i-scream
7   #
8   # This program is free software; you can redistribute it and/or
# Line 42 | Line 43 | function showStat($title, $value, $input) {
43      $report = $value;
44  
45      $value = getPregMatch($value, $input);
46 <    if (empty($value)) {
46 >    if (!isset($value)) {
47          $value = "<i><font color=\"#999999\">not sent</font></i>";
48      }
49      ?>
# Line 109 | Line 110 | function showBar($title, $value, $max, $units, $input,
110      if (!is_int($max)) {
111          $max = getPregMatch($max, $input);
112      }
113 <    if (empty($value) || empty($max)) {
113 >    if (!isset($value) || !isset($max)) {
114          return;
115      }
116  
# Line 117 | Line 118 | function showBar($title, $value, $max, $units, $input,
118          $value = $max - $value;
119      }
120  
121 <    $width = intval($max_width * $value / $max);
121 <
122 <    if ($width < 1) {
121 >    if(empty($max)) {
122          $width = 1;
123      }
124 +    else {
125 +        $width = intval($max_width * $value / $max);
126 +        if ($width < 1) {
127 +            $width = 1;
128 +        }
129 +    }
130  
131      ?>
132          <table border="0" cellpadding="0" cellspacing="0" align="center">
# Line 213 | Line 218 | EOT;
218             $input = $input[0];
219         }
220  
221 <       if (empty($input)) {
221 >       if (!isset($input)) {
222             echo "<br><br>There are currently no latest details about <b>$machine</b>.  Please notify your i-scream server administrator if you believe this to be incorrect.";
223         }
224         else {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines