Project

General

Profile

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