16,8 → 16,6 |
if (!is_readable($file)){ |
exit("Can't read the file ".$file);} |
} |
|
|
# Choice of language |
$Language = 'en'; |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ |
171,7 → 169,6 |
/*********************************** |
* Update ALCASAR_CONF_FILE * |
***********************************/ |
|
/******************************************* |
* Read ALCASAR_CONF_FILE Before * |
********************************************/ |
188,7 → 185,6 |
fclose($ouvre); |
} |
|
|
if(isset($_POST['dns1']) && preg_match($reg_ip,$_POST['dns1'])) |
{ |
file_put_contents(CONF_FILE, str_replace('DNS1='.$conf['DNS1'],'DNS1='.$_POST['dns1']."\n",file_get_contents(CONF_FILE))); |
220,12 → 216,8 |
if($network_modification) |
{ |
exec("sudo /usr/local/bin/alcasar-conf.sh -apply"); |
|
} |
|
|
|
|
/******************************************* |
* Read ALCASAR_CONF_FILE Updated * |
********************************************/ |
241,12 → 233,6 |
} |
fclose($ouvre); |
} |
|
/************************ |
* TO DO * |
*************************/ |
//modification de la conf réseau --> V3.0 |
|
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
<html><!-- written by steweb57 & rexy --> |
268,8 → 254,6 |
} |
</script> |
</head> |
|
|
<body> |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th><?php echo $l_network_title; ?></th></tr> |
281,13 → 265,13 |
<legend><?php echo $l_internet_legend; |
if (InternetTest()){ |
echo " <img src='/images/state_ok.gif'>"; |
$IP_PUB = exec ("wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1");} |
$IP_PUB = exec ("wget http://ipecho.net/plain -O - -o /dev/null");} |
else { |
echo " <img src='/images/state_error.gif'>"; |
$IP_PUB = "-.-.-.-";} |
?></legend> |
<table> |
<tr><td><?php echo $l_ip_public." : </td><td>".$IP_PUB;?></td></tr> |
<tr><td><?php echo $l_ip_public." : ".$IP_PUB;?></td></tr> |
<?php |
echo "<form action=".$_SERVER['PHP_SELF']." method='post'>"; |
echo "<tr><td>".$l_ip_dns1." <input style='width:120px' type='text' name='dns1' value=".$conf["DNS1"]."/></td></tr>"; |
322,7 → 306,6 |
echo "</form>"; |
?> |
</table> |
|
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th><?php echo $l_dhcp_title;?></th></tr> |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr> |
385,7 → 368,6 |
</td> |
</tr> |
</table> |
|
</body> |
</html> |
|