コード例 #1
0
ファイル: main.php プロジェクト: EhteshamMehmood/BlogMVC
 public function _new()
 {
     $tMessage = $this->processSave();
     $oComments = new row_comments();
     $oView = new _view('comments::new');
     $oView->oComments = $oComments;
     $oPluginXsrf = new plugin_xsrf();
     $oView->token = $oPluginXsrf->getToken();
     $oView->tMessage = $tMessage;
     return $oView;
 }
コード例 #2
0
ファイル: main.php プロジェクト: CariteColas/projetTKB
 public function _delete()
 {
     $tMessage = $this->processDelete();
     $oArticle = model_article::getInstance()->findById(_root::getParam('id'));
     $oView = new _view('article::delete');
     $oView->oArticle = $oArticle;
     $oView->tJoinmodel_auteur = model_auteur::getInstance()->getSelect();
     $oPluginXsrf = new plugin_xsrf();
     $oView->token = $oPluginXsrf->getToken();
     $oView->tMessage = $tMessage;
     $this->oLayout->add('main', $oView);
 }
コード例 #3
0
ファイル: main.php プロジェクト: DavBfr/BlogMVC
 public function _edit()
 {
     $tMessage = $this->processSave();
     $oPosts = model_posts::getInstance()->findById(_root::getParam('id'));
     $oView = new _view('privatePosts::edit');
     $oView->oPosts = $oPosts;
     $oView->tId = model_posts::getInstance()->getIdTab();
     $oView->tJoinmodel_users = model_users::getInstance()->getSelect();
     $oView->tJoinmodel_categories = model_categories::getInstance()->getSelect();
     $oPluginXsrf = new plugin_xsrf();
     $oView->token = $oPluginXsrf->getToken();
     $oView->tMessage = $tMessage;
     $this->oLayout->add('main', $oView);
 }
コード例 #4
0
ファイル: main.php プロジェクト: clavat/mkframework
 public function _edit()
 {
     if (!_root::getACL()->can('edit', 'article')) {
         //on verifie que l'utilisateur a le droit d'acceder a cette page
         _root::redirect('prive::list');
     }
     $tMessage = $this->save();
     $oArticleModel = new model_article();
     $oArticle = $oArticleModel->findById(_root::getParam('id'));
     $oView = new _view('prive::edit');
     $oView->oArticle = $oArticle;
     $oView->tColumn = $oArticleModel->getListColumn();
     $oView->tId = $oArticleModel->getIdTab();
     $oPluginXsrf = new plugin_xsrf();
     $oView->token = $oPluginXsrf->getToken();
     $oView->tMessage = $tMessage;
     $this->oLayout->add('main', $oView);
 }
コード例 #5
0
ファイル: main.php プロジェクト: clavat/mkframework
 public function _delete()
 {
     $tMessage = $this->delete();
     $oView = $this->getDelete(_root::getParam('id'));
     $oPluginXsrf = new plugin_xsrf();
     $oView->token = $oPluginXsrf->getToken();
     $oView->tMessage = $tMessage;
     $this->oLayout->add('main', $oView);
 }
コード例 #6
0
ファイル: main.php プロジェクト: clavat/mkframework
 public function _delete()
 {
     $tMessage = $this->delete();
     $oArticleModel = new model_article();
     $oArticle = $oArticleModel->findById(_root::getParam('id'));
     $oView = new _view('article::delete');
     $oView->oArticle = $oArticle;
     $oView->tColumn = $oArticleModel->getListColumn();
     $oView->tId = $oArticleModel->getIdTab();
     $oPluginXsrf = new plugin_xsrf();
     $oView->token = $oPluginXsrf->getToken();
     $oView->tMessage = $tMessage;
     $this->oLayout->add('main', $oView);
 }
コード例 #7
0
ファイル: main.php プロジェクト: CariteColas/projetTKB
 public function _editUser()
 {
     $tMessage = $this->processEditUser();
     $oUser = model_examplemodel::getInstance()->findUserById(_root::getParam('id'));
     $oView = new _view('examplemodule::userEdit');
     $oView->oUser = $oUser;
     $oPluginXsrf = new plugin_xsrf();
     $oView->token = $oPluginXsrf->getToken();
     $oView->tMessage = $tMessage;
     $oView->tJoinGroup = model_examplemodel::getInstance()->findSelectGroup();
     $this->oLayout->add('main', $oView);
 }