Project

General

Profile

Download (16 KB) Statistics
| Branch: | Tag: | Revision:
1 ff9d6728 Scott Ullrich
2
<script src="/javascript/sorttable.js"></script>
3
4 c6c150e9 Scott Ullrich
<?php
5 7ac5a4cb Scott Ullrich
/*
6
	pfSense_MODULE:	header
7
*/
8 f0394bbb Scott Ullrich
9 705a4137 Ermal Luçi
require_once("globals.inc");
10 b8f82cd7 Scott Ullrich
require_once("functions.inc");
11 7ac5a4cb Scott Ullrich
12 b46bfcf5 Bill Marquette
/* $Id$ */
13 e86a8e57 Scott Ullrich
14 0a3eaf4d jim-p
15
/* Determine automated help URL. Should output the page name and
16
   parameters separately */
17
$uri_split = "";
18
preg_match("/\/(.*)\?(.*)/", $_SERVER["REQUEST_URI"], $uri_split);
19
20
/* If there was no match, there were no parameters, just grab the filename
21
   Otherwise, use the matched filename from above. */
22
if (empty($uri_split[0])) {
23
	$pagename = ltrim($_SERVER["REQUEST_URI"], '/');
24
} else {
25
	$pagename = $uri_split[1];
26
}
27
/* If the page name is still empty, the user must have requested / (index.php) */
28
if (empty($pagename)) {
29
	$pagename = "index.php";
30
}
31
32
/* If the filename is pkg_edit.php or wizard.php, reparse looking
33
	for the .xml filename */
34 b873ded5 jim-p
if (($pagename == "pkg.php") || ($pagename == "pkg_edit.php") || ($pagename == "wizard.php")) {
35 0a3eaf4d jim-p
	$param_split = explode('&', $uri_split[2]);
36
	foreach ($param_split as $param) {
37
		if (substr($param, 0, 4) == "xml=") {
38
			$xmlfile = explode('=', $param);
39
			$pagename = $xmlfile[1];
40
		}
41
	}
42
}
43
44
/* Build the full help URL. */
45
$helpurl .= "{$g['help_base_url']}?page={$pagename}";
46
47 e93441e0 Scott Ullrich
function return_ext_menu($section) {
48
	global $config;
49
	$htmltext = "";
50 5e3249f0 Scott Ullrich
	$extarray = array();
51 e93441e0 Scott Ullrich
	if($config['installedpackages']['menu'] <> "") {
52
		foreach($config['installedpackages']['menu'] as $menuitem) {
53
			if($menuitem['section'] != $section) continue;
54
			if($menuitem['url'] <> "") {
55
			 	$addresswithport = getenv("HTTP_HOST");
56
				$colonpos = strpos($addresswithport, ":");
57
				if ($colonpos !== False){
58
					//my url is actually just the IP address of the pfsense box
59
					$myurl = substr($addresswithport, 0, $colonpos);
60 c987ed88 Scott Ullrich
				} else {
61 e93441e0 Scott Ullrich
					$myurl = $addresswithport;
62 90e3bbc0 Colin Smith
				}
63 2c7bc9d0 jim-p
				$description = str_replace('$myurl', $myurl, $menuitem['url']);
64 e93441e0 Scott Ullrich
			} else {
65
				$description = '/pkg.php?xml=' . $menuitem['configfile'];
66 c6c150e9 Scott Ullrich
			}
67 5e3249f0 Scott Ullrich
			$extarray[] = array($menuitem['name'], $description);
68 c6c150e9 Scott Ullrich
		}
69
	}
70 5e3249f0 Scott Ullrich
	return $extarray;
71 e93441e0 Scott Ullrich
}
72 65384707 Erik Kristensen
73 471ce716 Scott Ullrich
function output_menu($arrayitem, $target="") {
74 5e3249f0 Scott Ullrich
	foreach($arrayitem as $item) {
75 471ce716 Scott Ullrich
		if($target)
76
			$targetinfo = "target='{$target}'";
77 96372523 thompsa
		echo '<li><a ' . $targetinfo. ' href="' . $item[1] . '" class="navlnk">' . $item[0] . '</a></li>' . "\n";
78 5e3249f0 Scott Ullrich
	}
79
}
80
81
// System
82 5ba2df71 Scott Ullrich
$system_menu = array();
83
$system_menu[] = array("Advanced", "/system_advanced_admin.php");
84
$system_menu[] = array("Firmware", "/system_firmware.php");
85
$system_menu[] = array("General Setup", "/system.php");
86
$system_menu[] = array("Logout", "/index.php?logout");
87 5e3249f0 Scott Ullrich
if ($g['platform'] == "pfSense" or $g['platform'] == "nanobsd")
88 5ac70f13 Scott Ullrich
	$system_menu[] = array("Packages", "/pkg_mgr_installed.php");
