当前位置: 首页>>代码示例>>PHP>>正文


PHP FlashInfo类代码示例

本文整理汇总了PHP中FlashInfo的典型用法代码示例。如果您正苦于以下问题:PHP FlashInfo类的具体用法?PHP FlashInfo怎么用?PHP FlashInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了FlashInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doAction

 public function doAction()
 {
     $out = '';
     $this->doorGets->Table = '_dg_links';
     // Init langue
     $lgActuel = $this->doorGets->getLangueTradution();
     $moduleInfos = $this->doorGets->moduleInfos($this->doorGets->Uri, $lgActuel);
     // Init url redirection
     $redirectUrl = './?controller=module' . $moduleInfos['type'] . '&uri=' . $this->doorGets->Uri . '&lg=' . $lgActuel;
     // get Content for edit
     $params = $this->doorGets->Params();
     if (array_key_exists('uri', $params['GET'])) {
         $uri = $params['GET']['uri'];
         $isContent = $this->doorGets->dbQS($uri, $this->doorGets->Table, 'uri_module', " AND langue = '{$lgActuel}' LIMIT 1");
     }
     $champsObligatoire = array('label', 'link');
     if (!empty($this->doorGets->Form->i)) {
         $this->doorGets->checkMode();
         // gestion des champs vide
         foreach ($this->doorGets->Form->i as $k => $v) {
             if (empty($v)) {
                 $this->doorGets->Form->e[$this->doorGets->controllerNameNow() . '_edit_' . $k] = 'ok';
             }
         }
         if (empty($this->doorGets->Form->e)) {
             $data = array('label' => $this->doorGets->Form->i['label'], 'link' => $this->doorGets->Form->i['link']);
             $this->doorGets->dbQU($isContent['id'], $data, $this->doorGets->Table);
             FlashInfo::set($this->doorGets->__("Vos informations ont bien été mises à jour"));
             header('Location:' . $redirectUrl);
             exit;
         }
         FlashInfo::set($this->doorGets->__("Veuillez remplir correctement le formulaire"), "error");
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:34,代码来源:modulelinkRequest.php

示例2: __construct

 public function __construct(&$doorGets)
 {
     $this->doorGets = $doorGets;
     parent::__construct($doorGets);
     if (empty($doorGets->user)) {
         header('Location:./?controller=authentification&error-login=true&back=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     if (!in_array('promotion', $doorGets->user['liste_module_interne']) || in_array('promotion', $doorGets->user['liste_module_interne']) && SAAS_ENV && !SAAS_ADDRESS) {
         FlashInfo::set($this->doorGets->__("Vous n'avez pas les droits pour afficher ce module"), "error");
         header('Location:./');
         exit;
     }
     $me = $doorGets->user;
     $params = $doorGets->Params();
     $redirectUrl = './?controller=promotion';
     // get Content for edit / delete
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $doorGets->dbQS($id, '_promotion');
         if (!is_numeric($id)) {
             $id = '-!-';
         }
         if (empty($isContent)) {
             //var_dump($isContent);
             //exit();
             FlashInfo::set($doorGets->l("Le contenu n'existe pas"), "error");
             header('Location:' . $redirectUrl);
             exit;
         }
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:32,代码来源:promotionController.php

示例3: __construct

 public function __construct(&$doorGets)
 {
     $doorGets->Table = '_dg_files';
     $params = $doorGets->Params();
     if (empty($doorGets->user)) {
         header('Location:./?controller=authentification&error-login=true&back=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     if (!in_array('media', $doorGets->user['liste_module_interne']) || in_array('media', $doorGets->user['liste_module_interne']) && SAAS_ENV && !SAAS_MEDIA) {
         FlashInfo::set($this->doorGets->__("Vous n'avez pas les droits pour afficher ce module"), "error");
         header('Location:./');
         exit;
     }
     // get Content for edit / delete
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $doorGets->dbQS($id, $doorGets->Table);
         if (!is_numeric($id)) {
             $id = '-!-';
         }
         if (empty($isContent)) {
             FlashInfo::set($doorGets->__("Le contenu n'existe pas"), "error");
             header('Location:./?controller=media');
             exit;
         }
     }
     parent::__construct($doorGets);
 }
开发者ID:doorgets,项目名称:cms,代码行数:28,代码来源:mediaController.php

示例4: __construct

 public function __construct(&$doorGets)
 {
     parent::__construct($doorGets);
     $User = $doorGets->user;
     if (empty($doorGets->user)) {
         header('Location:./?controller=authentification&error-login=true&back=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     if (!in_array('support', $doorGets->user['liste_module_interne']) && !in_array('support_client', $doorGets->user['liste_module_interne']) || (in_array('support', $doorGets->user['liste_module_interne']) || in_array('support_client', $doorGets->user['liste_module_interne'])) && SAAS_ENV && !SAAS_SUPPORT) {
         FlashInfo::set($this->doorGets->__("Vous n'avez pas les droits pour afficher ce module"), "error");
         header('Location:./');
         exit;
     }
     // get Content for edit / delete
     $params = $this->doorGets->Params();
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $this->doorGets->dbQS($id, '_support');
         if (empty($isContent)) {
             FlashInfo::set($this->doorGets->__("Le contenu n'existe pas"), "error");
             header('Location:./?controller=support');
             exit;
             $this->isContent = $isContent;
         }
         if (!in_array('support', $doorGets->user['liste_module_interne']) && $User['id'] !== $isContent['id_user']) {
             FlashInfo::set($this->doorGets->__("Vous n'avez pas les droits pour afficher ce ticket"), "error");
             header('Location:./?controller=support');
             exit;
         }
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:31,代码来源:supportController.php

示例5: deleteAction

 public function deleteAction()
 {
     if (SAAS_ENV && !SAAS_THEME_DELETE) {
         FlashInfo::set($this->doorGets->__("Vous n'avez pas les droits pour afficher ce module"), "error");
         header('Location:./');
         exit;
     }
     $this->doorGets->Form = new Formulaire('delete_theme');
     // Generate the model
     $this->getRequest();
     // return the view
     return $this->getView();
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:13,代码来源:themeController.php

示例6: __construct

 public function __construct(&$doorGets)
 {
     parent::__construct($doorGets);
     if (empty($doorGets->user)) {
         header('Location:./?controller=authentification&error-login=true&back=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     if (!in_array('campagne_email', $doorGets->user['liste_module_interne']) || in_array('campagne_email', $doorGets->user['liste_module_interne']) && SAAS_ENV && !SAAS_NEWSLETTER) {
         FlashInfo::set($this->doorGets->__("Vous n'avez pas les droits pour afficher ce module"), "error");
         header('Location:./');
         exit;
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:13,代码来源:emailingController.php

示例7: doAction

 public function doAction()
 {
     $out = '';
     // get Content for edit / delete
     $params = $this->doorGets->Params();
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $this->doorGets->dbQS($id, $this->doorGets->Table);
         if (empty($isContent)) {
             header('Location:./?controller=' . $this->doorGets->controllerNameNow());
             exit;
         }
     }
     switch ($this->Action) {
         case 'select':
             if (!empty($this->doorGets->Form['status']->i)) {
                 $this->doorGets->checkMode();
                 $data['status'] = $this->doorGets->Form['status']->i['new_status'];
                 $this->doorGets->dbQU($isContent['id'], $data, $this->doorGets->Table);
                 FlashInfo::set($this->doorGets->__("Vos informations ont bien été mises à jour"));
                 header('Location:' . $_SERVER['REQUEST_URI']);
                 exit;
             }
             break;
         case 'delete':
             if (!empty($this->doorGets->Form->i)) {
                 $this->doorGets->checkMode();
                 if (empty($this->doorGets->Form->e)) {
                     $this->doorGets->dbQD($isContent['id'], $this->doorGets->Table);
                     FlashInfo::set($this->doorGets->__("Le commentaire à été corréctement supprimer"));
                     header('Location:./?controller=' . $this->doorGets->controllerNameNow());
                     exit;
                 }
             }
             break;
         case 'massdelete':
             if (!empty($this->doorGets->Form['massdelete_index']->i) && isset($this->doorGets->Form['massdelete_index']->i['groupe_delete_index'])) {
                 $this->doorGets->checkMode();
                 if (empty($this->doorGets->Form['massdelete_index']->e)) {
                     $ListeForDeleted = $this->doorGets->_toArray($this->doorGets->Form['massdelete_index']->i['groupe_delete_index']);
                     foreach ($ListeForDeleted as $id) {
                         $this->doorGets->dbQD($id, $this->doorGets->Table);
                     }
                     FlashInfo::set($this->doorGets->__("Les données sont supprimées"));
                     header('Location:./?controller=' . $this->doorGets->controllerNameNow());
                     exit;
                 }
             }
             break;
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:51,代码来源:orderRequest.php

示例8: __construct

 public function __construct(&$doorGets)
 {
     $doorGets->Table = '_order_status';
     parent::__construct($doorGets);
     if (empty($doorGets->user)) {
         header('Location:./?controller=authentification&error-login=true&back=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     if (!in_array('order', $doorGets->user['liste_module_interne'])) {
         FlashInfo::set($this->doorGets->__("Vous n'avez pas les droits pour afficher ce module"), "error");
         header('Location:./');
         exit;
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:14,代码来源:orderstatusController.php

示例9: doAction

 public function doAction()
 {
     $out = '';
     $User = $this->doorGets->user;
     $tableName = '_users_inbox';
     $controllerName = 'myinbox';
     // get Content for edit / delete
     $params = $this->doorGets->Params();
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $this->doorGets->dbQS($id, $tableName);
         if (empty($isContent)) {
             return null;
         }
     }
     switch ($this->Action) {
         case 'select':
             if ($isContent['readed'] == '2' && $isContent['id_user'] == $User['id']) {
                 $data['readed'] = 1;
                 $data['date_readed'] = time();
                 $this->doorGets->dbQU($id, $data, $tableName);
             }
             break;
         case 'delete':
             $sentUrl = '';
             if (!empty($this->doorGets->Form->i)) {
                 $this->doorGets->checkMode();
                 if (empty($this->doorGets->Form->e)) {
                     $data = array();
                     if ($isContent['id_user'] == $User['id']) {
                         $data['user_delete'] = 1;
                         $data['date_deleted'] = time();
                     }
                     if ($isContent['id_user_sent'] == $User['id']) {
                         $data['user_sent_delete'] = 1;
                         $data['date_sent_deleted'] = time();
                         $sentUrl = '&action=sent';
                     }
                     if (!empty($data)) {
                         $this->doorGets->dbQU($id, $data, $tableName);
                         FlashInfo::set("Le message à été corréctement supprimer.");
                         header('Location:./?controller=' . $controllerName . $sentUrl);
                         exit;
                     }
                 }
             }
             break;
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:49,代码来源:myinboxRequest.php

示例10: doAction

 public function doAction()
 {
     $out = '';
     $tableName = '_dg_inbox';
     $controllerName = 'inbox';
     // get Content for edit / delete
     $params = $this->doorGets->Params();
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $this->doorGets->dbQS($id, $tableName);
         if (empty($isContent)) {
             return null;
         }
     }
     switch ($this->Action) {
         case 'select':
             if ($isContent['lu'] == '2') {
                 $data['lu'] = 1;
                 $data['date_lu'] = time();
                 $this->doorGets->dbQU($id, $data, '_dg_inbox');
             }
             break;
         case 'delete':
             if (!empty($this->doorGets->Form->i)) {
                 $this->doorGets->checkMode();
                 if (empty($this->doorGets->Form->e)) {
                     $this->doorGets->dbQD($isContent['id'], $tableName);
                     FlashInfo::set($this->doorGets->__("Le message à été corréctement supprimer"));
                     header('Location:./?controller=' . $controllerName);
                     exit;
                 }
             }
             break;
         case 'massdelete':
             if (!empty($this->doorGets->Form['massdelete_index']->i) && isset($this->doorGets->Form['massdelete_index']->i['groupe_delete_index'])) {
                 $this->doorGets->checkMode();
                 if (empty($this->doorGets->Form['massdelete_index']->e)) {
                     $ListeForDeleted = $this->doorGets->_toArray($this->doorGets->Form['massdelete_index']->i['groupe_delete_index']);
                     foreach ($ListeForDeleted as $id) {
                         $this->doorGets->dbQD($id, $tableName);
                     }
                     FlashInfo::set($this->doorGets->__("Les données sont supprimées"));
                     header('Location:./?controller=' . $controllerName);
                     exit;
                 }
             }
             break;
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:49,代码来源:inboxRequest.php

示例11: __construct

 public function __construct(&$doorGets)
 {
     if (empty($doorGets->user)) {
         header('Location:./?controller=authentification&error-login=true&back=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     // Test if $uri module is valid
     $isUri = array();
     $User = $doorGets->user;
     $params = $doorGets->Params();
     $lgActuel = $doorGets->getLangueTradution();
     $moduleInfos = $doorGets->moduleInfos($doorGets->Uri, $lgActuel);
     if (array_key_exists('uri', $params['GET'])) {
         $uri = $params['GET']['uri'];
         $isUri = $doorGets->dbQS($uri, '_modules', 'uri');
     }
     $moduleInfos = $doorGets->moduleInfos($doorGets->Uri, $lgActuel);
     parent::__construct($doorGets);
     $this->table = '_categories';
     $lgActuel = $doorGets->getLangueTradution();
     $redirectUrl = './?controller=' . $doorGets->controllerNameNow() . '&uri=' . $this->doorGets->Uri . '&lg=' . $lgActuel;
     $redirectUrlModule = './?controller=modules&lg=' . $lgActuel;
     // If isn't valid uri do rediction to modules controller
     if (!array_key_exists('uri', $params['GET']) || empty($params['GET']['uri']) || empty($this->doorGets->Uri)) {
         FlashInfo::set($doorGets->__("Le module n'existe pas"), "error");
         header('Location:' . $redirectUrlModule);
         exit;
     }
     // get Content for edit / delete
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $doorGets->dbQS($id, $this->table);
         if (!is_numeric($id)) {
             $id = '-!-';
         }
         if (empty($isContent)) {
             FlashInfo::set($doorGets->__("Le contenu n'existe pas"), "error");
             header('Location:' . $redirectUrl);
             exit;
         }
     }
     if (!in_array($moduleInfos['id'], $this->doorGets->user['liste_module_admin'])) {
         FlashInfo::set($doorGets->l("Vous n'avez pas les droits pour gérer les catégories"), "error");
         header('Location:./');
         exit;
     }
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:47,代码来源:modulecategoryController.php

示例12: __construct

 public function __construct(&$doorGets)
 {
     if (!is_object($doorGets)) {
         return null;
     }
     $this->doorGets = $doorGets;
     $this->Params = $doorGets->Params;
     $this->Action = $doorGets->Action();
     $this->zoneArea = $doorGets->zoneArea();
     $lgActuel = $doorGets->getLangueTradution();
     $redirectUrlModule = './?controller=modules&lg=' . $lgActuel;
     if (empty($doorGets->user) && $doorGets->controllerNameNow() !== 'authentification') {
         header('Location:./?controller=authentification&error-login=true&back=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     // Test if $uri module is valid
     $isUri = array();
     $params = $doorGets->Params();
     if (array_key_exists('uri', $params['GET'])) {
         $uri = $params['GET']['uri'];
         $isUri = $doorGets->dbQS($uri, '_modules', 'uri');
         if (!empty($isUri)) {
             $doorGets->Uri = $uri;
             $doorGets->Table = '_m_' . $this->doorGets->getRealUri($uri);
         } else {
             FlashInfo::set($this->doorGets->__("L'URI n'existe pas"), "error");
             header('Location:' . $redirectUrlModule);
             exit;
         }
     } else {
         $moduleWithUri = Constant::$modules;
         if (in_array($doorGets->controllerNameNow(), $moduleWithUri)) {
             FlashInfo::set($this->doorGets->__("L'URI est vide"), "error");
             header('Location:' . $redirectUrlModule);
             exit;
         }
     }
     $this->getActionMethod();
     $doorGets->setController($this);
     $doorGets->Categories = $doorGets->loadCategories($doorGets->Uri);
     $this->doorGets = $doorGets;
     $doorGets->Content = $this->Content;
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:43,代码来源:doorGetsUserController.php

示例13: __construct

 public function __construct(&$doorGets)
 {
     $doorGets->Table = '_users_inbox';
     parent::__construct($doorGets);
     $User = $doorGets->user;
     $params = $doorGets->Params();
     $redirectUrl = './?controller=myinbox';
     if (empty($User)) {
         header('Location:./?controller=authentification&error-login=true&back=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     if (!in_array('myinbox', $User['liste_module_interne']) || in_array('myinbox', $doorGets->user['liste_module_interne']) && SAAS_ENV && !SAAS_MYINBOX) {
         FlashInfo::set($this->doorGets->__("Vous n'avez pas les droits pour afficher ce module"), "error");
         header('Location:./');
         exit;
     }
     // get Content for edit / delete
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $doorGets->dbQS($id, $doorGets->Table);
         if (!is_numeric($id)) {
             $id = '-!-';
         }
         if (empty($isContent)) {
             FlashInfo::set($doorGets->l("Le contenu n'existe pas"), "error");
             header('Location:' . $redirectUrl);
             exit;
         } elseif (!empty($isContent) && $isContent['id_user'] !== $User['id'] && $isContent['id_user_sent'] !== $User['id']) {
             FlashInfo::set($doorGets->l("Vous ne pouvez pas afficher cette page"), "error");
             header('Location:' . $redirectUrl);
             exit;
         } elseif (!empty($isContent) && $isContent['id_user'] == $User['id'] && $isContent['user_delete'] != 0) {
             FlashInfo::set($doorGets->l("Le contenu n'existe pas"), "error");
             header('Location:' . $redirectUrl);
             exit;
         } elseif (!empty($isContent) && $isContent['id_user_sent'] == $User['id'] && $isContent['user_sent_delete'] != 0) {
             FlashInfo::set($doorGets->l("Le contenu n'existe pas"), "error");
             header('Location:' . $redirectUrl);
             exit;
         }
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:42,代码来源:myinboxController.php

示例14: doAction

 public function doAction()
 {
     $out = '';
     $this->doorGets->Table = '_dg_survey';
     // Init langue
     $lgActuel = $this->doorGets->getLangueTradution();
     $moduleInfos = $this->doorGets->moduleInfos($this->doorGets->Uri, $lgActuel);
     // Init url redirection
     $redirectUrl = './?controller=module' . $moduleInfos['type'] . '&uri=' . $this->doorGets->Uri . '&lg=' . $lgActuel;
     // get Content for edit / delete
     $params = $this->doorGets->Params();
     if (array_key_exists('uri', $params['GET'])) {
         $uri = $params['GET']['uri'];
         $isContent = $this->doorGets->dbQS($uri, $this->doorGets->Table, 'uri');
         if (!empty($isContent)) {
             if ($lgGroupe = @unserialize($isContent['groupe_traduction'])) {
                 $idLgGroupe = $lgGroupe[$lgActuel];
                 $isContentTraduction = $this->doorGets->dbQS($idLgGroupe, $this->doorGets->Table . '_traduction');
                 if (!empty($isContentTraduction)) {
                     unset($isContent['id']);
                     $isContent = $isContent + $isContentTraduction;
                 }
             }
         }
     }
     $champsObligatoire = array('titre', 'article_tinymce');
     if (!empty($this->doorGets->Form->i)) {
         $this->doorGets->checkMode();
         if (empty($this->doorGets->Form->e)) {
             $data = array('question' => $this->doorGets->Form->i['question'], 'response_a' => $this->doorGets->Form->i['response_a'], 'response_b' => $this->doorGets->Form->i['response_b'], 'response_c' => $this->doorGets->Form->i['response_c'], 'response_d' => $this->doorGets->Form->i['response_d'], 'response_e' => $this->doorGets->Form->i['response_e'], 'response_f' => $this->doorGets->Form->i['response_f'], 'response_g' => $this->doorGets->Form->i['response_g'], 'response_h' => $this->doorGets->Form->i['response_h'], 'response_i' => $this->doorGets->Form->i['response_i']);
             $data['date_modification'] = time();
             $dataContenu['date_modification'] = time();
             $this->doorGets->dbQU($isContent['id_survey'], $dataContenu, $this->doorGets->Table);
             $this->doorGets->dbQU($isContent['id'], $data, $this->doorGets->Table . '_traduction', "id", " AND langue='{$lgActuel}' LIMIT 1 ");
             //$this->doorGets->clearDBCache();
             FlashInfo::set($this->doorGets->__("Vos informations ont bien été mises à jour"));
             $this->doorGets->_redirect($redirectUrl);
         }
         FlashInfo::set($this->doorGets->__("Veuillez remplir correctement le formulaire"), "error");
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:41,代码来源:modulesurveyRequest.php

示例15: errorHeaderResponse

 public function errorHeaderResponse($message = '', $errors = array())
 {
     $ajax = false;
     if ($ajax) {
         $this->_errorJson($message, $errors);
     } else {
         FlashInfo::set($message, "error");
     }
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:9,代码来源:doorgetsFunctions.php


注:本文中的FlashInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。