File size: 11.31Kb
<?php
include("core.php");
include("config.php");
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
$addy = "wapirate.net";
$bcon = connectdb();
if (!$bcon)
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
echo "<p align=\"center\">";
echo "<img src=\"images/exit.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 "</p>";
echo "<div>$addy</div>";
echo "</body>";
echo "</html>";
exit();
}
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$who = $_GET["who"];
$wnick = getnick_uid($who);
$uid = getuid_sid($sid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
cleardata();
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_sid($sid)))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
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 best 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 "));
//echo mysql_error();
$remain = $banto[0] - time();
$rmsg = gettimemsg($remain);
echo " IP: $rmsg<br/><br/>";
echo "</p>";
echo "<p>";
echo "<form action=\"login.php\" method=\"get\">";
echo "username:<br/> <input name=\"loguid\" format=\"*x\" size=\"8\" maxlength=\"30\"/><br/>";
echo "password:<br/> <input type=\"password\" name=\"logpwd\" size=\"8\" maxlength=\"30\"/><br/>";
echo "<input type=\"submit\" value=\"login »\"/>";
echo "</form>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
echo "</html>";
exit();
}
}
//echo isbanned($uid);
if(isbanned($uid))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
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 "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
echo "</html>";
exit();
}
$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");
////////////////////////////////////////MAIN PAGE
if($action=="shop")
{
addvisitor();
addonline(getuid_sid($sid),"Shop","");
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Wapirate Shop!<br/></div>";
//saveuinfo($sid);
echo "<p align=\"center\">";
$asset = "plusses";
$plussid = mysql_fetch_array(mysql_query("SELECT gold, name FROM ibwf_users WHERE id='".$uid."'"));
Echo "<b>Welcome To Wapirate Shop</b><br/><br/> Here You Can Spend Your Hard Earned Gold To Get Special Features On Wapirate<br/>";
echo "<br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<img src=\"images/shopkeeper.jpg\" alt=\"*\"/><br/>";
echo "The Items You Can Buy Are Listed Below:</p>";
echo "<p align=\"left\">";
echo "<b>$plussid[1]</b><br/>You currently have <b>$plussid[0] </b>Gold<br/><br/>";
echo "Change your username to a new username<br/>";
echo "Cost: 50 Gold<br/>";
echo "<a href=\"shop.php?action=newname&sid=$sid&who=$plussid[1]&whoid=$uid\">Buy Now</a>";
echo "</p>";
$who = $plussid[1];
echo "<p align=\"left\">";
echo "New Status<br/>";
echo "Cost: 500 Gold<br/>";
echo "<a href=\"shop.php?action=status&sid=$sid&uid=$uid\">Buy Now</a>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
///////////////////////////////////////
else if($action=="newname")
{
addonline(getuid_sid($sid),"I Want A New Nick!","");
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>New Nick<br/></div>";
echo "<p align=\"center\">";
$who=$_GET["who"];
if(getgold(getuid_sid($sid))<50){
echo "You Currently dont have 50 Gold your name will not be changed, Exchange your plusses for gold in wapirate <a href=\"bank.php?action=bank&sid=$sid\">bank</a><br/>";
}else{
echo "Type New Name<br/><br/>";
echo "</p><form action=\"shop.php?action=newname2&sid=$sid&who=$who&uid=$uid\" method=\"post\">";
echo "Name: <input name=\"name\" maxlength=\"50\"/><br/>";
echo "<input type=\"submit\" value=\"[BUY]\"/>";
echo "</form>";
echo "<p align=\"center\">";
}
echo "<br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
////////////////////////////////////////////
else if($action=="newname2")
{
addonline(getuid_sid($sid),"Iv Ordered A New Nick!","");
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>New Nick<br/></div>";
echo "<p align=\"center\">";
$cap=407;
$ulti=1;
$rojo=10;
$name = $_POST["name"];
$plussid = mysql_fetch_array(mysql_query("SELECT gold, name FROM ibwf_users WHERE id='".$uid."'"));
$who = $plussid[1];
if(getgold(getuid_sid($sid))<50){
echo "You Currently dont have 50 Gold. your name change will not be changed, Exchange your plusses for gold in wapirate <a href=\"bank.php?action=bank&sid=$sid\">bank</a><br/>";
}else{
$remainplus = $plussid[0] - 50;
$plussupdate = mysql_query("UPDATE ibwf_users SET gold='".$remainplus."' WHERE id='".$uid."'");
$message = "[b] $who [/b]Has visited The Shop and Bought a new Name. [br/] $who would like to change their Name to [b] $name [/b][br/]Please Action This request as soon as possible.[br/][small][i]p.s: this is an automated pm[/i][/small]";
autopm($message, $cap);
autopm($message, $ulti);
autopm($message, $rojo);
echo "Your new name ($name) will be updated within the next 24 hours.<br/> Thank you for your purchase! <br/> You have $remainplus Gold remaining!";
echo "<br/>";
}
echo "</p><p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
//////////////////////////////////////////
else if($action=="status")
{
addonline(getuid_sid($sid),"I Want A New Status!","");
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>New Status<br/></div>";
echo "<p align=\"center\">";
$who=$_GET["who"];
if(getgold(getuid_sid($sid))<500){
echo "You Currently dont have 500 Gold your status will not be changed, Exchange your plusses for gold in wapirate <a href=\"bank.php?action=bank&sid=$sid\">bank</a><br/>";
}else{
echo "Type New Status<br/><br/>";
echo "</p><form action=\"shop.php?action=status2&sid=$sid&who=$who&uid=$uid\" method=\"post\">";
echo "Status: <input name=\"status\" maxlength=\"50\"/><br/>";
echo "<input type=\"submit\" value=\"[BUY]\"/>";
echo "</form>";
echo "<p align=\"center\">";
}
echo "<br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
//////////////////////////////
else if($action=="status2")
{
addonline(getuid_sid($sid),"Iv Ordered A New Status!","");
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>New Status<br/></div>";
echo "<p align=\"center\">";
$cap=407;
$ulti=1;
$rojo=10;
$status = $_POST["status"];
$plussid = mysql_fetch_array(mysql_query("SELECT gold, name FROM ibwf_users WHERE id='".$uid."'"));
$who = $plussid[1];
if(getgold(getuid_sid($sid))<500){
echo "You Currently dont have 500 Gold your status will not be changed, Exchange your plusses for gold in wapirate <a href=\"bank.php?action=bank&sid=$sid\">bank</a><br/>";
}else{
$remainplus = $plussid[0] - 500;
$plussupdate = mysql_query("UPDATE ibwf_users SET gold='".$remainplus."' WHERE id='".$uid."'");
$message = "[b] $who [/b]Has visited The Shop and Bought a new status. [br/] $who would like to change their Status to [b] $status [/b][br/]Please Action This request as soon as possible.[br/][small][i]p.s: this is an automated pm[/i][/small]";
autopm($message, $cap);
autopm($message, $ulti);
autopm($message, $rojo);
echo "Your new status ($status) will be updated within the next 24 hours.<br/> Thank you for your purchase! <br/> You have $remainplus Gold remaining!";
echo "<br/>";
}
echo "</p><p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
echo "</html>";
?>