89 5ba2df71 Scott Ullrich
$system_menu[] = array("Setup Wizard", "/wizard.php?xml=setup_wizard.xml");
90
$system_menu[] = array("Routing", "/system_gateways.php");
91
$system_menu[] = array("Cert Manager", "/system_camanager.php");
92 43f26ab1 Ermal
if (!isAllowedPage("system_usermanager.php*"))
93
	$system_menu[] = array("User Manager", "/system_usermanager_passwordmg.php");
94
else
95
	$system_menu[] = array("User Manager", "/system_usermanager.php");
96 5ba2df71 Scott Ullrich
$system_menu = msort(array_merge($system_menu, return_ext_menu("System")),0);
97 5e3249f0 Scott Ullrich
98
// Interfaces
99 5ba2df71 Scott Ullrich
$interfaces_menu = array();
100 5e3249f0 Scott Ullrich
if (!isset($config['system']['webgui']['noassigninterfaces']))
101 5ba2df71 Scott Ullrich
	$interfaces_menu[] = array("(assign)", "/interfaces_assign.php");
102 5e3249f0 Scott Ullrich
$opts = get_configured_interface_with_descr(false, true);
103
foreach ($opts as $oif => $odescr)
104
	if (!isset($config['interfaces'][$oif]['ovpn']))
105 5ba2df71 Scott Ullrich
		$interfaces_menu[] = array(htmlspecialchars($odescr), "/interfaces.php?if={$oif}");
106
$interfaces_menu = msort(array_merge($interfaces_menu, return_ext_menu("Interfaces")),0);
107 5e3249f0 Scott Ullrich
108
// Firewall
109 5ba2df71 Scott Ullrich
$firewall_menu = array();
110
$firewall_menu[] = array("Aliases", "/firewall_aliases.php");
111 0d5c9be1 Chris Buechler
$firewall_menu[] = array("NAT", "/firewall_nat.php");
112 5ba2df71 Scott Ullrich
$firewall_menu[] = array("Rules", "/firewall_rules.php");
113
$firewall_menu[] = array("Schedules", "/firewall_schedule.php");
114 38b357bd Ermal
$firewall_menu[] = array("Traffic Shaper", "/firewall_shaper.php");
115 5ba2df71 Scott Ullrich
$firewall_menu[] = array("Virtual IPs", "/firewall_virtual_ip.php");
116
$firewall_menu = msort(array_merge($firewall_menu, return_ext_menu("Firewall")),0);
117 5e3249f0 Scott Ullrich
118
// Services
119 5ba2df71 Scott Ullrich
$services_menu = array();
120
$services_menu[] = array("Captive Portal", "/services_captiveportal.php");
121
$services_menu[] = array("DNS Forwarder", "/services_dnsmasq.php");
122
$services_menu[] = array("DHCP Relay", "/services_dhcp_relay.php");
123 5e3249f0 Scott Ullrich
if($g['services_dhcp_server_enable'])
124 5ba2df71 Scott Ullrich
	$services_menu[] = array("DHCP Server", "/services_dhcp.php");
