Location: PHPKode > projects > OpenDomains > include/function.php
<?
if(define("opendomains", false)) die("Hacking System");
function alert($text) {
	echo "
	<script language='Javascript'>
	alert(\"".$text."\");
	</script>
	";
	}
function exedns() {
 	$query=mysql_query("select * from cl_exe where 1 order by 'exe' asc");
 	$html="";
 	while($ht=mysql_fetch_array($query)) {
 		$html .= "<option value='$ht[exe]'>$ht[exe]</option>";
 		}
 	return $html;
	}
function checkdomain($domain,$exe) {
 	$query=mysql_query("select * from cl_domains where wdomain='$domain' and wexe='$exe';");
 	$ht=mysql_fetch_array($query);
 	if($ht[id]) {
		return true;
 		}
 		else {
 		return false;
 		}
	}
function fillter($text,$full) { $i=0;
    $black[$i]="`";$i++;    
    $black[$i]="\"";$i++;
    $black[$i]="`";$i++;
    $black[$i]="\`";$i++;
    $black[$i]="#";$i++;
	$black[$i]="\$";$i++;	
	$black[$i]="\\";$i++;	
	    
    	if($full==1) {
    		$black[$i]="@";$i++;
    		$black[$i]=".";$i++;
    	}
		
    $error=true;$j=$i-1;
    for($i=0;$i<=$j;$i++) {
    	$pos=strpos($text,$black[$i]);
    	if($pos)
    		$error=false;
    	}
    return $error;
	}
function whois($domain) {

	}
function goto($url) {
	echo "
	<script language='Javascript'>
	";
	if($url<>-1) {
		echo "
		top.location='$url';
		";
	}else {
		echo "
		window.history.go(-1);
		";
		}
	echo "
	</script>
	";
	die("");
	}
function kiemtra($back,$text,$full,$min,$max,$l1,$l2) {
		$len=strlen($text);
		$text=str_replace("'","",$text);
		$text=str_replace("\\","",$text);		
		$text=str_replace("\"","",$text);		
		$text=str_replace("#","",$text);		
		$text=str_replace("\$","",$text);		
		$text=str_replace("`","",$text);
		$text=str_replace("%","",$text);						
		$text=str_replace("&","",$text);		
		$text=str_replace("*","",$text);		
			if($full<>0) {
				$text=str_replace(";","",$text);
				$text=str_replace("(","",$text);				
				$text=str_replace(")","",$text);				
				$text=str_replace("/","",$text);				
			}
		// min / max
		if($l2<>0) { } else {
			$l2=" ~ Min: $min -> Max: $max";
		}
		$error=false;
		if(($len<$min)||($len>$max)) {
			$error=true;
			alert($l1." ".$l2);
		}
		if(($back==1)and($error==true)) {
			goto(-1);
			die("");
			exit;
			} else if($error==true) {
			die("");
			exit;
		}
		if($error==false) {
		// return $text
			return $text;
		}
  }
function status($num) {
	switch ($num) {
		case 0:
		return "Waiting";
		break;
		case 1:
		return "Active";
		break;
		case 2:
		return "Suppended";
		break;
	}
}

function zip($file) {
	$file_php = "";
	$version = "opendomains2";
	if ($version % 2 == 1) { 
		$version .= $version{0};
	}
	for ($i=0; $i < strlen($file); $i++) { 
		$file_php .= sprintf("%02X", hexdec(substr($version, 2*$i % strlen($version), 2)) ^ ord($file{$i}));
	}
	return $file_php;

} 

function stopme() {
	
	die ("<script language='Javascript'>
	window.location='blank.php';
	</script>");
	exit;
}
function getnumber() {
	$query=mysql_query("select id from `cl_domains` where 1");
	$total=mysql_num_rows($query);
	return $total;
}

function tdate($date) {
	$y=substr($date,0,4);
	$m=substr($date,4,2);
	$d=substr($date,6,2);
	return "$m/$d/$y";
}

function mini_top() {
	$query=mysql_query("select wdomain,wexe,wvisit from `cl_domains` where 1 order by `wvisit` DESC limit 0,10");
	$dem=0;
	$html="<table width=95% cellspacing=0 cellpadding=2 class='tbox1'> ";
	while($ht=mysql_fetch_array($query)) {
	$dem++;
	if($dem<=3) {
		$col="red"; 
	} elseif($dem<=6) {
		$col="blue";
	} else {
		$col="black";
	}
		$html.= "<tr><td width=1 class='tbox1' align=right >$dem.</td><td align=left class='tbox1'><a href='?act=top' target='_blank'><font color=$col >http://".substr($ht[wdomain].".".$ht[wexe],0,25)."</font></a></td></tr>";
	}
	$html.="</table>";
	return $html;
}

?>
Return current item: OpenDomains