hi folks this is shop.php page
in wapdesire
there's a bug on it..when
a user, for exemple, buy a personal avatar,
the automatic message to owner gets on
database but it shows on owner's inbox page
as a ghost message!..
you find alert 'bout new message but when you open the inbox page
you don't see nothin'
someone can help me to fix this
in wapdesire
PHP Code:
<?php
include("config.php");
include("core.php");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
//header('Content-type: application/vnd.wap.xhtml+xml');
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
$bcon = connectdb();
$sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
$sitename = $sitename[0];
if (!$bcon)
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<img src=\"../images/notok.gif\" alt=\"!\"/><br/>";
echo "<b><strong>Error! Cannot Connect To Database...</strong></b><br/><br/>";
echo "This error happens usually when backing up the database, please be patient...";
echo "</p>";
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"];
$uid = getuid_sid($sid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
cleardata();
if(($action != "") && ($action!="terms"))
{
$uid = getuid_sid($sid);
if((islogged($sid)==false)||($uid==0))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
echo "</head>";
echo "<body>";
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>";
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/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<img src=\"../images/notok.gif\" alt=\"x\"/><br/>";
echo "<b>You are Banned</b><br/><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "<b>Time Left: </b>$rmsg<br/>";
$nick = getnick_uid($banto[2]);
echo "<b>By: </b>$nick<br/>";
echo "<b>Reason: </b>$banto[1]";
//echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
$res = mysql_query("UPDATE ibwf_users SET browserm='".$brws4."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");
////////////////////////////////////////MAIN PAGE
if($action=="shop")
{
addvisitor();
addonline(getuid_sid($sid),"Shop","");
//saveuinfo($sid);
echo "<head>";
echo "<title>Shop</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$plusses = mysql_fetch_array(mysql_query("SELECT plusses, name FROM ibwf_users WHERE id='".$uid."'"));
Echo "Welcome To The Plusses Shop, Here You Can Spend Your Hard Earned Plusses To Get Special Features On Site<br/>";
echo "You Currently Have $plusses[0] Plusses";
echo "</p>";
echo "<p align=\"center\">";
echo "The Items You Can Buy Are Listed Below:</p>";
echo "<p align=\"center\">";
echo "Your Own Personal Avatar<br/>";
echo "Cost: 1000 Plusses<br/>";
echo "<b>1 </b><a accesskey=\"1\" href=\"shop.php?action=peravat&sid=$sid&who=$plusses[1]&whoid=$uid\">Buy Now</a>";
echo "</p>";
echo "<p align=\"center\">";
echo "Your Own Personal Smilie<br/>";
echo "Cost: 2000 Plusses<br/>";
echo "<b>2 </b><a accesskey=\"2\" href=\"shop.php?action=persmile&sid=$sid&who=$plusses[1]&whoid=$uid\">Buy Now</a>";
echo "</p>";
echo "<p align=\"center\">";
echo "Your Own Public Chatroom<br/>";
echo "Cost: 4000 Plusses<br/>";
echo "<b>3 </b><a accesskey=\"3\" href=\"shop.php?action=pubchat&sid=$sid&who=$plusses[1]&whoid=$uid\">Buy Now</a>";
echo "</p>";
echo "<p align=\"center\">";
echo "Your Own Forum<br/>";
echo "Cost: 5000 Plusses<br/>";
echo "<b>4 </b><a accesskey=\"4\" href=\"shop.php?action=pubforum&sid=$sid&who=$plusses[1]&whoid=$uid\">Buy Now</a>";
echo "</p>";
/*
echo "<p align=\"center\">";
echo "Your Own Status<br/>";
echo "Cost: 900 Plusses<br/>";
echo "<b>5 </b><a accesskey=\"5\" href=\"shop.php?action=perstaus?sid=$sid\">Buy Now";
echo "</p>";
*/
echo "<p align=\"center\">";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
else if($action=="peravat")
{
echo "<head>";
echo "<title>Shop</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$ownid[0]=1;
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$plusses = mysql_fetch_array(mysql_query("SELECT plusses, name FROM ibwf_users WHERE id='".$who."'"));
$remainplus = $plusses[0] - 1000;
$plussupdate = mysql_query("UPDATE ibwf_users SET plusses='".$remainplus."' WHERE id='".$who."'");
$message = "A User Has visited The Plusses Shop and Ordered a Personal Avatar, the user is ".$whoid." Please Action This request as soon as possible.[br/][small][i]p.s: this is an automated pm[/i][/small]";
autopm($message, $ownid[0]);
echo "Thank You For Choosing To Purchase Your Personal Avatar. Your Plusses Have Been Debited and your request sent to the staff for processing.<br/>";
echo "We Expect your personal avatar to be ready in 48hours or less<br/>";
echo "You Now have $remainplus Plusses Remaining<br/></p>";
echo "<p align=\"center\">";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
else if($action=="persmile")
{
echo "<head>";
echo "<title>Shop</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$ownid[0]=1;
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$plusses = mysql_fetch_array(mysql_query("SELECT plusses, name FROM ibwf_users WHERE id='".$who."'"));
$remainplus = $plusses[0] - 2000;
$plussupdate = mysql_query("UPDATE ibwf_users SET plusses='".$remainplus."' WHERE id='".$who."'");
$message = "A User Has visited The Plusses Shop and Ordered a Personal Smilie, the user is ".$whoid." Please Action This request as soon as possible.[br/][small][i]p.s: this is an automated pm[/i][/small]";
autopm($message, $ownid[0]);
echo "Thank You For Choosing To Purchase Your Personal Smilie. Your Plusses Have Been Debited and your request sent to the staff for processing.<br/>";
echo "We Expect your Personal Smilie to be ready in 48hours or less<br/>";
echo "You Now have $remainplus Plusses Remaining<br/></p>";
echo "<p align=\"center\">";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
else if($action=="pubchat")
{
echo "<head>";
echo "<title>Shop</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$ownid[0]=1;
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$plusses = mysql_fetch_array(mysql_query("SELECT plusses, name FROM ibwf_users WHERE id='".$who."'"));
$remainplus = $plusses[0] - 4000;
$plussupdate = mysql_query("UPDATE ibwf_users SET plusses='".$remainplus."' WHERE id='".$who."'");
$message = "A User Has visited The Plusses Shop and Ordered a Public Chatroom, the user is ".$whoid." Please Action This request as soon as possible.[br/][small][i]p.s: this is an automated pm[/i][/small]";
autopm($message, $ownid[0]);
echo "Thank You For Choosing To Purchase Your Own Chatroom. Your Plusses Have Been Debited and your request sent to the staff for processing.<br/>";
echo "We Expect your Room to be live within 48hours or less<br/>";
echo "You Now have $remainplus Plusses Remaining<br/></p>";
echo "<p align=\"center\">";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
else if($action=="pubforum")
{
echo "<head>";
echo "<title>Shop</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$ownid[0]=1;
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$plusses = mysql_fetch_array(mysql_query("SELECT plusses, name FROM ibwf_users WHERE id='".$who."'"));
$remainplus = $plusses[0] - 5000;
$plussupdate = mysql_query("UPDATE ibwf_users SET plusses='".$remainplus."' WHERE id='".$who."'");
$message = "A User Has visited The Plusses Shop and Ordered a Public Forum, the user is ".$whoid." Please Action This request as soon as possible.[br/][small][i]p.s: this is an automated pm[/i][/small]";
autopm($message, $ownid[0]);
echo "Thank You For Choosing To Purchase a Public Forum. Your Plusses Have Been Debited and your request sent to the staff for processing.<br/>";
echo "We Expect your forum will be live within 48hours or less<br/>";
echo "You Now have $remainplus Plusses Remaining<br/></p>";
echo "<p align=\"center\">";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
?>
</html>
a user, for exemple, buy a personal avatar,
the automatic message to owner gets on
database but it shows on owner's inbox page
as a ghost message!..
you find alert 'bout new message but when you open the inbox page
you don't see nothin'
someone can help me to fix this
Comment