Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2978 → Rev 2979

/web/acc/admin/network.php
438,9 → 438,9
file_put_contents(TEMP_FILE, str_replace('PROXY_IP='.$conf['PROXY_IP'], 'PROXY_IP='.trim($_POST['proxy']), file_get_contents(TEMP_FILE)));
$modification_proxy = true;
}
if ($conf['MULTIWAN'] !== 'Off')
if ($conf['MULTIWAN'] !== 'off')
{
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=Off', file_get_contents(TEMP_FILE)));
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=off', file_get_contents(TEMP_FILE)));
$modification_network = true;
}
}
447,9 → 447,9
else
{
//set multiwan value to off and delete every "WANx=" line
if ($_POST['gw_count'] === "1" && $conf['MULTIWAN'] !== 'Off')
if ($_POST['gw_count'] === "1" && $conf['MULTIWAN'] !== 'off')
{
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=Off', file_get_contents(TEMP_FILE)));
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=off', file_get_contents(TEMP_FILE)));
$temp = 1;
while (isset($conf['WAN'.$temp]))
{
500,7 → 500,7
}
file_put_contents(TEMP_FILE, str_replace('PUBLIC_WEIGHT='.$conf['PUBLIC_WEIGHT'], 'PUBLIC_WEIGHT='.(($_POST['weight'] !== '')?$_POST['weight']:1), file_get_contents(TEMP_FILE)));
//Set Multiwan status
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], "MULTIWAN=On\nWAN1=", file_get_contents(TEMP_FILE)));
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], "MULTIWAN=on\nWAN1=", file_get_contents(TEMP_FILE)));
//Adding the correct number of "WANx=" lines, numbered
for($i=2;$i<$_POST['gw_count'];$i++)
{
526,8 → 526,8
if ($conf['PROXY'] !== 'Off')
{
file_put_contents(TEMP_FILE, str_replace('PROXY='.$conf['PROXY'], 'PROXY=Off', file_get_contents(TEMP_FILE)));
if($_POST['gw_count'] !== "1" && $conf['MULTIWAN'] !== 'On') {
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=On', file_get_contents(TEMP_FILE)));
if($_POST['gw_count'] !== "1" && $conf['MULTIWAN'] !== 'on') {
file_put_contents(TEMP_FILE, str_replace('MULTIWAN='.$conf['MULTIWAN'], 'MULTIWAN=on', file_get_contents(TEMP_FILE)));
$modification_network = true;
}
$modification_proxy = true;