Project

General

Profile

« Previous | Next » 

Revision 5c9cc1de

Added by Scott Ullrich almost 20 years ago

When an alert is in progress show it in its own box

View differences:

usr/local/www/fbegin.inc
68 68
       <strong><a href="/"><img src="/logo.gif" border="0"></a></strong>
69 69
    </td>
70 70
    <td height="100%">
71
      <div style="height:99%" id="topbox" name="topbox">
71
      <div style="height:100%" id="topbox" name="topbox">
72 72
	<table bgcolor="#990000" background="top_background.gif" border="0" cellspacing="0" cellpadding="0" width="100%" height="85%">
73 73
	 <tr><td align="left" valign="bottom"><span class="tfrtitle">&nbsp;webConfigurator</span></td>
74 74
	   <td align="right" valign="bottom">
75 75
	     <span class="hostname"><?=$config['system']['hostname'] . "." . $config['system']['domain'];?>&nbsp;</span>
76 76
	   </td>
77 77
	 </tr>
78
	<?php
79
		/* display a top alert bar if need be */
80
		$need_alert_display = false;
81
		$display_text .= "";
82
		if(file_exists("{$g["tmp_path"]}/filter_reloading")) {
83
			$need_alert_display = true;
84
			$display_text .= "The filter rules are currently reloading.  You will receive an alert if there is an error.<br>";
85
		}
86
		$found_notices = are_notices_pending();
87
		if($found_notices == true) {
88
			$notices = get_notices();
89
			if(!$notices) {
90
				$need_alert_display = true;
91
				$display_text .= print_notices() . "<br>";
92
			}			
93
		}
94
		if($need_alert_display == true) {
95
			// XXX: make rounded.
96
			echo "<tr bgcolor=\"#000000\"><td colspan=\"2\"><font color=\"#ffffff\">";
97
			echo "<div id=\"roundalert\">";
98
			echo "<img src=\"/top_notification.gif\"> ";
99
			echo $display_text;
100
			echo "</div>";
101
			echo "</td></tr>";
102
		}
103
	?>
104 78
	</table>
105
	</div>
79
	</div>	
106 80
    </td>
107
  </tr>
81
  </tr>  
108 82
  <tr valign="top">
109 83
    <td valign="top" height="100%" width="150">
110 84
	<div id="niftyMenu" style="height:100%">
......
210 184
    </td>
211 185
    <td width="600"><table width="100%" border="0" cellpadding="10" cellspacing="0">
212 186
        <tr><td>
187

  
188
<?php
189
	/* display a top alert bar if need be */
190
	$need_alert_display = false;
191
	$display_text .= "";
192
	if(file_exists("{$g["tmp_path"]}/filter_reloading")) {
193
		$need_alert_display = true;
194
		$display_text .= "The filter rules are currently reloading.  You will receive an alert if there is an error.<br>";
195
	}
196
	$found_notices = are_notices_pending();
197
	if($found_notices == true) {
198
		$notices = get_notices();
199
		if(!$notices) {
200
			$need_alert_display = true;
201
			$display_text .= print_notices() . "<br>";
202
		}			
203
	}
204
	if($need_alert_display == true) {
205
                echo "<div style=\"background-color:#000000\" id=\"roundalert\">";
206
                echo "<table>";
207
		echo "<tr><td><font color=\"#ffffff\">";
208
		echo "&nbsp;&nbsp;<img align=\"middle\" src=\"/top_notification.gif\">&nbsp;&nbsp;&nbsp;";
209
		echo $display_text;
210
		echo "</td>";
211
		echo "</tr>";
212
		echo "</table>";
213
		echo "</div>";
214
	}
215
	
216
?>
usr/local/www/fend.inc
18 18
<?php
19 19
    /* if we displayed an alert earlier, round the bottom edges */
20 20
    if($need_alert_display == true) {
21
	echo "Rounded(\"div#roundalert\",\"bl br\",\"#FFF\",\"#990000\",\"smooth\");\n";
22
	echo "Rounded(\"div#topbox\",\"tl tr\",\"#FFF\",\"#990000\",\"smooth\");\n";
21
	echo "Rounded(\"div#roundalert\",\"all\",\"#FFF\",\"#000000\",\"smooth\");\n";
22
	echo "Rounded(\"div#topbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\");\n";
23 23
    } else {
24
	echo "Rounded(\"div#topbox\",\"tl tr bl br\",\"#FFF\",\"#990000\",\"smooth\");\n";
24
	echo "Rounded(\"div#topbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\");\n";
25 25
    }
26 26
?>
27 27
</script>

Also available in: Unified diff