getUserdata($_SESSION['uid']); $settingsBody = ''; $settingsMenu = []; if($flashii->loggedIn()) { if(isset($_GET['mode'])) { switch($_GET['mode']) { // General case 'home': $settingsBody .= '
Settings / Home
'; $settingsBody .= '
'; $settingsBody .= 'Welcome to the Settings Panel. From here you can monitor, view and update your profile and preferences.'; $settingsBody .= '
'; $settingsBody .= '

Select an option from the menu on the right!

'; $settingsBody .= '

Some parts may require you to enter a CAPTCHA (mainly in the "Account" section), this is for security purposes and might be removed in the future.

'; break; case 'profile': $settingsBody .= '
Settings / Edit Profile
'; $settingsBody .= '
'; $settingsBody .= 'These are the external account links etc. on your profile, shouldn\'t need any additional explanation for this one.'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ''; // Website $settingsBody .= '
'; $settingsBody .= '

Website

'; $settingsBody .= '
'; $settingsBody .= '
'; // Twitter $settingsBody .= '
'; $settingsBody .= '

Twitter

'; $settingsBody .= '
'; $settingsBody .= '
'; // GitHub $settingsBody .= '
'; $settingsBody .= '

GitHub

'; $settingsBody .= '
'; $settingsBody .= '
'; // Skype $settingsBody .= '
'; $settingsBody .= '

Skype

'; $settingsBody .= '
'; $settingsBody .= '
'; // YouTube $settingsBody .= '
'; $settingsBody .= '

YouTube

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; // SoundCloud $settingsBody .= '
'; $settingsBody .= '

SoundCloud

'; $settingsBody .= '
'; $settingsBody .= '
'; // Steam $settingsBody .= '
'; $settingsBody .= '

Steam

'; $settingsBody .= '
'; $settingsBody .= '
'; // osu! $settingsBody .= '
'; $settingsBody .= '

osu!

'; $settingsBody .= '
'; $settingsBody .= '
'; // Origin $settingsBody .= '
'; $settingsBody .= '

Origin

'; $settingsBody .= '
'; $settingsBody .= '
'; // Xbox Live $settingsBody .= '
'; $settingsBody .= '

Xbox Live

'; $settingsBody .= '
'; $settingsBody .= '
'; // PSN $settingsBody .= '
'; $settingsBody .= '

PSN

'; $settingsBody .= '
'; $settingsBody .= '
'; // Birthday $settingsBody .= '
'; $settingsBody .= '

Birthday

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ' '; $settingsBody .= '
'; $settingsBody .= '
'; break; case 'gender': $settingsBody .= '
Settings / Gender
'; $settingsBody .= '
'; $settingsBody .= 'Your gender is an important personal choice, below is a list with genders you can set.'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ''; $settingsBody .= '
'; $settingsBody .= '

Gender

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ' '; $settingsBody .= '
'; $settingsBody .= '
'; break; // Aesthetics case 'avatar': $settingsBody .= '
Settings / Avatar
'; $settingsBody .= '
'; $settingsBody .= 'Your avatar which is displayed all over the site and on your profile.
Maximum image size is 500x500, minimum image size is 20x20, maximum file size is 10 MB.'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ''; $settingsBody .= '
Your Avatar
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; break; case 'background': if(!$flashii->checkRank($fwSettings['premiumRanks'])) { header('Location: /settings/'); break; } $settingsBody .= '
Settings / Background
'; $settingsBody .= '
'; $settingsBody .= 'The background that is displayed on your profile.
Maximum image size is 2560x1440, minimum image size is 20x20, maximum file size is 10 MB.'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ''; $settingsBody .= '
Your Background
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; break; case 'page': $settingsBody .= '
Settings / Profile Page
'; $settingsBody .= '
'; $settingsBody .= 'This is the big markdown block that\'s displayed on the left side of your profile.
Click here if you don\'t know how to markdown.'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ''; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ' '; $settingsBody .= '
'; $settingsBody .= '
'; break; // Account case 'email': $settingsBody .= '
Settings / E-Mail Address
'; $settingsBody .= '
'; $settingsBody .= 'You e-mail address is/will eventually be used for password restoration and stuff like that, we won\'t spam you ;).'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ''; $settingsBody .= '

Your e-mail address is currently set to '. $userData['email'] . '.

'; $settingsBody .= '
'; $settingsBody .= '

E-Mail Address

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

Confirmation

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

Verification

'; $settingsBody .= recaptcha_get_html($RECAPTCHApublickey); $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ' '; $settingsBody .= '
'; $settingsBody .= '
'; break; case 'username': if(!$flashii->checkRank($fwSettings['premiumRanks'])) { header('Location: /settings/'); break; } $settingsBody .= '
Settings / Username
'; $settingsBody .= '
'; $settingsBody .= 'Probably the biggest part of your identity on a site, you can only change this once every 30 days so choose wisely.'; $settingsBody .= '
'; $eligible = ((time() - $userData['last_namechange']) > 2592000); $daydifferenece = (30 - round((time() - $userData['last_namechange']) / 86400)); $settingsBody .= '

You are '. ($eligible ? null : 'not ') .'eligible for a name change.

'; if(!$eligible) { $settingsBody .= '

You can change your name again in '. $daydifferenece .' days.

'; } else { $settingsBody .= '
'; $settingsBody .= '

Your current username is '. $userData['username'] . '.

'; $settingsBody .= ''; $settingsBody .= '
'; $settingsBody .= '

Username

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

Confirmation

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

Verification

'; $settingsBody .= recaptcha_get_html($RECAPTCHApublickey); $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ' '; $settingsBody .= '
'; $settingsBody .= '
'; } break; case 'usertitle': if(!$flashii->checkRank($fwSettings['premiumRanks'])) { header('Location: /settings/'); break; } $settingsBody .= '
Settings / User Title
'; $settingsBody .= '
'; $settingsBody .= 'That little piece of text displayed under your username on your profile.'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

Your current user title is:
'. $userData['usertitle'] . '

'; $settingsBody .= ''; $settingsBody .= '
'; $settingsBody .= '

New user title

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ' '; $settingsBody .= '
'; $settingsBody .= '
'; break; case 'password': $settingsBody .= '
Settings / Password
'; $settingsBody .= '
'; $settingsBody .= 'Used to log in to the site, I recommend making it not too easy to guess.'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ''; $settingsBody .= '
'; $settingsBody .= '

Current Password

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

New Password

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

Confirmation

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ' '; $settingsBody .= '
'; $settingsBody .= '
'; break; case 'groups': $settingsBody .= '
Settings / Groups
'; $settingsBody .= '
'; $settingsBody .= 'Manage what groups you\'re in and what is set as your main group, groups are like the "power levels" of this site. Your main group is highlighted.'; $settingsBody .= '
'; $groups = unserialize($userData['groups']); $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; foreach($groups as $group) { $groupData = $flashii->getRankdata($group); $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; } $settingsBody .= ''; $settingsBody .= '
Group NameActions
Group NameActions
'; break; // Danger Zone case 'sessions': $settingsBody .= '
Settings / Sessions
'; $settingsBody .= '
'; $settingsBody .= 'Session keys are a way of identifying yourself with the system without keeping your password in memory. '; $settingsBody .= 'If someone finds one of your session keys they could possibly compromise your account, if you see any sessions here that shouldn\'t be here hit the Kill button to kill the selected session. '; $settingsBody .= 'If you get logged out after clicking one you\'ve most likely killed your current session, to make it easier to avoid this from happening your current session is highlighted.'; $settingsBody .= '
'; $sessions = $flashii->getUserSessions($_SESSION['uid']); $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; foreach($sessions as $session) { $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; } $settingsBody .= ''; $settingsBody .= '
IPUseragentLogin time
IPUseragentLogin time
'; break; case 'regkeys'; if(!$regCheck) { header('Location: /settings/'); break; } $settingsBody .= '
Settings / Registration Keys
'; $settingsBody .= '
'; $settingsBody .= 'Sometimes we activate the registration key system which means that users can only register using your "referer" keys, this means we can keep unwanted people from registering. Each user can generate 5 of these keys, bans and deactivates render these keys useless.'; $settingsBody .= '
'; $keys = $database->query("SELECT * FROM `flashii_regcodes` WHERE `uid`='". $_SESSION['uid'] ."' ORDER BY `id` DESC")->fetch_all(MYSQLI_ASSOC); $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; foreach($keys as $key) { $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; $settingsBody .= ''; } $settingsBody .= ''; $settingsBody .= '
Registration CodeState
Registration CodeState
'. $key['code'] .''. ($key['used'] ? 'Used' : 'Unused') .'
'; if(count($keys) < 5) $settingsBody .= '

Generate new key

'; break; case 'deactivate'; $settingsBody .= '
Settings / Deactivate Account
'; $settingsBody .= '
'; $settingsBody .= 'You can deactivate your account here if you want to leave :(.'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ''; $settingsBody .= '

In order for this to go through properly we require you to enter a few forms.

'; $settingsBody .= '

If you want your account reactivated contact the Administrator, it is not allowed to have more than one account.

'; $settingsBody .= '
'; $settingsBody .= '

Username

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

Password

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

E-Mail Address

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

Type "I am one hundred percent sure that I want to deactivate my account." without the quotes.

'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= '

Verification

'; $settingsBody .= recaptcha_get_html($RECAPTCHApublickey); $settingsBody .= '
'; $settingsBody .= '
'; $settingsBody .= ''; $settingsBody .= '
'; $settingsBody .= '
'; break; // Not Found default: $settingsBody .= '
Settings / 404
'; $settingsBody .= 'Could not find what you were looking for.'; break; } } else { header('Location: /settings/home'); } $settingsMenu = [ 'General' => [ 'Home' => ['/settings'], 'Edit Profile' => ['/settings/profile'], 'Gender' => ['/settings/gender'], ], 'Aesthetics' => [ 'Avatar' => ['/settings/avatar'], 'Background' => ['/settings/background', $flashii->checkRank($fwSettings['premiumRanks'])], 'Profile Page' => ['/settings/page'], ], 'Account' => [ 'E-Mail Address' => ['/settings/email'], 'Username' => ['/settings/username', $flashii->checkRank($fwSettings['premiumRanks'])], 'User Title' => ['/settings/usertitle', $flashii->checkRank($fwSettings['premiumRanks'])], 'Password' => ['/settings/password'], 'Groups' => ['/settings/groups'], ], 'Danger zone' => [ 'Sessions' => ['/settings/sessions'], 'Registration Keys' => ['/settings/regkeys', $regCheck], 'Deactivate Account' => ['/settings/deactivate'], ], ]; } require_once fiiSwitch_path();