125
$services_menu[] = array("Dynamic DNS", "/services_dyndns.php");
126
$services_menu[] = array("IGMP proxy", "/services_igmpproxy.php");
127 3e2165b6 jim-p
$services_menu[] = array("Load Balancer", "/load_balancer_pool.php");
128 bb39c283 jim-p
$services_menu[] = array(gettext("NTP"), "/services_ntpd.php");
129 5ba2df71 Scott Ullrich
$services_menu[] = array("OLSR", "/pkg_edit.php?xml=olsrd.xml&id=0");
130
$services_menu[] = array("PPPoE Server", "/vpn_pppoe.php");
131 98bcf1f8 Scott Ullrich
$services_menu[] = array("RIP", "/pkg_edit.php?xml=routed.xml&id=0");
132 5ba2df71 Scott Ullrich
$services_menu[] = array("SNMP", "/services_snmp.php");
133 38b357bd Ermal
if(count($config['interfaces']) > 1) {
134 5e3249f0 Scott Ullrich
	/* no use for UPnP in single-interface deployments
135
	remove to reduce user confusion
136
	*/
137 93b2c459 jim-p
	$services_menu[] = array("UPnP &amp; NAT-PMP", "/pkg_edit.php?xml=miniupnpd.xml&id=0");
138 5e3249f0 Scott Ullrich
}
139 5ba2df71 Scott Ullrich
$services_menu = msort(array_merge($services_menu, return_ext_menu("Services")),0);
140 5e3249f0 Scott Ullrich
141
// VPN
142 5ba2df71 Scott Ullrich
$vpn_menu = array();
143
$vpn_menu[] = array("IPsec", "/vpn_ipsec.php");
144
$vpn_menu[] = array("OpenVPN", "/vpn_openvpn_server.php");
145
$vpn_menu[] = array("PPTP", "/vpn_pptp.php");
146
$vpn_menu[] = array("L2TP", "/vpn_l2tp.php");
147
$vpn_menu = msort(array_merge($vpn_menu, return_ext_menu("VPN")),0);
148 5e3249f0 Scott Ullrich
149
// Status
150
$status_menu = array();
151
if (isset($config['captiveportal']['enable']))
152
	$status_menu[] = array("Captive Portal", "/status_captiveportal.php");
153
$status_menu[] = array("CARP (failover)", "/carp_status.php");
154
$status_menu[] = array("Dashboard", "/index.php");
155
$status_menu[] = array("Gateways", "/status_gateways.php");
156 b9546722 Chris Buechler
$status_menu[] = array("DHCP Leases", "/status_dhcp_leases.php");
157 5e3249f0 Scott Ullrich
$status_menu[] = array("Filter Reload", "/status_filter_reload.php");
158
$status_menu[] = array("Interfaces", "/status_interfaces.php");
159
$status_menu[] = array("IPsec", "/diag_ipsec.php");
160 477dcf13 Chris Buechler
$status_menu[] = array("Load Balancer", "/status_lb_pool.php");
161 49551bbf jim-p
$status_menu[] = array("NTP", "/status_ntpd.php");
162 5e3249f0 Scott Ullrich
$status_menu[] = array("OpenVPN", "/status_openvpn.php");
163
if ($g['platform'] == "pfSense")
164
	$status_menu[] = array("Package Logs", "/diag_pkglogs.php");
165
$status_menu[] = array("Queues", "/status_queues.php");
166
$status_menu[] = array("RRD Graphs", "/status_rrd_graph.php");
167
$status_menu[] = array("Services", "/status_services.php");
168
$status_menu[] = array("System Logs", "/diag_logs.php");
169
$status_menu[] = array("Traffic Graph", "/status_graph.php?if=wan");
170 38b357bd Ermal
if(count($config['interfaces']) > 1) 
171 93b2c459 jim-p
	$status_menu[] = array("UPnP &amp; NAT-PMP", "/status_upnp.php");
172 5e3249f0 Scott Ullrich
$ifentries = get_configured_interface_with_descr();
173
foreach ($ifentries as $ent => $entdesc) {
174
	if (is_array($config['interfaces'][$ent]['wireless']) &&
175
		preg_match($g['wireless_regex'], $config['interfaces'][$ent]['if']))
176 273e9bf7 jim-p
		$wifdescrs[$ent] = $entdesc;
177 5e3249f0 Scott Ullrich
}
178 273e9bf7 jim-p
if (count($wifdescrs) > 0)
179 5e3249f0 Scott Ullrich
	$status_menu[] = array("Wireless", "/status_wireless.php");
