authenticate("U_PictureView,U_Number,U_TimeOffset"); isset($thisuser['U_PictureView']) && $picview = $thisuser['U_PictureView']; isset($thisuser['U_TimeOffset']) && $toffset = $thisuser['U_TimeOffset']; $Username = $thisuser['U_Username']; $html = new html; if ($User == 1) { $html -> not_right($ubbt_lang['NO_LONGER'],$Cat); } // ------------------------------------------------------------------------- // If we are allowing the view of pictures, let's see if this person wants to // see it $Pictureview = $theme['PictureView']; if ($theme['PictureView']) { if ($picview == "on") { $PictureView = $picview; } } // ------------------------------ // Grab the profile for this user $User = addslashes($User); $query = " SELECT U_Username,U_Fakeemail,U_Name,U_Totalposts,U_Homepage,U_Occupation,U_Hobbies,U_Location,U_Bio,U_Extra1,U_Extra2,U_Extra3,U_Extra4,U_Extra5,U_Registered,U_Picture,U_Title,U_Status,U_Number,U_Rating,U_Rates,U_Picwidth,U_Picheight FROM {$config['tbprefix']}Users WHERE U_Number = '$User' "; $sth = $dbh -> do_query($query); // ---------------- // Assign the stuff list ($CheckUser,$Fakeemail,$Name,$Totalposts,$Homepage,$Occupation,$Hobbies,$Location,$Bio,$ICQ,$Extra2,$Extra3,$Extra4,$Extra5,$Registered,$Picture,$Title,$Userstatus,$UNumber,$Rating,$Rates,$width,$height) = $dbh -> fetch_array($sth); $dbh -> finish_sth($sth); $profileuser = $CheckUser; # Added by LK $Title = stripslashes($Title); // ---------------------------------- // Figure out the # of stars they get if ($Rates) { $stars = $Rating / $Rates; $stars = intval($stars); } $Rating = ""; if (isset($stars)) { for ($x=1;$x<=$stars;$x++) { $Rating .= "\"*\""; } } // --------------------------- // Are user ratings turned on? if ($config['uratings'] == "1") { $Rating = " {$ubbt_lang['RATING']} $Rating   "; } else { $Rating = ""; } // ---------------------------------------- // Let's see if we already rated this user $thisuser_q = addslashes($thisuser['U_Username']); $query = " SELECT R_Rating FROM {$config['tbprefix']}Ratings WHERE R_What = '$UNumber' AND R_Rater = '{$thisuser['U_Number']}' AND R_Type = 'u' "; $sti = $dbh -> do_query($query); list($myrating) = $dbh -> fetch_array($sti); // ---------------------------------- // Figure out what we need to display $ratinghtml = ""; if ($config['uratings'] == "1") { if (!$myrating) { $ratinghtml = << {$ubbt_lang['RATE_USER']} EOF; } else { $ratinghtml = "{$ubbt_lang['YOURATED']} $myrating."; } } // ----------------------- // You can't rate yourself if ($User == $thisuser['U_Number']) { $ratinghtml = " "; } if ( (!$Picture) || ($Picture == "http://") ){ $Picture ="{$config['images']}/nopicture.gif"; } // ----------------------------- // Show the profile if it exists $columns = 2; if ($CheckUser) { if ($Homepage) { $Homepage = str_replace("http://","",$Homepage); $Homepage = "http://$Homepage"; } if ( (preg_match("/[0-9]/",$ICQ) ) && ($config['ICQ_Status']) ){ $icqimage = "\"\""; } if ($config['extra2']) { $extra2 = " {$config['extra2']} $Extra2  "; } if ($config['extra3']) { $extra3 = " {$config['extra3']} $Extra3  "; } if ($config['extra4']) { $extra4 = " {$config['extra4']} $Extra4  "; } if ($config['extra5']) { $extra5 = " {$config['extra5']} $Extra5  "; } $date = $html -> convert_time($Registered,$toffset); // -------------------------------------------------------------- // If this is an admin or moderator they get some special options $User = rawurlencode($User); $encoded = rawurlencode($User); if ($thisuser['U_Status'] == "Administrator") { if ( ( ($thisuser['U_Number'] == 2) && ($UNumber == 2) ) || ( $UNumber != 2) ){ $useredit = "\"\" "; $useredit .= "{$ubbt_lang['EDIT_T_U']} | "; } } if ($thisuser['U_Status'] == "Moderator") { if ( ($config['modedit']) && ($Userstatus == "User") ) { $useredit = "\"\" "; $useredit .= "{$ubbt_lang['EDIT_T_U']} | "; } } // --------------------------------------------------- // Only show the address book link for logged in users if ($thisuser['U_Username']) { $addresslinkstart = " "; $addresslinkstop = ""; } if ( ($config['private']) && ($thisuser['U_Username']) ){ $privlinkstart = ""; $privlinkstop = ""; } // ---------------- // They don't exist } else { $html -> not_right($ubbt_lang['NO_LONGER'],$Cat); } // ------------------------ // Now show them their page $html -> send_header("{$ubbt_lang['PROF_FOR']} $profileuser",$Cat,0,$thisuser); // ------------------------------------------------------------------- // If we came from a post then give them a link back to that post if ( ($what == "showthreaded") || ($what == "showflat") ){ $forumlinkstart = ""; $forumlinkstop = ""; } // If we came from the main page then give them a link back elseif( ($what == "ubbthreads") || ($what == "categories") ){ $forumlinkstart = ""; $forumlinkstop = ""; } // ---------------------------------------------------------------- // If they are coming from the online page then we go back to there. elseif ($what == "online") { $forumlinkstart = ""; $forumlinkstop = ""; } // ---------------------------------------------------------------- // If they are coming from the search page then we go back to there. elseif ($what == "search") { $Words = rawurlencode($Words); $Forum = rawurlencode($Forum); $Match = rawurlencode($Match); $forumlinkstart = ""; $forumlinkstop = ""; } // ----------------------------------------------------------------- // If they are coming from a private message then we return to there elseif ($what == "viewmessage") { $forumlinkstart = ""; $forumlinkstop = ""; } // --------------------------------------------------------------- // If they are coming from the member list then we return to there elseif ($what == "showmembers") { $forumlinkstart = ""; $forumlinkstop = ""; } // ----------------------------------------- // Otherwise they came from their login page elseif ($what == "login") { $forumlinkstart = ""; $forumlinkstop = ""; } // -------------------------------------------------------------- // Otherwise they get returned to somewhere specified by an addon elseif ($what == "addon") { $forumlinkstart = ""; $forumlinkstop = ""; } // -------------------------------------------------------- // If we didn't then give them a link back to all the posts else { if ($Board) { $forumlinkstart = ""; $forumlinkstop = ""; } else { $forumlinkstart = ""; $forumlinkstop = ""; } } // --------------------- // Grab the tablewrapper list($tbopen,$tbclose) = $html -> table_wrapper(); if (!$debug) { include("$thispath/templates/$tempstyle/showprofile.tmpl"); } // --------------- // Send the footer $html -> send_footer(); ?>