$UserID = $_REQUEST['userid']; if (!is_number($UserID)) { error(404); } $DB->query(" SELECT m.Username, m.Email, m.IRCKey, m.Paranoia, i.Info, i.Avatar, i.StyleID, i.StyleURL, i.SiteOptions, i.UnseededAlerts, i.DownloadAlt, p.Level AS Class, i.InfoTitle FROM users_main AS m JOIN users_info AS i ON i.UserID = m.ID LEFT JOIN permissions AS p ON p.ID = m.PermissionID WHERE m.ID = '".db_string($UserID)."'"); list($Username, $Email, $IRCKey, $Paranoia, $Info, $Avatar, $StyleID, $StyleURL, $SiteOptions, $UnseededAlerts, $DownloadAlt, $Class, $InfoTitle) = $DB->next_record(MYSQLI_NUM, array(3, 8)); if ($UserID != $LoggedUser['ID'] && !check_perms('users_edit_profiles', $Class)) { error(403); } $Paranoia = unserialize($Paranoia); if (!is_array($Paranoia)) { $Paranoia = array(); } function paranoia_level($Setting) { global $Paranoia; // 0: very paranoid; 1: stats allowed, list disallowed; 2: not paranoid return (in_array($Setting . '+', $Paranoia)) ? 0 : (in_array($Setting, $Paranoia) ? 1 : 2); } function display_paranoia($FieldName) { $Level = paranoia_level($FieldName); print "\t\t\t\t\t'." \n"; print "\t\t\t\t\t'."\n"; } function checked($Checked) { return ($Checked ? ' checked="checked"' : ''); } if ($SiteOptions) { $SiteOptions = unserialize($SiteOptions); } else { $SiteOptions = array(); } View::show_header("$Username > Settings", 'user,jquery-ui,release_sort,password_validate,validate,push_settings,cssgallery,preview_paranoia,bbcode,user_settings,donor_titles'); $DonorRank = Donations::get_rank($UserID); $DonorIsVisible = Donations::is_visible($UserID); if ($DonorIsVisible === null) { $DonorIsVisible = true; } extract(Donations::get_enabled_rewards($UserID)); $Rewards = Donations::get_rewards($UserID); $ProfileRewards = Donations::get_profile_rewards($UserID); $DonorTitles = Donations::get_titles($UserID); $DB->query(" SELECT username FROM lastfm_users WHERE ID = '$UserID'"); $LastFMUsername = ''; list($LastFMUsername) = $DB->next_record(); echo $Val->GenerateJS('userform'); ?>