Location: PHPKode > projects > OpenDomains > check.php
<?
// Security
	  define("opendomains", true);
	  session_start();
// include
	  include('include/config.php');
      include('include/function.php');
      include('include/mysql.php');	  
	  include("lang/".$config[lang]."/register.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['txt1'];
	$exe=$_POST['txt2'];	
	if((!ereg("^[a-zA-Z0-9\-]+$",$domain))||(!ereg("^[a-zA-Z0-9\-\.]+$",$domain))||(strlen($domain)<4)) {
			die("<script language='Javascript'>
			var p = top.document.getElementById('dv');
			p.style.visibility='hidden';
			top.document.frm.txt1.value='';
			top.document.frm.txt2.value='';	
			top.document.frm.txtreg.value='';			
			alert('".$lang["please_check_your_account"]."');
					
			</script>");
	}
	
	$reg=checkdomain($domain,$exe);
	
	if($reg==true) {
		no($lang["not_availible"]);
		?>
		<script language='Javascript'>
			var p = top.document.getElementById("dv");
			p.style.visibility='hidden';
			top.document.frm.txt1.value="";
			top.document.frm.txt2.value="";	
			top.document.frm.txtreg.value="";				
		</script>
		<? 		
		stopme();
	}
	

if(!$_POST['txtreg']) {
	if($reg==false) {
		no($lang["can_register"]);
		?>
		<script language='Javascript'>
			var p = top.document.getElementById("dv");
			p.style.visibility='visible';
		</script>
		<script  language="javascript">
		top.document.frm.txt1.value="<?=$domain?>";
		top.document.frm.txt2.value="<?=$exe?>";	
		top.document.frm.txtreg.value="<?=md5($domain."-".$exe)?>";	
		</script>
		<? 
	}
} else {
	$ireg=md5($domain."-".$exe);	
	if($ireg==$_POST['txtreg']) {
		if($_POST['txtcode']<>$_SESSION['code'])  {
			no($lang["security_error"]);
		} else {
			if($_POST['ch']=="checked") {
				// check account
			$name=kiemtra(0,$_POST['txtname'],0,5,40,$lang["please_check_your_full_name"],0);
			// check name
			if(!ereg("^[a-zA-Z0-9_\-\. ]+$",$name)) {
				no($lang["please_check_your_full_name"]);
				stopme();			
			}
						
			$email=kiemtra(0,$_POST['txtemail'],0,5,80,$lang["please_check_your_email"],0);		
			// check email 
			if(!ereg("^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9\-\.]+.[a-zA-Z0-9\-\.]+$",$email))  {
				no($lang["please_check_your_email"]);
				stopme();
			}

			
			$pass=kiemtra(0,$_POST['txtpass1'],1,6,40,$lang["please_check_your_password"],0);
			if($_POST['txtpass2']<>$_POST['txtpass1']) {
				no($lang["please_check_your_password"]);
				stopme();
			}
			// check password 
			if(!ereg("^[a-zA-Z0-9_\-\. ]+$",$pass)) {
				no($lang["please_check_your_password"]);
				stopme();			
			}			
			
			
			$title=kiemtra(0,$_POST['txttitle'],0,0,40,$lang["please_check_your_title"],0);
			$des=kiemtra(0,$_POST['txtdes'],0,0,80,$lang["please_check_your_description"],0);
			$key=kiemtra(0,$_POST['txtkey'],0,0,80,$lang["please_check_keywords"],0);
			
			$url=kiemtra(0,$_POST['txturl'],0,6,150,$lang["please_check_url"],0);					
			$fav=kiemtra(0,$_POST['txtfav'],0,0,150,$lang["please_check_fav"],0);			
			// check URL & FAV	
			$pos=strpos($url,"://");
			if(!$pos) {
				no($lang["please_check_url"]);
				stopme();
			}
			$pos=strpos($fav,"://");
			if(!$pos) {
				no($lang["please_check_fav"]);
				stopme();
			}
			
			
			$cloak=kiemtra(0,$_POST['txtcloak'],1,1,3,"Please check Cloaking Option",0);	
			
			$visit=0;
			$country=$_POST['txtcountry'];
			$date=date("Ymd");
			$online=date("Ymd");
			// Check Country
			if($country=="xx") {
				no($lang["please_check_country"]);
				stopme();
			}


			for($i=1;$i<=4;$i++) {
			 	eval("if(strtolower(\$web[config][cus".$i."require])==\"no\") {
			 	 	\$re[".$i."]=0;
				} else {
					\$re[".$i."]=1;
				}");
			}
			
			$cus1=kiemtra(0,$_POST['txtcus1'],0,$re[1],60,$lang["please_check"].$web[config][cus1]."",0);
			$cus2=kiemtra(0,$_POST['txtcus2'],0,$re[2],60,$lang["please_check"].$web[config][cus2]."",0);
			$cus3=kiemtra(0,$_POST['txtcus3'],0,$re[3],60,$lang["please_check"].$web[config][cus3]."",0);
			$cus4=kiemtra(0,$_POST['txtcus4'],0,$re[4],60,$lang["please_check"].$web[config][cus4]."",0);
			
			include("include/src_signup.php");
			
		
						
			if($web[config][active]=="none") {
				$status=1;

			} elseif($web[config][active]=="email") {
				// send mail
				$status=0;
				
			} else {
				// Only Admin Set Domains
				$status=0;
			}
			
			$ok=adddomain($domain, $exe, $url, $email, $pass, $name, $title, $des, $key, $cloak, $fav , $visit, $date, $online, $status, $country, $cus1, $cus2, $cus3, $cus4);	
			?>
			<script language="javascript">
			var p2 = top.document.getElementById("dv");
			p2.style.visibility='hidden';
			top.document.frm.txt1.value="";
			top.document.frm.txt2.value="";	
			top.document.frm.txtreg.value="";			
			</script>
			<? 
			include("lang/".$config[lang]."/email.php");			
			
			if($web[config][active]=="none") {
				// active now
				$sub=$lang[no_act_sub]." $domain.$exe";				
				$text=str_replace("[home]",$web[config][website],$lang[text]);
				$link=$web[config][website]."?act=login";
				
				$text=str_replace("[link]",$link,$text);
				$text=str_replace("[user]",$domain.".".$exe,$text);								
				$text=str_replace("[email]",$email,$text);								
				$text=str_replace("[pass]",$pass,$text);				
				
				mail($email, $sub, $text ,"From: ".$config[website]." <".$web[config][email].">\nReply-To: ".$web[config][email]."\r\nContent-Type: text/html");
								
				no($lang["congratulation_you_can_use_now"]." http://$domain.$exe");
				goto("http://$domain.$exe");
				stopme();
				
			} elseif($web[config][active]=="email") {
				// send mail active

				
				$sub=$lang[subject]." $domain.$exe";				
				$text=str_replace("[home]",$web[config][website],$lang[text]);
				$link=$web[config][website]."active.php?d=".md5($domain)."&e=".md5($exe);
				
				$text=str_replace("[link]",$link,$text);
				$text=str_replace("[user]",$domain.".".$exe,$text);								
				$text=str_replace("[email]",$email,$text);								
				$text=str_replace("[pass]",$pass,$text);				
				
				mail($email, $sub, $text ,"From: ".$config[website]." <".$web[config][email].">\nReply-To: ".$web[config][email]."\r\nContent-Type: text/html");
				
				no($lang["congratulation_please_check_mail"]);
				goto("index.php?act=index");
				stopme();
			} else {
				// Only Admin Set Domains

				
				
				// active now
				$sub=$lang[no_act_sub]." $domain.$exe";				
				$text=str_replace("[home]",$web[config][website],$lang[text]);
				$link=$web[config][website]."?act=login";
				
				$text=str_replace("[link]",$link,$text);
				$text=str_replace("[user]",$domain.".".$exe,$text);								
				$text=str_replace("[email]",$email,$text);								
				$text=str_replace("[pass]",$pass,$text);				
				
				mail($email, $sub, $text ,"From: ".$config[website]." <".$web[config][email].">\nReply-To: ".$web[config][email]."\r\nContent-Type: text/html");
				
				
				$sub=$lang[subject]." $domain.$exe";	
				$text=$lang[admin];				
				mail($web[config][email], $sub, $text ,"From: ".$config[website]." <".$web[config][email].">\nReply-To: ".$web[config][email]."\r\nContent-Type: text/html");
				no($lang["congratulation_please_wait"]);
				goto("index.php?act=index");				
				stopme();
												
			}			
						
			$_SESSION['code']=rand(10000,99999);			
			} else {
				no($lang["please_read_terms"]);
			}
		}
	} else {
		no("Hacking System !");
		stopme();
	}
}
	 include('include/close_mysql.php');
?>
Return current item: OpenDomains