This is in index.php
/////////////////////////////////viewuser profile
else if($action=="viewuser")
{
$whonick = getnick_uid($who);
addonline(getuid_sid($sid),"Viewing $whonick's Profile","");
$pstyle = gettheme($sid);
echo xhtmlhead($whonick." Profile",$pstyle);
echo "<p align=\"center\">";
if($who==""||$who==0)
{
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$whonick = getnick_uid($who);
if($whonick!="")
{
echo "$whonick's Profile
";
include("popups.php");
echo "";
echo "<a href=\"inbox.php?action=sendpm&who=$who&si d=$sid\">Send PM</a>
";
echo "<a href=\"lists.php?action=sendto&who=$who&si d=$sid\">Send PoP Up MSG</a>
";
if(cansee(getuid_sid($sid), $who))
{
$unol = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$who."'"));
if($unol[0]!="")
{
echo "Last Penalty Reason: $unol[0]
";
}
$unol = mysql_fetch_array(mysql_query("SELECT lastplreas FROM ibwf_users WHERE id='".$who."'"));
if($unol[0]!="")
{
echo "Last Credits Reason: $unol[0]
";
}
}
$uid = getuid_sid($sid);
if(budres($uid, $who)==0)
{
echo "<a href=\"genproc.php?action=bud&who=$who&sid =$sid&todo=add\">Add to buddy list</a>
";
}else if(budres($uid, $who)==1)
{
echo "Buddy request in the queue
";
}else if(budres($uid, $who)==2)
{
echo "<a href=\"genproc.php?action=bud&who=$who&sid =$sid&todo=del\">Remove From buddy list</a>
";
}
$ires = ignoreres($uid, $who);
if(es==2)
{
echo "<a href=\"genproc.php?action=ign&who=$who&sid =$sid&todo=del\">Remove From Ignore list</a>
";
}else if($ires==1)
{
echo "<a href=\"genproc.php?action=ign&who=$who&sid =$sid&todo=add\">Add to Ignore list</a>
";
}
echo "<a href=\"userfun.php?action=profile&who=$who& ;sid=$sid\">Fun and Games</a>
";
$avlink = getavatar($who);
if ($avlink=="")
{
echo "
<img src=\"images/nopic.jpg\" alt=\"avatar\"/>";
}else{
echo "
<img src=\"$avlink\" alt=\"avatar\"/>";
}
echo "";
echo "</p>";
echo "
";
echo "";
echo "Member's ID: $who
";
echo "Status: ".getstatus($who)."
";
$nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location FROM ibwf_users WHERE id='".$who."'"));
$uage = getage($nopl[1]);
if($nopl[0]=='M')
{
$usex = "Male";
}else if($nopl[0]=='F'){
$usex = "Female";
}else{
$usex = "Shemale";
}
$nopl[2] = htmlspecialchars($nopl[2]);
echo "A/S/L: $uage/$usex/$nopl[2]
";
$staters2 = mysql_fetch_array(mysql_query("SELECT stats2 FROM ibwf_users WHERE id='".$who."'"));
$stats2 = parsepm($staters2[0], $sid);
echo "Online Status: $stats2
";
$staters = mysql_fetch_array(mysql_query("SELECT stats FROM ibwf_users WHERE id='".$who."'"));
$stats = parsepm($staters[0], $sid);
echo "Martial Status: $stats
";
$unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE authorid='".$who."'"));
$tlink = "<a href=\"lists.php?action=tbuid&sid=$sid&who =$who\">$unol[0]</a>";
echo "Topics: $tlink
";
$unop = mysql_fetch_array(mysql_query("SELECT posts FROM ibwf_users WHERE id='".$who."'"));
$unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE uid='".$who."'"));
$plink = "<a href=\"lists.php?action=uposts&sid=$sid&wh o=$who\">$unol[0]</a>";
echo "Posts: $plink/$unop[0]
";
$noin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."'"));
$nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE byuid='".$who."'"));
echo "PMs IN: $noin[0] - OUT: $nout[0]
";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
echo "Credits: $nopl[0]
";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$who."'"));
echo "Chat Posts: $nopl[0]
";
$nopl = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$who."'"));
echo "Battle Points: $nopl[0]
";
$judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".$who."'"));
if($judg[0]>0)
{
echo "Battle Board Judge
";
}
$nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts WHERE shouter='".$who."'"));
$nopl = mysql_fetch_array(mysql_query("SELECT shouts FROM ibwf_users WHERE id='".$who."'"));
echo "Shouts: <a href=\"lists.php?action=shouts&sid=$sid&wh o=$who\">$nout[0]</a>/$nopl[0]
";
$nopl = mysql_fetch_array(mysql_query("SELECT regdate FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("d m y-H:i:s",$nopl[0]);
echo "Joined Mostwanted: $jdt
";
$nopl = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("d m y-H:i:s",$nopl[0]);
echo "Last Active: $jdt
";
$nopl = mysql_fetch_array(mysql_query("SELECT lastvst FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("d m y-H:i:s",$nopl[0]);
echo "Last Visit: $jdt
";
$nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$who."'"));
echo "Browser: $nopl[0]
";
$langs = mysql_fetch_array(mysql_query("SELECT langz FROM ibwf_users WHERE id='".$who."'"));
$langz = parsepm($langs[0], $sid);
echo "Language: $langz
";
$nopl = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
echo "E-mail: $nopl[0]
";
$referals = mysql_fetch_array(mysql_query("SELECT referal FROM ibwf_users WHERE id='".$who."'"));
$referal = parsepm($referals[0], $sid);
echo "Mostwanted Referal: $referal
";
$nopl = mysql_fetch_array(mysql_query("SELECT site FROM ibwf_users WHERE id='".$who."'"));
$nopl[0] = strtolower($nopl[0]);
echo "Site: <a href=\"$nopl[0]\">$nopl[0]</a>
";
$nopl = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
$sign = parsepm($nopl[0], $sid);
echo "Signature: $sign
";
if(ismod(getuid_sid($sid)))
{
$uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
echo "IP:<a href=\"lists.php?action=byip&sid=$sid&who= $who\">$uipadd[0]</a>
";
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "Buddies: $nob[0]
";
}
echo "
<a href=\"uinfo.php?who=$who&sid=$sid\">More Information</a>
";
echo "<a href=\"users?$whonick\">$whonick's Personal Wap Site</a>
";
echo "";
echo "</p>";
echo "<p align=\"center\">";
$noi = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"index.php?action=viewpl&who=$who&si d=$sid\">Poll</a>
";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=ucl&who=$who&sid=$ sid\">Clubs($noi[0])</a>
";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=clm&who=$who&sid=$ sid\">Member In $noi[0] Clubs</a>
";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE bowner='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=blogs&who=$who&sid =$sid\">Blogs($noi[0])</a>
";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=vault&who=$who&sid =$sid\">Vault($noi[0])</a>
";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_gbook WHERE gbowner='".$who."'"));
echo "<a href=\"lists.php?action=gbook&who=$who&sid =$sid\">Guestbook($noi[0])</a>
";
$judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".getuid_sid($sid)."'"));
if(ismod(getuid_sid($sid))||$judg[0]>0)
{
echo "<a href=\"index.php?action=batp&who=$who&sid= $sid\">Battle Points</a>
";
}
if(ismod(getuid_sid($sid)))
{
echo "<a href=\"modcp.php?action=user&who=$who&sid= $sid&who=$who\">Mod CP</a>
";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/> Member dos not exist
";
}
$thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
$themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
echo "
<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo xhtmlfoot();
}
in core.php
/////////////////////////////////////////////Are buds?
function arebuds($uid, $tid)
{
$res = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE ((uid='".$uid."' AND tid='".$tid."') OR (uid='".$tid."' AND tid='".$uid."')) AND agreed='1'"));
if($res[0]>0)
{
return true;
}
return false;
}
//////////////////////////////////function get n. of buds
function getnbuds($uid)
{
$notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$uid."' OR tid='".$uid."') AND agreed='1'"));
return $notb[0];
}
/////////////////////////////get no. of requists
function getnreqs($uid)
{
$notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE tid='".$uid."' AND agreed='0'"));
return $notb[0];
}
/////////////////////////////get no. of online buds
function getonbuds($uid)
{
$counter =0;
$buds = mysql_query("SELECT uid, tid FROM ibwf_buddies WHERE (uid='".$uid."' OR tid='".$uid."') AND agreed='1'");
while($bud=mysql_fetch_array($buds))
{
if($bud[0]==$uid)
{
$tid = $bud[1];
}else{
$tid = $bud[0];
}
if(isonline($tid))
{
$counter++;
}
}
return $counter;
}
/////////////////////////////////////////////can bud?
function budres($uid, $tid)
{
//3 = can't bud
//2 = already buds
//1 = request pended
//0 = can bud
if($uid==$tid)
{
return 3;
}
if (arebuds($uid, $tid))
{
return 2;
}
$req = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE ((uid='".$uid."' AND tid='".$tid."') OR (uid='".$tid."' AND tid='".$uid."')) AND agreed='0'"));
if($req[0]>0)
{
return 1;
}
$notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$tid."' OR tid='".$tid."') AND agreed='1'"));
global $max_buds;
if($notb[0]>=$max_buds)
{
return 3;
}
$notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$uid."' OR tid='".$uid."') AND agreed='1'"));
global $max_buds;
if($notb[0]>=$max_buds)
{
return 3;
}
return 0;
}
////////////////////////////////////////////Get bud msg
function getbudmsg($uid)
{
$getdata = mysql_fetch_array(mysql_query("SELECT budmsg FROM ibwf_users WHERE id='".$uid."'"));
return $getdata[0];
}
The SQL
-- --------------------------------------------------------
--
-- Tabel struktuur vir tabel `ibwf_buddies`
--
CREATE TABLE `ibwf_buddies` (
`id` int(100) NOT NULL auto_increment,
`uid` int(100) NOT NULL default '0',
`tid` int(100) NOT NULL default '0',
`agreed` char(1) NOT NULL default '0',
`reqdt` int(100) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Stort data vir tabel `ibwf_buddies`
--
-- --------------------------------------------------------
What Is The Problem Here????? Is It My Host???
/////////////////////////////////viewuser profile
else if($action=="viewuser")
{
$whonick = getnick_uid($who);
addonline(getuid_sid($sid),"Viewing $whonick's Profile","");
$pstyle = gettheme($sid);
echo xhtmlhead($whonick." Profile",$pstyle);
echo "<p align=\"center\">";
if($who==""||$who==0)
{
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$whonick = getnick_uid($who);
if($whonick!="")
{
echo "$whonick's Profile
";
include("popups.php");
echo "";
echo "<a href=\"inbox.php?action=sendpm&who=$who&si d=$sid\">Send PM</a>
";
echo "<a href=\"lists.php?action=sendto&who=$who&si d=$sid\">Send PoP Up MSG</a>
";
if(cansee(getuid_sid($sid), $who))
{
$unol = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$who."'"));
if($unol[0]!="")
{
echo "Last Penalty Reason: $unol[0]
";
}
$unol = mysql_fetch_array(mysql_query("SELECT lastplreas FROM ibwf_users WHERE id='".$who."'"));
if($unol[0]!="")
{
echo "Last Credits Reason: $unol[0]
";
}
}
$uid = getuid_sid($sid);
if(budres($uid, $who)==0)
{
echo "<a href=\"genproc.php?action=bud&who=$who&sid =$sid&todo=add\">Add to buddy list</a>
";
}else if(budres($uid, $who)==1)
{
echo "Buddy request in the queue
";
}else if(budres($uid, $who)==2)
{
echo "<a href=\"genproc.php?action=bud&who=$who&sid =$sid&todo=del\">Remove From buddy list</a>
";
}
$ires = ignoreres($uid, $who);
if(es==2)
{
echo "<a href=\"genproc.php?action=ign&who=$who&sid =$sid&todo=del\">Remove From Ignore list</a>
";
}else if($ires==1)
{
echo "<a href=\"genproc.php?action=ign&who=$who&sid =$sid&todo=add\">Add to Ignore list</a>
";
}
echo "<a href=\"userfun.php?action=profile&who=$who& ;sid=$sid\">Fun and Games</a>
";
$avlink = getavatar($who);
if ($avlink=="")
{
echo "
<img src=\"images/nopic.jpg\" alt=\"avatar\"/>";
}else{
echo "
<img src=\"$avlink\" alt=\"avatar\"/>";
}
echo "";
echo "</p>";
echo "
";
echo "";
echo "Member's ID: $who
";
echo "Status: ".getstatus($who)."
";
$nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location FROM ibwf_users WHERE id='".$who."'"));
$uage = getage($nopl[1]);
if($nopl[0]=='M')
{
$usex = "Male";
}else if($nopl[0]=='F'){
$usex = "Female";
}else{
$usex = "Shemale";
}
$nopl[2] = htmlspecialchars($nopl[2]);
echo "A/S/L: $uage/$usex/$nopl[2]
";
$staters2 = mysql_fetch_array(mysql_query("SELECT stats2 FROM ibwf_users WHERE id='".$who."'"));
$stats2 = parsepm($staters2[0], $sid);
echo "Online Status: $stats2
";
$staters = mysql_fetch_array(mysql_query("SELECT stats FROM ibwf_users WHERE id='".$who."'"));
$stats = parsepm($staters[0], $sid);
echo "Martial Status: $stats
";
$unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE authorid='".$who."'"));
$tlink = "<a href=\"lists.php?action=tbuid&sid=$sid&who =$who\">$unol[0]</a>";
echo "Topics: $tlink
";
$unop = mysql_fetch_array(mysql_query("SELECT posts FROM ibwf_users WHERE id='".$who."'"));
$unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE uid='".$who."'"));
$plink = "<a href=\"lists.php?action=uposts&sid=$sid&wh o=$who\">$unol[0]</a>";
echo "Posts: $plink/$unop[0]
";
$noin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."'"));
$nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE byuid='".$who."'"));
echo "PMs IN: $noin[0] - OUT: $nout[0]
";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
echo "Credits: $nopl[0]
";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$who."'"));
echo "Chat Posts: $nopl[0]
";
$nopl = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$who."'"));
echo "Battle Points: $nopl[0]
";
$judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".$who."'"));
if($judg[0]>0)
{
echo "Battle Board Judge
";
}
$nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts WHERE shouter='".$who."'"));
$nopl = mysql_fetch_array(mysql_query("SELECT shouts FROM ibwf_users WHERE id='".$who."'"));
echo "Shouts: <a href=\"lists.php?action=shouts&sid=$sid&wh o=$who\">$nout[0]</a>/$nopl[0]
";
$nopl = mysql_fetch_array(mysql_query("SELECT regdate FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("d m y-H:i:s",$nopl[0]);
echo "Joined Mostwanted: $jdt
";
$nopl = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("d m y-H:i:s",$nopl[0]);
echo "Last Active: $jdt
";
$nopl = mysql_fetch_array(mysql_query("SELECT lastvst FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("d m y-H:i:s",$nopl[0]);
echo "Last Visit: $jdt
";
$nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$who."'"));
echo "Browser: $nopl[0]
";
$langs = mysql_fetch_array(mysql_query("SELECT langz FROM ibwf_users WHERE id='".$who."'"));
$langz = parsepm($langs[0], $sid);
echo "Language: $langz
";
$nopl = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
echo "E-mail: $nopl[0]
";
$referals = mysql_fetch_array(mysql_query("SELECT referal FROM ibwf_users WHERE id='".$who."'"));
$referal = parsepm($referals[0], $sid);
echo "Mostwanted Referal: $referal
";
$nopl = mysql_fetch_array(mysql_query("SELECT site FROM ibwf_users WHERE id='".$who."'"));
$nopl[0] = strtolower($nopl[0]);
echo "Site: <a href=\"$nopl[0]\">$nopl[0]</a>
";
$nopl = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
$sign = parsepm($nopl[0], $sid);
echo "Signature: $sign
";
if(ismod(getuid_sid($sid)))
{
$uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
echo "IP:<a href=\"lists.php?action=byip&sid=$sid&who= $who\">$uipadd[0]</a>
";
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "Buddies: $nob[0]
";
}
echo "
<a href=\"uinfo.php?who=$who&sid=$sid\">More Information</a>
";
echo "<a href=\"users?$whonick\">$whonick's Personal Wap Site</a>
";
echo "";
echo "</p>";
echo "<p align=\"center\">";
$noi = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"index.php?action=viewpl&who=$who&si d=$sid\">Poll</a>
";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=ucl&who=$who&sid=$ sid\">Clubs($noi[0])</a>
";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=clm&who=$who&sid=$ sid\">Member In $noi[0] Clubs</a>
";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE bowner='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=blogs&who=$who&sid =$sid\">Blogs($noi[0])</a>
";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=vault&who=$who&sid =$sid\">Vault($noi[0])</a>
";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_gbook WHERE gbowner='".$who."'"));
echo "<a href=\"lists.php?action=gbook&who=$who&sid =$sid\">Guestbook($noi[0])</a>
";
$judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".getuid_sid($sid)."'"));
if(ismod(getuid_sid($sid))||$judg[0]>0)
{
echo "<a href=\"index.php?action=batp&who=$who&sid= $sid\">Battle Points</a>
";
}
if(ismod(getuid_sid($sid)))
{
echo "<a href=\"modcp.php?action=user&who=$who&sid= $sid&who=$who\">Mod CP</a>
";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/> Member dos not exist
";
}
$thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
$themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
echo "
<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo xhtmlfoot();
}
in core.php
/////////////////////////////////////////////Are buds?
function arebuds($uid, $tid)
{
$res = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE ((uid='".$uid."' AND tid='".$tid."') OR (uid='".$tid."' AND tid='".$uid."')) AND agreed='1'"));
if($res[0]>0)
{
return true;
}
return false;
}
//////////////////////////////////function get n. of buds
function getnbuds($uid)
{
$notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$uid."' OR tid='".$uid."') AND agreed='1'"));
return $notb[0];
}
/////////////////////////////get no. of requists
function getnreqs($uid)
{
$notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE tid='".$uid."' AND agreed='0'"));
return $notb[0];
}
/////////////////////////////get no. of online buds
function getonbuds($uid)
{
$counter =0;
$buds = mysql_query("SELECT uid, tid FROM ibwf_buddies WHERE (uid='".$uid."' OR tid='".$uid."') AND agreed='1'");
while($bud=mysql_fetch_array($buds))
{
if($bud[0]==$uid)
{
$tid = $bud[1];
}else{
$tid = $bud[0];
}
if(isonline($tid))
{
$counter++;
}
}
return $counter;
}
/////////////////////////////////////////////can bud?
function budres($uid, $tid)
{
//3 = can't bud
//2 = already buds
//1 = request pended
//0 = can bud
if($uid==$tid)
{
return 3;
}
if (arebuds($uid, $tid))
{
return 2;
}
$req = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE ((uid='".$uid."' AND tid='".$tid."') OR (uid='".$tid."' AND tid='".$uid."')) AND agreed='0'"));
if($req[0]>0)
{
return 1;
}
$notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$tid."' OR tid='".$tid."') AND agreed='1'"));
global $max_buds;
if($notb[0]>=$max_buds)
{
return 3;
}
$notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$uid."' OR tid='".$uid."') AND agreed='1'"));
global $max_buds;
if($notb[0]>=$max_buds)
{
return 3;
}
return 0;
}
////////////////////////////////////////////Get bud msg
function getbudmsg($uid)
{
$getdata = mysql_fetch_array(mysql_query("SELECT budmsg FROM ibwf_users WHERE id='".$uid."'"));
return $getdata[0];
}
The SQL
-- --------------------------------------------------------
--
-- Tabel struktuur vir tabel `ibwf_buddies`
--
CREATE TABLE `ibwf_buddies` (
`id` int(100) NOT NULL auto_increment,
`uid` int(100) NOT NULL default '0',
`tid` int(100) NOT NULL default '0',
`agreed` char(1) NOT NULL default '0',
`reqdt` int(100) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Stort data vir tabel `ibwf_buddies`
--
-- --------------------------------------------------------
What Is The Problem Here????? Is It My Host???
Comment