Location: PHPKode > projects > RadhikaGB > radhikagb_f2505100832/add_done.php
<?php
//||_____________________RadhikaGB_____________________||//
//||---------------------------------------------------||//
//||Page ID  :  add_done.php                           ||//
//||Build ID :  2505100832                             ||//
//||Support  :  http://softacme.com/radhikagb          ||//
//||          Jai Shri RADHA RANI...                   ||//
//||---------------------------------------------------||//
?>
<?php

$browser = $_SERVER['HTTP_USER_AGENT'];
while(isset($_POST['submitted'])) {
session_start();	
			if(file_exists("content.php")){
			require_once("content.php");
			}else{
			header("location: self-help.php?error=4");
			}
			$name=mysql_real_escape_string($_POST['name']);
			$email=mysql_real_escape_string($_POST['email']);
			$comment=mysql_real_escape_string($_POST['comment']);
			$website=mysql_real_escape_string($_POST['website']);
			$public=mysql_real_escape_string($_POST['public']);

		$bws = split(",",$data[ban_words]);
		$bwsc = count($bws);
		for($i = 0; $i < $bwsc; $i++) { 
		if(stripos($comment,trim($bws[$i])) != false)
		$error['comment_ban'] = true;
		}
	function emailv($email)
		{
		   if(eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}(\.[a-zA-Z]{2,3})?(\.[a-zA-Z]{2,3})?$', $email))
			  return true;
		   else
			  return false;
		}
	if($data[req_name] == "1" ){
	if($name == "" || strlen($name) < 3){
	$error['name'] = true;}
	}
	if($data[req_email] == "1" ){
	if($email == null || (emailv($email) == false) || strlen($email) < 5)
		$error['email'] = true;
}
	if($comment == null || strlen($comment) < 5)
		$error['comment'] = true;
	if($_SESSION['security_code'] != $_POST['security_code'] || empty($_SESSION['security_code']))
		$error['security_code'] = true;
	if(isset($error)) {
		break;
	}
	unset($_SESSION['security_code']);
	$comment = str_replace("<","&lt;",$_POST['comment']);
	$comment = str_replace(">","&gt;",$comment);
	if($website == "http://")
	$website = null;
	else
	$website = $website;
$website = str_replace("http://","",$website);
if($data[auto_post] == "1")
{$allow="1";
}else{$allow="0";}
$date=time();
$IPS	 = $_SERVER["REMOTE_ADDR"]; 
if($public =="1"){
mysql_query ("INSERT INTO guestbook (name, email, website, comment, ip, date, allow, browser) VALUES ('$name', '$email', '$website','$comment', '$IPS', '$date', '$allow','$browser')");
}else{
mysql_query ("INSERT INTO admin_messages (name, email, website, comment, ip, date, browser) VALUES ('$name', '$email', '$website','$comment', '$IPS', '$date', '$browser')");
}
$done_okay=true;
break;
}
?>
<?php
if(isset($error)) {
echo"<img src=\"admin/data/err.png\"><font face=\"arial\" size=\"2\">$error1<br />";
		}
?>
<style type="text/css">
.b1, .b2, .b3, .b4{font-size:1px; overflow:hidden; display:block;}
.b1 {height:1px; background:#888; margin:0 5px; }
.b2 {height:1px; background:#EFEFEF; border-right:2px solid #888; border-left:2px solid #888; margin:0 3px;}
.b3 {height:1px; background:#EFEFEF; border-right:1px solid #888; border-left:1px solid #888; margin:0 2px;}
.b4 {height:2px; background:#EFEFEF; border-right:1px solid #888; border-left:1px solid #888; margin:0 1px;}
.contentb {background: #EFEFEF; border-right:1px solid #888; text-align:left; border-left:1px solid #888; }
.contentb div {margin-left: 5px; }
</style>
<div id="oops">
<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
<div class="contentb">
<?php
	if($done_okay==true){
	echo"<img src=\"admin/data/okay.png\"><font face=\"arial\">$done_lang</font>";}
	if($error['name']){
	echo"$error2<br>";
	}if($error['email']){
	echo"$error3<br>";
	}if($error['comment']){
	echo"$error4<br>";
	}if($error['security_code']){
	echo"$error5<br>";
	}if($error['comment_ban']){
	echo"$error6";
	}
	mysql_close();
?>
</div>
<b class="b4"></b><b class="b3"></b><b class="b2"></b><b class="b1"></b>
Return current item: RadhikaGB