当前位置: 首页>>代码示例>>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;未经允许,请勿转载。