180
$status_menu = msort(array_merge($status_menu, return_ext_menu("Status")),0);
181
182
// Diagnostics
183 5ba2df71 Scott Ullrich
$diagnostics_menu = array();
184 e6ec6b25 Chris Buechler
$diagnostics_menu[] = array("ARP Table", "/diag_arp.php");
185 3f0357fc Ermal Lu?i
$diagnostics_menu[] = array("Authentication", "/diag_authentication.php");
186 5ba2df71 Scott Ullrich
$diagnostics_menu[] = array("Backup/Restore", "/diag_backup.php");
187
$diagnostics_menu[] = array("Command Prompt", "/exec.php");
188
$diagnostics_menu[] = array("DNS Lookup", "/diag_dns.php");
189
$diagnostics_menu[] = array("Edit File", "/edit.php");
190
$diagnostics_menu[] = array("Factory Defaults", "/diag_defaults.php");
191
$diagnostics_menu[] = array("Halt System", "/halt.php" );
192 9242ba15 Scott Ullrich
$diagnostics_menu[] = array("Limiter Info", "/diag_limiter_info.php" );
193
194 450bf4e2 Scott Ullrich
$diagnostics_menu[] = array("Tables", "/diag_tables.php");
195 5ba2df71 Scott Ullrich
$diagnostics_menu[] = array("Ping", "/diag_ping.php");
196 79992f17 Scott Ullrich
$diagnostics_menu[] = array("pfInfo", "/diag_pf_info.php");
197 a1054b46 Scott Ullrich
$diagnostics_menu[] = array("pfTop", "/diag_system_pftop.php");
198 5ba2df71 Scott Ullrich
$diagnostics_menu[] = array("Reboot", "/reboot.php");
199
$diagnostics_menu[] = array("Routes", "/diag_routes.php");
200 21f0f60d jim-p
$diagnostics_menu[] = array("SMART Status", "/diag_smart.php");
201 5ba2df71 Scott Ullrich
$diagnostics_menu[] = array("States", "/diag_dump_states.php");
202 9d71da81 jim-p
$diagnostics_menu[] = array("States Summary", "/diag_states_summary.php");
203 5ba2df71 Scott Ullrich
$diagnostics_menu[] = array("System Activity", "/diag_system_activity.php");
204
$diagnostics_menu[] = array("Traceroute", "/diag_traceroute.php");
205
$diagnostics_menu[] = array("Packet Capture", "/diag_packet_capture.php");
206 5e3249f0 Scott Ullrich
if($g['platform'] == "nanobsd")
207 9f9e4be1 jim-p
	$diagnostics_menu[] = array("NanoBSD", "/diag_nanobsd.php");
208 5e3249f0 Scott Ullrich
209
if (isset($config['system']['developer'])) {
210
	echo "<li><hr width=\"80%\"/></li>";
211 9f9e4be1 jim-p
	$diagnostics_menu[] = array("Restart HTTPD", "/restart_httpd.php");
212 5e3249f0 Scott Ullrich
}
213 5ba2df71 Scott Ullrich
$diagnostics_menu = msort(array_merge($diagnostics_menu, return_ext_menu("Diagnostics")),0);
214 5e3249f0 Scott Ullrich
215 3b29612f Chris Buechler
if(! $g['disablehelpmenu']) {
216
	$help_menu = array();
217
	$help_menu[] = array("About this Page", $helpurl);
218 f5208bf2 Scott Ullrich
	if($g['product_name'] == "pfSense") 
219 998930ab Scott Ullrich
		$help_menu[] = array("Bug Database", "http://www.pfsense.org/j.php?jumpto=redmine");
220 3b29612f Chris Buechler
	$help_menu[] = array("User Forum", "http://www.pfsense.org/j.php?jumpto=forum");
221
	$help_menu[] = array("Documentation", "http://www.pfsense.org/j.php?jumpto=doc");
222
	$help_menu[] = array("Developers Wiki", "http://www.pfsense.org/j.php?jumpto=devwiki");
223
	$help_menu[] = array("Paid Support", "http://www.pfsense.org/j.php?jumpto=portal");
224
	$help_menu[] = array("pfSense Book", "http://www.pfsense.org/j.php?jumpto=book");
225
	$help_menu[] = array("Search portal", "http://www.pfsense.org/j.php?jumpto=searchportal");
226 204f33f6 Scott Ullrich
	$help_menu[] = array("FreeBSD Handbook", "http://www.pfsense.org/j.php?jumpto=fbsdhandbook");
227 3b29612f Chris Buechler
	$help_menu = msort(array_merge($help_menu, return_ext_menu("Help")),0);	
228
}
229 669716df Scott Ullrich
230 e93441e0 Scott Ullrich
/* NOTICE ACKNOWLEDGE CODE by Erik Kristensen */
231
if ($_REQUEST['noticeaction'] == 'acknowledge') {
232 034f08e7 Scott Ullrich
	$notice_id = htmlspecialchars($_REQUEST['noticeid']);
233 e93441e0 Scott Ullrich
	close_notice($notice_id);
234
}
235
/**********************************************/
236 65384707 Erik Kristensen
237 c6c150e9 Scott Ullrich
?>
238 12a00813 Erik Kristensen
239 9f53d3a8 Scott Ullrich
<div id="wrapper">
240
	<div id="header">
