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

Comparing projects/cms/source/reports/php/historical/browser.php (file contents):
Revision 1.43 by tdb, Sun Aug 1 10:40:26 2004 UTC vs.
Revision 1.45 by tdb, Sat Jun 30 11:24:39 2007 UTC

# Line 20 | Line 20
20   # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21   #
22  
23 # Navigation for the i-scream reports.
24 # pjm2@ukc.ac.uk
25 #
23   # CONFIGURABLE CONSTANTS: -
24  
25   include("browser_config.inc.php");
# Line 47 | Line 44 | include("iutils.inc.php");
44  
45   ?>
46  
47 < <? include($titleHTML); ?>
47 > <?php include($titleHTML); ?>
48  
49 < <hr weight="1" color="<? echo $lineColor ?>">
49 > <hr weight="1" color="<?php echo $lineColor ?>">
50  
51   <b>Most recent reports available</b>
52 < <form method="<? echo $formMethod ?>" action="<? echo $thisPage ?>">
53 < <?
52 > <form method="<?php echo $formMethod ?>" action="<?php echo $thisPage ?>">
53 > <?php
54  
55      $file_array = getdirArray($reportDirectory,'rsort');
56      print "<select size=\"1\" name=\"day\">";
57      if ($day) { ?>
58 <        <option selected value="<? echo $day ?>"><? echo $day ?></option>
58 >        <option selected value="<?php echo $day ?>"><?php echo $day ?></option>
59          <option value="">----------------</option>
60 <    <? }
60 >    <?php }
61      foreach($file_array as $file_name) {
62          #if (is_dir($file_name)) {
63          if (preg_match("/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/", $file_name)) {
# Line 77 | Line 74 | include("iutils.inc.php");
74   <input type="submit" name="submit" value="Go">
75   </form>
76  
77 < <hr weight="1" color="<? echo $lineColor ?>">
77 > <hr weight="1" color="<?php echo $lineColor ?>">
78  
79 < <? if ($day) { ?>
79 > <?php if ($day) { ?>
80  
81 <    <b>Available reports for <? echo $day ?></b>
81 >    <b>Available reports for <?php echo $day ?></b>
82  
83 <    <form method="<? echo $formMethod ?>" action="<? echo $thisPage ?>">
83 >    <form method="<?php echo $formMethod ?>" action="<?php echo $thisPage ?>">
84       <select size="1" name="machine_name">
85 <      <? if ($machine_name) { ?>
86 <        <option selected value="<? echo $machine_name ?>"><? echo $machine_name ?></option>
85 >      <?php if ($machine_name) { ?>
86 >        <option selected value="<?php echo $machine_name ?>"><?php echo $machine_name ?></option>
87          <option value="">----------------</option>
88 <      <? } else { ?>
88 >      <?php } else { ?>
89          <option selected value="">[select machine]</option>
90 <      <? } ?>
91 <      <? include("$reportDirectory/$day/$machineNameHTML"); ?>
90 >      <?php } ?>
91 >      <?php include("$reportDirectory/$day/$machineNameHTML"); ?>
92       </select>
93  
94       <select size="1" name="report">
95 <      <? if ($report) { ?>
96 <        <option selected value="<? echo $report ?>"><? echo $report ?></option>
95 >      <?php if ($report) { ?>
96 >        <option selected value="<?php echo $report ?>"><?php echo $report ?></option>
97          <option value="">----------------</option>
98 <      <? } else { ?>
98 >      <?php } else { ?>
99          <option selected value="">[select report]</option>
100 <      <? } ?>
101 <      <? include("$reportDirectory/$day/$reportHTML"); ?>
100 >      <?php } ?>
101 >      <?php include("$reportDirectory/$day/$reportHTML"); ?>
102       </select>
103  
104 <     <input type="hidden" name="day" value="<? echo $day ?>">
104 >     <input type="hidden" name="day" value="<?php echo $day ?>">
105       <input type="submit" name="submit" value="Show">
106      </form>
107      
108 <    <hr weight="1" color="<? echo $lineColor ?>">
108 >    <hr weight="1" color="<?php echo $lineColor ?>">
109      
110 < <? } ?>
110 > <?php } ?>
111  
112      </p>
113  
114  
115 < <?
115 > <?php
116      if ($submit == "Show" && $machine_name && $report) {
117          
118          $url = "$webRoot/$day/$machine_name/$report/$reportChartFile";
# Line 128 | Line 125 | include("iutils.inc.php");
125              
126              ?>
127              
128 <            <center><b>[<? echo $machine_name; ?>] - <? echo $report; ?></b></center>
128 >            <center><b>[<?php echo $machine_name; ?>] - <?php echo $report; ?></b></center>
129            
130              <table border="0" cellpadding="0" cellspacing="0">
131               <tr>
132                <td align="right" valign="top">
133 <               <font size="2"><? printf("%.1f", $max_value);  ?></font>
133 >               <font size="2"><?php printf("%.1f", $max_value);  ?></font>
134                </td>
135                <td rowspan="2">
136 <               <img src="<? echo $url; ?>" width="500" height="250">
136 >               <img src="<?php echo $url; ?>" width="500" height="250">
137                </td>
138               </tr>
139               <tr>
140                <td align="right" valign="bottom">
141 <               <font size="2"><? echo $min_value; ?></font>
141 >               <font size="2"><?php echo $min_value; ?></font>
142                </td>
143               </tr>
144               <tr>
145                <td>&nbsp;</td>
146 <              <td><img src="<? echo $scaleImage ?>" width="500" height="39"></td>
146 >              <td><img src="<?php echo $scaleImage ?>" width="500" height="39"></td>
147               </tr>
148              </table>
149              
150 <            <hr weight="1" color="<? echo $lineColor ?>">
150 >            <hr weight="1" color="<?php echo $lineColor ?>">
151              
152              <b>Latest data</b>
153              <p>
154              Latest set of data received from
155 <            <a href="<? echo "latest.php?machine=$machine_name"; ?>"><?=$machine_name?></a>
155 >            <a href="<?php echo "latest.php?machine=$machine_name"; ?>"><?php=$machine_name?></a>
156              <br>
157 <            Alerts for <a href="alerts.php?machine=<?=$machine_name?>"><?=$machine_name?></a>
157 >            Alerts for <a href="alerts.php?machine=<?php=$machine_name?>"><?php=$machine_name?></a>
158  
159  
160 <            <hr weight="1" color="<? echo $lineColor ?>">
160 >            <hr weight="1" color="<?php echo $lineColor ?>">
161              
162              <b>Extra data</b>
163              <p>
164 <            <a href="<? echo "$webRoot/$day/$machine_name/$report/$reportChartDataFile" ?>">Raw plot data</a><br>
165 <            <a href="<? echo "$webRoot/$day/$machine_name/$report/$reportChartFile" ?>">GIF chart</a><br>
166 <            <a href="<? echo "$webRoot/$day/$machine_name/$report/$reportLimitsFile" ?>">PHP y-axis limits include</a>
164 >            <a href="<?php echo "$webRoot/$day/$machine_name/$report/$reportChartDataFile" ?>">Raw plot data</a><br>
165 >            <a href="<?php echo "$webRoot/$day/$machine_name/$report/$reportChartFile" ?>">GIF chart</a><br>
166 >            <a href="<?php echo "$webRoot/$day/$machine_name/$report/$reportLimitsFile" ?>">PHP y-axis limits include</a>
167              
168 <        <? }
168 >        <?php }
169          else {
170              echo "<p>The report could not be found.  Somebody must have deleted it!</p>";
171          }
# Line 177 | Line 174 | include("iutils.inc.php");
174      
175   ?>
176  
177 < <? include($bottomHTML); ?>
177 > <?php include($bottomHTML); ?>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines