593 |
stephane |
1 |
<?php
|
|
|
2 |
/*
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
*/
|
703 |
stephane |
6 |
/********************************************************************
|
|
|
7 |
* FICHIERS REQUIS *
|
|
|
8 |
*********************************************************************/
|
593 |
stephane |
9 |
require_once('includes/defines.inc.php');
|
|
|
10 |
require_once(ALCASAR_ADMIN_PATH_INC.'/session.inc.php');
|
703 |
stephane |
11 |
|
|
|
12 |
/********************************************************************
|
|
|
13 |
* APPLIQUATION DES MISES A JOURS *
|
|
|
14 |
*********************************************************************/
|
|
|
15 |
/*
|
|
|
16 |
Cette section met à jour la configuration réseau d'alcasar d'Alcasar
|
|
|
17 |
*/
|
|
|
18 |
print_r($_REQUEST);
|
|
|
19 |
/*
|
|
|
20 |
Mise à jour des paramètres WAN
|
|
|
21 |
*/
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
/*
|
|
|
25 |
Mise à jour des paramètres LAN
|
|
|
26 |
*/
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
/*
|
|
|
31 |
Mise à jour des paramètres DNS
|
|
|
32 |
*/
|
|
|
33 |
|
|
|
34 |
/*
|
|
|
35 |
Mise à jour des paramètres DHCP
|
|
|
36 |
*/
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
/*
|
|
|
40 |
Mise à jour des ROUTE
|
|
|
41 |
*/
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
/********************************************************************
|
|
|
45 |
* CHOIX DE LA LANGUE *
|
|
|
46 |
*********************************************************************/
|
|
|
47 |
# Choice of language
|
|
|
48 |
$Language = 'en';
|
|
|
49 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
|
|
50 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
|
|
51 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
|
|
|
52 |
if($Language == 'fr'){
|
|
|
53 |
$l_network_title = "Configuration réseau";
|
|
|
54 |
$l_ip = "@IP/CIDR";
|
|
|
55 |
$l_mask = "Masque";
|
|
|
56 |
$l_gateway = "Passerelle";
|
|
|
57 |
$l_dns = "DNS";
|
|
|
58 |
$l_yes = "OUI";
|
|
|
59 |
$l_no = "NON";
|
|
|
60 |
$l_ip_row_title = "Adresse IP";
|
|
|
61 |
$l_host_row_title = "Nom d'hôte";
|
|
|
62 |
$l_mac_row_title = "Adresse MAC";
|
|
|
63 |
$l_description_row_title = "Description";
|
|
|
64 |
//tabs-wan
|
|
|
65 |
$l_wan = "WAN";
|
|
|
66 |
$l_enable = "actif";
|
|
|
67 |
$l_disable = "inactif";
|
|
|
68 |
$l_internet_title = "Internet";
|
|
|
69 |
$l_ip_public = "@IP public";
|
|
|
70 |
$l_state = "Etat Internet";
|
|
|
71 |
$l_eth0_title = "ETH0 : carte réseau connecté vers Internet";
|
|
|
72 |
//tabs-lan
|
|
|
73 |
$l_lan = "LAN";
|
|
|
74 |
$l_eth1_title = "ETH1 : carte réseau connecté sur le réseau de consultation";
|
|
|
75 |
//tabs-dns-local
|
|
|
76 |
$l_local_dns = "DNS local";
|
|
|
77 |
//tabs-dhcp
|
|
|
78 |
$l_dhcp = "DHCP";
|
|
|
79 |
$l_dhcp_server = "Serveur DHCP";
|
|
|
80 |
$l_dhcp_activation = "Activation";
|
|
|
81 |
$l_dhcp_bail = "Bail";
|
|
|
82 |
$l_dhcp_description = "Si le DHCP est activée, la plage d'adresse IP est coupée en deux.<br />
|
|
|
83 |
Les adresses IP de X.X.X.X à X sont attribuées par DHCP, les autres sont réservées pour un adressage manuel des stations clientes.<br />";
|
|
|
84 |
$l_dhcp_ip_statique = "Adresses IP statiques";
|
|
|
85 |
//tabs-route
|
|
|
86 |
$l_route = "ROUTE";
|
|
|
87 |
$l_destination_row_title = "Destination";
|
|
|
88 |
$l_mask_row_title = "Masque de sous-réseau";
|
|
|
89 |
$l_gateway_row_title = "Passerelle";
|
|
|
90 |
//buttons
|
|
|
91 |
$l_change = "Modifier";
|
|
|
92 |
}
|
|
|
93 |
else { // a traduire
|
|
|
94 |
$l_network_title = "Network configuration";
|
|
|
95 |
$l_ip = "@IP/CIDR";
|
|
|
96 |
$l_mask = "Mask";
|
|
|
97 |
$l_gateway = "Gateway";
|
|
|
98 |
$l_dns = "DNS";
|
|
|
99 |
$l_yes = "YES";
|
|
|
100 |
$l_no = "NO";
|
|
|
101 |
$l_ip_row_title = "IP adress";
|
|
|
102 |
$l_host_row_title = "Host name";
|
|
|
103 |
$l_mac_row_title = "MAC adresse ";
|
|
|
104 |
$l_description_row_title = "Description";
|
|
|
105 |
//tabs-wan
|
|
|
106 |
$l_wan = "WAN";
|
|
|
107 |
$l_enable = "enable";
|
|
|
108 |
$l_disable = "disable";
|
|
|
109 |
$l_internet_title = "Internet";
|
|
|
110 |
$l_ip_public = "Public IP ";
|
|
|
111 |
$l_state = "Internet state";
|
|
|
112 |
$l_eth0_title = "ETH0 : carte réseau connecté vers Internet";
|
|
|
113 |
//tabs-lan
|
|
|
114 |
$l_lan = "LAN";
|
|
|
115 |
$l_eth1_title = "ETH1 : carte réseau connecté sur le réseau de consultation";
|
|
|
116 |
//tabs-dns-local
|
|
|
117 |
$l_local_dns = "Local DNS";
|
|
|
118 |
//tabs-dhcp
|
|
|
119 |
$l_dhcp = "DHCP";
|
|
|
120 |
$l_dhcp_server = "DHCP server";
|
|
|
121 |
$l_dhcp_activation = "Activation";
|
|
|
122 |
$l_dhcp_bail = "Bail";
|
|
|
123 |
$l_dhcp_description = "Si le DHCP est activée, la plage d'adresse IP est coupée en deux.<br />
|
|
|
124 |
Les adresses IP de X.X.X.X à X sont attribuées par DHCP, les autres sont réservées pour un adressage manuel des stations clientes.<br />";
|
|
|
125 |
$l_dhcp_ip_statique = "Adresses IP statiques";
|
|
|
126 |
//tabs-route
|
|
|
127 |
$l_route = "ROUTE";
|
|
|
128 |
$l_destination_row_title = "Destination";
|
|
|
129 |
$l_mask_row_title = "Mask";
|
|
|
130 |
$l_gateway_row_title = "Gateway";
|
|
|
131 |
//buttons
|
|
|
132 |
$l_change = "Modifier";
|
|
|
133 |
}
|
|
|
134 |
|
|
|
135 |
/********************************************************************
|
|
|
136 |
* CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION *
|
|
|
137 |
*********************************************************************/
|
|
|
138 |
define ("ALCASAR_CHILLI", "/etc/chilli.conf");
|
|
|
139 |
//define ("ALCASAR_CONF_FILE", "/usr/local/etc/alcasar.conf");
|
720 |
stephane |
140 |
define ("ALCASAR_CONF_FILE", "includes/alcasar.conf"); // uniquement pour le développement
|
|
|
141 |
//define ("ALCASAR_ETHERS", "/usr/local/etc/alcasar-ethers");
|
|
|
142 |
define ("ALCASAR_ETHERS", "includes/alcasar-ethers"); // uniquement pour le développement
|
|
|
143 |
//define ("ALCASAR_DNS_NAME", "/usr/local/etc/alcasar-dns-name");
|
|
|
144 |
define ("ALCASAR_DNS_NAME", "includes/alcasar-dns-name"); // uniquement pour le développement
|
703 |
stephane |
145 |
|
|
|
146 |
/********************************************************************
|
|
|
147 |
* TEST DES FICHIERS DE CONFIGURATION *
|
|
|
148 |
*********************************************************************/
|
|
|
149 |
|
|
|
150 |
//Test de présence et des droits en lecture des fichiers de configuration.
|
|
|
151 |
/*
|
|
|
152 |
if (!file_exists(ALCASAR_CHILLI)){
|
|
|
153 |
exit("Fichier de configuration ".ALCASAR_CHILLI." non présent");
|
|
|
154 |
}
|
|
|
155 |
*/
|
|
|
156 |
if (!file_exists(ALCASAR_CONF_FILE)){
|
|
|
157 |
exit("Fichier de configuration ".ALCASAR_CONF_FILE." non présent");
|
|
|
158 |
}
|
|
|
159 |
if (!file_exists(ALCASAR_ETHERS)){
|
|
|
160 |
exit("Fichier de configuration ".ALCASAR_ETHERS." non présent");
|
|
|
161 |
}
|
|
|
162 |
if (!file_exists(ALCASAR_DNS_NAME)){
|
|
|
163 |
exit("Fichier de configuration ".ALCASAR_DNS_NAME." non présent");
|
|
|
164 |
}
|
|
|
165 |
if (!is_readable(ALCASAR_CONF_FILE)){
|
|
|
166 |
exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_CONF_FILE);
|
|
|
167 |
}
|
|
|
168 |
if (!is_readable(ALCASAR_ETHERS)){
|
|
|
169 |
exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETHERS);
|
|
|
170 |
}
|
|
|
171 |
if (!is_readable(ALCASAR_DNS_NAME)){
|
|
|
172 |
exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_DNS_NAME);
|
|
|
173 |
}
|
|
|
174 |
|
|
|
175 |
/********************************************************************
|
|
|
176 |
* PARSING DES FICHIERS DE CONFIGURATION *
|
|
|
177 |
*********************************************************************/
|
|
|
178 |
/*
|
|
|
179 |
alcasar.conf parser
|
|
|
180 |
*/
|
|
|
181 |
$lines = file(ALCASAR_CONF_FILE);
|
|
|
182 |
$alcasar_conf = array();
|
|
|
183 |
foreach($lines as $line)
|
|
|
184 |
{
|
|
|
185 |
if (preg_match('/^[[:space:]]*#/',$line)) // on ignore les commentaires (ligne débutant par #)
|
|
|
186 |
continue;
|
|
|
187 |
if (strpos($line,"=")!==false){ // on parse toutes les lignes contenant un "="
|
|
|
188 |
$tmp = explode("=",$line);
|
|
|
189 |
$alcasar_conf[trim($tmp[0])] = trim($tmp[1]);
|
|
|
190 |
}
|
|
|
191 |
}
|
720 |
stephane |
192 |
|
|
|
193 |
function CIDRToNetmask($test){
|
|
|
194 |
// FONCTION A CREER
|
|
|
195 |
return "255.255.255.0";
|
|
|
196 |
}
|
|
|
197 |
|
|
|
198 |
$PUBLIC_IP = explode("/",$alcasar_conf["PUBLIC_IP"]);
|
|
|
199 |
$PUBLIC_IP_NETMASK = CIDRToNetmask($PUBLIC_IP[1]);
|
|
|
200 |
$PRIVATE_IP = explode("/",$alcasar_conf["PRIVATE_IP"]);
|
|
|
201 |
$PRIVATE_IP_NETMASK = CIDRToNetmask($PRIVATE_IP[1]);
|
703 |
stephane |
202 |
/*
|
|
|
203 |
chilli parser
|
|
|
204 |
*/
|
|
|
205 |
/*
|
|
|
206 |
$lines = file(ALCASAR_CHILLI);
|
|
|
207 |
$chilli = array();
|
|
|
208 |
foreach($lines as $line)
|
|
|
209 |
{
|
|
|
210 |
if (preg_match('/^[[:space:]]*#/',$line)) // on ignore les commentaires (ligne débutant par #)
|
|
|
211 |
continue;
|
|
|
212 |
if (strpos($line,"=")!==false){ // on parse toutes les lignes contenant un "="
|
|
|
213 |
$tmp = explode("=",$line);
|
|
|
214 |
$chilli[trim($tmp[0])] = trim($tmp[1]);
|
|
|
215 |
}
|
|
|
216 |
}
|
|
|
217 |
*/
|
|
|
218 |
/*
|
|
|
219 |
dnsname parser
|
|
|
220 |
*/
|
720 |
stephane |
221 |
|
703 |
stephane |
222 |
$lines = file(ALCASAR_DNS_NAME);
|
|
|
223 |
$dnsadresse = array();
|
720 |
stephane |
224 |
$dnsadresse['address'] = array();
|
|
|
225 |
$dnsadresse['cname'] = array();
|
|
|
226 |
$dnsadresse['domain'] = array();
|
703 |
stephane |
227 |
$n = 0;
|
720 |
stephane |
228 |
$m = 0;
|
|
|
229 |
$o = 0;
|
703 |
stephane |
230 |
foreach($lines as $line)
|
|
|
231 |
{
|
|
|
232 |
if (preg_match('/^[[:space:]]*#/',$line)) // on ignore les commentaires (ligne débutant par #)
|
|
|
233 |
continue;
|
|
|
234 |
if (preg_match("/^(address=\/)/", trim($line))){ // on parse toutes les lignes commencant par "address="
|
|
|
235 |
if (strpos($line,"/")!==false){
|
|
|
236 |
$tmp = explode("/",$line);
|
|
|
237 |
if (count($tmp) == 3) {
|
720 |
stephane |
238 |
$dnsadresse['address'][$n]['DNSNAME'] = $tmp[1];
|
|
|
239 |
$dnsadresse['address'][$n]['IPADDR'] = $tmp[2];
|
703 |
stephane |
240 |
$n++;
|
|
|
241 |
}
|
|
|
242 |
}
|
|
|
243 |
}
|
720 |
stephane |
244 |
if (preg_match("/^(cname=)/", trim($line))){ // on parse toutes les lignes commencant par "cname="
|
|
|
245 |
if (strpos($line,"=")!==false){
|
|
|
246 |
$tmp = explode("=",$line);
|
|
|
247 |
if (count($tmp) == 2) {
|
|
|
248 |
if (strpos($tmp[1],",")!==false){
|
|
|
249 |
$tmp = explode(",",$tmp[1]);
|
|
|
250 |
if (count($tmp) == 2) {
|
|
|
251 |
$dnsadresse['cname'][$m]['ALIAS'] = $tmp[0];
|
|
|
252 |
$dnsadresse['cname'][$m]['HOST'] = $tmp[1];
|
|
|
253 |
$m++;
|
|
|
254 |
}
|
|
|
255 |
}
|
|
|
256 |
}
|
|
|
257 |
}
|
|
|
258 |
}
|
|
|
259 |
if (preg_match("/^(domain=\/)/", trim($line))){ // on parse toutes les lignes commencant par "domain="
|
|
|
260 |
if (strpos($line,"/")!==false){
|
|
|
261 |
$tmp = explode("/",$line);
|
|
|
262 |
if (count($tmp) == 3) {
|
|
|
263 |
$dnsadresse['domain'][$o]['DOMAIN'] = $tmp[1];
|
|
|
264 |
$dnsadresse['domain'][$o]['IPADDR'] = $tmp[2];
|
|
|
265 |
$o++;
|
|
|
266 |
}
|
|
|
267 |
}
|
|
|
268 |
}
|
703 |
stephane |
269 |
}
|
720 |
stephane |
270 |
$n = 0;
|
|
|
271 |
$m = 0;
|
|
|
272 |
$o = 0;
|
703 |
stephane |
273 |
/*
|
|
|
274 |
ethers parser
|
720 |
stephane |
275 |
BUG COOVA PRESENT : LE CHAMP DESCRIPTION EST TOUJOURS VIDE (bug à vérifier)
|
|
|
276 |
|
|
|
277 |
refaire une expression régulaire pour ne matcher que les lignes avec des mac, ou laisser tel quel afin de voir les erreurs dans le fichier de conf?
|
|
|
278 |
|
703 |
stephane |
279 |
*/
|
720 |
stephane |
280 |
|
703 |
stephane |
281 |
$lines = file(ALCASAR_ETHERS);
|
|
|
282 |
$ethers = array();
|
|
|
283 |
$n = 0;
|
|
|
284 |
foreach($lines as $line)
|
|
|
285 |
{
|
720 |
stephane |
286 |
if (preg_match('/^[[:space:]]*#/',$line)) // on ignore les commentaires (ligne débutant par #)
|
703 |
stephane |
287 |
continue;
|
|
|
288 |
$tmp = preg_split("/\s/",$line,2);
|
|
|
289 |
if (count($tmp) == 2) {
|
|
|
290 |
$ethers[$n]['MAC'] = trim($tmp[0]);
|
|
|
291 |
|
|
|
292 |
if (strpos($line,"#")!==false){ //si présence de commentaire
|
|
|
293 |
$tmp2 = explode("#",$tmp[1],2);
|
|
|
294 |
|
|
|
295 |
$ethers[$n]['IPADDR']= trim($tmp2[0]);
|
|
|
296 |
$ethers[$n]['DESCRIPTION']= trim($tmp2[1]);
|
|
|
297 |
} else { //si absence de commentaire
|
|
|
298 |
$ethers[$n]['IPADDR']= trim($tmp[1]);
|
|
|
299 |
$ethers[$n]['DESCRIPTION']= "";
|
|
|
300 |
}
|
|
|
301 |
$n++;
|
|
|
302 |
}
|
|
|
303 |
}
|
720 |
stephane |
304 |
|
|
|
305 |
|
|
|
306 |
// Fonction de test de connectivité internet
|
|
|
307 |
function internetTest(){
|
|
|
308 |
$host = "www.google.fr"; # Google Test
|
|
|
309 |
$port = "80";
|
|
|
310 |
//var $num; //non utilisé
|
|
|
311 |
//var $error; //non utilisé
|
|
|
312 |
|
|
|
313 |
if (! $sock = @fsockopen($host, $port, $num, $error, 5)) {
|
|
|
314 |
return false;
|
|
|
315 |
} else {
|
|
|
316 |
fclose($sock);
|
|
|
317 |
return true;
|
|
|
318 |
}
|
|
|
319 |
}
|
703 |
stephane |
320 |
/********************************************************************
|
|
|
321 |
* AFFICHAGE DE LA PAGE *
|
|
|
322 |
*********************************************************************/
|
593 |
stephane |
323 |
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
|
|
|
324 |
<html>
|
|
|
325 |
<head>
|
|
|
326 |
<title>Network page</title>
|
703 |
stephane |
327 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
596 |
stephane |
328 |
<!-- include default CSS -->
|
593 |
stephane |
329 |
<link rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/default.css" type="text/css">
|
596 |
stephane |
330 |
<!-- include JQUERY UI CSS -->
|
|
|
331 |
<link type="text/css" rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/ui-lightness/jquery-ui-1.8.10.custom.css">
|
|
|
332 |
<!-- include custom page CSS -->
|
|
|
333 |
<style type="text/css">
|
720 |
stephane |
334 |
.tablewidth {
|
|
|
335 |
width:550px;
|
|
|
336 |
}
|
596 |
stephane |
337 |
</style>
|
|
|
338 |
<!-- include JQUERY -->
|
|
|
339 |
<script type="text/javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery-1.5.min.js"></script>
|
|
|
340 |
<!-- include JQUERY UI -->
|
|
|
341 |
<script type="text/javascript" src="<?php echo ALCASAR_ADMIN_PATH_JS; ?>/jquery-ui-1.8.10.all.min.js"></script>
|
|
|
342 |
<!-- include page javascript -->
|
|
|
343 |
<script type="text/javascript">
|
703 |
stephane |
344 |
$(function(){
|
|
|
345 |
$("a").attr("target", "content");
|
|
|
346 |
// Tabs
|
|
|
347 |
$('#tabs').tabs();
|
|
|
348 |
$( "button, input:submit, input:button, input:reset").button();
|
720 |
stephane |
349 |
|
|
|
350 |
// NetMask-CIDR for all network interfaces
|
|
|
351 |
$('#WAN-cidr').change(function () {
|
|
|
352 |
$('#WAN-mask').val(CIDRToNetmask($('#WAN-cidr').val()));
|
|
|
353 |
});
|
|
|
354 |
$('#WAN-mask').change(function () {
|
|
|
355 |
$('#WAN-cidr').val(netmaskToCIDR($('#WAN-mask').val()));
|
|
|
356 |
});
|
|
|
357 |
$('#LAN-cidr').change(function () {
|
|
|
358 |
$('#LAN-mask').val(CIDRToNetmask($('#LAN-cidr').val()));
|
|
|
359 |
});
|
|
|
360 |
$('#LAN-mask').change(function () {
|
|
|
361 |
$('#LAN-cidr').val(netmaskToCIDR($('#LAN-mask').val()));
|
|
|
362 |
});
|
|
|
363 |
|
703 |
stephane |
364 |
});
|
720 |
stephane |
365 |
|
|
|
366 |
function h_fillbitsfromleft(num)
|
|
|
367 |
{
|
|
|
368 |
/*
|
|
|
369 |
author : Guido Socher (script from tuxgraphics.org)
|
|
|
370 |
*/
|
|
|
371 |
if (num >= 8 ){
|
|
|
372 |
return(255);
|
|
|
373 |
}
|
|
|
374 |
bitpat=0xff00;
|
|
|
375 |
while (num > 0){
|
|
|
376 |
bitpat=bitpat >> 1;
|
|
|
377 |
num--;
|
|
|
378 |
}
|
|
|
379 |
return(bitpat & 0xff);
|
|
|
380 |
}
|
|
|
381 |
function h_countbitsfromleft(num)
|
|
|
382 |
{
|
|
|
383 |
/*
|
|
|
384 |
author : Guido Socher (script from tuxgraphics.org)
|
|
|
385 |
*/
|
|
|
386 |
if (num == 255 ){
|
|
|
387 |
return(8);
|
|
|
388 |
}
|
|
|
389 |
i = 0;
|
|
|
390 |
bitpat=0xff00;
|
|
|
391 |
while (i < 8){
|
|
|
392 |
if (num == (bitpat & 0xff)){
|
|
|
393 |
return(i);
|
|
|
394 |
}
|
|
|
395 |
bitpat=bitpat >> 1;
|
|
|
396 |
i++;
|
|
|
397 |
}
|
|
|
398 |
return(Number.NaN);
|
|
|
399 |
}
|
|
|
400 |
function netmaskToCIDR(mask){
|
|
|
401 |
//test netmask
|
|
|
402 |
if (!isNetMask(mask)) return false;
|
|
|
403 |
//calculate CIDR
|
|
|
404 |
var bits = mask.split('.');
|
|
|
405 |
sumofbits=0;
|
|
|
406 |
for(bit in bits){
|
|
|
407 |
tmpvar = parseInt(bits[bit],10);
|
|
|
408 |
if (isNaN(tmpvar)){
|
|
|
409 |
return false;
|
|
|
410 |
}
|
|
|
411 |
bitsfromleft=h_countbitsfromleft(tmpvar);
|
|
|
412 |
if (isNaN(bitsfromleft)){
|
|
|
413 |
return false;
|
|
|
414 |
}
|
|
|
415 |
sumofbits+=bitsfromleft;
|
|
|
416 |
}
|
|
|
417 |
//return CIDR
|
|
|
418 |
return sumofbits;
|
|
|
419 |
}
|
|
|
420 |
function isIpV4(ip){
|
|
|
421 |
var bits = ip.split('.');
|
|
|
422 |
var regEx = /[^0-9]/;
|
|
|
423 |
if (bits.length !=4){
|
|
|
424 |
return false;
|
|
|
425 |
}
|
|
|
426 |
for(bit in bits){
|
|
|
427 |
if ((bits[bit]=='')||(bits[bit].length>3)||(regEx.test(bits[bit]))){
|
|
|
428 |
return false;
|
|
|
429 |
}
|
|
|
430 |
}
|
|
|
431 |
if (parseInt(bits[0],10)==0){
|
|
|
432 |
return false;
|
|
|
433 |
}
|
|
|
434 |
return true;
|
|
|
435 |
}
|
|
|
436 |
function isNetMask(mask){
|
|
|
437 |
var bits = mask.split('.');
|
|
|
438 |
var regEx = /[^0-9]/;
|
|
|
439 |
if (bits.length !=4)
|
|
|
440 |
{
|
|
|
441 |
return false;
|
|
|
442 |
}
|
|
|
443 |
for(bit in bits){
|
|
|
444 |
if ((bits[bit]=='')||(bits[bit].length>3)||(regEx.test(bits[bit]))){
|
|
|
445 |
return false;
|
|
|
446 |
}
|
|
|
447 |
}
|
|
|
448 |
if (parseInt(bits[0],10) != 255){
|
|
|
449 |
if ((parseInt(bits[1],10) != 0)) return false;
|
|
|
450 |
if ((parseInt(bits[2],10) != 0)) return false;
|
|
|
451 |
if ((parseInt(bits[3],10) != 0)) return false;
|
|
|
452 |
}
|
|
|
453 |
if (parseInt(bits[1],10) != 255){
|
|
|
454 |
if ((parseInt(bits[2],10) != 0)) return false;
|
|
|
455 |
if ((parseInt(bits[3],10) != 0)) return false;
|
|
|
456 |
}
|
|
|
457 |
if (parseInt(bits[2],10) != 255){
|
|
|
458 |
if ((parseInt(bits[3],10) != 0)) return false;
|
|
|
459 |
}
|
|
|
460 |
return true;
|
|
|
461 |
}
|
|
|
462 |
|
|
|
463 |
function CIDRToNetmask(cidr){
|
|
|
464 |
//test CIDR
|
|
|
465 |
//format : 0 < cidr < 33
|
|
|
466 |
cidr = parseInt(cidr,10);
|
|
|
467 |
if ((isNaN(cidr))||(cidr > 32)||(cidr < 0)) return false;
|
|
|
468 |
|
|
|
469 |
//calculate Netmask
|
|
|
470 |
bit1 = "";
|
|
|
471 |
bit2 = "";
|
|
|
472 |
bit3 = "";
|
|
|
473 |
bit4 = "";
|
|
|
474 |
if (cidr<=8){
|
|
|
475 |
bit1 = h_fillbitsfromleft(cidr);
|
|
|
476 |
bit2 = "0";
|
|
|
477 |
bit3 = "0";
|
|
|
478 |
bit4 = "0";
|
|
|
479 |
} else if (cidr<=16){
|
|
|
480 |
bit1 = "255";
|
|
|
481 |
bit2 = h_fillbitsfromleft(cidr-8);
|
|
|
482 |
bit3 = "0";
|
|
|
483 |
bit4 = "0";
|
|
|
484 |
} else if (cidr<=24){
|
|
|
485 |
bit1 = "255";
|
|
|
486 |
bit2 = "255";
|
|
|
487 |
bit3 = h_fillbitsfromleft(cidr-16);
|
|
|
488 |
bit4 = "0";
|
|
|
489 |
} else if (cidr<=32){
|
|
|
490 |
bit1 = "255";
|
|
|
491 |
bit2 = "255";
|
|
|
492 |
bit3 = "255";
|
|
|
493 |
bit4 = h_fillbitsfromleft(cidr-24);
|
|
|
494 |
} else {
|
|
|
495 |
return false;
|
|
|
496 |
}
|
|
|
497 |
//return Netmask
|
|
|
498 |
return bit1+"."+bit2+"."+bit3+"."+bit4
|
|
|
499 |
}
|
596 |
stephane |
500 |
</script>
|
593 |
stephane |
501 |
</head>
|
596 |
stephane |
502 |
<body>
|
703 |
stephane |
503 |
<div id="tabs">
|
|
|
504 |
<ul>
|
|
|
505 |
<li><a href="#tabs-wan"><?php echo $l_wan; ?></a></li>
|
|
|
506 |
<li><a href="#tabs-lan"><?php echo $l_lan; ?></a></li>
|
|
|
507 |
<li><a href="#tabs-dns-local"><?php echo $l_local_dns; ?></a></li>
|
720 |
stephane |
508 |
<li><a href="#tabs-dhcp"><?php echo $l_dhcp; ?> et réseravation IP</a></li>
|
|
|
509 |
<!--
|
703 |
stephane |
510 |
<li><a href="#tabs-route"><?php echo $l_route; ?></a></li>
|
720 |
stephane |
511 |
<li><a href="#tabs-filter">Filtrage MAC</a></li>
|
|
|
512 |
-->
|
703 |
stephane |
513 |
</ul>
|
|
|
514 |
<!-- -->
|
|
|
515 |
<div id="tabs-wan">
|
|
|
516 |
<form method="post" name="form_wan" action="<?php echo $_SERVER['PHP_SELF']; ?>">
|
720 |
stephane |
517 |
<table class="ui-widget ui-widget-content tablewidth">
|
703 |
stephane |
518 |
<thead>
|
|
|
519 |
<tr class="ui-widget-header"><th colspan="2"><?php echo $l_internet_title; ?></th></tr>
|
|
|
520 |
</head>
|
|
|
521 |
<tbody>
|
|
|
522 |
<tr><td><?php echo $l_state; ?> :</td>
|
|
|
523 |
<td><?php
|
|
|
524 |
if (InternetTest()){
|
720 |
stephane |
525 |
echo " <img src='../images/state_ok.gif'> $l_enable";
|
|
|
526 |
$IP_PUB = exec ("wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1");}
|
|
|
527 |
else {
|
|
|
528 |
echo " <img src='../images/state_error.gif'> $l_disable";
|
|
|
529 |
$IP_PUB = "-.-.-.-";
|
|
|
530 |
}
|
703 |
stephane |
531 |
?>
|
|
|
532 |
</td></tr>
|
|
|
533 |
<tr><td><?php echo $l_ip_public; ?> :</td><td><?php //echo $IP_PUB; ?></td></tr>
|
|
|
534 |
<tr><td colspan="2"><br /></td></tr>
|
|
|
535 |
<tr class="ui-widget-header"><th colspan="2"><?php echo $l_eth0_title; ?></th></tr>
|
|
|
536 |
<tr><td><?php echo $l_ip; ?> :</td>
|
|
|
537 |
<td>
|
720 |
stephane |
538 |
<input type="text" name="WAN-ip" id="WAN-ip" value="<?php echo $PUBLIC_IP[0]; ?>" class="text"> /<input type="text" name="WAN-cidr" id="WAN-cidr" value="<?php echo $PUBLIC_IP[1]; ?>" class="text" size="2" maxlength="2">
|
703 |
stephane |
539 |
</td>
|
|
|
540 |
</tr>
|
720 |
stephane |
541 |
<tr><td><?php echo $l_mask; ?> :</td><td>
|
|
|
542 |
<input type="text" name="WAN-mask" id="WAN-mask" value="<?php echo $PUBLIC_IP_NETMASK ; ?>" class="text">
|
703 |
stephane |
543 |
</td></tr>
|
|
|
544 |
<tr><td><?php echo $l_gateway; ?> :</td><td>
|
|
|
545 |
<input type="text" name="WAN-gateway" id="WAN-gateway" value="<?php echo $alcasar_conf["GW"]; ?>" class="text">
|
|
|
546 |
</td></tr>
|
|
|
547 |
<tr><td><?php echo $l_dns; ?> 1 :</td><td>
|
|
|
548 |
<input type="text" name="WAN-dns1" id="WAN-dns1" value="<?php echo $alcasar_conf["DNS1"]; ?>" class="text">
|
|
|
549 |
</td></tr>
|
|
|
550 |
<tr><td><?php echo $l_dns; ?> 2 :</td><td>
|
|
|
551 |
<input type="text" name="WAN-dns2" id="WAN-dns2" value="<?php echo $alcasar_conf["DNS2"]; ?>" class="text">
|
|
|
552 |
</td></tr>
|
|
|
553 |
<tr><td colspan ="2"><br /></td></tr>
|
|
|
554 |
<tr><td><input type="submit" value="<?php echo $l_change; ?>" class="text"></td><td><br /></td></tr>
|
|
|
555 |
</tbody>
|
|
|
556 |
</table>
|
|
|
557 |
</form>
|
|
|
558 |
</div>
|
|
|
559 |
<div id="tabs-lan">
|
|
|
560 |
<form method="post" name="form_lan" action="<?php echo $_SERVER['PHP_SELF']; ?>">
|
720 |
stephane |
561 |
<table class="ui-widget ui-widget-content tablewidth">
|
703 |
stephane |
562 |
<thead>
|
|
|
563 |
<tr class="ui-widget-header"><th colspan="2"><?php echo $l_eth1_title; ?></th></tr>
|
|
|
564 |
</thead>
|
|
|
565 |
<tbody>
|
720 |
stephane |
566 |
<tr><td><?php echo $l_ip; ?> :</td><td><input type="text" name="eth0-ip" id="eth0-ip" value="<?php echo $PRIVATE_IP[0]; ?>" class="text"> /<input type="text" name="LAN-cidr" id="LAN-cidr" value="<?php echo $PRIVATE_IP[1]; ?>" class="text" size="2" maxlength="2"></td></tr>
|
|
|
567 |
<tr><td><?php echo $l_mask; ?> :</td><td><input type="text" name="eth0-ip" id="eth0-ip" value="<?php echo $PRIVATE_IP_NETMASK; ?>" class="text"></td></tr>
|
703 |
stephane |
568 |
<tr><td colspan ="2"><br /></td></tr>
|
|
|
569 |
<tr><td><input type="submit" value="Modifier" class="text"></td><td><br /></td></tr>
|
|
|
570 |
</tbody>
|
|
|
571 |
</table>
|
|
|
572 |
</form>
|
|
|
573 |
</div>
|
|
|
574 |
<div id="tabs-dns-local">
|
720 |
stephane |
575 |
<font color='red' size="8">Une liste par type d'entrée DNS (exemple actuel), ou un seul tableau global avec tri et colonne indiquant le type?</font>
|
|
|
576 |
<br />
|
|
|
577 |
<h2>Liste des hôtes DNS</h2>
|
|
|
578 |
<table border="0" id="dns-local" class="ui-widget ui-widget-content tablewidth">
|
703 |
stephane |
579 |
<thead>
|
|
|
580 |
<tr class="ui-widget-header"><th><?php echo $l_ip_row_title; ?></th><th></th><th><?php echo $l_host_row_title; ?></th><th class="col_action" scope="col" colspan="2"></th></tr>
|
|
|
581 |
</thead>
|
|
|
582 |
<tbody>
|
|
|
583 |
<?php
|
720 |
stephane |
584 |
foreach ($dnsadresse['address'] as $dns_adress){
|
703 |
stephane |
585 |
?>
|
|
|
586 |
<tr>
|
720 |
stephane |
587 |
<td><?php echo $dns_adress['IPADDR']; ?></td>
|
703 |
stephane |
588 |
<td> </td>
|
720 |
stephane |
589 |
<td><?php echo $dns_adress['DNSNAME']; ?></td>
|
703 |
stephane |
590 |
<td class="col_action" colspan="2"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/delete.png"></td>
|
|
|
591 |
</tr>
|
|
|
592 |
<?php
|
720 |
stephane |
593 |
}
|
703 |
stephane |
594 |
?>
|
|
|
595 |
<tr>
|
|
|
596 |
<td>
|
|
|
597 |
<input type="text" readonly="readonly" value="192" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p0" id="dhcp_static_ipaddr_p0">.
|
|
|
598 |
<input type="text" readonly="readonly" value="168" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p1" id="dhcp_static_ipaddr_p1">.
|
|
|
599 |
<input type="text" readonly="readonly" value="182" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p2" id="dhcp_static_ipaddr_p2">.
|
|
|
600 |
<input type="text" value="" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p3" id="dhcp_static_ipaddr_p3">
|
|
|
601 |
</td>
|
|
|
602 |
<td> </td>
|
|
|
603 |
<td>
|
|
|
604 |
<input type="text" value="" maxlength="100" size="50" class="text" name="dhcp_static_macaddr_p0" id="dhcp_static_macaddr_p0">
|
|
|
605 |
</td>
|
|
|
606 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/add.png"></td>
|
|
|
607 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/chart_organisation.png"></td>
|
|
|
608 |
</tr>
|
|
|
609 |
</tbody>
|
|
|
610 |
</table>
|
720 |
stephane |
611 |
<h2>Liste des alias DNS</h2>
|
|
|
612 |
<table border="0" id="dns-local" class="ui-widget ui-widget-content tablewidth">
|
|
|
613 |
<thead>
|
|
|
614 |
<tr class="ui-widget-header"><th><?php echo $l_host_row_title; ?></th><th></th><th>Alias</th><th class="col_action" scope="col" colspan="2"></th></tr>
|
|
|
615 |
</thead>
|
|
|
616 |
<tbody>
|
|
|
617 |
<?php
|
|
|
618 |
foreach ($dnsadresse['cname'] as $dns_adress){
|
|
|
619 |
?>
|
|
|
620 |
<tr>
|
|
|
621 |
<td><?php echo $dns_adress['HOST']; ?></td>
|
|
|
622 |
<td> </td>
|
|
|
623 |
<td><?php echo $dns_adress['ALIAS']; ?></td>
|
|
|
624 |
<td class="col_action" colspan="2"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/delete.png"></td>
|
|
|
625 |
</tr>
|
|
|
626 |
<?php
|
|
|
627 |
}
|
|
|
628 |
?>
|
|
|
629 |
<tr>
|
|
|
630 |
<td>
|
|
|
631 |
<input type="text" value="" maxlength="100" size="30" class="text" name="alias_host_name" id="alias_host_name">
|
|
|
632 |
</td>
|
|
|
633 |
<td> </td>
|
|
|
634 |
<td>
|
|
|
635 |
<input type="text" value="" maxlength="100" size="30" class="text" name="alias_alias_name" id="alias_alias_name">
|
|
|
636 |
</td>
|
|
|
637 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/add.png"></td>
|
|
|
638 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/chart_organisation.png"></td>
|
|
|
639 |
</tr>
|
|
|
640 |
</tbody>
|
|
|
641 |
</table>
|
|
|
642 |
|
|
|
643 |
<h2>Liste des domaines locaux</h2>
|
|
|
644 |
<table border="0" id="dns-local" class="ui-widget ui-widget-content tablewidth">
|
|
|
645 |
<thead>
|
|
|
646 |
<tr class="ui-widget-header"><th>Adresse IP serveur DNS</th><th></th><th>Domaine</th><th class="col_action" scope="col" colspan="2"></th></tr>
|
|
|
647 |
</thead>
|
|
|
648 |
<tbody>
|
|
|
649 |
<?php
|
|
|
650 |
foreach ($dnsadresse['domain'] as $dns_adress){
|
|
|
651 |
?>
|
|
|
652 |
<tr>
|
|
|
653 |
<td><?php echo $dns_adress['IPADDR']; ?></td>
|
|
|
654 |
<td> </td>
|
|
|
655 |
<td><?php echo $dns_adress['DOMAIN']; ?></td>
|
|
|
656 |
<td class="col_action" colspan="2"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/delete.png"></td>
|
|
|
657 |
</tr>
|
|
|
658 |
<?php
|
|
|
659 |
}
|
|
|
660 |
?>
|
|
|
661 |
<tr>
|
|
|
662 |
<td>
|
|
|
663 |
<input type="text" readonly="readonly" value="192" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p0" id="dhcp_static_ipaddr_p0">.
|
|
|
664 |
<input type="text" readonly="readonly" value="168" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p1" id="dhcp_static_ipaddr_p1">.
|
|
|
665 |
<input type="text" readonly="readonly" value="182" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p2" id="dhcp_static_ipaddr_p2">.
|
|
|
666 |
<input type="text" value="" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p3" id="dhcp_static_ipaddr_p3">
|
|
|
667 |
</td>
|
|
|
668 |
<td> </td>
|
|
|
669 |
<td>
|
|
|
670 |
<input type="text" value="" maxlength="100" size="50" class="text" name="dhcp_static_macaddr_p0" id="dhcp_static_macaddr_p0">
|
|
|
671 |
</td>
|
|
|
672 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/add.png"></td>
|
|
|
673 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/chart_organisation.png"></td>
|
|
|
674 |
</tr>
|
|
|
675 |
</tbody>
|
|
|
676 |
</table>
|
703 |
stephane |
677 |
</div>
|
|
|
678 |
<div id="tabs-dhcp">
|
|
|
679 |
<div id="dhcp">
|
|
|
680 |
<div id="div_dhcp_conf">
|
|
|
681 |
<h3 class="ui-widget-header"><?php echo $l_dhcp_server; ?></h3>
|
|
|
682 |
<form name="form_dhcp" action="<?php echo $_SERVER['PHP_SELF']; ?>" id="dhcp_conf_form">
|
|
|
683 |
|
720 |
stephane |
684 |
<table class="ui-widget ui-widget-content tablewidth">
|
703 |
stephane |
685 |
<tr><td><?php echo $l_dhcp_activation; ?> :</td>
|
|
|
686 |
<td>
|
|
|
687 |
<select name="" class="text">
|
|
|
688 |
<option><?php echo $l_yes; ?></option>
|
720 |
stephane |
689 |
<option><?php echo $l_no; ?></option>
|
703 |
stephane |
690 |
</select>
|
|
|
691 |
</td>
|
|
|
692 |
</tr>
|
|
|
693 |
<tr>
|
|
|
694 |
<td>DHCP start :</td>
|
|
|
695 |
<td>
|
|
|
696 |
<input type="text" readonly="readonly" value="192" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p0" id="dhcp_static_ipaddr_p0">.
|
|
|
697 |
<input type="text" readonly="readonly" value="168" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p1" id="dhcp_static_ipaddr_p1">.
|
|
|
698 |
<input type="text" readonly="readonly" value="182" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p2" id="dhcp_static_ipaddr_p2">.
|
|
|
699 |
<input type="text" value="" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p3" id="dhcp_static_ipaddr_p3">
|
|
|
700 |
</td>
|
|
|
701 |
</tr>
|
|
|
702 |
<tr><td>DHCP stop :</td><td>
|
|
|
703 |
<input type="text" readonly="readonly" value="192" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p0" id="dhcp_static_ipaddr_p0">.
|
|
|
704 |
<input type="text" readonly="readonly" value="168" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p1" id="dhcp_static_ipaddr_p1">.
|
|
|
705 |
<input type="text" readonly="readonly" value="182" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p2" id="dhcp_static_ipaddr_p2">.
|
|
|
706 |
<input type="text" value="" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p3" id="dhcp_static_ipaddr_p3">
|
|
|
707 |
</td>
|
|
|
708 |
</tr>
|
720 |
stephane |
709 |
<tr><td>MTU :</td><td><input type="text" value="1500 (conf)" maxlength="8" size="8" class="text" name="" id=""></td></tr>
|
|
|
710 |
<tr><td><?php echo $l_dhcp_bail; ?> :</td><td><input type="text" value="600 (conf)" maxlength="8" size="8" class="text" name="" id=""></td></tr>
|
|
|
711 |
<tr><td>Grâce :</td><td><input type="text" value="60 (conf)" maxlength="8" size="8" class="text" name="" id=""></td></tr>
|
703 |
stephane |
712 |
<tr><td colspan ="2"><br /></td></tr>
|
|
|
713 |
<tr><td><input type="submit" value="Modifier" class="text"></td><td></td></tr>
|
|
|
714 |
</table>
|
|
|
715 |
<br />
|
|
|
716 |
<?php echo $l_dhcp_description; ?>
|
|
|
717 |
</form>
|
|
|
718 |
</div>
|
|
|
719 |
<br /><br />
|
|
|
720 |
|
|
|
721 |
|
|
|
722 |
<div id="div_dhcp_statique">
|
|
|
723 |
<h3><?php echo $l_dhcp_ip_statique; ?></h3>
|
|
|
724 |
<table border="0" id="dhcp_static" class="ui-widget ui-widget-content">
|
|
|
725 |
<thead>
|
|
|
726 |
<tr class="ui-widget-header"><th><?php echo $l_ip_row_title; ?></th><th></th><th><?php echo $l_mac_row_title; ?></th><th></th><th><?php echo $l_description_row_title; ?></th><th class="col_action" scope="col" colspan="2"></th></tr>
|
|
|
727 |
</thead>
|
|
|
728 |
<tbody>
|
|
|
729 |
<?php
|
720 |
stephane |
730 |
foreach ($ethers as $ip_static){
|
703 |
stephane |
731 |
?>
|
|
|
732 |
<tr>
|
720 |
stephane |
733 |
<td><?php echo $ip_static['IPADDR']; ?></td>
|
703 |
stephane |
734 |
<td> </td>
|
720 |
stephane |
735 |
<td><?php echo $ip_static['MAC']; ?></td>
|
703 |
stephane |
736 |
<td> </td>
|
720 |
stephane |
737 |
<td><?php echo $ip_static['DESCRIPTION']; ?></td>
|
703 |
stephane |
738 |
<td class="col_action" colspan="2"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/delete.png"></td>
|
|
|
739 |
</tr>
|
|
|
740 |
<?php
|
720 |
stephane |
741 |
}
|
703 |
stephane |
742 |
?>
|
|
|
743 |
<tr>
|
|
|
744 |
<td>
|
|
|
745 |
<input type="text" readonly="readonly" value="192" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p0" id="dhcp_static_ipaddr_p0">.
|
|
|
746 |
<input type="text" readonly="readonly" value="192" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p1" id="dhcp_static_ipaddr_p1">.
|
|
|
747 |
<input type="text" readonly="readonly" value="192" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p2" id="dhcp_static_ipaddr_p2">.
|
|
|
748 |
<input type="text" value="" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p3" id="dhcp_static_ipaddr_p3">
|
|
|
749 |
</td>
|
|
|
750 |
<td> </td>
|
|
|
751 |
<td>
|
|
|
752 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p0" id="dhcp_static_macaddr_p0">:
|
|
|
753 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p1" id="dhcp_static_macaddr_p1">:
|
|
|
754 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p2" id="dhcp_static_macaddr_p2">:
|
|
|
755 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p3" id="dhcp_static_macaddr_p3">:
|
|
|
756 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p4" id="dhcp_static_macaddr_p4">:
|
|
|
757 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p5" id="dhcp_static_macaddr_p0">
|
|
|
758 |
</td>
|
|
|
759 |
<td> </td>
|
|
|
760 |
<td><input type="text" value="" maxlength="20" size="20" class="text" name="dhcp_static_description" id="dhcp_static_description"></td>
|
|
|
761 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/add.png"></td>
|
|
|
762 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/chart_organisation.png"></td>
|
|
|
763 |
</tr>
|
|
|
764 |
</tbody>
|
|
|
765 |
</table>
|
|
|
766 |
</div>
|
|
|
767 |
</div>
|
|
|
768 |
</div>
|
720 |
stephane |
769 |
<!--
|
703 |
stephane |
770 |
<div id="tabs-route">
|
|
|
771 |
Alcasar est la passerelle par défaut des postes du réseau de consulation.<br />
|
|
|
772 |
Si un réseau est accessible par une autre passerelle présente sur le réseau de consultation vous pouvez le préciser içi.<br />
|
|
|
773 |
<br />
|
|
|
774 |
<table border="0" id="route" class="ui-widget ui-widget-content">
|
|
|
775 |
<thead>
|
|
|
776 |
<tr class="ui-widget-header"><th><?php echo $l_destination_row_title; ?></th><th></th><th><?php echo $l_mask_row_title; ?></th><th><?php echo $l_gateway_row_title; ?></th><th class="col_action" scope="col" colspan="2"></th></tr>
|
|
|
777 |
</thead>
|
|
|
778 |
<tbody>
|
|
|
779 |
<?php
|
|
|
780 |
$route_list = array();// a faire
|
|
|
781 |
//foreach ($route_list as $route){
|
|
|
782 |
?>
|
|
|
783 |
<tr>
|
|
|
784 |
<td><?php //echo $route['DESTINATION']; ?>DESTINATION</td>
|
|
|
785 |
<td> </td>
|
|
|
786 |
<td><?php //echo $route['NETMASK']; ?>NETMASK</td>
|
|
|
787 |
<td><?php //echo $route['GATEWAY']; ?>GATEWAY</td>
|
|
|
788 |
<td class="col_action" colspan="2"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/delete.png"></td>
|
|
|
789 |
</tr>
|
|
|
790 |
<?php
|
|
|
791 |
//}
|
|
|
792 |
?>
|
|
|
793 |
<tr>
|
|
|
794 |
<td>
|
|
|
795 |
<input type="text" value="" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p0" id="dhcp_static_ipaddr_p0">.
|
|
|
796 |
<input type="text" value="" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p1" id="dhcp_static_ipaddr_p1">.
|
|
|
797 |
<input type="text" value="" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p2" id="dhcp_static_ipaddr_p2">.
|
|
|
798 |
<input type="text" value="" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p3" id="dhcp_static_ipaddr_p3">
|
|
|
799 |
</td>
|
|
|
800 |
<td> </td>
|
|
|
801 |
<td>
|
|
|
802 |
<input type="text" value="255" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p0" id="dhcp_static_ipaddr_p0">.
|
|
|
803 |
<input type="text" value="255" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p1" id="dhcp_static_ipaddr_p1">.
|
|
|
804 |
<input type="text" value="255" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p2" id="dhcp_static_ipaddr_p2">.
|
|
|
805 |
<input type="text" value="0" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p3" id="dhcp_static_ipaddr_p3">
|
|
|
806 |
</td>
|
|
|
807 |
<td>
|
|
|
808 |
<input type="text" readonly="readonly" value="192" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p0" id="dhcp_static_ipaddr_p0">.
|
|
|
809 |
<input type="text" readonly="readonly" value="168" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p1" id="dhcp_static_ipaddr_p1">.
|
|
|
810 |
<input type="text" readonly="readonly" value="182" maxlength="3" size="3" class="readonly" name="dhcp_static_ipaddr_p2" id="dhcp_static_ipaddr_p2">.
|
|
|
811 |
<input type="text" value="" maxlength="3" size="3" class="text" name="dhcp_static_ipaddr_p3" id="dhcp_static_ipaddr_p3">
|
|
|
812 |
</td>
|
|
|
813 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/add.png"></td>
|
|
|
814 |
<td class="col_action"></td>
|
|
|
815 |
</tr>
|
|
|
816 |
</tbody>
|
|
|
817 |
</table>
|
|
|
818 |
</div>
|
720 |
stephane |
819 |
<div id="tabs-filter">
|
|
|
820 |
<h1>Filtrage MAC</h1>
|
|
|
821 |
<form>
|
|
|
822 |
<table><tr><td>Activation du filtrage</td><td><input type="radio">activé <input type="radio">désactivé</td></tr></table>
|
|
|
823 |
</form>
|
|
|
824 |
<h1>Adresses MAC autorisées</h1>
|
|
|
825 |
<form>
|
|
|
826 |
<table border="0" id="dhcp_static" class="ui-widget ui-widget-content">
|
|
|
827 |
<thead>
|
|
|
828 |
<tr class="ui-widget-header"><th>#</th><th><?php echo $l_mac_row_title; ?></th><th></th><th class="col_action" scope="col" colspan="2"></th></tr>
|
|
|
829 |
</thead>
|
|
|
830 |
<tbody>
|
|
|
831 |
<?php
|
|
|
832 |
//foreach ($ethers as $ip_static){
|
|
|
833 |
?>
|
|
|
834 |
<tr>
|
|
|
835 |
<td>1</td>
|
|
|
836 |
<td>08:00:55:DF:EE:00</td>
|
|
|
837 |
<td>station de toto</td>
|
|
|
838 |
<td class="col_action" colspan="2"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/delete.png"></td>
|
|
|
839 |
</tr>
|
|
|
840 |
<?php
|
|
|
841 |
//}
|
|
|
842 |
?>
|
|
|
843 |
<tr>
|
|
|
844 |
<td> </td>
|
|
|
845 |
<td>
|
|
|
846 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p0" id="dhcp_static_macaddr_p0">:
|
|
|
847 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p1" id="dhcp_static_macaddr_p1">:
|
|
|
848 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p2" id="dhcp_static_macaddr_p2">:
|
|
|
849 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p3" id="dhcp_static_macaddr_p3">:
|
|
|
850 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p4" id="dhcp_static_macaddr_p4">:
|
|
|
851 |
<input type="text" value="" maxlength="2" size="2" class="text" name="dhcp_static_macaddr_p5" id="dhcp_static_macaddr_p0">
|
|
|
852 |
</td>
|
|
|
853 |
<td><input type="text" value="" maxlength="20" size="20" class="text" name="dhcp_static_description" id="dhcp_static_description"></td>
|
|
|
854 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/add.png"></td>
|
|
|
855 |
<td class="col_action"><image src="<?php echo ALCASAR_ADMIN_PATH_IMG; ?>/chart_organisation.png"></td>
|
|
|
856 |
</tr>
|
|
|
857 |
</tbody>
|
|
|
858 |
</table>
|
|
|
859 |
</form>
|
|
|
860 |
</div>
|
|
|
861 |
-->
|
703 |
stephane |
862 |
</div>
|
593 |
stephane |
863 |
</body>
|
|
|
864 |
</html>
|