241 9afdf058 Ermal
		<div id="header-left"><a href="/index.php" id="status-link"><img src="/themes/<?= $g['theme']; ?>/images/transparent.gif" border="0"></a></div>
242 9f53d3a8 Scott Ullrich
		<div id="header-right">
243 1df0159c Erik Kristensen
			<div class="container">
244
				<div class="left">webConfigurator</div>
245
				<div class="right">
246 64fcbfc8 Erik Kristensen
<?
247 b1cbbf24 Erik Kristensen
				if (are_notices_pending()) {
248
					$notices = get_notices();
249 dca32536 Scott Ullrich
250 a2046789 Scott Ullrich
					$requests=array();
251 dca32536 Scott Ullrich
252 a6fac06e Erik Kristensen
					## Get Query Arguments from URL ###
253
					foreach ($_REQUEST as $key => $value) {
254
						if ($key != "PHPSESSID")
255
							$requests[] = $key.'='.$value;
256
					}
257 a2046789 Scott Ullrich
					if(is_array($requests))
258
						$request_string = implode("&", $requests);
259 a6fac06e Erik Kristensen
260 35eef977 Scott Ullrich
					if(is_array($notices)) {
261
						foreach ($notices as $key => $value) {
262
							$date = date("m-d-y H:i:s", $key);
263
							$noticemsg = str_replace("'", "", $value['notice']);
264
							$noticemsg = str_replace('"', "", $noticemsg);
265
							$noticemsg = str_replace("\n", "", $noticemsg);
266
							$noticemsg = str_replace("<p>", "", $noticemsg);
267
							$noticemsg = str_replace("<pre>", "", $noticemsg);
268
							$noticemsg = str_replace("</pre>", "", $noticemsg);
269
							$noticemsg = str_replace("</p>", "", $noticemsg);
270
							$noticemsg = str_replace("<br>", "", $noticemsg);
271 91d3d442 Scott Ullrich
							$extra_args = "";
272
							if($_GET['xml']) 
273 060d4c5e jim-p
								$extraargs="&xml=" .  htmlspecialchars($_GET['xml']);
274 91d3d442 Scott Ullrich
							if($_POST['xml']) 
275 060d4c5e jim-p
								$extraargs="&xml=" .  htmlspecialchars($_POST['xml']);
276 91d3d442 Scott Ullrich
							if($_GET['id']) 
277 060d4c5e jim-p
								$extraargs="&xml=" .  htmlspecialchars($_GET['id']);
278 91d3d442 Scott Ullrich
							if($_POST['id'])
279 060d4c5e jim-p
								$extraargs="&xml=" .  htmlspecialchars($_POST['id']);
280 91d3d442 Scott Ullrich
							$notice_msgs = '<a href="?noticeaction=acknowledge&noticeid=all' . $extraargs . '">Acknowledge All</a> &nbsp;&nbsp;&nbsp;&nbsp;.:.&nbsp;&nbsp;&nbsp;&nbsp; ';
281 35eef977 Scott Ullrich
							if ($value['url']) {
282 190d5d58 jim-p
								$notice_msgs .= $date.' - <a href="'.$url.'?' . htmlspecialchars($request_string) . '&noticeaction=acknowledge&noticeid='.$key.'">['.$value['id'].']</a>';
283 35eef977 Scott Ullrich
							} else {
284 f01d8c49 jim-p
								$notice_msgs .= $date.' - <a href="?' . htmlspecialchars($request_string) . '&noticeaction=acknowledge&noticeid='.$key.'">['.$value['id'].']'.htmlspecialchars($noticemsg).'</a>';
285 35eef977 Scott Ullrich
							}
286
							$notice_msgs .= " &nbsp;&nbsp;&nbsp;&nbsp;.:.&nbsp;&nbsp;&nbsp;&nbsp; ";
287 b1cbbf24 Erik Kristensen
						}
288
					}
289 64fcbfc8 Erik Kristensen
?>
290 b1cbbf24 Erik Kristensen
					<div id="alerts">
291
						<script type="text/javascript">
292
							var content='<div id="marquee-text"><?= $notice_msgs; ?></div>'
293
						</script>
294 625dcc40 Bill Marquette
						<script type="text/javascript" src="/javascript/ticker.js"></script>
295 b1cbbf24 Erik Kristensen
					</div>
296
<?
297
				} else {
298 612832ec Erik Kristensen
?>
299
					<div id="hostname">
300
						<? print $config['system']['hostname'] . "." . $config['system']['domain']; ?>
301
					</div>
302
<?
303 b1cbbf24 Erik Kristensen
				}
