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


PHP Template_Controller::redirect_erreur方法代碼示例

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


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

示例1: envoyer

 /**
  * Methode : page envoyer le mailing
  */
 public function envoyer()
 {
     if ($_POST) {
         $texte = $this->input->post('texte');
         $format = $this->input->post('format');
         $sujet = $this->input->post('sujet');
         $format = $format == 1 ? TRUE : FALSE;
         $users = $this->user->select();
         $nbr_envois = 0;
         foreach ($users as $user) {
             if ($format) {
                 $view = new View('mailing/template');
                 $view->name = ucfirst(mb_strtolower($user->username));
                 $view->content = $texte;
                 $message = $view->render();
             } else {
                 $message = $texte;
             }
             if (email::send($user->email, Kohana::config('email.from'), $sujet, $message, $format)) {
                 $nbr_envois++;
             }
         }
         return url::redirect('mailing?msg=' . urlencode(Kohana::lang('mailing.send_valide', number_format($nbr_envois))));
     } else {
         return parent::redirect_erreur('mailing');
     }
 }
開發者ID:ezioms,項目名稱:RpgEditor,代碼行數:30,代碼來源:mailing.php

示例2: show

 /**
  * Methode : page de détail d'un article
  */
 public function show($idActualite = FALSE)
 {
     if (!$idActualite || !is_numeric($idActualite)) {
         return parent::redirect_erreur('articles');
     }
     cookie::set('UserFilesPath', url::base() . '../images/articles/' . $idActualite);
     cookie::set('UserFilesAbsolutePath', DOCROOT . '../images/articles/' . $idActualite);
     if (!cookie::get('UserFilesPath')) {
         return url::redirect('articles/show/' . $idActualite);
     }
     if (!($actualite = $this->acticles->select(array('id_article' => $idActualite), TRUE))) {
         return parent::redirect_erreur('articles');
     }
     $actualiteCategories = $this->acticles->selectListeCategories();
     $this->script = array('js/lib/jquery.validate', 'js/articles');
     $this->css = array('form', 'article');
     $this->template->titre = array(Kohana::lang('article.all_article') => 'articles', $actualite->title => NULL);
     $this->template->button = TRUE;
     $this->template->navigation = $this->acticles->navigation($idActualite, 'id_article', 'articles');
     $this->template->navigationURL = 'articles/show';
     $this->template->contenu = new View('formulaire/form');
     $this->template->contenu->action = 'articles/save';
     $this->template->contenu->id = $idActualite;
     $this->template->contenu->formulaire = new View('articles/show');
     $this->template->contenu->formulaire->row = $actualite;
     $this->template->contenu->formulaire->actualiteCategories = $actualiteCategories;
     $this->template->contenu->formulaire->regions = Region_Model::instance()->listing_parent();
 }
開發者ID:ezioms,項目名稱:RpgEditor,代碼行數:31,代碼來源:articles.php

示例3: show

 /**
  * Methode : page de détail d'une user
  */
 public function show($idQuete = false)
 {
     if (!$idQuete || !is_numeric($idQuete)) {
         return parent::redirect_erreur('quetes');
     }
     cookie::set('UserFilesPath', url::base() . '../images/quetes/' . $idQuete);
     cookie::set('UserFilesAbsolutePath', DOCROOT . '../images/quetes/' . $idQuete);
     if (!cookie::get('UserFilesPath')) {
         return url::redirect('quetes/show/' . $idQuete);
     }
     if (!($quete = $this->quete->select(array('id_quete' => $idQuete), 1))) {
         return parent::redirect_erreur('quetes');
     }
     if (!($module = Map_Model::instance()->select(array('module_map' => 'quete'), false))) {
         return url::redirect('regions?msg=' . urlencode(Kohana::lang('quete.no_module')));
     }
     $this->script = array('js/lib/jquery.validate', 'js/lib/jquery.facebox', 'js/quetes');
     $this->css = array('form', 'quete', 'facebox');
     $this->template->titre = array(Kohana::lang('quete.all_quetes') => 'quetes', Kohana::lang('quete.show_title', ucfirst(mb_strtolower($quete->title))) => NULL);
     $this->template->button = TRUE;
     $this->template->navigation = parent::navigation($idQuete, 'id_quete', 'quetes');
     $this->template->contenu = new View('formulaire/form');
     $this->template->contenu->action = 'quetes/save';
     $this->template->contenu->id = $idQuete;
     $this->template->contenu->formulaire = new View('quetes/show');
     $this->template->contenu->formulaire->row = $quete;
     $this->template->contenu->formulaire->module = $module;
     $this->template->contenu->formulaire->bots = Map_Model::instance()->select(array('module_map' => 'fight'), false);
     $this->template->contenu->formulaire->quete = $this->quete->select(array('id_quete !=' => $idQuete));
 }
