Beispiel #1
0
         $tournament_obj = new KotH($tournamentid, $register->getParticipants($tournament));
         break;
     case 7:
         // Deathmatch
         require_once $mod_dir . "/tournament.deathmatch.class.php";
         $tournament_obj = new Deathmatch($tournamentid, $register->getParticipants($tournament));
         break;
 }
 switch ($mode) {
     default:
         $smarty->assign('path', $template_dir . "/view.tpl");
         $tournament['regcount'] = $register->getRegCount($tournamentid);
         // Joining stuff ..
         if ($tournament['playerperteam'] == 1) {
             if (isset($_POST['join'])) {
                 $register->joinTournament($tournamentid);
             }
             if (isset($_POST['unjoin'])) {
                 $register->leaveTournament($tournamentid);
             }
             $smarty->assign('already_joined', $register->alreadyJoined($tournamentid));
             $smarty->assign('playerlist', $register->getPlayerList($tournament));
         } else {
             if (isset($_POST['creategroup'])) {
                 if ($tournament['regcount'] < $tournament['playerlimit']) {
                     $groupid = $register->createGroup($_POST['creategroup_name'], $_POST['creategroup_password'], $tournamentid);
                     $register->joinGroup($tournament, $groupid, $_POST['creategroup_password']);
                 }
             }
             if (isset($_POST['unjoin'])) {
                 $register->leaveTournament($tournamentid);