$value) {
if(($key !== 'configure') && ($key !== 'configkey')) {
$value = preg_replace('/\'/', '\\\'', $value);
$return.=' \''.$key.'\' => \''.trim($value).'\''.",\n";
}
}
$return = rtrim(rtrim($return),',');
$return.="\n];\n";
$return.='?>';
rename($configfile, $configfile.'.bak');
file_put_contents($configfile, $return);
echo '
';
echo 'New Configuration settings saved in '.$configfile.'
';
echo 'Home';
echo '';
$CONFIG = $_POST;
exit(0);
}
if ((isset($_POST["password"]) && ($_POST["password"]==$admin["password"])) && ($_POST['configkey'] == $admin['key'])) {
include($config_dir.'/scripts/setup.inc.php');
exit(0);
} else{
//Show the wrong password notice
if($_SERVER['REQUEST_METHOD'] == 'POST') {
echo '';
echo 'Password Incorrect
';
echo 'Retry Home';
echo '';
exit(0);
}
echo '';
echo '
';
}
?>