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.40 by tdb, Sun May 19 21:15:29 2002 UTC

# Line 42 | Line 42 | function showStat($title, $value, $input) {
42      $report = $value;
43  
44      $value = getPregMatch($value, $input);
45 <    if (empty($value)) {
45 >    if (!isset($value)) {
46          $value = "<i><font color=\"#999999\">not sent</font></i>";
47      }
48      ?>
# Line 109 | Line 109 | function showBar($title, $value, $max, $units, $input,
109      if (!is_int($max)) {
110          $max = getPregMatch($max, $input);
111      }
112 <    if (empty($value) || empty($max)) {
112 >    if (!isset($value) || !isset($max)) {
113          return;
114      }
115  
# Line 117 | Line 117 | function showBar($title, $value, $max, $units, $input,
117          $value = $max - $value;
118      }
119  
120 <    $width = intval($max_width * $value / $max);
121 <
122 <    if ($width < 1) {
120 >    if(empty($max)) {
121          $width = 1;
122      }
123 +    else {
124 +        $width = intval($max_width * $value / $max);
125 +        if ($width < 1) {
126 +            $width = 1;
127 +        }
128 +    }
129  
130      ?>
131          <table border="0" cellpadding="0" cellspacing="0" align="center">
# Line 213 | Line 217 | EOT;
217             $input = $input[0];
218         }
219  
220 <       if (empty($input)) {
220 >       if (!isset($input)) {
221             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.";
222         }
223         else {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines