View file wapirate/wml/head.php

File size: 5.78Kb
<?php

session_name("PHPSESSID");

session_start();

$sid = $_SESSION['pirate']; 

$oddid = $_SESSION['odd'];

include("captainsafeconfig.php");

include("captainsafecore.php");

$bcon = connectdb();

$ubr = getbrowser();

$uip = getip();

$ref = $_SERVER['HTTP_REFERER'];



//////////////////////////ban proxy

  $ip = getip();

  

  $proxy = mysql_fetch_array(mysql_query("SELECT id FROM proxys WHERE ip='".$ip."'"));

  if($proxy[0]>0){

$ran = rand(1,2);

  if($ran==1){

$link = "http://casino.win4mobile.com";

}else{

$link = "http://gameloft.4-your-mobile.co.uk";

}

    header("Location: ".$link);

    exit;

  }

  

  $numbers=explode (".",$ip);

  $code=($numbers[0] * 16777216) + ($numbers[1] * 65536) + ($numbers[2] * 256) + ($numbers[3]);    

  $lis="0";

  $user = file("data.dat");

  for($x=0;$x<sizeof($user);$x++) {

  $temp = explode(";",$user[$x]);

  $opp[$x] = "$temp[0];$temp[1];$temp[2];$temp[3];$temp[4];";

  if($code >= $temp[0] && $code <= $temp[1]) {

  $list[$lis] = $opp[$x];

  $lis++; 

  }

  }

  if(sizeof($list) != "0") {

  for ($i=0; $i<sizeof($list); $i++){

  $p=explode(';', $list[$i]);

  $cun = $p[4];

  }

  }

  $zip = getip();

$flagc =  flag($zip);

$flagc = strtolower($flagc);

$cun = strtolower($cun);

/*

//////////////////////////ban philipines

if(substr_count($cun,"philippines")>0||substr_count($flagc,"philippines")>0){

$ran = rand(1,2);

if($ran==1){

$link = "http://casino.win4mobile.com";

}else{

$link = "http://gameloft.4-your-mobile.co.uk";

}

    header("Location: ".$link);

    exit;

}

///end ban

*/





///anti sql injection 

if(isset($_GET)){foreach($_GET as $key=>$value){$_GET[$key]=delhtml($value);}} 

if(isset($_POST)){foreach($_POST as $key=>$value){$_POST[$key]=delhtml($value);}}

check_injection($sid,$uip,$ubr,$ref);

header("Content-type: text/vnd.wap.wml");

header("Cache-Control: no-store, no-cache, must-revalidate");

echo("<?xml version=\"1.0\"?>");

echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

?>

<wml>

<?php

$bcon = connectdb();

if (!$bcon){

echo "<card id=\"main\" title=\"$sitename (ERROR!)\">";

echo "<p align=\"center\">";

echo "<img src=\"images/error.gif\" alt=\"*\"/><br/>";

echo "ERROR! cannot connect to database<br/><br/>";

echo "This error usually happens when backing up the database, please be patient, The site will be up as soon as possible<br/><br/>";

echo "You can temporary use our other <a href=\"http://wapirate.mygamesonline.org/chat/index.php\">chatroom</a> while wapirate is offline<br/>";

echo "<b>THANK YOU VERY MUCH</b>";

echo "</p>";

echo "</card>";

echo "</wml>";

exit();

}

$netw = $_SERVER['HTTP_X_NETWORK_INFO'];

$action = $_GET["action"];

$page = $_GET["page"];

$who = $_GET["who"];

$uid = getuid_sid($sid);

$hvia = $HTTP_VIA;

cleardata();

$ipcheck = mysql_fetch_array(mysql_query("SELECT ipadd, browserm FROM ibwf_users WHERE id='".$uid."'"));

if(isipbanned($uip,$ubr)){

if(!isshield(getuid_sid($sid))){

echo "<card id=\"main\" title=\"$sitename\">";

echo "<p align=\"center\">";

echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";

echo "This IP address is blocked<br/>";

echo "<br/>";

echo "However we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to login, if you keep coming to this page that means you are not shielded, so come back when the IP-Ban period is over<br/><br/>";

$banto = mysql_fetch_array(mysql_query("SELECT  timeto FROM ibwf_penalties WHERE  penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));

$remain =  $banto[0] - time();

$rmsg = gettimemsg($remain);

echo "Time to unblock the IP: $rmsg<br/><br/>";

echo "</p>";

echo "<p>";

echo "UserID: <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/><br/>";

echo "Password: <input type=\"password\" name=\"logpwd\"  maxlength=\"30\"/><br/>";

echo "<anchor>LOGIN<go href=\"/xhtml/login.php\" method=\"get\">";

echo "<postfield name=\"loguid\" value=\"$(loguid)\"/>";

echo "<postfield name=\"logpwd\" value=\"$(logpwd)\"/>";

echo "</go></anchor>";

echo "</p>";

echo "</card>";

echo "</wml>";

exit();

}

}



if(($action != "") && ($action!="terms")){

$uid = getuid_sid($sid);

if(($ubr!="")&&($ubr!=$ipcheck[1])){

$not = 0;

}

    if((islogged($sid)==false)||($uid==0)||($not=="1")){

echo "<card id=\"main\" title=\"$sitename\">";

echo "<p align=\"center\">";

echo "You are not logged in<br/>";

echo "Or Your session has expired<br/><br/>";

echo "<a href=\"index.php\">Login</a>";

echo "</p>";

echo "</card>";

echo "</wml>";

exit();

}

}







//echo isbanned($uid);

if(isbanned($uid)){

echo "<card id=\"main\" title=\"$sitename\">";

echo "<p align=\"center\">";

echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";

echo "You are <b>Banned</b><br/>";

$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'"));

$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));

$remain = $banto[0]- time();

$rmsg = gettimemsg($remain);

echo "Time to finish your penalty: $rmsg<br/><br/>";

echo "Ban Reason: $banres[0]";

echo "</p>";

echo "</card>";

echo "</wml>";

exit();

}

$res = mysql_query("UPDATE ibwf_users SET hide='0', tel='".$netw."', mini='".$ope."', browserm='".$ubr."', ipadd='".$uip."', hvia='".$hvia."' WHERE id='".getuid_sid($sid)."'");

$umsg = getunreadpm(getuid_sid($sid));

$status10 = "Owner";

$status9 = "Hijacker";

$status8 = "Ultimate";

$status7 = "Unreal";

$status6 = "Master";

$status5 = "Moderator";

$status4 = "Modjunior";

$status3 = "Hooked";

$status2 = "SeaRious";

$status1 = "Apprentice";



?>