1 |
c6c150e9
|
Scott Ullrich
|
<?php
|
2 |
b46bfcf5
|
Bill Marquette
|
/* $Id$ */
|
3 |
859329c8
|
Scott Ullrich
|
function return_ext_menu($section) {
|
4 |
c6c150e9
|
Scott Ullrich
|
global $g;
|
5 |
|
|
$htmltext = "";
|
6 |
|
|
$dh = @opendir($g['www_path'] . "/ext/" . $section);
|
7 |
|
|
if ($dh) {
|
8 |
|
|
while (($extd = readdir($dh)) !== false) {
|
9 |
|
|
if (($extd === ".") || ($extd === ".."))
|
10 |
|
|
continue;
|
11 |
|
|
$fdt = fopen("{$g['www_path']}/ext/" . $section . "/" . $extd, "r");
|
12 |
|
|
$description = fread($fdt, 1024);
|
13 |
|
|
fclose($fdt);
|
14 |
6483da5d
|
Scott Ullrich
|
echo "<!-- <a href=\"/pkg.php?xml=" . strtolower($extd) . ".xml\" class=\"navlnk\">" . $extd . "</a><br> -->\n";
|
15 |
af3939aa
|
Scott Ullrich
|
$htmltext .= " <a href=\"" . $description . "\" class=\"navlnk\">" . $extd . "</a><br>\n";
|
16 |
c6c150e9
|
Scott Ullrich
|
}
|
17 |
|
|
closedir($dh);
|
18 |
|
|
}
|
19 |
|
|
return $htmltext;
|
20 |
|
|
}
|
21 |
|
|
?>
|
22 |
|
|
|
23 |
5b237745
|
Scott Ullrich
|
<script language="javascript">
|
24 |
|
|
<!--
|
25 |
|
|
var tri_open = "";
|
26 |
|
|
var tri_closed = "";
|
27 |
|
|
|
28 |
|
|
window.onload = preload;
|
29 |
|
|
|
30 |
|
|
function preload() {
|
31 |
|
|
if (document.images) {
|
32 |
|
|
tri_open = new Image(14,10);
|
33 |
|
|
tri_closed = new Image(14,10);
|
34 |
|
|
tri_open.src = "/tri_o.gif";
|
35 |
|
|
tri_closed.src = "/tri_c.gif";
|
36 |
|
|
}
|
37 |
|
|
}
|
38 |
|
|
|
39 |
|
|
function showhide(tspan, tri) {
|
40 |
|
|
tspanel = document.getElementById(tspan);
|
41 |
|
|
triel = document.getElementById(tri);
|
42 |
|
|
if (tspanel.style.display == 'none') {
|
43 |
|
|
tspanel.style.display = '';
|
44 |
|
|
triel.src = "/tri_o.gif";
|
45 |
|
|
} else {
|
46 |
|
|
tspanel.style.display = 'none';
|
47 |
|
|
triel.src = "/tri_c.gif";
|
48 |
|
|
}
|
49 |
|
|
}
|
50 |
|
|
-->
|
51 |
|
|
</script>
|
52 |
|
|
<table width="750" border="0" cellspacing="0" cellpadding="2">
|
53 |
197fd4d4
|
Scott Ullrich
|
<tr valign="bottom">
|
54 |
258f5bb7
|
Scott Ullrich
|
<td width="150" height="65" align="center" valign="middle"> <strong><a href="/"><img src="/logo.gif" border="0"></a></strong></td>
|
55 |
aca01efc
|
Scott Ullrich
|
<td height="65" bgcolor="#990000">
|
56 |
5b237745
|
Scott Ullrich
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
57 |
79fa33e7
|
Scott Ullrich
|
<tr><td align="left" valign="bottom"><span class="tfrtitle"> webConfigurator</span></td>
|
58 |
5b237745
|
Scott Ullrich
|
<td align="right" valign="bottom">
|
59 |
|
|
<span class="hostname"><?=$config['system']['hostname'] . "." . $config['system']['domain'];?> </span>
|
60 |
|
|
</td></tr></table>
|
61 |
|
|
</td>
|
62 |
|
|
</tr>
|
63 |
197fd4d4
|
Scott Ullrich
|
<tr valign="top">
|
64 |
|
|
<td width="150" bgcolor="#000000">
|
65 |
5b237745
|
Scott Ullrich
|
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
66 |
|
|
<tr>
|
67 |
197fd4d4
|
Scott Ullrich
|
<td><span class="navlnk"><font color="#FFFFFF"> <strong>System</strong>
|
68 |
5b237745
|
Scott Ullrich
|
<br>
|
69 |
197fd4d4
|
Scott Ullrich
|
<a href="/system.php" class="navlnk">General
|
70 |
5b237745
|
Scott Ullrich
|
setup</a><br>
|
71 |
197fd4d4
|
Scott Ullrich
|
<a href="/system_routes.php" class="navlnk">Static
|
72 |
5b237745
|
Scott Ullrich
|
routes</a><br>
|
73 |
|
|
<a href="/system_firmware.php" class="navlnk">Firmware</a><br>
|
74 |
|
|
<a href="/system_advanced.php" class="navlnk">Advanced</a><br>
|
75 |
ee11cc6e
|
Scott Ullrich
|
<a href="/pkg_mgr.php" class="navlnk">Package Manager</a><br>
|
76 |
859329c8
|
Scott Ullrich
|
<?php echo return_ext_menu("System"); ?>
|
77 |
5b237745
|
Scott Ullrich
|
<strong>Interfaces</strong>
|
78 |
|
|
<?php if (!isset($config['system']['webgui']['noassigninterfaces'])): ?>
|
79 |
|
|
<a href="/interfaces_assign.php" class="navlnks">(assign)</a>
|
80 |
|
|
<?php endif; ?>
|
81 |
|
|
<br>
|
82 |
|
|
<a href="/interfaces_lan.php" class="navlnk">LAN</a><br>
|
83 |
|
|
<a href="/interfaces_wan.php" class="navlnk">WAN</a><br>
|
84 |
|
|
<?php for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++): if (!isset($config['interfaces']['opt' . $i]['ovpn'])): ?>
|
85 |
|
|
<a href="/interfaces_opt.php?index=<?=$i;?>" class="navlnk"><?=htmlspecialchars($config['interfaces']['opt' . $i]['descr']);?></a><br>
|
86 |
|
|
<?php endif; endfor; ?>
|
87 |
859329c8
|
Scott Ullrich
|
<?php echo return_ext_menu("Interfaces"); ?>
|
88 |
5b237745
|
Scott Ullrich
|
<strong>Firewall</strong><br>
|
89 |
|
|
<a href="/firewall_rules.php" class="navlnk">Rules</a><br>
|
90 |
|
|
<a href="/firewall_nat.php" class="navlnk">NAT</a><br>
|
91 |
|
|
<a href="/firewall_aliases.php" class="navlnk">Aliases</a><br>
|
92 |
c50411a2
|
Scott Ullrich
|
<a href="/firewall_shaper.php" class="navlnk">Traffic Shaper</a><br>
|
93 |
859329c8
|
Scott Ullrich
|
<?php echo return_ext_menu("Firewall"); ?>
|
94 |
5b237745
|
Scott Ullrich
|
<strong>Services</strong><br>
|
95 |
|
|
<a href="/services_dnsmasq.php" class="navlnk">DNS forwarder</a><br>
|
96 |
197fd4d4
|
Scott Ullrich
|
<a href="/services_dyndns.php" class="navlnk">Dynamic
|
97 |
5b237745
|
Scott Ullrich
|
DNS</a><br>
|
98 |
|
|
<a href="/services_dhcp.php" class="navlnk">DHCP server</a><br>
|
99 |
|
|
<a href="/services_dhcp_relay.php" class="navlnk">DHCP relay</a><br>
|
100 |
|
|
<a href="/services_snmp.php" class="navlnk">SNMP</a><br>
|
101 |
|
|
<a href="/services_proxyarp.php" class="navlnk">Proxy ARP</a><br>
|
102 |
|
|
<a href="/services_captiveportal.php" class="navlnk">Captive portal</a><br>
|
103 |
|
|
<a href="/services_wol.php" class="navlnk">Wake on LAN</a><br>
|
104 |
859329c8
|
Scott Ullrich
|
<?php echo return_ext_menu("Services"); ?>
|
105 |
5b237745
|
Scott Ullrich
|
<strong>VPN</strong><br>
|
106 |
|
|
<a href="/vpn_ipsec.php" class="navlnk">IPsec</a><br>
|
107 |
|
|
<a href="/vpn_pptp.php" class="navlnk">PPTP</a><br>
|
108 |
|
|
<a href="/vpn_openvpn.php" class="navlnk">OpenVPN</a><br>
|
109 |
|
|
<strong>Status</strong><br>
|
110 |
|
|
<a href="/index.php" class="navlnk">System</a><br>
|
111 |
|
|
<a href="/status_interfaces.php" class="navlnk">Interfaces</a><br>
|
112 |
d62682bd
|
Bill Marquette
|
<a href="/status_queues.php" class="navlnk">Queues</a><br>
|
113 |
5b237745
|
Scott Ullrich
|
<a href="/status_graph.php" class="navlnk">Traffic graph</a><br>
|
114 |
|
|
<a href="/status_wireless.php" class="navlnk">Wireless</a><br>
|
115 |
|
|
<?php if (isset($config['captiveportal']['enable'])): ?>
|
116 |
|
|
<a href="/status_captiveportal.php" class="navlnk">Captive portal</a><br>
|
117 |
|
|
<?php endif; ?>
|
118 |
859329c8
|
Scott Ullrich
|
<?php echo return_ext_menu("Status"); ?>
|
119 |
5b237745
|
Scott Ullrich
|
<?php if (isset($config['system']['webgui']['expanddiags']) || strstr($_SERVER['SCRIPT_FILENAME'], "diag_") || strstr($_SERVER['SCRIPT_FILENAME'], "reboot")): ?>
|
120 |
|
|
<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>
|
121 |
|
|
<span id="diag">
|
122 |
|
|
<?php else: ?>
|
123 |
|
|
<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>
|
124 |
|
|
<span id="diag" style="display: none">
|
125 |
|
|
<?php endif; ?>
|
126 |
4df39e03
|
Scott Ullrich
|
<a href="/diag_logs.php" class="navlnk">System logs</a><br>
|
127 |
3d46740b
|
Colin Smith
|
<a href="/diag_pkglogs.php" class="navlnk">Package logs</a><br>
|
128 |
5b237745
|
Scott Ullrich
|
<a href="/diag_dhcp_leases.php" class="navlnk">DHCP leases</a><br>
|
129 |
|
|
<a href="/diag_ipsec_sad.php" class="navlnk">IPsec</a><br>
|
130 |
|
|
<a href="/diag_ping.php" class="navlnk">Ping</a><br>
|
131 |
4df39e03
|
Scott Ullrich
|
<a href="/diag_resetstate.php" class="navlnk">Reset state</a><br>
|
132 |
5b237745
|
Scott Ullrich
|
<a href="/diag_backup.php" class="navlnk">Backup/Restore</a><br>
|
133 |
4df39e03
|
Scott Ullrich
|
<a href="/diag_defaults.php" class="navlnk">Factory defaults </a><br>
|
134 |
|
|
<a href="/edit.php" class="navlnk">Edit File</a><br>
|
135 |
|
|
<a href="/exec.php" class="navlnk">Command Prompt</a><br>
|
136 |
|
|
<a href="/reboot.php" class="navlnk">Reboot system</a><br>
|
137 |
56977a25
|
Scott Ullrich
|
<a href="/halt.php" class="navlnk">Halt system</a><br>
|
138 |
af3939aa
|
Scott Ullrich
|
<?php echo return_ext_menu("Diagnostics"); ?>
|
139 |
5b237745
|
Scott Ullrich
|
</span>
|
140 |
|
|
</font></span>
|
141 |
|
|
</td>
|
142 |
|
|
</tr></table></td>
|
143 |
|
|
<td width="600"><table width="100%" border="0" cellpadding="10" cellspacing="0">
|
144 |
|
|
<tr><td>
|