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 .= '';
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 .= '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 .= '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 .= '';
break;
case 'page':
$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 .= 'Probably the biggest part of your identity on a site, you can only change this once every 30 days so choose wisely.';
$settingsBody .= '
';
$settingsBody .= 'That little piece of text displayed under your username on your profile.';
$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 .= '';
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 .= '
';
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 .= '
';
$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 .= '