當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Flight::teams方法代碼示例

本文整理匯總了PHP中Flight::teams方法的典型用法代碼示例。如果您正苦於以下問題:PHP Flight::teams方法的具體用法?PHP Flight::teams怎麽用?PHP Flight::teams使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Flight的用法示例。


在下文中一共展示了Flight::teams方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: deleteTeam

 public function deleteTeam($id)
 {
     Flight::auth()->check(20);
     $team = Flight::teams()->getTeamWithId($id);
     $team->delete();
     Flight::redirect('/teams');
 }
開發者ID:happyoniens,項目名稱:Club,代碼行數:7,代碼來源:teamController.php

示例2: showEvent

 public function showEvent($id)
 {
     Flight::auth()->check();
     $event = Flight::events()->getEventWithId($id);
     $team = Flight::teams()->getTeamWithId($event->team);
     Flight::util()->render('event', array("event" => $event, "team" => $team));
 }
開發者ID:happyoniens,項目名稱:Club,代碼行數:7,代碼來源:eventController.php

示例3: showNewAbsence

 public function showNewAbsence($team, $event)
 {
     if ($event != null) {
         $event = Flight::events()->getEventWithId($event);
     }
     $team = Flight::teams()->getTeamWithId($team);
     Flight::util()->render('newAbsence', array('team' => $team, 'event' => $event));
 }
開發者ID:happyoniens,項目名稱:Club,代碼行數:8,代碼來源:absenceController.php

示例4: register

 public function register()
 {
     Flight::auth()->check(20);
     $response = Flight::util()->validate("user", Flight::request()->data);
     if (is_array($response)) {
         Flight::util()->render('newUser', array('error' => $response, "teams" => Flight::teams()->getAllTeams()));
         return;
     }
     $data = Flight::request()->data;
     $user = new user($data);
     $user->teams = Flight::request()->data->teams;
     $user->store();
     Flight::redirect("/createUser");
 }
開發者ID:happyoniens,項目名稱:Club,代碼行數:14,代碼來源:auth.php

示例5: getTeams

 public function getTeams()
 {
     if ($this->role == 20) {
         $this->teams = Flight::teams()->getAllTeams();
         return $this->teams;
     }
     $sql = "SELECT team.* FROM team, coach_team WHERE team.id = coach_team.team_id AND coach_team.coach_id = '{$this->id}'";
     $result = Flight::db()->query($sql);
     $this->teams = array();
     if ($result == false) {
         return $this->teams;
     } else {
         while ($row = $result->fetch_assoc()) {
             $this->teams[] = new team($row);
         }
         return $this->teams;
     }
 }
開發者ID:happyoniens,項目名稱:Club,代碼行數:18,代碼來源:user.php

示例6: showUpdatePlayer

 public function showUpdatePlayer($id)
 {
     Flight::auth()->check();
     Flight::util()->render('editPlayer', array('player' => Flight::players()->getPlayerWithId($id), 'teams' => Flight::teams()->getAllTeams()));
 }
開發者ID:happyoniens,項目名稱:Club,代碼行數:5,代碼來源:playerController.php

示例7: foreach

  <?php 
if (count($players) > 0) {
    ?>
    <table class='table'>
    <tr><th>Forename</th><th>Surname</th><th>Team</th><th>Detail</th></tr>
    <?php 
    foreach ($players as $player) {
        ?>
      <tr></td><td><?php 
        echo $player->forename;
        ?>
</td><td><?php 
        echo $player->surname;
        ?>
</td><td><?php 
        echo Flight::teams()->getTeamNameWithId($player->team);
        ?>
</td><td><a href='<?php 
        Flight::link('/player/' . $player->id);
        ?>
'>View Details</a></tr>
      <?php 
    }
    ?>
    </table>
    <?php 
} else {
    ?>
      <h5>No Players in this Team <a href="<?php 
    Flight::link('/asignPlayer');
    ?>
開發者ID:happyoniens,項目名稱:Club,代碼行數:31,代碼來源:players.php

示例8: showNewUser

 public function showNewUser()
 {
     Flight::auth()->check(20);
     Flight::util()->render('newUser', array("teams" => Flight::teams()->getAllTeams()));
 }
開發者ID:happyoniens,項目名稱:Club,代碼行數:5,代碼來源:userController.php


注:本文中的Flight::teams方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。