Lavalair/ravingwap Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Lavalair/ravingwap Help

    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&#39;s Profile
    ";
    include("popups.php");
    echo "";
    echo "<a href=\"inbox.php?action=sendpm&amp;who=$who&amp;si d=$sid\">Send PM</a>

    ";
    echo "<a href=\"lists.php?action=sendto&amp;who=$who&amp;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=&#39;".$who."&#39;"));
    if($unol[0]!="")
    {
    echo "Last Penalty Reason: $unol[0]
    ";
    }
    $unol = mysql_fetch_array(mysql_query("SELECT lastplreas FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    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&amp;who=$who&amp;sid =$sid&amp;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&amp;who=$who&amp;sid =$sid&amp;todo=del\">Remove From buddy list</a>
    ";
    }
    $ires = ignoreres($uid, $who);
    if(es==2)
    {
    echo "<a href=\"genproc.php?action=ign&amp;who=$who&amp;sid =$sid&amp;todo=del\">Remove From Ignore list</a>
    ";
    }else if($ires==1)
    {
    echo "<a href=\"genproc.php?action=ign&amp;who=$who&amp;sid =$sid&amp;todo=add\">Add to Ignore list</a>
    ";
    }
    echo "<a href=\"userfun.php?action=profile&amp;who=$who&amp ;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&#39;s ID: $who
    ";
    echo "Status: ".getstatus($who)."
    ";
    $nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    $uage = getage($nopl[1]);
    if($nopl[0]==&#39;M&#39;)
    {
    $usex = "Male";
    }else if($nopl[0]==&#39;F&#39;){
    $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=&#39;".$who."&#39;"));
    $stats2 = parsepm($staters2[0], $sid);
    echo "Online Status: $stats2
    ";
    $staters = mysql_fetch_array(mysql_query("SELECT stats FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    $stats = parsepm($staters[0], $sid);
    echo "Martial Status: $stats
    ";
    $unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE authorid=&#39;".$who."&#39;"));
    $tlink = "<a href=\"lists.php?action=tbuid&amp;sid=$sid&amp;who =$who\">$unol[0]</a>";
    echo "Topics: $tlink
    ";
    $unop = mysql_fetch_array(mysql_query("SELECT posts FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    $unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE uid=&#39;".$who."&#39;"));
    $plink = "<a href=\"lists.php?action=uposts&amp;sid=$sid&amp;wh o=$who\">$unol[0]</a>";
    echo "Posts: $plink/$unop[0]
    ";
    $noin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid=&#39;".$who."&#39;"));
    $nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE byuid=&#39;".$who."&#39;"));
    echo "PMs IN: $noin[0] - OUT: $nout[0]
    ";
    $nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    echo "Credits: $nopl[0]
    ";
    $nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    echo "Chat Posts: $nopl[0]
    ";
    $nopl = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    echo "Battle Points: $nopl[0]
    ";
    $judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid=&#39;".$who."&#39;"));
    if($judg[0]>0)
    {
    echo "Battle Board Judge
    ";
    }
    $nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts WHERE shouter=&#39;".$who."&#39;"));
    $nopl = mysql_fetch_array(mysql_query("SELECT shouts FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    echo "Shouts: <a href=\"lists.php?action=shouts&amp;sid=$sid&amp;wh o=$who\">$nout[0]</a>/$nopl[0]
    ";
    $nopl = mysql_fetch_array(mysql_query("SELECT regdate FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    $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=&#39;".$who."&#39;"));
    $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=&#39;".$who."&#39;"));
    $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=&#39;".$who."&#39;"));
    echo "Browser: $nopl[0]
    ";
    $langs = mysql_fetch_array(mysql_query("SELECT langz FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    $langz = parsepm($langs[0], $sid);
    echo "Language: $langz
    ";
    $nopl = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    echo "E-mail: $nopl[0]
    ";
    $referals = mysql_fetch_array(mysql_query("SELECT referal FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    $referal = parsepm($referals[0], $sid);
    echo "Mostwanted Referal: $referal
    ";
    $nopl = mysql_fetch_array(mysql_query("SELECT site FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    $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=&#39;".$who."&#39;"));
    $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=&#39;".$who."&#39;"));
    echo "IP:<a href=\"lists.php?action=byip&amp;sid=$sid&amp;who= $who\">$uipadd[0]</a>
    ";
    $nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid=&#39;".$who."&#39; OR tid=&#39;".$who."&#39;) AND agreed=&#39;1&#39;"));
    echo "Buddies: $nob[0]
    ";
    }
    echo "
    <a href=\"uinfo.php?who=$who&amp;sid=$sid\">More Information</a>
    ";
    echo "<a href=\"users?$whonick\">$whonick&#39;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=&#39;".$who."&#39;"));
    if($noi[0]>0)
    {
    echo "<a href=\"index.php?action=viewpl&amp;who=$who&amp;si d=$sid\">Poll</a>
    ";
    }
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner=&#39;".$who."&#39;"));
    if($noi[0]>0)
    {
    echo "<a href=\"lists.php?action=ucl&amp;who=$who&amp;sid=$ sid\">Clubs($noi[0])</a>
    ";
    }
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid=&#39;".$who."&#39;"));
    if($noi[0]>0)
    {
    echo "<a href=\"lists.php?action=clm&amp;who=$who&amp;sid=$ sid\">Member In $noi[0] Clubs</a>
    ";
    }
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE bowner=&#39;".$who."&#39;"));
    if($noi[0]>0)
    {
    echo "<a href=\"lists.php?action=blogs&amp;who=$who&amp;sid =$sid\">Blogs($noi[0])</a>
    ";
    }
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid=&#39;".$who."&#39;"));
    if($noi[0]>0)
    {
    echo "<a href=\"lists.php?action=vault&amp;who=$who&amp;sid =$sid\">Vault($noi[0])</a>
    ";
    }
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_gbook WHERE gbowner=&#39;".$who."&#39;"));
    echo "<a href=\"lists.php?action=gbook&amp;who=$who&amp;sid =$sid\">Guestbook($noi[0])</a>
    ";
    $judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid=&#39;".getuid_sid($sid)."&#39;"));
    if(ismod(getuid_sid($sid))||$judg[0]>0)
    {
    echo "<a href=\"index.php?action=batp&amp;who=$who&amp;sid= $sid\">Battle Points</a>
    ";
    }

    if(ismod(getuid_sid($sid)))
    {
    echo "<a href=\"modcp.php?action=user&amp;who=$who&amp;sid= $sid&amp;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=&#39;".$uid."&#39;"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id=&#39;".$thid[0]."&#39;"));
    echo "
    <a href=\"index.php?action=main&amp;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=&#39;".$uid."&#39; AND tid=&#39;".$tid."&#39;) OR (uid=&#39;".$tid."&#39; AND tid=&#39;".$uid."&#39;)) AND agreed=&#39;1&#39;"));
    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=&#39;".$uid."&#39; OR tid=&#39;".$uid."&#39;) AND agreed=&#39;1&#39;"));
    return $notb[0];
    }

    /////////////////////////////get no. of requists

    function getnreqs($uid)
    {
    $notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE tid=&#39;".$uid."&#39; AND agreed=&#39;0&#39;"));
    return $notb[0];
    }


    /////////////////////////////get no. of online buds

    function getonbuds($uid)
    {
    $counter =0;
    $buds = mysql_query("SELECT uid, tid FROM ibwf_buddies WHERE (uid=&#39;".$uid."&#39; OR tid=&#39;".$uid."&#39;) AND agreed=&#39;1&#39;");
    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&#39;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=&#39;".$uid."&#39; AND tid=&#39;".$tid."&#39;) OR (uid=&#39;".$tid."&#39; AND tid=&#39;".$uid."&#39;)) AND agreed=&#39;0&#39;"));
    if($req[0]>0)
    {
    return 1;
    }
    $notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid=&#39;".$tid."&#39; OR tid=&#39;".$tid."&#39;) AND agreed=&#39;1&#39;"));
    global $max_buds;
    if($notb[0]>=$max_buds)
    {

    return 3;
    }
    $notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid=&#39;".$uid."&#39; OR tid=&#39;".$uid."&#39;) AND agreed=&#39;1&#39;"));
    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=&#39;".$uid."&#39;"));
    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 &#39;0&#39;,
    `tid` int(100) NOT NULL default &#39;0&#39;,
    `agreed` char(1) NOT NULL default &#39;0&#39;,
    `reqdt` int(100) NOT NULL default &#39;0&#39;,
    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???

    #2
    CREATE TABLE `ibwf_buddies` (
    `id` int(100) NOT NULL auto_increment,
    `uid` int(100) NOT NULL default &#39;0&#39;,
    `tid` int(100) NOT NULL default &#39;0&#39;,
    `agreed` char(1) NOT NULL default &#39;0&#39;,
    `reqdt` int(100) NOT NULL default &#39;0&#39;,
    PRIMARY KEY (`id`)
    ) TYPE=MyISAM AUTO_INCREMENT=1 ;

    Comment

    Working...
    X