1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
<?php
require_once("notices.inc");
/* $Id$ */
function return_ext_menu($section) {
global $config;
$htmltext = "";
if($config['installedpackages']['menu'] <> "") {
foreach($config['installedpackages']['menu'] as $menuitem) {
if($menuitem['section'] != $section) continue;
if($menuitem['url'] <> "") {
$description = str_replace('$myurl', getenv("HTTP_HOST"), $menuitem['url']);
} else {
$description = '/pkg.php?xml=' . $menuitem['configfile'];
}
$htmltext .= ' <a href="' . $description . ' "class="navlnk">' . $menuitem['name'] . '</a><br>' . "\n";
}
}
return $htmltext;
}
?>
<script language="javascript">
<!--
var tri_open = "";
var tri_closed = "";
window.onload = preload;
function preload() {
if (document.images) {
tri_open = new Image(14,10);
tri_closed = new Image(14,10);
tri_open.src = "/tri_o.gif";
tri_closed.src = "/tri_c.gif";
}
}
function showhide(tspan, tri) {
tspanel = document.getElementById(tspan);
triel = document.getElementById(tri);
if (tspanel.style.display == 'none') {
tspanel.style.display = '';
triel.src = "/tri_o.gif";
} else {
tspanel.style.display = 'none';
triel.src = "/tri_c.gif";
}
}
function showhide_black(tspan, tri) {
tspanel = document.getElementById(tspan);
triel = document.getElementById(tri);
if (tspanel.style.display == 'none') {
tspanel.style.display = '';
triel.src = "/tri_o_black.gif";
} else {
tspanel.style.display = 'none';
triel.src = "/tri_c_black.gif";
}
}
-->
</script>
<table width="750" border="0" cellspacing="1" cellpadding="1">
<tr valign="bottom" height="65">
<td width="150" height="100%" align="center" valign="middle">
<strong><a href="/"><img src="/logo.gif" border="0"></a></strong>
</td>
<td height="100%">
<div style="height:100%" id="topbox" name="topbox">
<table bgcolor="#990000" background="top_background.gif" border="0" cellspacing="0" cellpadding="0" width="100%" height="85%">
<tr><td align="left" valign="bottom"><span class="tfrtitle"> webConfigurator</span></td>
<td align="right" valign="bottom">
<span class="hostname"><?=$config['system']['hostname'] . "." . $config['system']['domain'];?> </span>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr valign="top">
<td valign="top" height="100%" width="150">
<div id="niftyMenu" style="height:100%">
<table height="100%" width="100%" class="menu" bgcolor="#000000">
<tr valign="top">
<td nowrap><span class="navlnk"><font color="#FFFFFF"> <strong>System</strong>
<br>
<a href="/system_advanced.php" class="navlnk">Advanced</a><br>
<a href="/system_firmware_check.php" class="navlnk">Firmware</a><br>
<a href="/system.php" class="navlnk">General setup</a><br>
<a href="/pkg_mgr.php" class="navlnk">Packages</a><br>
<a href="/system_routes.php" class="navlnk">Static routes</a><br>
<?php echo return_ext_menu("System"); ?>
<strong>Interfaces</strong>
<?php if (!isset($config['system']['webgui']['noassigninterfaces'])): ?>
<a href="/interfaces_assign.php" class="navlnks">(assign)</a>
<?php endif; ?>
<br>
<a href="/interfaces_lan.php" class="navlnk">LAN</a><br>
<?php for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++): if (!isset($config['interfaces']['opt' . $i]['ovpn'])): ?>
<a href="/interfaces_opt.php?index=<?=$i;?>" class="navlnk"><?=htmlspecialchars($config['interfaces']['opt' . $i]['descr']);?></a><br>
<?php endif; endfor; ?>
<a href="/interfaces_wan.php" class="navlnk">WAN</a><br>
<?php echo return_ext_menu("Interfaces"); ?>
<strong>Firewall</strong><br>
<a href="/firewall_aliases.php" class="navlnk">Aliases</a><br>
<a href="/firewall_nat.php" class="navlnk">NAT</a><br>
<a href="/firewall_rules.php" class="navlnk">Rules</a><br>
<a href="/firewall_shaper.php" class="navlnk">Traffic Shaper</a><br>
<?php echo return_ext_menu("Firewall"); ?>
<strong>Services</strong><br>
<a href="/services_captiveportal.php" class="navlnk">Captive portal</a><br>
<a href="/services_dnsmasq.php" class="navlnk">DNS forwarder</a><br>
<a href="/services_dhcp_relay.php" class="navlnk">DHCP relay</a><br>
<a href="/services_dhcp.php" class="navlnk">DHCP server</a><br>
<a href="/services_dyndns.php" class="navlnk">Dynamic DNS</a><br>
<a href="/services_snmp.php" class="navlnk">SNMP</a><br>
<a href="/services_proxyarp.php" class="navlnk">Proxy ARP</a><br>
<a href="/services_wol.php" class="navlnk">Wake on LAN</a><br>
<a href="/carp_status.php" class="navlnk">CARP (failover)</a><br>
<?php echo return_ext_menu("Services"); ?>
<strong>VPN</strong><br>
<a href="/vpn_ipsec.php" class="navlnk">IPsec</a><br>
<a href="/vpn_pptp.php" class="navlnk">PPTP</a><br>
<strong>Status</strong><br>
<?php if (isset($config['captiveportal']['enable'])): ?>
<a href="/status_captiveportal.php" class="navlnk">Captive portal</a><br>
<?php endif; ?>
<a href="/diag_dhcp_leases.php" class="navlnk">DHCP leases</a><br>
<a href="/status_interfaces.php" class="navlnk">Interfaces</a><br>
<a href="/diag_ipsec_sad.php" class="navlnk">IPsec</a><br>
<a href="/diag_pkglogs.php" class="navlnk">Package logs</a><br>
<a href="/status_queues.php" class="navlnk">Queues</a><br>
<a href="/status_services.php" class="navlnk">Services</a><br>
<a href="/index.php" class="navlnk">System</a><br>
<a href="/diag_logs.php" class="navlnk">System logs</a><br>
<a href="/status_graph.php" class="navlnk">Traffic graph</a><br>
<?php $i = 0; $ifdescrs = array();
if (is_array($config['interfaces']['wan']['wireless']) &&
(strstr($config['interfaces']['wan']['if'], "wi") || strstr($config['interfaces']['wan']['if'], "ath")))
$ifdescrs['wan'] = 'WAN';
if (is_array($config['interfaces']['lan']['wireless']) &&
(strstr($config['interfaces']['lan']['if'], "wi") || strstr($config['interfaces']['lan']['if'], "ath")))
$ifdescrs['lan'] = 'LAN';
for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) {
if (is_array($config['interfaces']['opt' . $j]['wireless']) &&
isset($config['interfaces']['opt' . $j]['enable']) &&
(strstr($config['interfaces']['opt' . $j]['if'], "wi") || strstr($config['interfaces']['opt' . $j]['if'], "ath")))
$ifdescrs['opt' . $j] = $config['interfaces']['opt' . $j]['descr'];
}
if (count($ifdescrs) > 0): ?>
<a href="/status_wireless.php" class="navlnk">Wireless</a><br>
<?php endif; ?>
<?php echo return_ext_menu("Status"); ?>
<?php if (isset($config['system']['developer'])) { ?>
<strong>Developers</strong><br>
<a href="/restart_httpd.php" class="navlnk">Restart HTTPD</a><br>
<?php } ?>
<?php if (isset($config['system']['webgui']['expanddiags']) || strstr($_SERVER['SCRIPT_FILENAME'], "diag_") || strstr($_SERVER['SCRIPT_FILENAME'], "reboot")): ?>
<a href="javascript:showhide('diag','tri_diag')"><img src="/tri_o.gif" id="tri_diag" width="14" height="10" border="0"></a><strong><a href="javascript:showhide('diag','tri_diag')" class="navlnk">Diagnostics</a></strong><br>
<span id="diag">
<?php else: ?>
<a href="javascript:showhide('diag','tri_diag')"><img src="/tri_c.gif" id="tri_diag" width="14" height="10" border="0"></a><strong><a href="javascript:showhide('diag','tri_diag')" class="navlnk">Diagnostics</a></strong><br>
<span id="diag" style="display: none">
<?php endif; ?>
<a href="/diag_backup.php" class="navlnk">Backup/Restore</a><br>
<a href="/exec.php" class="navlnk">Command Prompt</a><br>
<a href="/edit.php" class="navlnk">Edit File</a><br>
<a href="/diag_defaults.php" class="navlnk">Factory defaults </a><br>
<a href="/halt.php" class="navlnk">Halt system</a><br>
<a href="/diag_ping.php" class="navlnk">Ping</a><br>
<a href="/reboot.php" class="navlnk">Reboot system</a><br>
<a href="/diag_dump_states.php" class="navlnk">States</a><br>
<?php echo return_ext_menu("Diagnostics"); ?>
</span>
</font></span>
</td>
</tr>
</table>
</div>
</td>
<td width="600"><table width="100%" border="0" cellpadding="10" cellspacing="0">
<tr><td>
<?php
/* display a top alert bar if need be */
$need_alert_display = false;
$found_notices = are_notices_pending();
if($found_notices == true) {
$notices = get_notices();
if(!$notices) {
$need_alert_display = true;
$display_text = print_notices() . "<br>";
}
}
if($need_alert_display == true) {
echo "<div style=\"background-color:#000000\" id=\"roundalert\">";
echo "<table>";
echo "<tr><td><font color=\"#ffffff\">";
echo " <img align=\"middle\" src=\"/top_notification.gif\"> ";
echo $display_text;
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</div>";
}
?>
|