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

Comparing projects/cms/source/reports/php/alerts/alerts.php (file contents):
Revision 1.25 by pjm2, Wed Mar 21 19:10:33 2001 UTC vs.
Revision 1.32 by pjm2, Thu Mar 22 19:17:30 2001 UTC

# Line 24 | Line 24 | function getValue($value, $alert) {
24  
25   function printAlert($machine, $alert, $small="") {
26  
27 +    global $fontsize;
28 +
29      include("alerts_config.inc.php");
30  
31      $alertLevelNum = getValue("alertLevel", $alert);
# Line 50 | Line 52 | function printAlert($machine, $alert, $small="") {
52      $alertLevel = $alertLevelNames[$alertLevelNum];
53      $initialAlertTime = strftime("%x %X", intval($initialAlertTime / 1000));
54  
55 <    if ($small == "true") {
55 >    if ($small == "on") {
56          echo <<<EOT
57              <tr>
58               <td width="50">
59                &nbsp;
60               </td>
61 <             <td align="left">
61 >             <td>
62                <img src="level$alertLevelNum.gif" width="41" height="9" border="0" alt="$alertLevel">
63               </td>
64 <             <td align="left">
65 <              <font size="3" color="$alertColour"><b>$alertLevel</b></font>
64 >             <td>
65 >              <font size="$fontsize" color="$alertColour"><b>$alertLevel</b></font>
66               </td>
67 <             <td align="left">
68 <              <font size="3">$attributeName</font>
67 >             <td>
68 >              <font size="$fontsize">$attributeName</font>
69               </td>
70               <td>
71                &nbsp;
# Line 105 | Line 107 | EOT;
107   }
108  
109   function printReports($machine, $small="") {
110 +    global $fontsize;
111 +
112      # Get a list of all files in the machine's directory.
113      include("alerts_config.inc.php");
114      $alertArray = getdirArray("$alertDirectory/$machine", 'rsort');
115    
116 <    if ($small == "true") {
116 >    if ($small == "on") {
117          echo <<<EOT
118 <           <table border="0" cellpadding="2" cellspacing="0">
118 >           <table border="0" cellpadding="2" cellspacing="6">
119              <tr>
120               <td colspan="5">
121 <              <font size="+1"><b><a href="alerts.php?machine=$machine" style="color: black; text-decoration: none;">$machine</a></b></font>
121 >              <font size="$fontsize"><b><a href="alerts.php?machine=$machine" style="color: black; text-decoration: none;">$machine</a></b></font>
122               </td>
123              </tr>
124   EOT;
# Line 123 | Line 127 | EOT;
127          echo <<<EOT
128               <p>&nbsp;</p>
129               <table border="0" cellpadding="3" cellspacing="2" bgcolor="#000066" width="100%">
130 <               <tr>
130 >              <tr>
131                 <td>
132                  <font color="white">
133                   <b>
# Line 156 | Line 160 | EOT;
160          }
161      }
162      else {
163 <        if ($small != "true") {
163 >        if ($small != "on") {
164              echo "There are currently no alerts held about <b>$machine</b>";
165              printLine("");
166          }
167      }
168  
169 <    if ($small == "true") {
170 <        echo "</table>";
169 >    if ($small == "on") {
170 >        echo <<<EOT
171 >            <tr>
172 >             <td colspan="5">&nbsp;</td>
173 >            </tr>
174 >           </table>
175 > EOT;
176      }
177      else {
178          echo <<<EOT
# Line 179 | Line 188 | EOT;
188  
189   <? include($titleHTML); ?>
190  
191 < <? if (!$hideform) { ?>
191 > <? if ($hideform != "on") { ?>
192  
193   <? printLine("Latest alerts for hosts"); ?>
194  
# Line 210 | Line 219 | EOT;
219  
220         printLine("");
221  
222 +       $masterwidth = "";
223 +       if ($small != "on") {
224 +           $masterwidth = ' width="100%"';
225 +       }
226 +
227 +       echo <<<EOT
228 +        <table border="0" align="center"$masterwidth>
229 +         <tr>
230 +          <td>
231 + EOT;
232 +
233         if ($machine == "ALL") {
234             $machine_array = getdirArray($alertDirectory, 'asort');
235             if ($machine_array != FALSE) {
# Line 222 | Line 242 | EOT;
242             printReports($machine, $small);
243         }
244        
245 +       echo <<<EOT
246 +         </td>
247 +        </tr>
248 +       </table>
249 + EOT;
250     }
251     else {
252         printLine("");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines