this is the code i have
the problem is when people wappy it says one is wappied to the other but the other is available to wappy
PHP Code:
complete.php
PHP script text
<?php
define('WCS',true);
include('../core/main.inc');
header_type();
cleardata();
if(ipbanned(ip(),browser())){
if(!shield(getuid_sid($sid))){
echo head_tag("Ip Blocked!!!",0,0);
echo ipbanned_msg();
echo foot_tag();
exit();
}
}
if(!islogged($sid)){
echo head_tag("Error!!!",0,0);
echo session_expired();
echo foot_tag();
exit();
}
if(banned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo banned_msg($sid);
echo foot_tag();
exit();
}
mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
/////////////////////////SITE EXTRAS/////////////////////////
addonline(getuid_sid($sid),"The Chapel","");
echo head_tag(getnick_sid($sid)."@The Chapel",1,getnick_sid($sid));
$title="<b>Welcome To The Online Chapel!</b>";
if($type=="accepted")
{
$partner = getnick_uid($who);
mysql_query("UPDATE chapel SET complete='0', date='".time()."', open='0' WHERE partid='".getuid_sid($sid)."' AND userid='".$who."'");
$main.="<p align=\"center\"><img src=\"../images/ok.gif\" alt=\"\"/>You And $partner Are Now Wappied<br/>Congratulations";
$main.="<br/><a href=\"../main.php?sid=$sid\">Main Menu</a></p>";
}
else if($type=="rejected"){
$partner = getnick_uid($who);
$main.="<p align=\"center\"><img src=\"../images/ok.gif\" alt=\"\"/>You Have Successfully Rejected $partner's Request.";
mysql_query("DELETE FROM chapel WHERE userid='".$who."'");
$main.="<br/><a href=\"../main.php?sid=$sid\">Main Menu</a></p>";
}else{
$main.="<p align=\"center\"><img src=\"../images/error.gif\" alt=\"\"/>Database Error<br/>";
$main.="<br/><a href=\"./chapel.php?sid=$sid\">Back To Chapel</a></p>";
}
$L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
$L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
$L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
$L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
$L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\">Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
?>