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