Subversion Repositories ALCASAR

Rev

Rev 2297 | Rev 2304 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2297 Rev 2299
Line 222... Line 222...
222
* 	Update ALCASAR_CONF_FILE   *
222
* 	Update ALCASAR_CONF_FILE   *
223
***********************************/
223
***********************************/
224
/*******************************************
224
/*******************************************
225
*	Read ALCASAR_CONF_FILE Before     *
225
*	Read ALCASAR_CONF_FILE Before     *
226
********************************************/
226
********************************************/
227
$ouvre=fopen(CONF_FILE,"r");
227
$file_conf = fopen(CONF_FILE, 'r');
228
if ($ouvre){
228
if (!$file_conf) {
229
	while (!feof ($ouvre))
229
	exit('Error opening the file '.CONF_FILE);
230
	{
230
}
-
 
231
while (!feof($file_conf)) {
231
		$tampon = fgets($ouvre, 4096);
232
	$buffer = fgets($file_conf, 4096);
232
		if (strpos($tampon,"=")!==false){
233
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
233
			$tmp = explode("=",$tampon);
234
		$tmp = explode('=', $buffer);
234
			$conf[$tmp[0]] = $tmp[1];
235
		$conf[trim($tmp[0])] = trim($tmp[1]);
235
		}
-
 
236
	}
236
	}
237
	fclose($ouvre);
-
 
238
}
237
}
-
 
238
fclose($file_conf);
239
	
239
	
240
if(isset($_POST['dns1']) && preg_match($reg_ip,$_POST['dns1']))
240
if(isset($_POST['dns1']) && preg_match($reg_ip,$_POST['dns1']))
241
{
241
{
242
	file_put_contents(CONF_FILE, str_replace('DNS1='.$conf['DNS1'],'DNS1='.$_POST['dns1']."\n",file_get_contents(CONF_FILE)));
242
	file_put_contents(CONF_FILE, str_replace('DNS1='.$conf['DNS1'],'DNS1='.$_POST['dns1']."\n",file_get_contents(CONF_FILE)));
243
	$network_modification=1;
243
	$network_modification=1;
Line 271... Line 271...
271
}
271
}
272
 
272
 
273
/*******************************************
273
/*******************************************
274
*	Read ALCASAR_CONF_FILE Updated     *
274
*	Read ALCASAR_CONF_FILE Updated     *
275
********************************************/
275
********************************************/
276
$ouvre=fopen(CONF_FILE,"r");
276
$file_conf = fopen(CONF_FILE, 'r');
277
if ($ouvre){
277
if (!$file_conf) {
278
	while (!feof ($ouvre))
278
	exit('Error opening the file '.CONF_FILE);
279
	{
279
}
-
 
280
while (!feof($file_conf)) {
280
		$tampon = fgets($ouvre, 4096);
281
	$buffer = fgets($file_conf, 4096);
281
		if (strpos($tampon,"=")!==false){
282
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
282
			$tmp = explode("=",$tampon);
283
		$tmp = explode('=', $buffer);
283
			$conf[$tmp[0]] = $tmp[1];
284
		$conf[trim($tmp[0])] = trim($tmp[1]);
284
		}
-
 
285
	}
285
	}
286
	fclose($ouvre);
-
 
287
}
286
}
-
 
287
fclose($file_conf);
288
?>
288
?>
289
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
289
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
290
<html><!-- written by steweb57 & rexy -->
290
<html><!-- written by steweb57 & rexy -->
291
<head>
291
<head>
292
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
292
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">