/* Security
<script language='Javascript'>
alert('Hacking System ! Anti Hacking by OpenDomains 2.0');
top.location='http://opendomains.vnn.bz';
</script>
*/<?
define("opendomains", true);
include("config.php");
$dns=str_replace("www.","",strtolower(base64_decode($_SERVER['QUERY_STRING'])));
if((!ereg("^[a-zA-Z0-9\-\.]+$",$dns))||(strlen($dns)<5))
exit;
$domain=explode(".",$dns);
$u=$domain[0];
$d=$domain[1].".".$domain[2];
$domain=$u.".".$d;
$pc=0;
$upd=0;
if($config[cache]=="yes") {
// check cache
if(!file_exists("../".$config[save]."/".$domain)) {
$pc=1;
$upd=1;
} else {
include("../".$config[save]."/".$domain);
}
} else {
$pc=1;
}
$where=" wdomain='$u' and wexe='$d' ";
if($pc==1) {
// connect
$sqlserver=mysql_connect($config[mysql][host],$config[mysql][user],$config[mysql][pass])or die("Please read install.txt - C");
mysql_select_db($config[mysql][data],$sqlserver)or die("Please read install.txt - D");
// check
$query=mysql_query("select * from `cl_domains` where ".$where." ;")or die("");
$acc=mysql_fetch_array($query);
}
if(!$acc[id]) {
// not
die("top.location='$config[url]?act=not';");
} elseif($acc[wact]<>"1") {
// suppend or not account
if($acc[wact]=="2") {
die("top.location='$config[url]?act=suppend';");
} else {
die("top.location='$config[url]?act=active';");
}
} else {
// start
include("transfer.php");
if($config[cache]=="yes") {
include("cache.php");
} else {
// update visit
$new=$acc[wvisit] + 1;
$query=mysql_query("update `cl_domains` set wvisit='$new' where ".$where.";")or die("Error update !");
}
// online update
if(($acc[wonline])<>date("Ymd")) {
if($pc==0) {
// connect
$sqlserver=mysql_connect($config[mysql][host],$config[mysql][user],$config[mysql][pass])or die("Please read install.txt - C");
mysql_select_db($config[mysql][data],$sqlserver)or die("Please read install.txt - D");
}
if($config[cache]=="yes") {
$acc[wonline]=date("Ymd");
$upd=1;
$visit=$acc[wvisit] + rand(1,20);
$visit=", wvisit='$visit'";
}
$query=mysql_query("update `cl_domains` set wonline='".date("Ymd")."' $visit where ".$where.";")or die("Error update !");
}
// end
}
if($upd==1) {
ghi($acc,"../".$config[save]);
}
if($pc==1) {
mysql_close($sqlserver);
}
?>