$stmt = $db->prepare('INSERT INTO user_character_groups (character_group_name,character_group_order,uid) VALUES (?,?,?)'); $stmt->execute(array($_POST['character_group_name'], $_POST['character_group_order'], $user->getUID())); } else { $stmt = $db->prepare('INSERT INTO user_character_groups (character_group_name,character_group_order,uid) VALUES (?,?,?)'); $stmt->execute(array($_POST['character_group_name'], $_POST['character_group_order'], $user->getUID())); } } elseif ($_POST['character_group'] == 'delete') { $stmt = $db->prepare('DELETE FROM user_character_groups WHERE character_group_id = ? AND uid = ?'); $stmt->execute(array($_POST['character_group_id'], $user->getUID())); $stmt = $db->prepare('DELETE FROM user_character_group_assignment WHERE character_group_id = ? AND uid = ?'); $stmt->execute(array($_POST['character_group_id'], $user->getUID())); } } require_once 'includes/header.php'; // Getting all characters except the Main Character for output in the Dashboard $characters = new CharacterDashboard($user, $user->getDefaultID(), FALSE); // Getting the main character specifically $mainCharacter = new Character($user->getDefaultID(), $user->getDefaultKeyID(), $user->getDefaultVCode(), $user->getDefaultAccessMask(), $db, $user); ?> <div class="opaque-container"> <div class="row" style="width: 100%; padding-top: 20px; padding-bottom: 15px"> <!-- Main Character Box --> <?php // This is where we do all of the logic for the Main Character output // Getting the correct string for what our Main Character is flying and where he/she is if ($mainCharacter->getActiveShipName() != 'Out Of Capsule') { $prepositionLookup = $mainCharacter->getActiveShipName(); $first = $prepositionLookup[0]; $preposition = ''; if (preg_match('/^[aeiou]\\z/i', $first)) {
?> </td> <td style="text-align: center"><?php echo $expires; ?> </td> </tr> <?php } ?> </table> <h3 style="text-align: center">Character Overview</h3> <div class="row"> <?php $characters = new CharacterDashboard($userAccountID, 1, TRUE); $characters_groups = $characters->getCharacters(); $characters_list = $characters_groups['All Characters']; unset($characters_list['name']); foreach ($characters_list as $character) { ?> <div style="width: 50%; float: left; padding-bottom: 10px"> <div style="float:left"> <!-- Character Portrait --> <form action="index.php" method="post" name="setdefault" id="setdefault"> <input type="hidden" name="defaultname" id="defaultname" value="<?php echo $character->getCharacterName(); ?> " /> <input type="hidden" name="defaultid" id="defaultid" value="<?php echo $character->getCharacterID(); ?>