Location: PHPKode > projects > OpenDomains > login.php
<?
// Security
	  define("opendomains", true);
	  session_start();	  
// include
	  include('include/config.php');
	  
      include('include/function.php');
      include('include/mysql.php');	  
	  include("lang/".$config[lang]."/login.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';
	}

function set(div,html) {
	eval("var dv = top.document.getElementById('" + div + "');");
	eval("dv.innerHTML = html;");	
}	

//--></script>
<?
	$scode=$_POST['txtcode'];
	// check login email with pass
	if(($scode)and(!$_POST['idz'])) {
	$email=kiemtra(0,$_POST['txtemail'],0,5,80,$lang["please_check_your_email"]." - Error !",0);
	$pass=kiemtra(0,$_POST['txtpass'],1,6,80,$lang["please_check_your_password"],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();
			}
			// check password 
			if(!ereg("^[a-zA-Z0-9_\-\. ]+$",$pass)) {
				no($lang["please_check_your_password"]);
				stopme();			
			}								

		
		if($scode<>$_SESSION['code']) {
			no($lang["security_error"]);
			stopme();
		}
		$query=mysql_query("select * from `cl_domains` where wemail='$email' and wpass='$pass';");
		$ht=mysql_fetch_array($query);
		if($ht[id]) {
			$query=mysql_query("select * from `cl_domains` where wemail='$email'");
			$listing="<form action='login.php' method='post' name='flog' id='flog' target='ajax'>";		
			$dem=0;
			
			while($ft=mysql_fetch_array($query)) {
				$dem++;
				if(($ht[wdomain]==$ft[wdomain])and($ht[wexe]==$ft[wexe])) {
					$chk="checked";
				} else {
					$chk=NULL;
				}
				$listing.="";
				$listing.="<input type='radio' name='idz' value='$ft[id]' $chk > $ft[wdomain].$ft[wexe] <br>";
			}
			$listing.="<b>&raquo; Password Account:</b> <input type='password' name='txtpass' value='' class='tbox2'>";
			$listing.="<b> <a href=Javascript:loginz('flog'); >[ ".$lang["login_but"]." ]</a></b>";
			$listing.="</form>";
			?>
			<script  language="javascript">	
			/*	
			var p1 = top.document.getElementById("dlog1");
			var p2 = top.document.getElementById("dlog2");				
			p1.innerHTML="Please Check 1 Account To Continue !";
			p2.innerHTML="List Account Here";
			*/
			var p = top.document.getElementById("dlog");	
			set("dlog1","<b><img src='images/img/home.png'> <?=$lang["select_to_login"]?></b>");
			set("dlog2","<?=$listing?>");								
			p.style.visibility='visible';
			</script>
			<? 
		} else {
			no($lang["please_check_your_login"]);
			stopme();
		}
		// Login with select account
	} else if($_POST['idz']) {
		// kiem tra domain & exe da login
			$idz=kiemtra(0,$_POST['idz'],1,1,20,"Hacking System",0);
			$pass=kiemtra(0,$_POST['txtpass'],1,6,80,$lang["please_check_your_password"],0);

			if(!$idz) {
				no("Hacking System !");
			} else {
				$query=mysql_query("select * from `cl_domains` where id='$idz' and wpass='$pass'");
				$ht=mysql_fetch_array($query);
				if($ht[id]) {
					$listing="";
					$listing.="<form action='update.php' method='post' target='ajax' name='frmlog' id='frmlog'>";
$listing.="<input type='hidden' name='txtreg' value='".md5($ht[wdomain]."-".$ht[wexe])."'>";
$listing.="<input type='hidden' name='txt1' value='".$ht[wdomain]."'>";
$listing.="<input type='hidden' name='txt2' value='".$ht[wexe]."'>";
$listing.="<table width='100%' cellspacing=0 cellpadding=2 border=0 >";
$listing.="<tr>";
$listing.="<td colspan=10 ><b>Account:</b> $ht[wdomain].$ht[wexe] <b>[ Status: ".status($ht[wact])." ]</b></td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ><img src='images/checkbox.png' bordre=0 height=100% ></td>";
$listing.="<td valign=center align=left width=35% >";
$listing.="<b>".$lang["full_name"]."</b>";
$listing.="</td>";
$listing.="<td align=left valign=center  >";
$listing.="<input type='text' name='txtname' value='".$ht[wname]."' class='tbox' >";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ><img src='images/checkbox.png' bordre=0 height=100% ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b>".$lang["email"]."</b>";
$listing.="</td>";
$listing.="<td align=left valign=center >";
$listing.="<input type='text' name='txtemail' value='".$ht[wemail]."' class='tbox' >";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ><img src='images/checkbox.png' bordre=0 height=100% ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b><font color=red>".$lang["c_password"]."</font></b>";
$listing.="</td>";
$listing.="<td align=left valign=center >";
$listing.="<input type='password' name='txtpass' value='".$ht[wpass]."' class='tbox' >";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ><img src='images/checkbox.png' bordre=0 height=100% ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b>".$lang["country"]." <font color=red>( $ht[wcountry] )</font></b>";
$listing.="</td>";
$listing.="<td align=left valign=center >";
include("include/country.php");
$listing.= $country;
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr>";
$listing.="<td colspan=10 >".$lang["new_pass"]."</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b><font color=green >".$lang["new_password"]."</font></b>";
$listing.="</td>";
$listing.="<td align=left valign=center >";
$listing.="<input type='password' name='txtpass1' value='' class='tbox' >";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b><font color=green >".$lang["confirm_pass"]."</font></b>";
$listing.="</td>";
$listing.="<td align=left valign=center >";
$listing.="<input type='password' name='txtpass2' value='' class='tbox' >";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr>";
$listing.="<td colspan=10 >".$lang["web_info"]."</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b>".$lang["web_title"]."</b>";
$listing.="</td>";
$listing.="<td align=left valign=center >";
$listing.="<input type='text' name='txttitle' value='".$ht[wtitle]."' class='tbox'>";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b>".$lang["web_key"]."</b>";
$listing.="</td>";
$listing.="<td align=left valign=center >";
$listing.="<input type='text' name='txtkey' value='".$ht[wkey]."' class='tbox'>";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b>".$lang["web_des"]."</b>";
$listing.="</td>";
$listing.="<td align=left valign=center >";
$listing.="<input type='text' name='txtdes' value='".$ht[wdes]."' class='tbox'>";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ><img src='images/checkbox.png' bordre=0 height=100% ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b>".$lang["target_url"]."</b>";
$listing.="</td>";
$listing.="<td align=left valign=center >";
$listing.="<input type='text' name='txturl' value='".$ht[wurl]."' class='tbox' >";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ><img src='images/checkbox.png' bordre=0 height=100% ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b>".$lang["web_cloak"]."</b>";
$listing.="</td>";
$tam=$ht[wcloak];
$ck[$tam]="selected";
$listing.="<td align=left valign=center >";
$listing.="<Select name='txtcloak'>";
$listing.="<option value='1' $ck[1] >Yes</option>";
$listing.="<option value='0' $ck[0] >No</option>";
$listing.="</Select>";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";
$listing.="<tr><td width=10 ></td>";
$listing.="<td valign=center align=left >";
$listing.="<b>".$lang["web_fav"]."</b>";
$listing.="</td>";
$listing.="<td align=left valign=center >";
$listing.="<input type='text' name='txtfav' value='".$ht[wfav]."' class='tbox'>";
$listing.="</td>";
$listing.="<td width=10 >&nbsp;</td>";
$listing.="</tr>";

$kt=0;
$addi=false;
for($i=1;$i<=4;$i++) {

	eval("if(\$web[config][cus".$i."]<>'') { \$addi=true; \$name=\$web[config][cus".$i."]; } else { \$addi=false; }");
	
	if($addi==true) {
		if($kt==0) {
	$listing.=" <tr><td colspan=10 >".$lang["add_info"]."</td></tr>";
			$kt=1;
		}
		
$listing.=" <tr><td width=10 ></td>";
$listing.="	<td valign=center align=left >";
$listing.="	<b>$name:</b>";
$listing.="	</td>";
$listing.="	<td align=left valign=center >";
$listing.="	<input type='text' name='txtcus".$i."' value='".$ht[wcus."".$i]."' class='tbox'>";
$listing.="	</td>";
$listing.="	<td width=10 >&nbsp;</td>";
$listing.="	</tr>		";

	}
	
	
}


$listing.="<tr><td width=10 ></td>";
$listing.="<td valign=center align=left >";
$listing.="</td>";
$listing.="<td align=left valign=center >";
$listing.="<b><a href=Javascript:loginz('frmlog'); >[ ".$lang["edit_but"]." ]</a></b>";
$listing.="</td><td width=10 >&nbsp;</td></tr>";
$listing.="</table></form>";
				?>
				<script language="javascript"  >
				set("dlog1","");
				set("dlog2","");				
				set("dlog3","");				
				set("dlog1","<?=$listing?>");
				</script>
				<? 
				stopme();	
				} else {
					?>
					<script language="javascript">			
				set("dlog3","");
					</script>
					<?
					no($lang["please_check_your_password"]);					
					stopme();
				}
			}
				
	} 
include('include/close_mysql.php');	
?>
Return current item: OpenDomains