304
?>
305 1df0159c Erik Kristensen
				</div>
306
			</div>
307 9f53d3a8 Scott Ullrich
		</div>
308
	</div> <!-- Header DIV -->
309
	<div id="content">
310
		<div id="left">
311 2779b49b Scott Dale
			<div id="navigation" style="z-index:1000">
312 41058a8c Erik Kristensen
				<ul id="menu">
313 d86286ed Erik Kristensen
					<li class="firstdrop">
314 9f53d3a8 Scott Ullrich
						<div>System</div>
315 d86286ed Erik Kristensen
						<ul class="subdrop">
316 7cf210f1 Ermal Lu?i
						<?php
317 5ba2df71 Scott Ullrich
							output_menu($system_menu);
318 7cf210f1 Ermal Lu?i
						?>
319 9f53d3a8 Scott Ullrich
						</ul>
320
					</li>
321 d86286ed Erik Kristensen
					<li class="drop">
322
						<div>Interfaces</div>
323
						<ul class="subdrop">
324 7cf210f1 Ermal Lu?i
						<?php
325 5ba2df71 Scott Ullrich
							output_menu($interfaces_menu);
326 7cf210f1 Ermal Lu?i
						?>
327 9f53d3a8 Scott Ullrich
						</ul>
328
					</li>
329 d86286ed Erik Kristensen
					<li class="drop">
330 9f53d3a8 Scott Ullrich
						<div>Firewall</div>
331 d86286ed Erik Kristensen
						<ul class="subdrop">
332 7cf210f1 Ermal Lu?i
						<?php
333 5ba2df71 Scott Ullrich
							output_menu($firewall_menu);
334 7cf210f1 Ermal Lu?i
						?>
335 9f53d3a8 Scott Ullrich
						</ul>
336
					</li>
337 d86286ed Erik Kristensen
					<li class="drop">
338 9f53d3a8 Scott Ullrich
						<div>Services</div>
339 d86286ed Erik Kristensen
						<ul class="subdrop">
340 7cf210f1 Ermal Lu?i
						<?
341 5ba2df71 Scott Ullrich
							output_menu($services_menu);
342 7cf210f1 Ermal Lu?i
						?>
343 9f53d3a8 Scott Ullrich
						</ul>
344
					</li>
345 d86286ed Erik Kristensen
					<li class="drop">
346 9f53d3a8 Scott Ullrich
						<div>VPN</div>
347 d86286ed Erik Kristensen
						<ul class="subdrop">
348 7cf210f1 Ermal Lu?i
						<?php
349 5ba2df71 Scott Ullrich
							output_menu($vpn_menu);
350 7cf210f1 Ermal Lu?i
						?>
351 9f53d3a8 Scott Ullrich
						</ul>
352
					</li>
353 d86286ed Erik Kristensen
					<li class="drop">
354 9f53d3a8 Scott Ullrich
						<div>Status</div>
355 d86286ed Erik Kristensen
						<ul class="subdrop">
356 7cf210f1 Ermal Lu?i
						<?php
357 5e3249f0 Scott Ullrich
							output_menu($status_menu);
358 7cf210f1 Ermal Lu?i
						?>
359 9f53d3a8 Scott Ullrich
						</ul>
360
					</li>
361 669716df Scott Ullrich
					<li class="drop">
362 9f53d3a8 Scott Ullrich
						<div>Diagnostics</div>
363 d86286ed Erik Kristensen
						<ul id="diag" class="subdrop">
364 7cf210f1 Ermal Lu?i
						<?
365 5ba2df71 Scott Ullrich
							output_menu($diagnostics_menu);
366 7cf210f1 Ermal Lu?i
						?>
367 9f53d3a8 Scott Ullrich
						</ul>
368
					</li>
