1
|
<?php
|
2
|
/*
|
3
|
pfSense_MODULE: header
|
4
|
*/
|
5
|
|
6
|
require_once("globals.inc");
|
7
|
require_once("functions.inc");
|
8
|
require_once("shortcuts.inc");
|
9
|
require_once("service-utils.inc");
|
10
|
|
11
|
/* $Id$ */
|
12
|
|
13
|
$pagetitle = gentitle( $pgtitle );
|
14
|
|
15
|
if (isset($config['system']['webgui']['pagenamefirst']))
|
16
|
$tabtitle = $pagetitle . " - " . $config['system']['hostname'] . "." . $config['system']['domain'];
|
17
|
else
|
18
|
$tabtitle = $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle;
|
19
|
?>
|
20
|
<!DOCTYPE html>
|
21
|
<html lang="en">
|
22
|
<head>
|
23
|
<link rel="stylesheet" href="/bootstrap/css/pfSense.css" />
|
24
|
<title><?= $tabtitle ?></title>
|
25
|
<script>var events = events || [];</script>
|
26
|
</head>
|
27
|
<body id="<?=basename($_SERVER['SCRIPT_NAME'], '.php')?>">
|
28
|
<?php
|
29
|
|
30
|
/* Determine automated help URL. Should output the page name and
|
31
|
parameters separately */
|
32
|
$uri_split = "";
|
33
|
preg_match("/\/(.*)\?(.*)/", $_SERVER["REQUEST_URI"], $uri_split);
|
34
|
|
35
|
/* If there was no match, there were no parameters, just grab the filename
|
36
|
Otherwise, use the matched filename from above. */
|
37
|
if (empty($uri_split[0])) {
|
38
|
$pagename = ltrim($_SERVER["REQUEST_URI"], '/');
|
39
|
} else {
|
40
|
$pagename = $uri_split[1];
|
41
|
}
|
42
|
/* If the page name is still empty, the user must have requested / (index.php) */
|
43
|
if (empty($pagename)) {
|
44
|
$pagename = "index.php";
|
45
|
}
|
46
|
|
47
|
/* If the filename is pkg_edit.php or wizard.php, reparse looking
|
48
|
for the .xml filename */
|
49
|
if (($pagename == "pkg.php") || ($pagename == "pkg_edit.php") || ($pagename == "wizard.php")) {
|
50
|
$param_split = explode('&', $uri_split[2]);
|
51
|
foreach ($param_split as $param) {
|
52
|
if (substr($param, 0, 4) == "xml=") {
|
53
|
$xmlfile = explode('=', $param);
|
54
|
$pagename = $xmlfile[1];
|
55
|
}
|
56
|
}
|
57
|
}
|
58
|
|
59
|
/* Build the full help URL. */
|
60
|
$helpurl .= "{$g['help_base_url']}?page={$pagename}";
|
61
|
|
62
|
function return_ext_menu($section) {
|
63
|
global $config;
|
64
|
$htmltext = "";
|
65
|
$extarray = array();
|
66
|
if($config['installedpackages']['menu'] <> "") {
|
67
|
foreach($config['installedpackages']['menu'] as $menuitem) {
|
68
|
if($menuitem['section'] != $section) continue;
|
69
|
if($menuitem['url'] <> "") {
|
70
|
$test_url=$menuitem['url'];
|
71
|
$addresswithport = getenv("HTTP_HOST");
|
72
|
$colonpos = strpos($addresswithport, ":");
|
73
|
if ($colonpos !== False){
|
74
|
//my url is actually just the IP address of the pfsense box
|
75
|
$myurl = substr($addresswithport, 0, $colonpos);
|
76
|
} else {
|
77
|
$myurl = $addresswithport;
|
78
|
}
|
79
|
$description = str_replace('$myurl', $myurl, $menuitem['url']);
|
80
|
} else {
|
81
|
$description = '/pkg.php?xml=' . $menuitem['configfile'];
|
82
|
$test_url=$description;
|
83
|
}
|
84
|
if(isAllowedPage($test_url)){
|
85
|
$extarray[] = array($menuitem['name'], $description);
|
86
|
}
|
87
|
}
|
88
|
}
|
89
|
return $extarray;
|
90
|
}
|
91
|
|
92
|
function output_menu($arrayitem, $target = null) {
|
93
|
foreach ($arrayitem as $item) {
|
94
|
if (isAllowedPage($item[1]) || $item[1]=="/index.php?logout"){
|
95
|
$attr = sprintf("href=\"%s\"", htmlentities($item[1]));
|
96
|
if ($target) {
|
97
|
$attr .= sprintf(" target=\"%s\"", htmlentities($target));
|
98
|
}
|
99
|
$class = "navlnk";
|
100
|
if ($item['class']) {
|
101
|
$class .= " {$item['class']}";
|
102
|
}
|
103
|
$attr .= sprintf(" class=\"%s\"", htmlentities($class));
|
104
|
if ($item['style']) {
|
105
|
$attr .= sprintf(" style=\"%s\"", htmlentities($item['style']));
|
106
|
}
|
107
|
|
108
|
echo "<li>". sprintf("<a %s>%s</a>", $attr, $item[0]). "</li>\n";
|
109
|
}
|
110
|
}
|
111
|
}
|
112
|
|
113
|
// System
|
114
|
$system_menu = array();
|
115
|
$system_menu[] = array(gettext("Logout"), "/index.php?logout");
|
116
|
$system_menu[] = array(gettext("Advanced"), "/system_advanced_admin.php");
|
117
|
$system_menu[] = array(gettext("Firmware"), "/system_firmware.php");
|
118
|
$system_menu[] = array(gettext("General Setup"), "/system.php");
|
119
|
$system_menu[] = array(gettext("High Avail. Sync"), "/system_hasync.php");
|
120
|
if ($g['platform'] == "pfSense" or $g['platform'] == "nanobsd")
|
121
|
$system_menu[] = array(gettext("Packages"), "/pkg_mgr_installed.php");
|
122
|
$system_menu[] = array(gettext("Setup Wizard"), "/wizard.php?xml=setup_wizard.xml");
|
123
|
$system_menu[] = array(gettext("Routing"), "/system_gateways.php");
|
124
|
$system_menu[] = array(gettext("Cert Manager"), "/system_camanager.php");
|
125
|
if (!isAllowedPage("system_usermanager.php*"))
|
126
|
$system_menu[] = array(gettext("User Manager"), "/system_usermanager_passwordmg.php");
|
127
|
else
|
128
|
$system_menu[] = array(gettext("User Manager"), "/system_usermanager.php");
|
129
|
$system_menu = msort(array_merge($system_menu, return_ext_menu("System")),0);
|
130
|
|
131
|
// Interfaces
|
132
|
$interfaces_menu = array();
|
133
|
if (!isset($config['system']['webgui']['noassigninterfaces']))
|
134
|
$interfaces_menu[] = array(gettext("(assign)"), "/interfaces_assign.php");
|
135
|
$opts = get_configured_interface_with_descr(false, true);
|
136
|
foreach ($opts as $oif => $odescr)
|
137
|
if (!isset($config['interfaces'][$oif]['ovpn']))
|
138
|
$interfaces_menu[] = array(htmlspecialchars($odescr), "/interfaces.php?if={$oif}");
|
139
|
$interfaces_menu = msort(array_merge($interfaces_menu, return_ext_menu("Interfaces")),0);
|
140
|
|
141
|
// Firewall
|
142
|
$firewall_menu = array();
|
143
|
$firewall_menu[] = array(gettext("Aliases"), "/firewall_aliases.php");
|
144
|
$firewall_menu[] = array(gettext("NAT"), "/firewall_nat.php");
|
145
|
$firewall_menu[] = array(gettext("Rules"), "/firewall_rules.php");
|
146
|
$firewall_menu[] = array(gettext("Schedules"), "/firewall_schedule.php");
|
147
|
$firewall_menu[] = array(gettext("Traffic Shaper"), "/firewall_shaper.php");
|
148
|
$firewall_menu[] = array(gettext("Virtual IPs"), "/firewall_virtual_ip.php");
|
149
|
$firewall_menu = msort(array_merge($firewall_menu, return_ext_menu("Firewall")),0);
|
150
|
|
151
|
// Services
|
152
|
$services_menu = array();
|
153
|
$services_menu[] = array(gettext("Captive Portal"), "/services_captiveportal.php");
|
154
|
$services_menu[] = array(gettext("DNS Forwarder"), "/services_dnsmasq.php");
|
155
|
$services_menu[] = array(gettext("DNS Resolver"), "/services_unbound.php");
|
156
|
$services_menu[] = array(gettext("DHCP Relay"), "/services_dhcp_relay.php");
|
157
|
$services_menu[] = array(gettext("DHCPv6 Relay"), "/services_dhcpv6_relay.php");
|
158
|
if($g['services_dhcp_server_enable']) {
|
159
|
$services_menu[] = array(gettext("DHCP Server"), "/services_dhcp.php");
|
160
|
$services_menu[] = array(gettext("DHCPv6 Server/RA"), "/services_dhcpv6.php");
|
161
|
}
|
162
|
$services_menu[] = array(gettext("Dynamic DNS"), "/services_dyndns.php");
|
163
|
$services_menu[] = array(gettext("IGMP proxy"), "/services_igmpproxy.php");
|
164
|
$services_menu[] = array(gettext("Load Balancer"), "/load_balancer_pool.php");
|
165
|
$services_menu[] = array(gettext("NTP"), "/services_ntpd.php");
|
166
|
$services_menu[] = array(gettext("PPPoE Server"), "/vpn_pppoe.php");
|
167
|
$services_menu[] = array(gettext("SNMP"), "/services_snmp.php");
|
168
|
if(count($config['interfaces']) > 1) {
|
169
|
/* no use for UPnP in single-interface deployments
|
170
|
remove to reduce user confusion
|
171
|
*/
|
172
|
$services_menu[] = array(gettext("UPnP & NAT-PMP"), "/pkg_edit.php?xml=miniupnpd.xml");
|
173
|
}
|
174
|
$services_menu[] = array(gettext("Wake on LAN"), "/services_wol.php");
|
175
|
$services_menu = msort(array_merge($services_menu, return_ext_menu("Services")),0);
|
176
|
|
177
|
// VPN
|
178
|
$vpn_menu = array();
|
179
|
$vpn_menu[] = array(gettext("IPsec"), "/vpn_ipsec.php");
|
180
|
$vpn_menu[] = array(gettext("OpenVPN"), "/vpn_openvpn_server.php");
|
181
|
$vpn_menu[] = array(gettext("PPTP"), "/vpn_pptp.php");
|
182
|
$vpn_menu[] = array(gettext("L2TP"), "/vpn_l2tp.php");
|
183
|
$vpn_menu = msort(array_merge($vpn_menu, return_ext_menu("VPN")),0);
|
184
|
|
185
|
// Status
|
186
|
$status_menu = array();
|
187
|
if (count($config['captiveportal']) > 0)
|
188
|
$status_menu[] = array(gettext("Captive Portal"), "/status_captiveportal.php");
|
189
|
$status_menu[] = array(gettext("CARP (failover)"), "/carp_status.php");
|
190
|
$status_menu[] = array(gettext("Dashboard"), "/index.php");
|
191
|
$status_menu[] = array(gettext("Gateways"), "/status_gateways.php");
|
192
|
$status_menu[] = array(gettext("DHCP Leases"), "/status_dhcp_leases.php");
|
193
|
$status_menu[] = array(gettext("DHCPv6 Leases"), "/status_dhcpv6_leases.php");
|
194
|
$status_menu[] = array(gettext("Filter Reload"), "/status_filter_reload.php");
|
195
|
$status_menu[] = array(gettext("Interfaces"), "/status_interfaces.php");
|
196
|
$status_menu[] = array(gettext("IPsec"), "/diag_ipsec.php");
|
197
|
$status_menu[] = array(gettext("Load Balancer"), "/status_lb_pool.php");
|
198
|
$status_menu[] = array(gettext("NTP"), "/status_ntpd.php");
|
199
|
$status_menu[] = array(gettext("OpenVPN"), "/status_openvpn.php");
|
200
|
if ($g['platform'] == "pfSense")
|
201
|
$status_menu[] = array(gettext("Package Logs"), "/diag_pkglogs.php");
|
202
|
$status_menu[] = array(gettext("Queues"), "/status_queues.php");
|
203
|
$status_menu[] = array(gettext("RRD Graphs"), "/status_rrd_graph.php");
|
204
|
$status_menu[] = array(gettext("Services"), "/status_services.php");
|
205
|
$status_menu[] = array(gettext("System Logs"), "/diag_logs.php");
|
206
|
$status_menu[] = array(gettext("Traffic Graph"), "/status_graph.php?if=wan");
|
207
|
if(count($config['interfaces']) > 1)
|
208
|
$status_menu[] = array(gettext("UPnP & NAT-PMP"), "/status_upnp.php");
|
209
|
$ifentries = get_configured_interface_with_descr();
|
210
|
foreach ($ifentries as $ent => $entdesc) {
|
211
|
if (is_array($config['interfaces'][$ent]['wireless']) &&
|
212
|
preg_match($g['wireless_regex'], $config['interfaces'][$ent]['if']))
|
213
|
$wifdescrs[$ent] = $entdesc;
|
214
|
}
|
215
|
if (count($wifdescrs) > 0)
|
216
|
$status_menu[] = array(gettext("Wireless"), "/status_wireless.php");
|
217
|
$status_menu = msort(array_merge($status_menu, return_ext_menu("Status")),0);
|
218
|
|
219
|
// Diagnostics
|
220
|
$diagnostics_menu = array();
|
221
|
$diagnostics_menu[] = array(gettext("ARP Table"), "/diag_arp.php");
|
222
|
$diagnostics_menu[] = array(gettext("Authentication"), "/diag_authentication.php");
|
223
|
$diagnostics_menu[] = array(gettext("Backup/Restore"), "/diag_backup.php");
|
224
|
$diagnostics_menu[] = array(gettext("Command Prompt"), "/exec.php");
|
225
|
$diagnostics_menu[] = array(gettext("DNS Lookup"), "/diag_dns.php");
|
226
|
$diagnostics_menu[] = array(gettext("Edit File"), "/edit.php");
|
227
|
$diagnostics_menu[] = array(gettext("Factory Defaults"), "/diag_defaults.php");
|
228
|
|
229
|
if(file_exists("/var/run/gmirror_active"))
|
230
|
$diagnostics_menu[] = array(gettext("GEOM Mirrors"), "/diag_gmirror.php" );
|
231
|
|
232
|
$diagnostics_menu[] = array(gettext("Halt System"), "/halt.php" );
|
233
|
$diagnostics_menu[] = array(gettext("Limiter Info"), "/diag_limiter_info.php" );
|
234
|
$diagnostics_menu[] = array(gettext("NDP Table"), "/diag_ndp.php" );
|
235
|
|
236
|
$diagnostics_menu[] = array(gettext("Tables"), "/diag_tables.php");
|
237
|
$diagnostics_menu[] = array(gettext("Ping"), "/diag_ping.php");
|
238
|
$diagnostics_menu[] = array(gettext("Test Port"), "/diag_testport.php");
|
239
|
$diagnostics_menu[] = array(gettext("pfInfo"), "/diag_pf_info.php");
|
240
|
$diagnostics_menu[] = array(gettext("pfTop"), "/diag_system_pftop.php");
|
241
|
$diagnostics_menu[] = array(gettext("Reboot"), "/reboot.php");
|
242
|
$diagnostics_menu[] = array(gettext("Routes"), "/diag_routes.php");
|
243
|
$diagnostics_menu[] = array(gettext("SMART Status"), "/diag_smart.php");
|
244
|
$diagnostics_menu[] = array(gettext("Sockets"), "/diag_sockets.php" );
|
245
|
$diagnostics_menu[] = array(gettext("States"), "/diag_dump_states.php");
|
246
|
$diagnostics_menu[] = array(gettext("States Summary"), "/diag_states_summary.php");
|
247
|
$diagnostics_menu[] = array(gettext("System Activity"), "/diag_system_activity.php");
|
248
|
$diagnostics_menu[] = array(gettext("Traceroute"), "/diag_traceroute.php");
|
249
|
$diagnostics_menu[] = array(gettext("Packet Capture"), "/diag_packet_capture.php");
|
250
|
if($g['platform'] == "nanobsd")
|
251
|
$diagnostics_menu[] = array(gettext("NanoBSD"), "/diag_nanobsd.php");
|
252
|
|
253
|
if (isset($config['system']['developer'])) {
|
254
|
$diagnostics_menu[] = array(gettext("Restart HTTPD"), "/restart_httpd.php", "style" => "font-weight: bold; color: yellow;");
|
255
|
|
256
|
}
|
257
|
$diagnostics_menu = msort(array_merge($diagnostics_menu, return_ext_menu("Diagnostics")),0);
|
258
|
|
259
|
$gold_menu = array();
|
260
|
$gold_menu[] = array(gettext("pfSense Gold"), "https://www.pfsense.org/gold");
|
261
|
$gold_menu = msort(array_merge($gold_menu, return_ext_menu("Gold")),0);
|
262
|
|
263
|
if(! $g['disablehelpmenu']) {
|
264
|
$help_menu = array();
|
265
|
$help_menu[] = array(gettext("About this Page"), $helpurl);
|
266
|
if($g['product_name'] == "pfSense")
|
267
|
$help_menu[] = array(gettext("Bug Database"), "https://www.pfsense.org/j.php?jumpto=redmine");
|
268
|
$help_menu[] = array(gettext("User Forum"), "https://www.pfsense.org/j.php?jumpto=forum");
|
269
|
$help_menu[] = array(gettext("Documentation"), "https://www.pfsense.org/j.php?jumpto=doc");
|
270
|
$help_menu[] = array(gettext("Developers Wiki"), "https://www.pfsense.org/j.php?jumpto=devwiki");
|
271
|
$help_menu[] = array(gettext("Paid Support"), "https://www.pfsense.org/j.php?jumpto=portal");
|
272
|
$help_menu[] = array(gettext("pfSense Book"), "https://www.pfsense.org/j.php?jumpto=book");
|
273
|
$help_menu[] = array(gettext("Search portal"), "https://www.pfsense.org/j.php?jumpto=searchportal");
|
274
|
$help_menu[] = array(gettext("FreeBSD Handbook"), "https://www.pfsense.org/j.php?jumpto=fbsdhandbook");
|
275
|
$help_menu = msort(array_merge($help_menu, return_ext_menu("Help")),0);
|
276
|
}
|
277
|
|
278
|
?>
|
279
|
<nav class="navbar navbar-static-top navbar-inverse">
|
280
|
<div class="container">
|
281
|
<div class="navbar-header">
|
282
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#pf-navbar">
|
283
|
<span class="sr-only">Toggle navigation</span>
|
284
|
<span class="icon-bar"></span>
|
285
|
<span class="icon-bar"></span>
|
286
|
<span class="icon-bar"></span>
|
287
|
</button>
|
288
|
|
289
|
<a class="navbar-brand" href="/"><img src="/logo.png" alt="pfSense" /></a>
|
290
|
</div>
|
291
|
|
292
|
<div class="collapse navbar-collapse" id="pf-navbar">
|
293
|
<ul class="nav navbar-nav">
|
294
|
<li class="dropdown">
|
295
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?=gettext("System"); ?>
|
296
|
<span class="caret"></span>
|
297
|
</a>
|
298
|
|
299
|
<ul class="dropdown-menu" role="menu"><?=output_menu($system_menu)?></ul>
|
300
|
</li>
|
301
|
<li class="dropdown">
|
302
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?=gettext("Interfaces"); ?>
|
303
|
<span class="caret"></span>
|
304
|
</a>
|
305
|
|
306
|
<ul class="dropdown-menu" role="menu"><?=output_menu($interfaces_menu)?></ul>
|
307
|
</li>
|
308
|
<li class="dropdown">
|
309
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?=gettext("Firewall"); ?>
|
310
|
<span class="caret"></span>
|
311
|
</a>
|
312
|
|
313
|
<ul class="dropdown-menu" role="menu"><?=output_menu($firewall_menu)?></ul>
|
314
|
</li>
|
315
|
<li class="dropdown">
|
316
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?=gettext("Services"); ?>
|
317
|
<span class="caret"></span>
|
318
|
</a>
|
319
|
|
320
|
<ul class="dropdown-menu" role="menu"><?=output_menu($services_menu)?></ul>
|
321
|
</li>
|
322
|
<li class="dropdown">
|
323
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?=gettext("VPN"); ?>
|
324
|
<span class="caret"></span>
|
325
|
</a>
|
326
|
|
327
|
<ul class="dropdown-menu" role="menu"><?=output_menu($vpn_menu)?></ul>
|
328
|
</li>
|
329
|
<li class="dropdown">
|
330
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?=gettext("Status"); ?>
|
331
|
<span class="caret"></span>
|
332
|
</a>
|
333
|
|
334
|
<ul class="dropdown-menu" role="menu"><?=output_menu($status_menu)?></ul>
|
335
|
</li>
|
336
|
<li class="dropdown">
|
337
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?=gettext("Diagnostics"); ?>
|
338
|
<span class="caret"></span>
|
339
|
</a>
|
340
|
|
341
|
<ul class="dropdown-menu" role="menu"><?=output_menu($diagnostics_menu)?></ul>
|
342
|
</li>
|
343
|
<li class="dropdown">
|
344
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?=gettext("Gold"); ?>
|
345
|
<span class="caret"></span>
|
346
|
</a>
|
347
|
|
348
|
<ul class="dropdown-menu" role="menu"><?=output_menu($gold_menu, "_blank")?></ul>
|
349
|
</li>
|
350
|
|
351
|
<?php if(are_notices_pending()):?>
|
352
|
<?php $notices = get_notices(); ?>
|
353
|
<li class="dropdown">
|
354
|
<a href="#" data-toggle="modal" data-target="#notices" role="button" aria-expanded="false"><?=gettext("Notices"); ?>
|
355
|
<span class="badge"><?=count($notices)?></span>
|
356
|
</a>
|
357
|
</li>
|
358
|
<?php endif; ?>
|
359
|
|
360
|
<?php if(! $g['disablehelpmenu']): ?>
|
361
|
<li class="dropdown">
|
362
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?=gettext("Help"); ?>
|
363
|
<span class="caret"></span>
|
364
|
</a>
|
365
|
|
366
|
<ul class="dropdown-menu" role="menu"><?=output_menu($help_menu, "_blank"); ?></ul>
|
367
|
</li>
|
368
|
<?php endif; ?>
|
369
|
</ul>
|
370
|
</div>
|
371
|
</div>
|
372
|
|
373
|
<?php if(are_notices_pending()):?>
|
374
|
<div class="modal fade" id="notices" role="dialog" aria-labelledby="noticesTitle" aria-hidden="true">
|
375
|
<div class="modal-dialog">
|
376
|
<div class="modal-content">
|
377
|
<div class="modal-header">
|
378
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
379
|
<span aria-hidden="true">×</span>
|
380
|
</button>
|
381
|
|
382
|
<h3 class="modal-title" id="myModalLabel">Notices</h3>
|
383
|
</div>
|
384
|
|
385
|
<div class="modal-body">
|
386
|
<?php
|
387
|
$noticeCategories = array();
|
388
|
foreach($notices as $time => $notice)
|
389
|
{
|
390
|
if (!isset($noticeCategories[ $notice['category'] ]))
|
391
|
$noticeCategories[ $notice['category'] ] = array();
|
392
|
|
393
|
$notice['time'] = $time;
|
394
|
array_push($noticeCategories[ $notice['category'] ], $notice);
|
395
|
}
|
396
|
|
397
|
foreach($noticeCategories as $category => $catNotices):?>
|
398
|
<h4><?=$category?></h4>
|
399
|
<ul>
|
400
|
<?php
|
401
|
foreach($catNotices as $notice):
|
402
|
?>
|
403
|
<li>
|
404
|
<b>
|
405
|
<?php if (!empty($notice['url'])):?>
|
406
|
<a href="<?=$notice['url']?>"><?=$notice['id']?></a> -
|
407
|
<?php endif;?>
|
408
|
</b>
|
409
|
<?=$notice['notice']?>
|
410
|
<i>@ <?=date('Y-m-d H:i:s', $notice['time'])?></i>
|
411
|
</li>
|
412
|
<?php endforeach;?>
|
413
|
</ul>
|
414
|
<?php endforeach;?>
|
415
|
</div>
|
416
|
|
417
|
<div class="modal-footer">
|
418
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
419
|
<a type="button" class="btn btn-primary" href="/?closenotice=all">Mark all as read</a>
|
420
|
</div>
|
421
|
</div>
|
422
|
</div>
|
423
|
</div>
|
424
|
<?php endif; ?>
|
425
|
|
426
|
</nav>
|
427
|
<div class="container">
|
428
|
<header class="header">
|
429
|
<?=genhtmltitle($pgtitle);?>
|
430
|
|
431
|
<ul class="context-links">
|
432
|
<?php
|
433
|
|
434
|
if (!$hide_service_status && !empty($shortcuts[$shortcut_section]['service'])) {
|
435
|
$ssvc = array();
|
436
|
switch ($shortcut_section) {
|
437
|
case "openvpn":
|
438
|
$ssvc = find_service_by_openvpn_vpnid($vpnid);
|
439
|
break;
|
440
|
case "captiveportal":
|
441
|
$ssvc = find_service_by_cp_zone($cpzone);
|
442
|
break;
|
443
|
default:
|
444
|
$ssvc = find_service_by_name($shortcuts[$shortcut_section]['service']);
|
445
|
|
446
|
}
|
447
|
if (!empty($ssvc)) {
|
448
|
// echo '<li>'. get_service_status_icon($ssvc, false). '</li>'; TODO: Add missing function
|
449
|
echo '<li>'. get_service_control_links($ssvc, false). '</li>';
|
450
|
}
|
451
|
}
|
452
|
|
453
|
echo '<li>'. get_shortcut_main_link($shortcut_section, false). '</li>';
|
454
|
echo '<li>'. get_shortcut_status_link($shortcut_section, false). '</li>';
|
455
|
echo '<li>'. get_shortcut_log_link($shortcut_section, false). '</li>';
|
456
|
|
457
|
?>
|
458
|
<?php if(! $g['disablehelpicon']): ?>
|
459
|
<li>
|
460
|
<a href="<?=$helpurl?>" title="<?=gettext("Help for items on this page")?>" class="help-icon">
|
461
|
<i class="icon-large icon-question-sign"></i>
|
462
|
</a>
|
463
|
</li>
|
464
|
<?php endif; ?>
|
465
|
</ul>
|
466
|
|
467
|
</header>
|
468
|
|
469
|
<?php
|
470
|
/* if upgrade in progress, alert user */
|
471
|
if (is_subsystem_dirty('packagelock') || (file_exists('/conf/needs_package_sync') && platform_booting())) {
|
472
|
if (file_exists('/conf/needs_package_sync') && platform_booting()) {
|
473
|
$info_text = sprintf(gettext("%s is booting then packages will be reinstalled in the background.<p>Do not make changes in the GUI until this is complete."), $g['product_name']);
|
474
|
} else {
|
475
|
$pgtitle = array(gettext("System"),gettext("Package Manager"));
|
476
|
$info_text = gettext("Packages are currently being reinstalled in the background.<p>Do not make changes in the GUI until this is complete.");
|
477
|
}
|
478
|
print_info_box($info_text . "<p><img src='/themes/{$g['theme']}/images/icons/icon_fw-update.gif' alt='firmware update' />");
|
479
|
}
|
480
|
|
481
|
$pgtitle_output = true;
|
482
|
|
483
|
/* If this page is being remotely managed then do not allow the loading of the contents. */
|
484
|
if ($config['remote_managed_pages']['item']) {
|
485
|
foreach($config['remote_managed_pages']['item'] as $rmp) {
|
486
|
if ($rmp == $_SERVER['SCRIPT_NAME']) {
|
487
|
print_info_box_np("This page is currently being managed by a remote machine.");
|
488
|
include("foot.inc");
|
489
|
exit;
|
490
|
}
|
491
|
}
|
492
|
}
|