public static function _addNewMember() { $user = User::find(intval($_SESSION['userid'])); $member = Member::find(intval($_SESSION['memberid'])); $tools = Tool::find_all($user->role); $divisions = Division::find_all(); $division = Division::findById(intval($member->game_id)); $platoons = Platoon::find_all($member->game_id); $platoon_id = $user->role >= 2 && !User::isDev() ? $member->platoon_id : false; $squads = Squad::findAll($member->game_id, $platoon_id); $js = 'recruit'; Flight::render('recruiting/new_member', compact('user', 'member', 'division', 'platoons', 'squads'), 'content'); Flight::render('layouts/application', compact('js', 'user', 'member', 'tools', 'divisions')); }
public static function _edit() { $user = User::find(intval($_SESSION['userid'])); $member = Member::findByMemberId($_POST['member_id']); $platoons = Platoon::find_all($member->game_id); // if user role lower than plt ld, show only own platoon's squads $platoon_id = $user->role >= 2 && !User::isDev() ? $member->platoon_id : false; $squads = Squad::findAll($member->game_id, $platoon_id); $positionsArray = Position::find_all(); $rolesArray = Role::find_all(); $memberGames = MemberGame::get($member->id); if (User::isUser($member->id)) { $userInfo = User::findByMemberId($member->id); } else { $userInfo = null; } Flight::render('modals/view_member', array('user' => $user, 'member' => $member, 'userInfo' => $userInfo, 'platoons' => $platoons, 'memberGames' => $memberGames, 'squads' => $squads, 'positionsArray' => $positionsArray, 'rolesArray' => $rolesArray)); }
public function __construct($game_id) { $this->game_id = $game_id; // get data $this->division = Division::findById($this->game_id); $this->platoons = Platoon::find_all($this->game_id); // colors $this->division_leaders_color = "#00FF00"; $this->platoon_leaders_color = "#00FF00"; $this->squad_leaders_color = "#FFA500"; $this->div_name_color = "#FF0000"; $this->platoon_num_color = "#FF0000"; $this->platoon_pos_color = "#40E0D0"; // number of columns $this->num_columns = 4; // widths $this->players_width = 900; $this->info_width = 800; // misc settings $this->min_num_squad_leaders = 2; self::generate(); }
public function __construct($game_id) { $this->banner = "http://i.imgur.com/BKkTYMC.jpg"; $this->game_id = $game_id; // get data $this->division = Division::findById($this->game_id); $this->platoons = Platoon::find_all($this->game_id); // colors $this->division_leaders_color = "#FF0000"; $this->general_sergeants_color = "#00FFFF"; $this->platoon_name_color = "#00FFFF"; $this->platoon_leader_color = "#FFA07A"; $this->squad_leader_color = "orange"; // number of columns $this->num_columns_squads = 3; // widths $this->players_width = 900; $this->info_width = 800; // misc settings $this->min_num_squad_leaders = 2; self::generate(); }
<?php } ?> <!-- supported divisions --> <li class="dropdown multi-level"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Divisions <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <?php foreach ($divisions as $division) { ?> <?php $platoons = Platoon::find_all($division->id); ?> <li class="dropdown-submenu"><a href='divisions/<?php echo $division->short_name; ?> '><?php echo $division->full_name; ?> </a> <?php if ((array) count($platoons)) { ?> <ul class="dropdown-menu"> <?php foreach ($platoons as $platoonLink) {