$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.Country, i.StyleID, i.StyleURL, i.SiteOptions, i.UnseededAlerts, p.Level AS Class 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,$Country,$StyleID,$StyleURL,$SiteOptions,$UnseededAlerts,$Class)=$DB->next_record(MYSQLI_NUM, array(3,9)); 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 ''." \n"; print ''; } function checked($Checked) { return $Checked ? 'checked="checked"' : ''; } if ($SiteOptions) { $SiteOptions = unserialize($SiteOptions); } else { $SiteOptions = array(); } View::show_header($Username.' > Settings','user,jquery,jquery-ui,release_sort,password_validate,validate,push_settings'); $DB->query("SELECT PushService, PushOptions FROM users_push_notifications WHERE UserID = '$LoggedUser[ID]'"); list($PushService, $PushOptions) = $DB->next_record(MYSQLI_NUM, false); if ($PushOptions) { $PushOptions = unserialize($PushOptions); } else { $PushOptions = array(); } echo $Val->GenerateJS('userform'); ?>