369 3b29612f Chris Buechler
					<?php if(! $g['disablehelpmenu']): ?>
370 669716df Scott Ullrich
					<li class="lastdrop">
371
						<div>Help</div>
372
						<ul id="help" class="subdrop">
373
						<?
374 471ce716 Scott Ullrich
							output_menu($help_menu, "_new");
375 669716df Scott Ullrich
						?>
376
						</ul>
377
					</li>
378 3b29612f Chris Buechler
					<?php endif; ?>
379 9f53d3a8 Scott Ullrich
				</ul>
380
			</div>
381 dca32536 Scott Ullrich
382 9f53d3a8 Scott Ullrich
		</div> <!-- Left DIV -->
383 dca32536 Scott Ullrich
384 9f53d3a8 Scott Ullrich
		<div id="right">
385 dca32536 Scott Ullrich
386 5c9cc1de Scott Ullrich
<?php
387 45ee90ed Matthew Grooms
388 5c9cc1de Scott Ullrich
	/* display a top alert bar if need be */
389
	$need_alert_display = false;
390
	$found_notices = are_notices_pending();
391
	if($found_notices == true) {
392
		$notices = get_notices();
393
		if(!$notices) {
394
			$need_alert_display = true;
395 efe8fa78 jim-p
			$display_text = print_notices($notices) . "<br>";
396 dca32536 Scott Ullrich
		}
397 5c9cc1de Scott Ullrich
	}
398
	if($need_alert_display == true) {
399
                echo "<div style=\"background-color:#000000\" id=\"roundalert\">";
400
                echo "<table>";
401
		echo "<tr><td><font color=\"#ffffff\">";
402
		echo "&nbsp;&nbsp;<img align=\"middle\" src=\"/top_notification.gif\">&nbsp;&nbsp;&nbsp;";
403
		echo $display_text;
404
		echo "</td>";
405
		echo "</tr>";
406
		echo "</table>";
407
		echo "</div>";
408
	}
409 b8f82cd7 Scott Ullrich
410 5e3249f0 Scott Ullrich
function add_to_menu($url, $name) {
411 45ee90ed Matthew Grooms
	if (isAllowedPage($url))
412
		echo "<li><a href=\"{$url}\" class=\"navlnk\">{$name}</a></li>\n";
413 b8f82cd7 Scott Ullrich
}
414 19b331c1 Scott Ullrich
?>
415 dca32536 Scott Ullrich
416 f7eae2bf jim-p
<div>
417 e6c563bb jim-p
<span class="pgtitle"><a href="<?= $_SERVER['SCRIPT_NAME'] ?>"><?=genhtmltitle($pgtitle);?></a></span>
418 c2e23f7b jim-p
<span style="float:right; margin: 0 0 20px 20px;">
419
<?php if(! empty($statusurl)): ?>
420
<a href="<?php echo $statusurl; ?>" target="_new" title="Status of items on this page."><img src="/themes/<?php echo $g['theme']; ?>/images/status.png" border="0"></a>
421
<?php endif; ?>
422
<?php if(! empty($logurl)): ?>
423
<a href="<?php echo $logurl; ?>" target="_new" title="Log entries for items on this page."><img src="/themes/<?php echo $g['theme']; ?>/images/log.png" border="0"></a>
424
<?php endif; ?>
425 28181237 Renato Botelho
<?php if(! $g['disablehelpicon']): ?>
426 c2e23f7b jim-p
<a href="<?php echo $helpurl; ?>" target="_new" title="Help for items on this page."><img src="/themes/<?php echo $g['theme']; ?>/images/help.png" border="0"></a>
427 28181237 Renato Botelho
<?php endif; ?>
428 c2e23f7b jim-p
</span>
429 f7eae2bf jim-p
</div>
430
<br />
431 b873ded5 jim-p
432 366e5d8c sullrich
<?php
433 261c7de8 jim-p
/* if upgrade in progress, alert user */
434
if(is_subsystem_dirty('packagelock')) {
435
	$pgtitle = array(gettext("System"),gettext("Package Manager"));
436
	print_info_box(gettext("Packages are currently being reinstalled in the background.<p>Do not make changes in the GUI until this is complete.") . "<p><img src='/themes/{$g['theme']}/images/icons/icon_fw-update.gif'>");
437
}
438 366e5d8c sullrich
	$pgtitle_output = true;
439 43f26ab1 Ermal
?>