Exemplo n.º 1
0
 function store()
 {
     global $mainframe, $db, $user;
     $post = $_POST;
     $model = Players::getInstance();
     global $user;
     if (!$user->isSuperAdmin()) {
         YiiMessage::raseNotice("Your account not have permission to add/edit Players");
         $this->redirect(Router::buildLink("gamesport", array('view' => 'players')));
     }
     $id = Request::getVar("id", 0);
     $obj_tblTeam = YiiTables::getInstance(TBL_GS_PLAYERS);
     $obj_tblTeam->load($id);
     $obj_tblTeam->bind($post);
     //        var_dump($obj_tblTeam); die;
     $obj_tblTeam->store();
     return $obj_tblTeam->id;
 }