Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1960 → Rev 1959

/web/acc/admin/network.php
182,16 → 182,14
}
}
break;
case 'del_host' :
case 'del_mac' :
foreach ($_POST as $key => $value)
{
if ($value == 'on')
{
$dns_local_file=DNS_LOCAL_FILE;
exec("/bin/sed -i \"/$key/d\" $dns_local_file");
exec ("sudo /usr/bin/systemctl restart dnsmasq");
exec ("sudo /usr/bin/systemctl restart dnsmasq-blacklist");
exec ("sudo /usr/bin/systemctl restart dnsmasq-whitelist");
$ether_file=ETHERS_FILE;
exec("/bin/sed -i \"/^$key/d\" $ether_file");
exec ("sudo /usr/bin/systemctl reload chilli");
}
}
break;
389,16 → 387,16
$tab=file(DNS_LOCAL_FILE);
if ($tab) # not empty
{
$line_exist=True;
foreach ($tab as $line)
{
if (preg_match ('/^address/', $line))
{
$line_exist=True;
$field=explode("/", $line);
$host_name=$field[1];
$ip_addr=$field[2];
echo "<tr><td>$host_name";
echo "<td>$ip_addr";
$ip_addr=$field[1];
$host_name=$field[2];
echo "<tr><td>$ip_addr";
echo "<td>$host_name";
echo "<td><input type='checkbox' name='$host_name'>";
echo "</tr>";
}
/web/acc/admin/network2.php
15,6 → 15,7
$tab=file(ETHERS_FILE);
if ($tab) # le fichier n'est pas vide
{
$line_exist=True;
foreach ($tab as $line)
{
$field=explode(" ", $line);
23,10 → 24,7
echo "<tr><td>$mac_addr";
echo "<td>$ip_addr";
if ($mac_addr != $intif_mac_addr)
{
echo "<td><input type='checkbox' name='$mac_addr'>";
$line_exist=True;
}
else echo "<td>";
echo "</tr>";
}