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 |
94044c40
|
Carlos Eduardo Ramos
|
$system_menu[] = array(gettext("Advanced"), "/system_advanced_admin.php");
|
84 |
|
|
$system_menu[] = array(gettext("Firmware"), "/system_firmware.php");
|
85 |
|
|
$system_menu[] = array(gettext("General Setup"), "/system.php");
|
86 |
|
|
$system_menu[] = array(gettext("Logout"), "/index.php?logout");
|
87 |
5e3249f0
|
Scott Ullrich
|
if ($g['platform'] == "pfSense" or $g['platform'] == "nanobsd")
|
88 |
94044c40
|
Carlos Eduardo Ramos
|
$system_menu[] = array(gettext("Packages"), "/pkg_mgr_installed.php");
|
89 |
|
|
$system_menu[] = array(gettext("Setup Wizard"), "/wizard.php?xml=setup_wizard.xml");
|
90 |
|
|
$system_menu[] = array(gettext("Routing"), "/system_gateways.php");
|
91 |
|
|
$system_menu[] = array(gettext("Cert Manager"), "/system_camanager.php");
|
92 |
43f26ab1
|
Ermal
|
if (!isAllowedPage("system_usermanager.php*"))
|
93 |
d8012adb
|
Vinicius Coque
|
$system_menu[] = array(gettext("User Manager"), "/system_usermanager_passwordmg.php");
|
94 |
43f26ab1
|
Ermal
|
else
|
95 |
d8012adb
|
Vinicius Coque
|
$system_menu[] = array(gettext("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 |
94044c40
|
Carlos Eduardo Ramos
|
$firewall_menu[] = array(gettext("Aliases"), "/firewall_aliases.php");
|
111 |
|
|
$firewall_menu[] = array(gettext("NAT"), "/firewall_nat.php");
|
112 |
|
|
$firewall_menu[] = array(gettext("Rules"), "/firewall_rules.php");
|
113 |
|
|
$firewall_menu[] = array(gettext("Schedules"), "/firewall_schedule.php");
|
114 |
|
|
$firewall_menu[] = array(gettext("Traffic Shaper"), "/firewall_shaper.php");
|
115 |
|
|
$firewall_menu[] = array(gettext("Virtual IPs"), "/firewall_virtual_ip.php");
|
116 |
5ba2df71
|
Scott Ullrich
|
$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 |
94044c40
|
Carlos Eduardo Ramos
|
$services_menu[] = array(gettext("Captive Portal"), "/services_captiveportal.php");
|
121 |
|
|
$services_menu[] = array(gettext("DNS Forwarder"), "/services_dnsmasq.php");
|
122 |
|
|
$services_menu[] = array(gettext("DHCP Relay"), "/services_dhcp_relay.php");
|
123 |
8b6313a4
|
jim-p
|
if($g['services_dhcp_server_enable']) {
|
124 |
94044c40
|
Carlos Eduardo Ramos
|
$services_menu[] = array(gettext("DHCP Server"), "/services_dhcp.php");
|
125 |
8b6313a4
|
jim-p
|
$services_menu[] = array(gettext("DHCPv6 Server"), "/services_dhcpv6.php");
|
126 |
|
|
}
|
127 |
94044c40
|
Carlos Eduardo Ramos
|
$services_menu[] = array(gettext("Dynamic DNS"), "/services_dyndns.php");
|
128 |
|
|
$services_menu[] = array(gettext("IGMP proxy"), "/services_igmpproxy.php");
|
129 |
|
|
$services_menu[] = array(gettext("Load Balancer"), "/load_balancer_pool.php");
|
130 |
|
|
$services_menu[] = array(gettext("OLSR"), "/pkg_edit.php?xml=olsrd.xml&id=0");
|
131 |
|
|
$services_menu[] = array(gettext("PPPoE Server"), "/vpn_pppoe.php");
|
132 |
|
|
$services_menu[] = array(gettext("RIP"), "/pkg_edit.php?xml=routed.xml&id=0");
|
133 |
|
|
$services_menu[] = array(gettext("SNMP"), "/services_snmp.php");
|
134 |
38b357bd
|
Ermal
|
if(count($config['interfaces']) > 1) {
|
135 |
5e3249f0
|
Scott Ullrich
|
/* no use for UPnP in single-interface deployments
|
136 |
|
|
remove to reduce user confusion
|
137 |
|
|
*/
|
138 |
94044c40
|
Carlos Eduardo Ramos
|
$services_menu[] = array(gettext("UPnP & NAT-PMP"), "/pkg_edit.php?xml=miniupnpd.xml&id=0");
|
139 |
5e3249f0
|
Scott Ullrich
|
}
|
140 |
94044c40
|
Carlos Eduardo Ramos
|
$services_menu[] = array(gettext("OpenNTPD"), "/pkg_edit.php?xml=openntpd.xml&id=0");
|
141 |
|
|
$services_menu[] = array(gettext("Wake on LAN"), "/services_wol.php");
|
142 |
5ba2df71
|
Scott Ullrich
|
$services_menu = msort(array_merge($services_menu, return_ext_menu("Services")),0);
|
143 |
5e3249f0
|
Scott Ullrich
|
|
144 |
|
|
// VPN
|
145 |
5ba2df71
|
Scott Ullrich
|
$vpn_menu = array();
|
146 |
94044c40
|
Carlos Eduardo Ramos
|
$vpn_menu[] = array(gettext("IPsec"), "/vpn_ipsec.php");
|
147 |
|
|
$vpn_menu[] = array(gettext("OpenVPN"), "/vpn_openvpn_server.php");
|
148 |
|
|
$vpn_menu[] = array(gettext("PPTP"), "/vpn_pptp.php");
|
149 |
|
|
$vpn_menu[] = array(gettext("L2TP"), "/vpn_l2tp.php");
|
150 |
5ba2df71
|
Scott Ullrich
|
$vpn_menu = msort(array_merge($vpn_menu, return_ext_menu("VPN")),0);
|
151 |
5e3249f0
|
Scott Ullrich
|
|
152 |
|
|
// Status
|
153 |
|
|
$status_menu = array();
|
154 |
|
|
if (isset($config['captiveportal']['enable']))
|
155 |
94044c40
|
Carlos Eduardo Ramos
|
$status_menu[] = array(gettext("Captive Portal"), "/status_captiveportal.php");
|
156 |
|
|
$status_menu[] = array(gettext("CARP (failover)"), "/carp_status.php");
|
157 |
|
|
$status_menu[] = array(gettext("Dashboard"), "/index.php");
|
158 |
|
|
$status_menu[] = array(gettext("Gateways"), "/status_gateways.php");
|
159 |
|
|
$status_menu[] = array(gettext("DHCP Leases"), "/status_dhcp_leases.php");
|
160 |
8b6313a4
|
jim-p
|
$status_menu[] = array(gettext("DHCPv6 Leases"), "/status_dhcpv6_leases.php");
|
161 |
94044c40
|
Carlos Eduardo Ramos
|
$status_menu[] = array(gettext("Filter Reload"), "/status_filter_reload.php");
|
162 |
|
|
$status_menu[] = array(gettext("Interfaces"), "/status_interfaces.php");
|
163 |
|
|
$status_menu[] = array(gettext("IPsec"), "/diag_ipsec.php");
|
164 |
|
|
$status_menu[] = array(gettext("Load Balancer"), "/status_lb_pool.php");
|
165 |
|
|
$status_menu[] = array(gettext("OpenVPN"), "/status_openvpn.php");
|
166 |
5e3249f0
|
Scott Ullrich
|
if ($g['platform'] == "pfSense")
|
167 |
94044c40
|
Carlos Eduardo Ramos
|
$status_menu[] = array(gettext("Package Logs"), "/diag_pkglogs.php");
|
168 |
|
|
$status_menu[] = array(gettext("Queues"), "/status_queues.php");
|
169 |
|
|
$status_menu[] = array(gettext("RRD Graphs"), "/status_rrd_graph.php");
|
170 |
|
|
$status_menu[] = array(gettext("Services"), "/status_services.php");
|
171 |
|
|
$status_menu[] = array(gettext("System Logs"), "/diag_logs.php");
|
172 |
|
|
$status_menu[] = array(gettext("Traffic Graph"), "/status_graph.php?if=wan");
|
173 |
38b357bd
|
Ermal
|
if(count($config['interfaces']) > 1)
|
174 |
94044c40
|
Carlos Eduardo Ramos
|
$status_menu[] = array(gettext("UPnP & NAT-PMP"), "/status_upnp.php");
|
175 |
5e3249f0
|
Scott Ullrich
|
$ifentries = get_configured_interface_with_descr();
|
176 |
|
|
foreach ($ifentries as $ent => $entdesc) {
|
177 |
|
|
if (is_array($config['interfaces'][$ent]['wireless']) &&
|
178 |
|
|
preg_match($g['wireless_regex'], $config['interfaces'][$ent]['if']))
|
179 |
273e9bf7
|
jim-p
|
$wifdescrs[$ent] = $entdesc;
|
180 |
5e3249f0
|
Scott Ullrich
|
}
|
181 |
273e9bf7
|
jim-p
|
if (count($wifdescrs) > 0)
|
182 |
94044c40
|
Carlos Eduardo Ramos
|
$status_menu[] = array(gettext("Wireless"), "/status_wireless.php");
|
183 |
5e3249f0
|
Scott Ullrich
|
$status_menu = msort(array_merge($status_menu, return_ext_menu("Status")),0);
|
184 |
|
|
|
185 |
|
|
// Diagnostics
|
186 |
5ba2df71
|
Scott Ullrich
|
$diagnostics_menu = array();
|
187 |
94044c40
|
Carlos Eduardo Ramos
|
$diagnostics_menu[] = array(gettext("ARP Tables"), "/diag_arp.php");
|
188 |
|
|
$diagnostics_menu[] = array(gettext("Authentication"), "/diag_authentication.php");
|
189 |
|
|
$diagnostics_menu[] = array(gettext("Backup/Restore"), "/diag_backup.php");
|
190 |
|
|
$diagnostics_menu[] = array(gettext("Command Prompt"), "/exec.php");
|
191 |
|
|
$diagnostics_menu[] = array(gettext("DNS Lookup"), "/diag_dns.php");
|
192 |
|
|
$diagnostics_menu[] = array(gettext("Edit File"), "/edit.php");
|
193 |
|
|
$diagnostics_menu[] = array(gettext("Factory Defaults"), "/diag_defaults.php");
|
194 |
|
|
$diagnostics_menu[] = array(gettext("Halt System"), "/halt.php" );
|
195 |
ca98b042
|
Vinicius Coque
|
$diagnostics_menu[] = array(gettext("Limiter Info"), "/diag_limiter_info.php" );
|
196 |
8b6313a4
|
jim-p
|
$diagnostics_menu[] = array(gettext("NDP Table"), "/diag_ndp.php" );
|
197 |
ca98b042
|
Vinicius Coque
|
|
198 |
94044c40
|
Carlos Eduardo Ramos
|
$diagnostics_menu[] = array(gettext("Tables"), "/diag_tables.php");
|
199 |
|
|
$diagnostics_menu[] = array(gettext("Ping"), "/diag_ping.php");
|
200 |
ca98b042
|
Vinicius Coque
|
$diagnostics_menu[] = array(gettext("pfInfo"), "/diag_pf_info.php");
|
201 |
|
|
$diagnostics_menu[] = array(gettext("pfTop"), "/diag_system_pftop.php");
|
202 |
94044c40
|
Carlos Eduardo Ramos
|
$diagnostics_menu[] = array(gettext("Reboot"), "/reboot.php");
|
203 |
|
|
$diagnostics_menu[] = array(gettext("Routes"), "/diag_routes.php");
|
204 |
|
|
$diagnostics_menu[] = array(gettext("SMART Status"), "/diag_smart.php");
|
205 |
|
|
$diagnostics_menu[] = array(gettext("States"), "/diag_dump_states.php");
|
206 |
|
|
$diagnostics_menu[] = array(gettext("States Summary"), "/diag_states_summary.php");
|
207 |
|
|
$diagnostics_menu[] = array(gettext("System Activity"), "/diag_system_activity.php");
|
208 |
|
|
$diagnostics_menu[] = array(gettext("Traceroute"), "/diag_traceroute.php");
|
209 |
|
|
$diagnostics_menu[] = array(gettext("Packet Capture"), "/diag_packet_capture.php");
|
210 |
5e3249f0
|
Scott Ullrich
|
if($g['platform'] == "nanobsd")
|
211 |
94044c40
|
Carlos Eduardo Ramos
|
$diagnostics_menu[] = array(gettext("NanoBSD"), "/diag_nanobsd.php");
|
212 |
5e3249f0
|
Scott Ullrich
|
|
213 |
|
|
if (isset($config['system']['developer'])) {
|
214 |
|
|
echo "<li><hr width=\"80%\"/></li>";
|
215 |
94044c40
|
Carlos Eduardo Ramos
|
$diagnostics_menu[] = array(gettext("Restart HTTPD"), "/restart_httpd.php");
|
216 |
5e3249f0
|
Scott Ullrich
|
}
|
217 |
5ba2df71
|
Scott Ullrich
|
$diagnostics_menu = msort(array_merge($diagnostics_menu, return_ext_menu("Diagnostics")),0);
|
218 |
5e3249f0
|
Scott Ullrich
|
|
219 |
3b29612f
|
Chris Buechler
|
if(! $g['disablehelpmenu']) {
|
220 |
|
|
$help_menu = array();
|
221 |
94044c40
|
Carlos Eduardo Ramos
|
$help_menu[] = array(gettext("About this Page"), $helpurl);
|
222 |
f5208bf2
|
Scott Ullrich
|
if($g['product_name'] == "pfSense")
|
223 |
54bdff75
|
Vinicius Coque
|
$help_menu[] = array(gettext("Bug Database"), "http://www.pfsense.org/j.php?jumpto=redmine");
|
224 |
94044c40
|
Carlos Eduardo Ramos
|
$help_menu[] = array(gettext("User Forum"), "http://www.pfsense.org/j.php?jumpto=forum");
|
225 |
|
|
$help_menu[] = array(gettext("Documentation"), "http://www.pfsense.org/j.php?jumpto=doc");
|
226 |
|
|
$help_menu[] = array(gettext("Developers Wiki"), "http://www.pfsense.org/j.php?jumpto=devwiki");
|
227 |
|
|
$help_menu[] = array(gettext("Paid Support"), "http://www.pfsense.org/j.php?jumpto=portal");
|
228 |
|
|
$help_menu[] = array(gettext("pfSense Book"), "http://www.pfsense.org/j.php?jumpto=book");
|
229 |
|
|
$help_menu[] = array(gettext("Search portal"), "http://www.pfsense.org/j.php?jumpto=searchportal");
|
230 |
|
|
$help_menu[] = array(gettext("FreeBSD Handbook"), "http://www.pfsense.org/j.php?jumpto=fbsdhandbook");
|
231 |
3b29612f
|
Chris Buechler
|
$help_menu = msort(array_merge($help_menu, return_ext_menu("Help")),0);
|
232 |
|
|
}
|
233 |
669716df
|
Scott Ullrich
|
|
234 |
e93441e0
|
Scott Ullrich
|
/* NOTICE ACKNOWLEDGE CODE by Erik Kristensen */
|
235 |
|
|
if ($_REQUEST['noticeaction'] == 'acknowledge') {
|
236 |
034f08e7
|
Scott Ullrich
|
$notice_id = htmlspecialchars($_REQUEST['noticeid']);
|
237 |
e93441e0
|
Scott Ullrich
|
close_notice($notice_id);
|
238 |
|
|
}
|
239 |
|
|
/**********************************************/
|
240 |
65384707
|
Erik Kristensen
|
|
241 |
c6c150e9
|
Scott Ullrich
|
?>
|
242 |
12a00813
|
Erik Kristensen
|
|
243 |
9f53d3a8
|
Scott Ullrich
|
<div id="wrapper">
|
244 |
|
|
<div id="header">
|
245 |
4540ab2c
|
Ermal
|
<div id="header-left"><a href="index.php" id="status-link"><img src="/themes/<?= $g['theme']; ?>/images/transparent.gif" border="0"></a></div>
|
246 |
9f53d3a8
|
Scott Ullrich
|
<div id="header-right">
|
247 |
1df0159c
|
Erik Kristensen
|
<div class="container">
|
248 |
|
|
<div class="left">webConfigurator</div>
|
249 |
|
|
<div class="right">
|
250 |
64fcbfc8
|
Erik Kristensen
|
<?
|
251 |
b1cbbf24
|
Erik Kristensen
|
if (are_notices_pending()) {
|
252 |
|
|
$notices = get_notices();
|
253 |
dca32536
|
Scott Ullrich
|
|
254 |
a2046789
|
Scott Ullrich
|
$requests=array();
|
255 |
dca32536
|
Scott Ullrich
|
|
256 |
a6fac06e
|
Erik Kristensen
|
## Get Query Arguments from URL ###
|
257 |
|
|
foreach ($_REQUEST as $key => $value) {
|
258 |
|
|
if ($key != "PHPSESSID")
|
259 |
|
|
$requests[] = $key.'='.$value;
|
260 |
|
|
}
|
261 |
a2046789
|
Scott Ullrich
|
if(is_array($requests))
|
262 |
|
|
$request_string = implode("&", $requests);
|
263 |
a6fac06e
|
Erik Kristensen
|
|
264 |
35eef977
|
Scott Ullrich
|
if(is_array($notices)) {
|
265 |
|
|
foreach ($notices as $key => $value) {
|
266 |
|
|
$date = date("m-d-y H:i:s", $key);
|
267 |
|
|
$noticemsg = str_replace("'", "", $value['notice']);
|
268 |
|
|
$noticemsg = str_replace('"', "", $noticemsg);
|
269 |
|
|
$noticemsg = str_replace("\n", "", $noticemsg);
|
270 |
|
|
$noticemsg = str_replace("<p>", "", $noticemsg);
|
271 |
|
|
$noticemsg = str_replace("<pre>", "", $noticemsg);
|
272 |
|
|
$noticemsg = str_replace("</pre>", "", $noticemsg);
|
273 |
|
|
$noticemsg = str_replace("</p>", "", $noticemsg);
|
274 |
|
|
$noticemsg = str_replace("<br>", "", $noticemsg);
|
275 |
91d3d442
|
Scott Ullrich
|
$extra_args = "";
|
276 |
|
|
if($_GET['xml'])
|
277 |
060d4c5e
|
jim-p
|
$extraargs="&xml=" . htmlspecialchars($_GET['xml']);
|
278 |
91d3d442
|
Scott Ullrich
|
if($_POST['xml'])
|
279 |
060d4c5e
|
jim-p
|
$extraargs="&xml=" . htmlspecialchars($_POST['xml']);
|
280 |
91d3d442
|
Scott Ullrich
|
if($_GET['id'])
|
281 |
060d4c5e
|
jim-p
|
$extraargs="&xml=" . htmlspecialchars($_GET['id']);
|
282 |
91d3d442
|
Scott Ullrich
|
if($_POST['id'])
|
283 |
060d4c5e
|
jim-p
|
$extraargs="&xml=" . htmlspecialchars($_POST['id']);
|
284 |
91d3d442
|
Scott Ullrich
|
$notice_msgs = '<a href="?noticeaction=acknowledge¬iceid=all' . $extraargs . '">Acknowledge All</a> .:. ';
|
285 |
35eef977
|
Scott Ullrich
|
if ($value['url']) {
|
286 |
190d5d58
|
jim-p
|
$notice_msgs .= $date.' - <a href="'.$url.'?' . htmlspecialchars($request_string) . '¬iceaction=acknowledge¬iceid='.$key.'">['.$value['id'].']</a>';
|
287 |
35eef977
|
Scott Ullrich
|
} else {
|
288 |
f01d8c49
|
jim-p
|
$notice_msgs .= $date.' - <a href="?' . htmlspecialchars($request_string) . '¬iceaction=acknowledge¬iceid='.$key.'">['.$value['id'].']'.htmlspecialchars($noticemsg).'</a>';
|
289 |
35eef977
|
Scott Ullrich
|
}
|
290 |
|
|
$notice_msgs .= " .:. ";
|
291 |
b1cbbf24
|
Erik Kristensen
|
}
|
292 |
|
|
}
|
293 |
64fcbfc8
|
Erik Kristensen
|
?>
|
294 |
b1cbbf24
|
Erik Kristensen
|
<div id="alerts">
|
295 |
|
|
<script type="text/javascript">
|
296 |
|
|
var content='<div id="marquee-text"><?= $notice_msgs; ?></div>'
|
297 |
|
|
</script>
|
298 |
625dcc40
|
Bill Marquette
|
<script type="text/javascript" src="/javascript/ticker.js"></script>
|
299 |
b1cbbf24
|
Erik Kristensen
|
</div>
|
300 |
|
|
<?
|
301 |
|
|
} else {
|
302 |
612832ec
|
Erik Kristensen
|
?>
|
303 |
|
|
<div id="hostname">
|
304 |
|
|
<? print $config['system']['hostname'] . "." . $config['system']['domain']; ?>
|
305 |
|
|
</div>
|
306 |
|
|
<?
|
307 |
b1cbbf24
|
Erik Kristensen
|
}
|
308 |
|
|
?>
|
309 |
1df0159c
|
Erik Kristensen
|
</div>
|
310 |
|
|
</div>
|
311 |
9f53d3a8
|
Scott Ullrich
|
</div>
|
312 |
|
|
</div> <!-- Header DIV -->
|
313 |
|
|
<div id="content">
|
314 |
|
|
<div id="left">
|
315 |
2779b49b
|
Scott Dale
|
<div id="navigation" style="z-index:1000">
|
316 |
41058a8c
|
Erik Kristensen
|
<ul id="menu">
|
317 |
d86286ed
|
Erik Kristensen
|
<li class="firstdrop">
|
318 |
7de4284c
|
Vinicius Coque
|
<div><?php echo gettext("System"); ?></div>
|
319 |
d86286ed
|
Erik Kristensen
|
<ul class="subdrop">
|
320 |
7cf210f1
|
Ermal Lu?i
|
<?php
|
321 |
5ba2df71
|
Scott Ullrich
|
output_menu($system_menu);
|
322 |
7cf210f1
|
Ermal Lu?i
|
?>
|
323 |
9f53d3a8
|
Scott Ullrich
|
</ul>
|
324 |
|
|
</li>
|
325 |
d86286ed
|
Erik Kristensen
|
<li class="drop">
|
326 |
7de4284c
|
Vinicius Coque
|
<div><?php echo gettext("Interfaces"); ?></div>
|
327 |
d86286ed
|
Erik Kristensen
|
<ul class="subdrop">
|
328 |
7cf210f1
|
Ermal Lu?i
|
<?php
|
329 |
5ba2df71
|
Scott Ullrich
|
output_menu($interfaces_menu);
|
330 |
7cf210f1
|
Ermal Lu?i
|
?>
|
331 |
9f53d3a8
|
Scott Ullrich
|
</ul>
|
332 |
|
|
</li>
|
333 |
d86286ed
|
Erik Kristensen
|
<li class="drop">
|
334 |
7de4284c
|
Vinicius Coque
|
<div><?php echo gettext("Firewall"); ?></div>
|
335 |
d86286ed
|
Erik Kristensen
|
<ul class="subdrop">
|
336 |
7cf210f1
|
Ermal Lu?i
|
<?php
|
337 |
5ba2df71
|
Scott Ullrich
|
output_menu($firewall_menu);
|
338 |
7cf210f1
|
Ermal Lu?i
|
?>
|
339 |
9f53d3a8
|
Scott Ullrich
|
</ul>
|
340 |
|
|
</li>
|
341 |
d86286ed
|
Erik Kristensen
|
<li class="drop">
|
342 |
7de4284c
|
Vinicius Coque
|
<div><?php echo gettext("Services"); ?></div>
|
343 |
d86286ed
|
Erik Kristensen
|
<ul class="subdrop">
|
344 |
7cf210f1
|
Ermal Lu?i
|
<?
|
345 |
5ba2df71
|
Scott Ullrich
|
output_menu($services_menu);
|
346 |
7cf210f1
|
Ermal Lu?i
|
?>
|
347 |
9f53d3a8
|
Scott Ullrich
|
</ul>
|
348 |
|
|
</li>
|
349 |
d86286ed
|
Erik Kristensen
|
<li class="drop">
|
350 |
7de4284c
|
Vinicius Coque
|
<div><?php echo gettext("VPN"); ?></div>
|
351 |
d86286ed
|
Erik Kristensen
|
<ul class="subdrop">
|
352 |
7cf210f1
|
Ermal Lu?i
|
<?php
|
353 |
5ba2df71
|
Scott Ullrich
|
output_menu($vpn_menu);
|
354 |
7cf210f1
|
Ermal Lu?i
|
?>
|
355 |
9f53d3a8
|
Scott Ullrich
|
</ul>
|
356 |
|
|
</li>
|
357 |
d86286ed
|
Erik Kristensen
|
<li class="drop">
|
358 |
7de4284c
|
Vinicius Coque
|
<div><?php echo gettext("Status"); ?></div>
|
359 |
d86286ed
|
Erik Kristensen
|
<ul class="subdrop">
|
360 |
7cf210f1
|
Ermal Lu?i
|
<?php
|
361 |
5e3249f0
|
Scott Ullrich
|
output_menu($status_menu);
|
362 |
7cf210f1
|
Ermal Lu?i
|
?>
|
363 |
9f53d3a8
|
Scott Ullrich
|
</ul>
|
364 |
|
|
</li>
|
365 |
669716df
|
Scott Ullrich
|
<li class="drop">
|
366 |
7de4284c
|
Vinicius Coque
|
<div><?php echo gettext("Diagnostics"); ?></div>
|
367 |
d86286ed
|
Erik Kristensen
|
<ul id="diag" class="subdrop">
|
368 |
7cf210f1
|
Ermal Lu?i
|
<?
|
369 |
5ba2df71
|
Scott Ullrich
|
output_menu($diagnostics_menu);
|
370 |
7cf210f1
|
Ermal Lu?i
|
?>
|
371 |
9f53d3a8
|
Scott Ullrich
|
</ul>
|
372 |
|
|
</li>
|
373 |
3b29612f
|
Chris Buechler
|
<?php if(! $g['disablehelpmenu']): ?>
|
374 |
669716df
|
Scott Ullrich
|
<li class="lastdrop">
|
375 |
7de4284c
|
Vinicius Coque
|
<div><?php echo gettext("Help"); ?></div>
|
376 |
669716df
|
Scott Ullrich
|
<ul id="help" class="subdrop">
|
377 |
|
|
<?
|
378 |
471ce716
|
Scott Ullrich
|
output_menu($help_menu, "_new");
|
379 |
669716df
|
Scott Ullrich
|
?>
|
380 |
|
|
</ul>
|
381 |
|
|
</li>
|
382 |
3b29612f
|
Chris Buechler
|
<?php endif; ?>
|
383 |
9f53d3a8
|
Scott Ullrich
|
</ul>
|
384 |
|
|
</div>
|
385 |
dca32536
|
Scott Ullrich
|
|
386 |
9f53d3a8
|
Scott Ullrich
|
</div> <!-- Left DIV -->
|
387 |
dca32536
|
Scott Ullrich
|
|
388 |
9f53d3a8
|
Scott Ullrich
|
<div id="right">
|
389 |
dca32536
|
Scott Ullrich
|
|
390 |
5c9cc1de
|
Scott Ullrich
|
<?php
|
391 |
45ee90ed
|
Matthew Grooms
|
|
392 |
5c9cc1de
|
Scott Ullrich
|
/* display a top alert bar if need be */
|
393 |
|
|
$need_alert_display = false;
|
394 |
|
|
$found_notices = are_notices_pending();
|
395 |
|
|
if($found_notices == true) {
|
396 |
|
|
$notices = get_notices();
|
397 |
|
|
if(!$notices) {
|
398 |
|
|
$need_alert_display = true;
|
399 |
efe8fa78
|
jim-p
|
$display_text = print_notices($notices) . "<br>";
|
400 |
dca32536
|
Scott Ullrich
|
}
|
401 |
5c9cc1de
|
Scott Ullrich
|
}
|
402 |
|
|
if($need_alert_display == true) {
|
403 |
|
|
echo "<div style=\"background-color:#000000\" id=\"roundalert\">";
|
404 |
|
|
echo "<table>";
|
405 |
|
|
echo "<tr><td><font color=\"#ffffff\">";
|
406 |
|
|
echo " <img align=\"middle\" src=\"/top_notification.gif\"> ";
|
407 |
|
|
echo $display_text;
|
408 |
|
|
echo "</td>";
|
409 |
|
|
echo "</tr>";
|
410 |
|
|
echo "</table>";
|
411 |
|
|
echo "</div>";
|
412 |
|
|
}
|
413 |
b8f82cd7
|
Scott Ullrich
|
|
414 |
5e3249f0
|
Scott Ullrich
|
function add_to_menu($url, $name) {
|
415 |
45ee90ed
|
Matthew Grooms
|
if (isAllowedPage($url))
|
416 |
|
|
echo "<li><a href=\"{$url}\" class=\"navlnk\">{$name}</a></li>\n";
|
417 |
b8f82cd7
|
Scott Ullrich
|
}
|
418 |
19b331c1
|
Scott Ullrich
|
?>
|
419 |
dca32536
|
Scott Ullrich
|
|
420 |
f7eae2bf
|
jim-p
|
<div>
|
421 |
e6c563bb
|
jim-p
|
<span class="pgtitle"><a href="<?= $_SERVER['SCRIPT_NAME'] ?>"><?=genhtmltitle($pgtitle);?></a></span>
|
422 |
c2e23f7b
|
jim-p
|
<span style="float:right; margin: 0 0 20px 20px;">
|
423 |
|
|
<?php if(! empty($statusurl)): ?>
|
424 |
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>
|
425 |
c2e23f7b
|
jim-p
|
<?php endif; ?>
|
426 |
|
|
<?php if(! empty($logurl)): ?>
|
427 |
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>
|
428 |
c2e23f7b
|
jim-p
|
<?php endif; ?>
|
429 |
28181237
|
Renato Botelho
|
<?php if(! $g['disablehelpicon']): ?>
|
430 |
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>
|
431 |
28181237
|
Renato Botelho
|
<?php endif; ?>
|
432 |
c2e23f7b
|
jim-p
|
</span>
|
433 |
f7eae2bf
|
jim-p
|
</div>
|
434 |
|
|
<br />
|
435 |
b873ded5
|
jim-p
|
|
436 |
366e5d8c
|
sullrich
|
<?php
|
437 |
261c7de8
|
jim-p
|
/* if upgrade in progress, alert user */
|
438 |
|
|
if(is_subsystem_dirty('packagelock')) {
|
439 |
|
|
$pgtitle = array(gettext("System"),gettext("Package Manager"));
|
440 |
|
|
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'>");
|
441 |
|
|
}
|
442 |
366e5d8c
|
sullrich
|
$pgtitle_output = true;
|
443 |
3f0357fc
|
Ermal Lu?i
|
?>
|