Location: PHPKode > projects > OpenDomains > sendmail.php
<?
// Security
	  define("opendomains", true);
	   session_start();	  
// include
	  include('include/config.php');
      include('include/function.php');
      include('include/mysql.php');	  
	  include("lang/".$config[lang]."/spam.php");	
	  include("lang/".$config[lang]."/contact.php");		  
	  include("lang/".$config[lang]."/register.php");	
	  include("lang/".$config[lang]."/login.php");		    
// security
if(!$_SERVER['HTTP_REFERER']) {
	header("location: http://opendomains.vnn.bz");
}
function no($text) {
	echo "<script language='Javascript'>
			alert(\"".$text."\");
			</script>";
}

?>
<script language="JavaScript"><!--
if (parent == self)
  //  top.location.href = 'http://opendomains.vnn.bz';


	
//--></script>
<?
$domain=$_POST['txtdomain'];
$name=$_POST['txtname'];
$email=$_POST['txtemail'];

	// check email 
			if(!ereg("^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9\-\.]+.[a-zA-Z0-9\-\.]+$",$email))  {
				no($lang["please_check_your_email"]);
				stopme();
			}		
	if($_GET['txt']=="spam") {	
		if(!ereg("^[a-zA-Z0-9_\-\.]+.[a-zA-Z0-9_\-\.]+$",$domain)) {
			no($lang["domain_report_error"]);
			exit;
		}			
	}

$virus=$_POST['virus'];
$spam=$_POST['spam'];
$fraud=$_POST['fraud'];
$mess=$_POST['mess'];
if(strlen($mess)<50) {
	no($lang["content_50"]);
	exit;
}
$sub=$_POST['txtsub'];

$scode=$_POST['txtcode'];
if($scode<>$_SESSION['code']) {
	no($lang["security_error"]);
	exit;
} else {
	if($_GET['txt']=="spam") {
	$sub="Report Spam: ".$sub;
	$text="Report Spam From: $name <$email> <br>
	Domain Report: $domain<br>
	Virus: $virus<br>
	Spam: $spam<br>
	Fraud: $fraud<br>
	Message: $mess<br>
	At ".date("m/d/Y H:i:s")."
";
	}
	elseif($_GET['txt']=="contact") {
	$sub="Contact: ".$sub;	
	$text="Contact From: $name <$email> <br>
	$mess <br>
	At ".date("m/d/Y H:i:s")."";
	}
	mail($web[config][email], $sub, $text ,"From: $name<$email>\nReply-To: $email\r\nContent-Type: text/html");
	
	if($_GET['txt']=="spam") {
	no($lang["spam_send"]);
	}
	elseif($_GET['txt']=="contact") {
	no($lang["contact_send"]);
	}
		
	goto("index.php?");
}
@mysql_close($sqlserver);
?>
Return current item: OpenDomains