authenticate("U_PictureView,U_Number,U_TimeOffset,U_TimeFormat,U_Ignored,U_OC_Userid"); isset($thisuser['U_PictureView']) && $picview = $thisuser['U_PictureView']; isset($thisuser['U_TimeOffset']) && $toffset = $thisuser['U_TimeOffset']; !isset($thisuser['U_TimeFormat']) && $thisuser['U_TimeFormat'] = $theme['timeformat']; !isset($thisuser['U_Ignored']) && $thisuser['U_Ignored'] = ""; $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 = ""; 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,U_Birthday,U_ShowBday,U_CoppaUser,U_OC_Userid FROM {$config['tbprefix']}Users WHERE U_Number = '$User' "; $sth = $dbh -> do_query($query,__LINE__,__FILE__); // ---------------- // 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,$Birthday,$showbday,$coppauser,$ocuserid) = $dbh -> fetch_array($sth); $dbh -> finish_sth($sth); $profileuser = $CheckUser; // ---------------------------- // Is OneCommunity implemented? if (isset($config['oc_profiles']) && ($config['oc_profiles']) ) { header("Location: {$config['oc_profiles']}?getprofile=$ocuserid&u=$User"); exit; } // ------------------------------------------------ // If this is a coppa user, we can't show some info if ($coppauser) { $Fakeemail = ""; $Name = ""; $Homepage = ""; $Occupation = ""; $Hobbies = ""; $Location = ""; $Bio = ""; $ICQ = ""; $Extra2 = ""; $Extra3 = ""; $Extra4 = ""; $Extra5 = ""; $Picture = ""; } // ---------------------------------- // 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,__LINE__,__FILE__); list($myrating) = $dbh -> fetch_array($sti); // ---------------------------------- // Figure out what we need to display $birthday = ""; if ($showbday) { if (!$config['showage']) { list($month,$day,$year) = split("/",$Birthday); $Birthday = "$month/$day"; } $birthday = " {$ubbt_lang['BIRTHDAY']} $Birthday  "; } $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"; } if (!$Pictureview) { $Picture = "{$config['images']}/blank.gif"; $width = 0; $height = 0; } // ----------------------------- // Show the profile if it exists $columns = 2; if ($CheckUser) { if ($Homepage) { $Homepage = str_replace("http://","",$Homepage); $Homepage = str_replace("https://","",$Homepage); $Homepage = "http://$Homepage"; } if ( (preg_match("/^\d+$/",$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,$thisuser['U_TimeFormat']); // -------------------------------------------------------------- // 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") { $modperms = $userob -> get_mod_perms($thisuser['U_Number']); if ( ($modperms['P_CanEditUsers']) && ($Userstatus == "User") ) { $useredit = "\"\" "; $useredit .= "{$ubbt_lang['EDIT_T_U']} | "; } } // --------------------------------------------------- // Only show the address book link for logged in users if ($thisuser['U_Username'] && !$coppauser) { $addresslinkstart = " "; $addresslinkstop = ""; } if ( ($config['private']) && ($thisuser['U_Username']) && !$coppauser ){ $privlinkstart = ""; $privlinkstop = ""; } // --------------------------------------------------- // Only logged in users can ignore / unignore people if ($thisuser['U_Username']) { if ($Userstatus != "Administrator" && $Userstatus != "Moderator" && $thisuser['U_Number'] != $User) { $ignorelinkstart = " "; $ignorelinkstop = " | "; if (preg_match("/-$User-/",$thisuser['U_Ignored'])) { $ignoretext = $ubbt_lang['UNIGNORE']; } else { $ignoretext = $ubbt_lang['IGNORE']; } } } // ---------------- // 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(); ?>