File size: 5.98Kb
<?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\">";
echo "<head>";
echo "<title>$stitle</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\"/>";
echo "
<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
<meta name=\"description\" content=\"wapirate :)\">
<meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\">
";
echo "</head>";
echo "<body>";
$bcon = connectdb();
if (!$bcon)
{
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 "You can temporary use our other <a href=\"http://wapirate.madpage.com/chat/index.php\">chatroom</a> while wapirate is offline<br/>";
echo "<b>THANK YOU VERY MUCH</b>";
echo "</p>";
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);
cleardata();
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_sid($sid)))
{
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>";
exit();
}
}
if(($action != "") && ($action!="terms"))
{
$uid = getuid_sid($sid);
if((islogged($sid)==false)||($uid==0))
{
echo "<p align=\"center\">";
echo "You are not logged in<br/>";
echo "Or Your session has been expired<br/><br/>";
echo "<a href=\"index.php\">Login</a>";
echo "</p>";
exit();
}
}
//echo isbanned($uid);
if(isbanned($uid))
{
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>";
exit();
}
$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");
/////////////////////////////////////////////////main page
else if($action=="main")
{
addonline(getuid_sid($sid),"Smiley Generator","");
echo "<p align=\"center\">";
echo "<img src=\"/smilies/har.gif\" alt=\"\"/><br/>";
echo "<b><small><u>Creat Your Own Personal Smilie.</u></small></b><br/>
<small>Remember, if you want to make a space use <b>+</b> where you want the space to be.</small><br/>";
echo "</p><form action=\"smiley.php?action=create&sid=$sid\" method=\"post\">";
echo "Battle Points to exchange: <input name=\"logo\" maxlength=\"30\"/><br/>";
echo "<input type=\"submit\" value=\"Create\"/>";
echo "</form><p align=\"center\">";
echo "<br/><img src=\"/images/line.gif\" alt=\"line\"/>";
echo "<br/><a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "<br/><br/><small>© $sitename</small>";
echo "</p>";
exit();
}
/////////////////////////////////////////////////// Generated
else if($action=="create")
{
addonline(getuid_sid($sid),"Smiley Generator","");
$logo = $_POST["logo"];
echo "<p align=\"center\">";
echo "<b>Your Personal logo was created successfully!!!</b><br/>";
echo "<img src=\"http://www.smiliegenerators.com/smileyletters/image.php?s=$logo\" alt=\"$logo\"/><br/>";
echo "<a href=\"http://www.smiliegenerators.com/smileyletters/image.php?s=$logo\">Download!!</a><br/>";
echo "<br/><img src=\"/images/line.gif\" alt=\"line\"/>";
echo "<br/><a href=\"smiley.php?action=main&sid=$sid\">Back</a><br/>";
echo "<br/><a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "<br/><br/><small>© $sitename</small>";
echo "</p>";
exit();
}
else{
addonline(getuid_sid($sid),"Lost In Smiley Generator","");
echo "<p align=\"center\">";
echo "I don't know how did you get into here, but there's nothing to show<br/><br/>";
echo "<a href=\"/xhtml/index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
exit();
}
echo "</body>";
echo "</html>";
?>