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.50 by tdb, Wed Jun 29 10:26:40 2005 UTC vs.
Revision 1.52 by tdb, Sat Jun 30 11:24:40 2007 UTC

# Line 51 | Line 51 | function showUptime($title, $value, $input, $graph="")
51          <table border="0" width="100%">
52            <tr>
53              <td width="50%" align="right" valign="top">
54 <             <b><?=$title?></b>
54 >             <b><?php=$title?></b>
55              </td>
56              <td width="50%" align="left" valign="top">
57 <             <? if (preg_match("/^[0-9]+\.?[0-9]*$/", $value)) {
57 >             <?php if (preg_match("/^[0-9]+\.?[0-9]*$/", $value)) {
58                      linkToHistory($graph);
59                  } ?>
60 <              <?=uptime($value)?> (<?=$value?> seconds)</td>
60 >              <?php=uptime($value)?> (<?php=$value?> seconds)</td>
61            </tr>
62          </table>
63 <    <?
63 >    <?php
64   }
65  
66  
# Line 76 | Line 76 | function showStat($title, $value, $input, $graph="") {
76          <table border="0" width="100%">
77            <tr>
78              <td width="50%" align="right" valign="top">
79 <             <b><?=$title?></b>
79 >             <b><?php=$title?></b>
80              </td>
81              <td width="50%" align="left" valign="top">
82 <             <? if (preg_match("/^[0-9]+\.?[0-9]*$/", $value)) {
82 >             <?php if (preg_match("/^[0-9]+\.?[0-9]*$/", $value)) {
83                      linkToHistory($graph);
84                  } ?>
85 <              <?=$value?></td>
85 >              <?php=$value?></td>
86            </tr>
87          </table>
88 <    <?
88 >    <?php
89   }
90  
91  
# Line 183 | Line 183 | function showDiskIO($diskRoot, $input) {
183      while(1) {
184          $name = getPregMatch("$diskRoot.p$i.attributes.name", $input);
185          if ($name) {
186 <            $graph = preg_replace("/\//", "$hex_slash", $name);
187 <            $graph = preg_replace("/_/", "$hex_underscore", $graph);
186 >            $graph = preg_replace("/_/", "$hex_underscore", $name);
187 >            $graph = preg_replace("/\//", "$hex_slash", $graph);
188              $graph = preg_replace("/\\\\/", "$hex_bslash", $graph);
189              $graph = preg_replace("/ /", "$hex_space", $graph);
190              $graph = preg_replace("/:/", "$hex_colon", $graph);
# Line 209 | Line 209 | function showNet($netRoot, $input) {
209      while(1) {
210          $name = getPregMatch("$netRoot.p$i.attributes.name", $input);
211          if ($name) {
212 <            $graph = preg_replace("/\//", "$hex_slash", $name);
213 <            $graph = preg_replace("/_/", "$hex_underscore", $graph);
212 >            $graph = preg_replace("/_/", "$hex_underscore", $name);
213 >            $graph = preg_replace("/\//", "$hex_slash", $graph);
214              $graph = preg_replace("/\\\\/", "$hex_bslash", $graph);
215              $graph = preg_replace("/ /", "$hex_space", $graph);
216              $graph = preg_replace("/:/", "$hex_colon", $graph);
# Line 300 | Line 300 | function showBar($title, $value, $max, $units, $input,
300      ?>
301          <table border="0" cellpadding="0" cellspacing="0" align="center">
302            <tr>
303 <            <td colspan="2"><? linkToHistory($graph); ?> <b><?=$title?></b> <font size="2">(<?=$value?><?=$units?>)</font></td>
303 >            <td colspan="2"><?php linkToHistory($graph); ?> <b><?php=$title?></b> <font size="2">(<?php=$value?><?php=$units?>)</font></td>
304            </tr>
305            <tr>
306 <            <td colspan="2" bgcolor="#eeeeff"><img src="<?=$barImage?>" border="0" height="20" width="<?=$width?>"></td>
306 >            <td colspan="2" bgcolor="#eeeeff"><img src="<?php=$barImage?>" border="0" height="20" width="<?php=$width?>"></td>
307            </tr>
308            <tr>
309 <            <td colspan="2"><img src="<?=$scaleImage?>" border="0" height="11" width="<?=$max_width?>"></td>
309 >            <td colspan="2"><img src="<?php=$scaleImage?>" border="0" height="11" width="<?php=$max_width?>"></td>
310            </tr>
311            <tr>
312 <            <td align="left">0<?=$units?></td>
313 <            <td align="right"><?=$max?><?=$units?></td>
312 >            <td align="left">0<?php=$units?></td>
313 >            <td align="right"><?php=$max?><?php=$units?></td>
314            </tr>
315          </table>
316 <    <?
316 >    <?php
317   }
318  
319  
320   ?>
321  
322 < <? include($titleHTML); ?>
322 > <?php include($titleHTML); ?>
323  
324 < <? printLine("Display the latest information received from a host"); ?>
324 > <?php printLine("Display the latest information received from a host"); ?>
325  
326 < <form method="<? echo $formMethod ?>" action="<? echo $thisPage ?>">
327 < <?
326 > <form method="<?php echo $formMethod ?>" action="<?php echo $thisPage ?>">
327 > <?php
328  
329      $file_array = getdirArray($latestDirectory,'asort');
330      print "<select size=\"1\" name=\"machine\">";
331      if ($machine) { ?>
332 <        <option selected value="<? echo $machine ?>"><? echo $machine ?></option>
332 >        <option selected value="<?php echo $machine ?>"><?php echo $machine ?></option>
333          <option value="">----------------</option>
334 <    <? }
334 >    <?php }
335      foreach($file_array as $file_name) {
336          #if (is_dir($file_name)) {
337              print "<option value=\"$file_name\">$file_name</option>";
# Line 343 | Line 343 | function showBar($title, $value, $max, $units, $input,
343   <input type="submit" name="submit" value="Display">
344   </form>
345  
346 < <? if ($machine) {
346 > <?php if ($machine) {
347  
348         $last_modified = filemtime("$latestDirectory/$machine/$latestData");
349         clearstatcache();
# Line 398 | Line 398 | EOT;
398  
399   ?>
400  
401 < <? printLine(""); ?>
401 > <?php printLine(""); ?>
402  
403 < <? include($bottomHTML); ?>
403 > <?php include($bottomHTML); ?>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines