Location: PHPKode > projects > PHP Enter > www/admin/index.php
<?php include('header.php'); include('options.php'); ?>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="8" bgcolor="#FFFFFF">
<tr><td><span class="cconfig"><strong>Configuration</strong></span>
</td><tr>
<tr><td width="450px">
<?php
if(isset($_POST['submit']))
{
$ccmainten = $_POST['mainten'];
$cctitle = $_POST['title'];
$ccmdesc = $_POST['mdesc'];
$cclang = $_POST['lang'];
$cctemp = $_POST['temp'];
$ccpath = $_POST['path'];
$ccrepath = $_POST['repath'];
$ccemail = $_POST['email'];
$ccintro = $_POST['intro'];
$cckeypublic = $_POST['keypublic'];
$cckeycaptcha = $_POST['keycaptcha'];
//////////
$mainten ='$config[\'mainten\']';
$rewrite ='$config[\'rewrite\']';
$title='$config[\'title\']';
$mdesc='$config[\'mdesc\']';
$lang='$config[\'lang\']';
$temp='$config[\'temp\']';
$path='$config[\'path\']';
$repath='$config[\'repath\']';
$email='$config[\'email\']';
$intro='$config[\'intro\']';
$keypublic='$config[\'keypublic\']';
$keycaptcha='$config[\'keycaptcha\']';
////////////
$myFile="options.php";
$fh = fopen($myFile, 'w') or die("can't open file- check CHMOD");
$stringData = 
"<?php
######Maintenance Mode######
$mainten = '$ccmainten';
######Friendly URL######
$rewrite = '$ccrewrite';
######WebSite Title######
$title = '$cctitle';
######WebSite Description######
$mdesc = '$ccmdesc';
######Language######
$lang = '$cclang';
######Template######
$temp = '$cctemp';
######WebSite URL######
$path = '$ccpath';
######WebSite PATH######
$repath = '$ccrepath';
######WebSite Email######
$email = '$ccemail';
######Intro Text######
$intro = '$ccintro';
######ReCaptcha Settings######
$keypublic = '$cckeypublic';
$keycaptcha = '$cckeycaptcha';
?>";
fwrite($fh, $stringData);
fclose($fh);
echo"<br /><center><font size=2 color=green>Successfully.</font></center>";
}else{
?>
<div id=vforms>
<form method="post" action="index.php">
<center>
<font color=#3A586A>Enable Maintenance Mode</font><br />
<br />
<?php
if($config['mainten'] == 1){
?>
<select style="background:#FFF6C1;" id="incc" name="mainten">
<option value='1'>- Website is in maintenance mode</option>
<option style="background:#ffffff;" value='1'>---- Maintenance mode</option>
<option style="background:#ffffff;" value='2'>------ Production mode.</option>
</select>
<?php
}
?>
<?php
if($config['mainten'] == 2){
?>
<select style="background:#EEFFE3;" id="incc" name="mainten">
<option value='2'>-- Website in production mode</option>
<option style="background:#ffffff;" value='1'>---- Maintenance mode</option>
<option style="background:#ffffff;" value='2'>------ Production mode</option>
</select>
<?php
}
?>
<br /><br />
<font color=#3A586A>Friendly URLs</font><br />
<font size="1">Requirements: Apache web server with the mod_rewrite module installed.</font>
<?php
if($config['rewrite'] == 1){
?>
<select style="background:#EEFFE3;" id="incc" name="ccrewrite">
<option value='1'>- Mod Rewrite On</option>
<option style="background:#ffffff;" value='1'>---- Yes</option>
<option style="background:#ffffff;" value='2'>------ No.</option>
</select>
<?php
}
?>
<?php
if($config['rewrite'] == 2){
?>
<select style="background:#FFF6C1;" id="incc" name="ccrewrite">
<option value='2'>-- Mod Rewrite Off</option>
<option style="background:#ffffff;" value='1'>---- Yes</option>
<option style="background:#ffffff;" value='2'>------ No</option>
</select>
<?php
}
?>
<br /><br />
<font color=#3A586A>WebSite Name</font><br /><input id="incc" type=text name="title" value="<?php echo $config['title'] ?>" size="35">
<br /><br />
<font color=#3A586A>Meta Description</font><br /><input id="incc" type=text name="mdesc" value="<?php echo $config['mdesc'] ?>" size="35">
<br /><br />
<font color=#3A586A>Language</font><br /><select id="incc" name="lang">
<option selected value="<?php echo $config['lang'] ?>"><?php echo $config['lang'] ?></option>
<option value='english'>---- English</option>
</select><br /><br />
<font color=#3A586A>Template</font><br /><select id="incc" name="temp" value="default">
<option selected value="<?php echo $config['temp'] ?>"><?php echo $config['temp'] ?></option>
<option value='default'>--- Default</option>
</select><br /><br />
<font color=#3A586A>URL (http://www.example.com or http://www.example.com/folder)</font><br /><input id="incc" type=text name="path" value="<?php echo $config['path'] ?>" size="35">
<br /><br />
<font color=#3A586A>Path e.g. <?php echo realpath('./../'); ?></font><br /><input id="incc" type=text name="repath" value="<?php echo $config['repath'] ?>" size="35">
<br /><br />
<font color=#3A586A>System Email</font><br /><input id="incc" type=text name="email" value="<?php echo $config['email'] ?>" size="35">
<br />(Admin Notification)<br /><br />
<font color=#3A586A>Intro Text</font><br /><input id="incc" type=text name="intro" value="<?php echo $config['intro'] ?>" size="35">
<br /><br />
<font color=#3A586A>Recaptcha Public Key</font><br /><input id="incc" type=text name="keypublic" value="<?php echo $config['keypublic'] ?>" size="35">
<br /><br />
<font color=#3A586A>Recaptcha Private Key:</font><br /><input id="incc" type=text name="keycaptcha" value="<?php echo $config['keycaptcha'] ?>" size="35">
<br /><br /><br />
<input type="submit" name="submit" VALUE=" Submit"><br /><br /><br /><br />
</center>
</font>
</form>
</div>
<?php
}
?>
  </td>
 </tr>
</table>
Return current item: PHP Enter