PHP Code:
<?php
/*
IrisBlaze wap forum
by Ra'ed Shabana
*/
//» »
//« «
include("config.php");
include("core.php");
//session_start();
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();
$uid = getuid_sid($sid);
$lang = mysql_fetch_array(mysql_query("SELECT lang FROM ibwf_users WHERE id='".$uid."'"));
include("language.php");
if (!$bcon)
{
echo "<card id=\"main\" title=\"$WapCult (ERROR!)\">";
echo "<p align=\"center\">";
echo "<img src=\"images/exit.gif\" alt=\"*\"/><br/>";
echo "$lang1<br/><br/>";
echo "$lang2<br/><br/>";
echo "<b>$lang3</b>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$brws = explode("/",$_SERVER['HTTP_USER_AGENT']);
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$who = $_GET["who"];
cleardata();
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_sid($sid)))
{
echo "<card id=\"main\" title=\"WapCult Calculator\">";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
echo "$lang4<br/>";
echo "<br/>";
echo "$lang5<br/><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));
//echo mysql_error();
$remain = $banto[0] - (time() + $timeadjust) ;
$rmsg = gettimemsg($remain);
echo "$lang6 $rmsg<br/><br/>";
echo "</p>";
echo "<p>";
echo "$lang7 <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/><br/>";
echo "$lang8 <input type=\"password\" name=\"logpwd\" maxlength=\"30\"/><br/>";
echo "<anchor>$lang9<go href=\"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((islogged($sid)==false)||($uid==0))
{
echo "<card id=\"main\" title=\"WapCult\">";
echo "<p align=\"center\">";
echo "$lang10<br/>";
echo "$lang11<br/><br/>";
echo "<a href=\"index.php\">$lang12</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
//echo isbanned($uid);
if(isbanned($uid))
{
echo "<card id=\"main\" title=\"WapCult Bank\">";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
echo "$lang13<br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE uid='".$uid."' AND penalty='1'"));
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
$remain = $banto[0]- (time() + $timeadjust) ;
$rmsg = gettimemsg($remain);
echo "$lang14 $rmsg<br/><br/>";
echo "$lang15 $banres[0]";
//echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");
//////////////
if($action=="main")
{
addonline(getuid_sid($sid),"WapCult Calculator","calc.php?action=main");
echo "<card id=\"main\" title=\"WapCult Bank\">";
echo "<p align=\"center\">";
$nick = getnick_sid($sid);
$who = getuid_nick($nick);
//////////////////input thingi
echo "<b><u>$nick</u> Welcome To The Worlds First Wap-Calculator</b><br/>Please Choose The Action You Want To Perform<br/>";
echo"<a href=\"calc.php?action=add&who=242&sid=$sid\">ADD</a><br/>";
echo"<a href=\"calc.php?action=sub&who=242&sid=$sid\">SUBTRACT</a><br/>";
echo"<a href=\"calc.php?action=div&who=242&sid=$sid\">DIVIDE</a><br/>";
echo"<a href=\"calc.php?action=mul&who=242&sid=$sid\">MULTIPLY</a><br/>";
//////////////////////////
echo"</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "<br/><br/><i>-plz Dont Copy Us-</i>";
echo "<br/>100% coded by: ";
echo"<a href=\"index.php?action=viewuser&who=242&sid=$sid\">TK</a><br/>";
echo"(c) WapCult.com";
echo "</p></card>";
}
else
if($action=="add")
{
addonline(getuid_sid($sid),"WapCult Calculator","calc.php?action=main");
echo "<card id=\"main\" title=\"WapCult Calculator\">";
echo "<p align=\"center\">";
$nick = getnick_sid($sid);
$who = getuid_nick($nick);
//////////////////input thingi
echo "Plese Enter The Two Numbers You Want To Add<br/>";
echo "<small>First Number:</small> <input name=\"fir\" format=\"*N\" maxlength=\"30\"/><br/>";
echo "<small>Second Number:</small> <input type=\"text\" name=\"sec\" format=\"*N\" maxlength=\"30\"/><br/>";
echo "<small><anchor>Calculate<go href=\"calc.php?action=add1&sid=$sid\" method=\"post\">";
echo "<postfield name=\"fir\" value=\"$(fir)\"/>";
echo "<postfield name=\"sec\" value=\"$(sec)\"/>";
echo "</go></anchor></small><br/><br/>";
//////////////////////////
echo"</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "<br/><br/><i>-plz Dont Copy Us-</i>";
echo "<br/>100% coded by: ";
echo"<a href=\"index.php?action=viewuser&who=242&sid=$sid\">TK</a><br/>";
echo"(c) WapCult.com";
echo "</p></card>";
}
else
if($action=="add1")
{
addonline(getuid_sid($sid),"WapCult Calculator","calc.php?action=main");
echo "<card id=\"main\" title=\"WapCult Calculator\">";
echo "<p align=\"center\">";
$fir = $_POST["fir"];
$act = $_POST["act"];
$sec = $_POST["sec"];
$total = $fir+$sec;
echo "<b>(</b>ADD<b>)</b><br/>";
echo "<b>First Number:</b> $fir<br/>";
echo "<b>Second Number:</b> $sec<br/>";
echo "<b>Total:</b> $total<br/>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "<br/><br/><i>-plz Dont Copy Us-</i>";
echo "<br/>100% coded by: ";
echo"<a href=\"index.php?action=viewuser&who=242&sid=$sid\">TK</a><br/>";
echo"(c) WapCult.com";
echo "</p></card>";
}
/////////////
else
if($action=="sub")
{
addonline(getuid_sid($sid),"WapCult Calculator","calc.php?action=main");
echo "<card id=\"main\" title=\"WapCult Calculator\">";
echo "<p align=\"center\">";
$nick = getnick_sid($sid);
$who = getuid_nick($nick);
//////////////////input thingi
echo "Plese Enter The Two Numbers You Want To Subtract<br/>";
echo "<small>First Number:</small> <input name=\"fir\" format=\"*N\" maxlength=\"30\"/><br/>";
echo "<small>Second Number:</small> <input type=\"text\" name=\"sec\" format=\"*N\" maxlength=\"30\"/><br/>";
echo "<small><anchor>Subtract<go href=\"calc.php?action=sub1&sid=$sid\" method=\"post\">";
echo "<postfield name=\"fir\" value=\"$(fir)\"/>";
echo "<postfield name=\"sec\" value=\"$(sec)\"/>";
echo "</go></anchor></small><br/><br/>";
//////////////////////////
echo"</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "<br/><br/><i>-plz Dont Copy Us-</i>";
echo "<br/>100% coded by: ";
echo"<a href=\"index.php?action=viewuser&who=242&sid=$sid\">TK</a><br/>";
echo"(c) WapCult.com";
echo "</p></card>";
}
else
if($action=="sub1")
{
addonline(getuid_sid($sid),"WapCult Calculator","calc.php?action=main");
echo "<card id=\"main\" title=\"WapCult Calculator\">";
echo "<p align=\"center\">";
$fir = $_POST["fir"];
$act = $_POST["act"];
$sec = $_POST["sec"];
$total = $fir-$sec;
echo "<b>(</b>Subtract<b>)</b><br/>";
echo "<b>First Number:</b> $fir<br/>";
echo "<b>Second Number:</b> $sec<br/>";
echo "<b>Total:</b> $total<br/>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "<br/><br/><i>-plz Dont Copy Us-</i>";
echo "<br/>100% coded by: ";
echo"<a href=\"index.php?action=viewuser&who=242&sid=$sid\">TK</a><br/>";
echo"(c) WapCult.com";
echo "</p></card>";
}
////////////////
/////////////
else
if($action=="div")
{
addonline(getuid_sid($sid),"WapCult Calculator","calc.php?action=main");
echo "<card id=\"main\" title=\"WapCult Calculator\">";
echo "<p align=\"center\">";
$nick = getnick_sid($sid);
$who = getuid_nick($nick);
//////////////////input thingi
echo "Plese Enter The Two Numbers You Want To Divide<br/>";
echo "<small>First Number:</small> <input name=\"fir\" format=\"*N\" maxlength=\"30\"/><br/>";
echo "<small>Second Number:</small> <input type=\"text\" name=\"sec\" format=\"*N\" maxlength=\"30\"/><br/>";
echo "<small><anchor>Divide<go href=\"calc.php?action=div1&sid=$sid\" method=\"post\">";
echo "<postfield name=\"fir\" value=\"$(fir)\"/>";
echo "<postfield name=\"sec\" value=\"$(sec)\"/>";
echo "</go></anchor></small><br/><br/>";
//////////////////////////
echo"</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "<br/><br/><i>-plz Dont Copy Us-</i>";
echo "<br/>100% coded by: ";
echo"<a href=\"index.php?action=viewuser&who=242&sid=$sid\">TK</a><br/>";
echo"(c) WapCult.com";
echo "</p></card>";
}
else
if($action=="div1")
{
addonline(getuid_sid($sid),"WapCult Calculator","calc.php?action=main");
echo "<card id=\"main\" title=\"WapCult Calculator\">";
echo "<p align=\"center\">";
$fir = $_POST["fir"];
$act = $_POST["act"];
$sec = $_POST["sec"];
$total = $fir/$sec;
echo "<b>(</b>DIVIDE<b>)</b><br/>";
echo "<b>First Number:</b> $fir<br/>";
echo "<b>Second Number:</b> $sec<br/>";
echo "<b>Total:</b> $total<br/>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "<br/><br/><i>-plz Dont Copy Us-</i>";
echo "<br/>100% coded by: ";
echo"<a href=\"index.php?action=viewuser&who=242&sid=$sid\">TK</a><br/>";
echo"(c) WapCult.com";
echo "</p></card>";
}
////////////////
/////////////
else
if($action=="mul")
{
addonline(getuid_sid($sid),"WapCult Calculator","calc.php?action=main");
echo "<card id=\"main\" title=\"WapCult Calculator\">";
echo "<p align=\"center\">";
$nick = getnick_sid($sid);
$who = getuid_nick($nick);
//////////////////input thingi
echo "Plese Enter The Two Numbers You Want To Multiply<br/>";
echo "<small>First Number:</small> <input name=\"fir\" format=\"*N\" maxlength=\"30\"/><br/>";
echo "<small>Second Number:</small> <input type=\"text\" name=\"sec\" format=\"*N\" maxlength=\"30\"/><br/>";
echo "<small><anchor>Multiply<go href=\"calc.php?action=mul1&sid=$sid\" method=\"post\">";
echo "<postfield name=\"fir\" value=\"$(fir)\"/>";
echo "<postfield name=\"sec\" value=\"$(sec)\"/>";
echo "</go></anchor></small><br/><br/>";
//////////////////////////
echo"</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "<br/><br/><i>-plz Dont Copy Us-</i>";
echo "<br/>100% coded by: ";
echo"<a href=\"index.php?action=viewuser&who=242&sid=$sid\">TK</a><br/>";
echo"(c) WapCult.com";
echo "</p></card>";
}
else
if($action=="mul1")
{
addonline(getuid_sid($sid),"WapCult Calculator","calc.php?action=main");
echo "<card id=\"main\" title=\"WapCult Calculator\">";
echo "<p align=\"center\">";
$fir = $_POST["fir"];
$act = $_POST["act"];
$sec = $_POST["sec"];
$total = $fir*$sec;
echo "<b>(</b>MULTIPLY<b>)</b><br/>";
echo "<b>First Number:</b> $fir<br/>";
echo "<b>Second Number:</b> $sec<br/>";
echo "<b>Total:</b> $total<br/>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "<br/><br/><i>-plz Dont Copy Us-</i>";
echo "<br/>100% coded by: ";
echo"<a href=\"index.php?action=viewuser&who=242&sid=$sid\">TK</a><br/>";
echo"(c) WapCult.com";
echo "</p></card>";
}
////////////////
//////////////
else
{
addonline(getuid_sid($sid),"Lost in Calculator","");
echo "<card id=\"main\" title=\"WapCult\">";
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=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
?></wml>
Comment