I want to make my other site i have when ppl go into ur profile they must only see request to be friends the user have an option to show his profile or to hide it for normal users
private Profile
Collapse
X
-
ive added this code please help me to make it work
Code://///////////////////////////////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<br/>"; echo "<small>"; $avlink = getavatar($who); if ($avlink!=""){ echo "<img src=\"$avlink\" height=\"150\" width=\"150\" alt=\"avatar\"/><br/>"; }else{ echo "<img src=\"images/nopic.jpg\" height=\"45\" width=\"45\" alt=\"avatar\"/><br/>"; } $pmoodlink = getpmood($who); if($pmoodlink=="") { echo ""; }else{ echo "<img src=\"$pmoodlink\" alt=\"$whonick\"/><br/>"; } echo "<br/>"; echo "Rating: "; echo rating($who); echo "<br/>"; if(isonline($who)) { echo "<img src=\"../images/onl.gif\" alt=\"*\"/>User is <b>ONLINE</b><br/>"; }else{ echo "<img src=\"../images/ofl.gif\" alt=\"*\"/>User is <b>OFFLINE</b><br/>"; } $plc = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$who."'")); echo "<a href=\"inbox.php?action=sendpm&who=$who&sid=$sid\">Send PM</a><br/><br/>"; 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]<br/>"; } $unol = mysql_fetch_array(mysql_query("SELECT lastplreas FROM ibwf_users WHERE id='".$who."'")); if($unol[0]!="") { echo "Last Credits Reason: $unol[0]<br/>"; } } boxstart ("Profile"); getalert($sid); $query=mysql_fetch_array( mysql_query("SELECT viewpro FROM ibwf_users WHERE id='".$who."'")); if($query=="1") { $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><br/>"; }else if(budres($uid, $who)==1) { echo "Buddy request in the queue<br/>"; }else if(budres($uid, $who)==2) { echo "<a href=\"genproc.php?action=bud&who=$who&sid=$sid&todo=del\">Remove From buddy list</a><br/>"; } $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><br/>"; }else if($ires==1) { echo "<a href=\"genproc.php?action=ign&who=$who&sid=$sid&todo=add\">Add to Ignore list</a><br/>"; } else { echo "disabled"; } } echo "<a href=\"userfun.php?action=profile&who=$who&sid=$sid\">Fun and Games</a><br/>"; if($uid==$who) { echo "<br/><b><a href=\"index.php?action=uset&sid=$sid\"> Edit My Profile </a></b><br/>"; } if(cansee(getuid_sid($sid), $who)) { echo "<a href=\"popup.php?action=send&who=$who&sid=$sid\">Send Popup PM</a><br/>"; } echo "</small>"; echo "</p>"; boxend(); boxstart("Actions"); echo "<u>Send a message to $whonick</u>:<br/>"; echo "<form action=\"inbxproc.php?action=sendpm&who=$who&sid=$sid\" method=\"post\"><textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>"; echo "<input id=\"inputButton\" type=\"submit\" value=\"Submit\"/>"; echo "</form><br/><br/>"; boxstart ("User"); echo "<p>"; echo "<small>"; echo "<div class=\"mblock1\">"; echo "<center><b><u>$lang72</u></b></center>"; echo "Member's ID: <b>$who</b><br/>"; echo "Status: <b>".getstatus($who)."</b><br/>"; $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: <b>$uage/$usex/$nopl[2]</b><br/>"; //////////////////////////////////////// boxend(); boxstart ("Location"); $uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'")); $IPaddress=$uipadd[0]; $two_letter_country_code=iptocountry($IPaddress); echo "Flag: <img src=\"flags/$two_letter_country_code.gif\" alt=\"*\" /><br/>\n"; echo "Country: <b>$two_letter_country_code</b><br/>"; $subno = mysql_fetch_array(mysql_query("SELECT subno FROM ibwf_users WHERE id='".$who."'")); echo "Network: <b>$subno[0]</b><br/>"; echo "<b>Starsign: </b>".getstarsign($nopl[1])."<br/>"; echo "</div>"; /////////////////////////////////////////////////////chapel $married=mysql_fetch_array(mysql_query("SELECT * from ibwf_married WHERE frmuid='".$who."' OR touid='".$who."'")); if($married['frmuid']==$who) { if($married['agreed']==1) { if($married['complete']==1) { $unick=getnick_uid($who); $mnick=getnick_uid($married['touid']); echo "<br/><strong>$unick is Married To $mnick</strong><br/><br/>"; } } }else{ if($married['agreed']==1) { if($married['complete']==1) { $unick=getnick_uid($who); $mnick=getnick_uid($married['frmuid']); echo "<br/><strong>$unick is Married To $mnick</strong><br/><br/>"; } } } /////////////////////////////////////// //////////////////////////////////////// boxend(); boxstart ("Stats"); echo "<div class=\"mblock1\">"; echo "<center><b><u>$lang73</u></b></center>"; $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: <b>$tlink</b><br/>"; $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&who=$who\">$unol[0]</a>"; echo "Posts: <b>$plink/$unop[0]</b><br/>"; $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: <b>$noin[0]</b> - OUT: <b>$nout[0]</b><br/>"; $plc = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$who."'")); $uact .= $plc[0]; echo "<b>Last Seen :</b> $uact<br/><br/>"; $nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'")); echo "Credits: <b>$nopl[0]</b><br/>"; $nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$who."'")); echo "Chat Posts: <b>$nopl[0]</b><br/>"; echo "<b>Total Unread PMs:</b> ".getunreadpm($who)."<br/>"; echo "<b>Unread PMs From You:</b> ".getunreadpm($who,$uid)."<br/>"; /* $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_usergallery WHERE uid='".$who."'")); echo "<a href=\"gallery2.php?action=viewuser&who=$who&sid=$sid\">Gallery ($countpics[0])</a><br/>"; */ $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE uid='".$who."'")); if($noi[0]>0) { echo "Gallery: <b><a href=\"gallery2.php?action=viewuserphoto&who=$who&sid=$sid\">$noi[0]</a></b><br/>"; } $bank = mysql_fetch_array(mysql_query("SELECT bank FROM ibwf_users WHERE id='".$who."'")); echo "<b>Plusses In Bank:</b> $bank[0]<br/>"; echo "<a href=\"index.php?action=chapel&sid=$sid\">»Propose for marriage</a><br/>"; $nopl = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$who."'")); echo "Battle Points: <b>$nopl[0]</b><br/>"; $judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".$who."'")); if($judg[0]>0) { echo "<b>Battle Board Judge</b><br/>"; } $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: <b><a href=\"lists.php?action=shouts&sid=$sid&who=$who\">$nout[0]</a>/$nopl[0]</b><br/>"; $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 M: <b>$jdt</b><br/>"; $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: <b>$jdt</b><br/>"; $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: <b>$jdt</b><br/>"; echo "</div>"; echo "<div class=\"mblock1\">"; echo "<center><b><u>$lang74</u></b></center>"; /* $totaltimeonline = mysql_fetch_array(mysql_query("SELECT tottimeonl FROM ibwf_users WHERE id='".$who."'")); $num = $totaltimeonline[0]/86400; $days = intval($num); $num2 = ($num - $days)*24; $hours = intval($num2); $num3 = ($num2 - $hours)*60; $mins = intval($num3); $num4 = ($num3 - $mins)*60; $secs = intval($num4); echo "Time Online: "; if(($days==0) and ($hours==0) and ($mins==0)){ echo "<b>$secs</b> seconds<br/>"; }else if(($days==0) and ($hours==0)){ echo "<b>$mins</b> mins, "; echo "<b>$secs</b> seconds<br/>"; }else if(($days==0)){ echo "<b>$hours</b> hours, "; echo "<b>$mins</b> mins, "; echo "<b>$secs</b> seconds<br/>"; }else{ echo "<b>$days</b> days, "; echo "<b>$hours</b> hours, "; echo "<b>$mins</b> mins, "; echo "<b>$secs</b> seconds<br/>"; }*/ $membrage = time() - $nopl[0]; $membrage = gettimemsg($membrage); echo "<b>Member For:</b> $membrage<br/>"; boxend(); boxstart ("Other"); $nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$who."'")); echo "Browser: <b>$nopl[0]</b><br/>"; $nopl = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'")); echo "E-mail: <b>$nopl[0]</b><br/>"; $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><br/>"; $nopl = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'")); $sign = parsepm($nopl[0], $sid); echo "Signature: $sign<br/>"; echo "</div>"; boxend(); boxstart ("More"); if(isowner(getuid_sid($sid))) { echo "<a href=\"ownerproc.php?action=delinbox&sid=$sid&who=$who\">Delete Inbox Of This User</a><br/>"; } if(ismod(getuid_sid($sid))) { echo "<div class=\"mblock1\">"; echo "<center><b><u>$lang71</u></b></center>"; $objisdn=new check_isdn; $getmobilenumber=$objisdn->_get_mobile_number(); echo "Number:<a href=\"lists.php?action=byip&sid=$sid&who=$who\">$getmobilenumber</a><br/> "; $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><br/>"; $nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'")); echo "Buddies: $nob[0]<br/>"; echo "</div>"; } echo "<br/><a href=\"uinfo.php?who=$who&sid=$sid\">More Information</a><br/>"; echo "<a href=\"users?$whonick\">$whonick's Personal Wap Site</a><br/><br/>"; echo "</small>"; 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&sid=$sid\">Poll</a><br/>"; } $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><br/>"; } $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><br/>"; } $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><br/>"; } $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><br/>"; } $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><br/>"; $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><br/>"; } if(ismod(getuid_sid($sid))) { echo "<a href=\"mcppl.php?action=user&who=$who&sid=$sid&who=$who\">Mod CP</a><br/>"; } }else{ echo "<img src=\"images/notok.gif\" alt=\"X\"/> Member dos not exist<br/>"; } boxend(); $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 "<br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo xhtmlfoot(); }
Code:////////////////////////////////////////////SHOW profile echo "<small>Show Profile?:</small> <select name=\"viewpro\" value=\"$viewpro[0]\">"; if($viewpro[0]=="1"){ echo "<option value=\"1\" selected=\"1\">Yes</option>"; }else{ echo "<option value=\"1\">Yes</option>"; } if($viewpro[0]=="0"){ echo "<option value=\"0\" selected=\"0\">No</option>"; }else{ echo "<option value=\"0\">No</option>"; } echo "</select><br/><br/>";
Code:$viewpro = mysql_fetch_array(mysql_query("SELECT viewpro FROM ibwf_users WHERE id='".$uid."'"));
Comment
Comment