예제 #1
0
 public function _CheckDoubleRelations()
 {
     // Check if this player is already related to this player
     if (Player_Manager::isRelatedTo($this->player_id, $this->manager_id)) {
         $this->error_message("player", "This player is already related to this manager.");
         return false;
     }
     return true;
 }
예제 #2
0
 public function PlayerPayments($player = 0)
 {
     $this->template->setData("SelectedTab", "Connected players");
     // Find the player
     $this->Player = new Account($player);
     // Make sure the player exists
     if (!$this->Player->exists()) {
         Session::GoBack("Player could not be found.");
     }
     // Make sure manager is related to this player
     if (!Player_Manager::isRelatedTo($this->Player->id, Auth::Get("id"))) {
         Session::GoBack("You are not related to this player.");
     }
     // Get Payments
     $this->Payments = $this->Player->payments->include_related("fixture", array("id", "location"))->include_related("game_block", array("time"))->where(array("fixtures.owner" => Auth::Get("id")))->order_by("id", "DESC")->get_iterated();
     $this->load->view("manager/PlayerPayments");
 }