本文整理汇总了PHP中FlashInfo类的典型用法代码示例。如果您正苦于以下问题:PHP FlashInfo类的具体用法?PHP FlashInfo怎么用?PHP FlashInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FlashInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: doAction
public function doAction()
{
$out = '';
$params = $this->doorGets->Params();
if (array_key_exists('id', $params['GET'])) {
$id = $params['GET']['id'];
$isContent = $this->doorGets->dbQS($id, '_rubrique');
if (empty($isContent)) {
header('Location:./?controller=rubriques');
exit;
}
}
switch ($this->Action) {
case 'add':
$cResultsInt = $this->doorGets->getCountTable('_rubrique');
if (!empty($this->doorGets->Form->i)) {
$this->doorGets->checkMode();
foreach ($this->doorGets->Form->i as $k => $v) {
if (empty($v) && $k !== 'idModule') {
$this->doorGets->Form->e['rubriques_add_' . $k] = 'ok';
}
}
if (empty($this->doorGets->Form->e)) {
$data['name'] = $this->doorGets->Form->i['name'];
$data['ordre'] = $cResultsInt + 1;
$data['idModule'] = $this->doorGets->Form->i['idModule'];
$data['showinmenu'] = $this->doorGets->Form->i['showinmenu'];
$data['date_creation'] = time();
$idContent = $this->doorGets->dbQI($data, '_rubrique');
FlashInfo::set($this->doorGets->__("Vos informations ont bien été mises à jour"));
header('Location:./?controller=rubriques');
exit;
}
FlashInfo::set($this->doorGets->__("Veuillez remplir correctement le formulaire"), "error");
}
break;
case 'edit':
if (!empty($this->doorGets->Form->i)) {
$this->doorGets->checkMode();
foreach ($this->doorGets->Form->i as $k => $v) {
if (empty($v) && $k !== 'idModule') {
$this->doorGets->Form->e['rubriques_edit_' . $k] = 'ok';
}
}
if (empty($this->doorGets->Form->e)) {
$data = $this->doorGets->Form->i;
$data = array('name' => $this->doorGets->Form->i['name'], 'idModule' => $this->doorGets->Form->i['idModule'], 'showinmenu' => $this->doorGets->Form->i['showinmenu']);
$this->doorGets->dbQU($isContent['id'], $data, '_rubrique');
FlashInfo::set($this->doorGets->__("Vos informations ont bien été mises à jour"));
//$this->doorGets->clearDBCache();
header('Location:./?controller=rubriques');
exit;
}
}
break;
case 'delete':
if (!empty($this->doorGets->Form->i) && empty($this->doorGets->Form->e)) {
$this->doorGets->checkMode();
$this->doorGets->dbQD($isContent['id'], '_rubrique', 'id');
$this->doorGets->dbQL("UPDATE _rubrique SET ordre = ordre - 1 WHERE ordre > " . $isContent['ordre'] . " ");
$this->doorGets->clearModuleDBCache('_rubrique');
FlashInfo::set($this->doorGets->__("Vos informations sont bien supprimées"));
header('Location:./?controller=rubriques');
exit;
}
break;
}
}
开发者ID:doorgets,项目名称:cms,代码行数:68,代码来源:rubriquesRequest.php
示例17: editblockAction
public function editblockAction()
{
if (!in_array('module_block', $this->doorGets->user['liste_module_interne']) || in_array('module_block', $this->doorGets->user['liste_module_interne']) && SAAS_ENV && !SAAS_WIDGET_BLOCK) {
FlashInfo::set($this->doorGets->__("Vous n'avez pas les droits pour afficher ce module"), "error");
header('Location:./');
exit;
}
$this->doorGets->Form = new Formulaire('modules_editblock');
// Generate the model
$this->getRequest();
// return the view
return $this->getView();
}
开发者ID:neoartdoo,项目名称:CMS,代码行数:13,代码来源:modulesController.php
示例18:
$tplRubrique = Template::getView('user/user_rubrique_left');
include $tplRubrique;
?>
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div id="page-content-wrapper-content">
<?php
echo FlashInfo::get();
?>
<?php
echo $doorGets->Controller()->getContent();
?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
} else {
// Flash info
echo FlashInfo::get();
$tplHeader = Template::getView('index_header');
include $tplHeader;
echo $doorGets->Controller()->getContent();
}
开发者ID:doorgets,项目名称:cms,代码行数:31,代码来源:user_wrapper.tpl.php
示例19: doAction
public function doAction()
{
$lgActuel = $this->doorGets->getLangueTradution();
$typeFile["image/png"] = "data/upload/png/";
$typeFile["image/jpeg"] = "data/upload/jpg/";
$typeFile["image/gif"] = "data/upload/gif/";
$typeFile["application/zip"] = "data/upload/zip/";
$typeFile["application/x-zip-compressed"] = "data/upload/xzip/";
$typeFile["application/pdf"] = "data/upload/pdf/";
$typeFile["application/x-shockwave-flash"] = "data/upload/swf/";
$typeExtension["image/png"] = "png";
$typeExtension["image/jpeg"] = "jpg";
$typeExtension["image/gif"] = "gif";
$typeExtension["application/zip"] = "zip";
$typeExtension["application/x-zip-compressed"] = "zip";
$typeExtension["application/pdf"] = "pdf";
$typeExtension["application/x-shockwave-flash"] = "swf";
$typeImage["image/png"] = '<img src="' . BASE_IMG . 'png.png" class="ico_fichier" >';
$typeImage["image/jpeg"] = '<img src="' . BASE_IMG . 'jpg.png" class="ico_fichier" >';
$typeImage["image/gif"] = '<img src="' . BASE_IMG . 'gif.png" class="ico_fichier" >';
$typeImage["application/zip"] = '<img src="' . BASE_IMG . 'zip.png" class="ico_fichier" >';
$typeImage["application/x-zip-compressed"] = '<img src="' . BASE_IMG . 'zip.png" class="ico_fichier" >';
$typeImage["application/pdf"] = '<img src="' . BASE_IMG . 'pdf.png" class="ico_fichier" >';
$typeImage["application/x-shockwave-flash"] = '<img src="' . BASE_IMG . 'swf.png" class="ico_fichier" >';
$this->typeFile = $typeFile;
$this->typeExtension = $typeExtension;
$this->typeImage = $typeImage;
$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)) {
if ($lgGroupe = @unserialize($isContent['groupe_traduction'])) {
$idLgGroupe = $lgGroupe[$lgActuel];
$isContentTraduction = $this->doorGets->dbQS($idLgGroupe, $this->doorGets->Table . '_traduction');
if (!empty($isContentTraduction)) {
$isContent = array_merge($isContent, $isContentTraduction);
$this->isContent = $isContent;
}
}
}
}
switch ($this->Action) {
case 'add':
if (!empty($this->doorGets->Form->i) && empty($this->doorGets->Form->e)) {
$this->doorGets->checkMode();
if (!is_dir(BASE_DATA . 'upload')) {
@mkdir(BASE_DATA . 'upload', 0777, true);
copy(BASE_DATA . 'index.php', BASE_DATA . 'upload/index.php');
}
if (empty($this->doorGets->Form->i['title'])) {
FlashInfo::set($this->doorGets->__("Veuillez saisir le nom du fichier"), "error");
$this->doorGets->Form->e['media_add_title'] = 'ok';
}
if (isset($_FILES['media_add_path']) && $_FILES['media_add_path']['error'] != 0) {
FlashInfo::set($this->doorGets->__("Veuillez importer un fichier valide"), "error");
$this->doorGets->Form->e['media_add_path'] = 'ok';
}
if (isset($_FILES['media_add_path']) && empty($this->doorGets->Form->e)) {
if (!array_key_exists($_FILES['media_add_path']["type"], $this->typeFile)) {
FlashInfo::set($this->doorGets->__("Veuillez importer un fichier valide"), "error");
$this->doorGets->Form->e['media_add_path'] = 'ok';
}
if ($_FILES['media_add_path']["size"] > $this->sizeMax) {
FlashInfo::set($this->doorGets->__("Votre fichier est trop lourd"), "error");
$this->doorGets->Form->e['media_add_path'] = 'ok';
}
}
$uri = $this->doorGets->Form->i['uri'];
$isValidUri = $this->doorGets->isValidUri($uri, '_dg_files');
if (!$isValidUri) {
$this->doorGets->Form->e[$this->doorGets->controllerNameNow() . '_add_uri'] = 'ok';
}
if (empty($this->doorGets->Form->e)) {
$ttff = $_FILES['media_add_path']["type"];
$sSize = $_FILES['media_add_path']['size'];
$ttf = $this->typeExtension[$ttff];
$uni = time() . '-' . uniqid($ttf);
if (!is_dir(BASE_DATA . 'upload/' . $ttf)) {
@mkdir(BASE_DATA . 'upload/' . $ttf, 0777, true);
copy(BASE_DATA . 'index.php', BASE_DATA . 'upload/' . $ttf . '/index.php');
}
$nameFileImage = $uni . '-doorgets.' . $ttf;
$uploaddir = $this->typeFile[$ttff];
$uploadfile = BASE . $uploaddir . $nameFileImage;
if (move_uploaded_file($_FILES['media_add_path']['tmp_name'], $uploadfile)) {
$this->doorGets->Form->i['fichier'] = $nameFileImage;
}
$data['uri'] = $this->doorGets->Form->i['uri'];
$data['id_user'] = $this->doorGets->user['id'];
$data['id_groupe'] = $this->doorGets->user['groupe'];
$data['type'] = $ttff;
$data['date_creation'] = time();
$idContent = $this->doorGets->dbQI($data, $this->doorGets->Table);
foreach ($this->doorGets->getAllLanguages() as $k => $v) {
$dataTraduction['id_file'] = $idContent;
$dataTraduction['title'] = $this->doorGets->Form->i['title'];
$dataTraduction['path'] = $nameFileImage;
//.........这里部分代码省略.........
开发者ID:neoartdoo,项目名称:CMS,代码行数:101,代码来源:mediaRequest.php
示例20: doAction
public function doAction()
{
$out = '';
$lgTraduction = $this->doorGets->getLangueTradution(true);
switch ($this->Action) {
case 'oauth':
if (!empty($this->doorGets->Form->i)) {
$this->doorGets->checkMode();
if (!array_key_exists('oauth_google_active', $this->doorGets->Form->i)) {
$this->doorGets->Form->i['oauth_google_active'] = 0;
}
if (!array_key_exists('oauth_facebook_ac
|
请发表评论