開發者ID:ezioms,項目名稱:RpgEditor,代碼行數:33,代碼來源:quetes.php

示例4: show

 /**
  * Methode : page de détail d'un utilisateur
  */
 public function show($idUser)
 {
     if (!($user = $this->user->select(array('id' => $idUser), TRUE))) {
         parent::redirect_erreur('users');
     }
     $role = new Roles_Model();
     $listeRole = $role->liste();
     $roleUser = $role->selectUser($idUser);
     $this->script = array('js/lib/jquery.validate', 'js/lib/jquery.facebox', 'js/users');
     $this->css = array('form', 'facebox', 'user');
     $this->template->titre = array(Kohana::lang('user.all_user') => 'users', Kohana::lang('user.show_name', ucfirst(mb_strtolower($user->username))) => NULL);
     $this->template->button = TRUE;
     $this->template->navigation = parent::navigation($idUser, 'id', 'users');
     $this->template->contenu = new View('formulaire/form');
     $this->template->contenu->action = 'users/save';
     $this->template->contenu->id = $idUser;
     $this->template->contenu->formulaire = new View('users/show');
     $this->template->contenu->formulaire->row = $user;
     $this->template->contenu->formulaire->roles = $listeRole;
     $this->template->contenu->formulaire->roleUser = $roleUser;
     $this->template->contenu->formulaire->regions = Region_Model::instance()->listing_parent();
     $this->template->contenu->formulaire->avatar = file::listing_dir(DOCROOT . '../images/character');
 }
開發者ID:ezioms,項目名稱:RpgEditor,代碼行數:26,代碼來源:users.php

示例5: show

 /**
  * Methode : page de détail d'une carte
  */
 public function show($idRegion = false)
 {
     if (!$idRegion || !is_numeric($idRegion)) {
         return parent::redirect_erreur('regions');
     }
     cookie::set('id_map_parent', $idRegion);
     if (!($region = $this->region->select(array('id' => $idRegion), 1))) {
         return parent::redirect_erreur('regions');
     }
     $this->script = array('js/lib/jquery.validate', 'js/lib/jquery.facebox', 'js/region');
     $this->css = array('form', 'region', 'facebox');
     $this->template->titre = array(Kohana::lang('region.liste_regions') => !$region->id_parent ? 'regions' : '/regions/child/' . $region->id_parent, Kohana::lang('region.show_name', ucfirst(mb_strtolower($region->name))) => NULL);
     $this->template->button = TRUE;
     $this->template->navigation = parent::navigation($idRegion, 'id', 'regions');
     $this->template->contenu = new View('formulaire/form');
     $this->template->contenu->action = 'regions/save';
     $this->template->contenu->id = $idRegion;
     $this->template->contenu->formulaire = new View('regions/show');
     $this->template->contenu->formulaire->row = $region;
     $this->template->contenu->formulaire->listing = $this->region->listing_parent();
     $this->template->contenu->formulaire->music = file::listing_dir(DOCROOT . '../audios');
     $this->template->contenu->formulaire->skybox = file::listing_dir(DOCROOT . '../images/skybox');
 }
開發者ID:ezioms,項目名稱:RpgEditor,代碼行數:26,代碼來源:regions.php

示例6: show

 /**
  * Methode : page de détail d'une user
  */
 public function show($idItem = false)
 {
     if (!$idItem || !is_numeric($idItem)) {
         return parent::redirect_erreur('items');
     }
     if (!($item = $this->item->select(FALSE, $idItem, TRUE))) {
         return parent::redirect_erreur('items');
     }
     $listItem = $listJob = FALSE;
     foreach ($this->item->select() as $row) {
         $listItem[$row->id] = $row;
     }
     $this->script = array('js/lib/jquery.validate', 'js/lib/jquery.facebox', 'js/items');
     $this->css = array('form', 'item', 'facebox');
     $this->template->titre = array(Kohana::lang('item.all_items') => 'items', Kohana::lang('item.show_name', ucfirst(mb_strtolower($item->name))) => NULL);
     $this->template->button = TRUE;
     $this->template->navigation = parent::navigation($idItem, 'id', 'items');
     $this->template->contenu = new View('formulaire/form');
     $this->template->contenu->action = 'items/save';
     $this->template->contenu->id = $idItem;
     $this->template->contenu->formulaire = new View('items/show');
     $this->template->contenu->formulaire->row = $item;
     $this->template->contenu->formulaire->items = $listItem;
 }
開發者ID:ezioms,項目名稱:RpgEditor,代碼行數:27,代碼來源:items.php


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