Location: PHPKode > projects > OpenDomains > update.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");	  
	  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';

function set(div,html) {
	eval("var dv = top.document.getElementById('" + div + "');");
	eval("dv.innerHTML = html;");	
}	
	
//--></script>
<?
	$reg=$_POST['txtreg'];
	$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>");
	}
	
	$isreg=checkdomain($domain,$exe);

if($isreg==true) {
	if($reg==md5($domain."-".$exe)) {
		// check current pass
			$pass=kiemtra(0,$_POST['txtpass'],1,6,40,$lang["please_check_your_password"],0);		
			// check password 
			if(!ereg("^[a-zA-Z0-9_\-\. ]+$",$pass)) {
				no($lang["please_check_your_password"]);
				stopme();			
			}		
		$query=mysql_query("select * from `cl_domains` where wdomain='$domain' and wexe='$exe' and wpass='$pass'");
		$ht=mysql_fetch_array($query);
		if($ht[id]) {
			$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();
			}
			// if set new password
			if($_POST['txtpass1']) {
				$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);	
			$country=$_POST['txtcountry'];			
			// Check Country
			if($country=="xx") {
				$country=$ht[wcountry];
			}			
									
			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_manager.php");

			// intalize 
			$visit=$ht[wvisit];
			$status=$ht[wact];							
						
			$ok=updatedomain($domain, $exe, $url, $email, $pass, $name, $title, $des, $key, $cloak, $fav, $visit, $status, $country, $cus1, $cus2, $cus3, $cus4 ,"user");

			if($ok==true) {
				no($lang["updated"]);
			?>
			<script language="javascript">
			top.document.frmlog.txtpass.value='<?=$pass?>';
			top.document.frmlog.txtpass1.value='';			
			top.document.frmlog.txtpass2.value='';						
			</script>
			<?				
			
			}else {
				no("Hacking System - Update Error !");
				exit;
			}				
									
															
		} else {
			no($lang["please_check_your_password"]);
		}					
	} else {
		no("Hacking System !");
	}
} else {
	no("Hacking System !");
}	
include('include/close_mysql.php');	
?>
Return current item: OpenDomains