Location: PHPKode > projects > Free Blog Creator > freeblog/config.php
<?php
require("header.php");
?>
Menu &gt; Blog settings<br><br><br>
<?php
if(!$_POST["edit"]){

$Log=@file("./log/basic.cgi");
$line=explode(",",$Log[0]);
$url=$line[0];
$url2=$line[1];
$daytime=$line[2];
$blogname=$line[3];
$status=$line[4];
$comment=$line[5];
$trackback=$line[6];
$send=$line[7];
if($url2==""){
$url2= str_replace(basename(__FILE__),"",'http://'.$_SERVER["HTTP_HOST"].$_SERVER[PHP_SELF])."";
}
if($daytime==""){
$daytime="-7";
}
$send=str_replace("<br />","\n",$send);

}
?>



<?php
if($_POST["edit"]){
$url=$_POST["url"];
$url2=$_POST["url2"];
$daytime=$_POST["daytime"];
$blogname=$_POST["blogname"];
$status=$_POST["status"];
$comment=$_POST["comment"];
$trackback=$_POST["trackback"];
$send=$_POST["send"];
}
?>

<?php
if($_POST["edit"]){

$send = strip_tags($send);
$send = preg_replace("/[\n\r]$/","", $send);
$send=nl2br($send);
$send=str_replace("\n","",$send);
$send=str_replace("\r","",$send);


$lines=array("$url","$url2","$daytime","$blogname","$status","$comment","$trackback","$send","1");
$lines=implode(",",$lines);
$lines=$lines."\n";


$fp=fopen("./log/basic.cgi","w");
fputs($fp,$lines);	
fclose($fp);


$send=str_replace("<br />","\n",$send);

print "Saved<br>";
}
?>

<table width='450' border='0' cellspacing='1' bgcolor='#BBBBBB'>
<form action="" method="POST">
<tr><td align='left' bgcolor='#ffffff' width='30%'>&nbsp;<b>URL to the online Page</b></td><td bgcolor='#FFFFFF'><input size="30" type="text" name="url" value="<?=$url?>"></input><br />
Full absolute URL to file that contains<br />
&lt;?require &quot;<?=dirname(__FILE__)?>/entry.php&quot;;?&gt;.<br />
Example: http://www.yoursite.com/pageyouwishtodisplay.php
</td></tr>
<tr><td align='left' bgcolor='#ffffff' width='30%'>&nbsp;<b>URL to Root Directory</b></td><td bgcolor='#FFFFFF'><input size="30" type="text" name="url2" value="<?=$url2?>"></input><br />
The directory where the script is installed on the server.<br />
</td></tr>
<tr><td align='left' bgcolor='#ffffff' width='30%'>&nbsp;<b>Time zone</b></td><td bgcolor='#FFFFFF'>
<select name="daytime">
<?php
$a=array ( "-12", "-11", "-10", "-9", "-8", "-7", "-6", "-5", "-4", "-3", "-2", "-1", "0", "+1", "+2", "+3", "+4", "+5", "+6", "+7", "+8", "+9", "+10", "+11", "+12" );
foreach($a as $key => $val){
$Selected="";
if($daytime=="$val"){
$Selected="selected";
}
echo " <option value='$val' $Selected>$val</option>";
}
?>
</select>
</td></tr>
<tr><td align='left' bgcolor='#ffffff' width='30%'>&nbsp;<b>Blog name</b></td><td bgcolor='#FFFFFF'><input size='30' type='text' name='blogname' value='<?=$blogname?>'></input></td></tr>

<tr><td align='left' bgcolor='#ffffff' width='30%'>&nbsp;<b>Post type</b></td><td bgcolor='#ffffff'>
<select name="status">
<?php
if(($status==2) || ($status=='')){
$statusSelected1="selected";
}
else{
$statusSelected0="selected";
}
?>
<option value="1" <?=$statusSelected0?>>Draft</option>
<option value="2" <?=$statusSelected1?>>Public</option>
</select>
</td></tr>
<tr><td align='left' bgcolor='#ffffff' width='30%'>&nbsp;<b>Comments</b></td><td bgcolor='#ffffff'>
<select name="comment">
<?php
if(($comment==1) || ($comment=='')){
$commentSelected1="selected";
}
else{
$commentSelected0="selected";
}
?>
<option value="1" <?=$commentSelected1?>>Accept</option>
<option value="0" <?=$commentSelected0?>>Not accept</option>
</select>
</td></tr>
<tr><td align='left' bgcolor='#ffffff' width='30%'>&nbsp;<b>Trackbacks</b></td><td bgcolor='#ffffff'>
<select name="trackback">
<?php
if(($trackback==1) || ($trackback=='')){
$trackbackSelected1="selected";
}
else{
$trackbackSelected0="selected";
}
?>
<option value="1" <?=$trackbackSelected1?>>Accept</option>
<option value="0" <?=$trackbackSelected0?>>Not accept</option>
</select>
</td></tr>

<tr><td align='left' bgcolor='#ffffff' width='30%'>&nbsp;<b>Ping address list</b></td><td bgcolor='#ffffff'>
<textarea name="send" rows ="40" cols="40" style="height:3em;margin-bottom:1px;overflow:visible;ime-mode:disabled;"><?=$send?></textarea>
</td></tr>
</table>
Use line break for each URL.<br>
Examples of ping address list<br>
http://ping.com/</br>
http://ping2.com/

<table width='450'>
<tr><td align='center'><br><div class="submit"><input type="submit" name="edit" value="Save"></div></form></td></tr>
</table>






<?php
require("footer.php");
?>
Return current item: Free Blog Creator