Exemple #1
0
 public function actionDisplay($lang, $mySql, $queries, $module, $module_dispatch, $idUrl, $type, $categorie, $ss_categorie, $search, $sort, $order, $pagination)
 {
     $ActionDetail = new ActionDetail();
     $ActionUpdate = new ActionUpdate();
     $ActionDelete = new ActionDelete();
     $ActionAdd = new ActionAdd();
     $layout = "";
     if ($type == DETAIL) {
         $layout .= $ActionDetail->init($mySql, $queries, $lang, $module_dispatch, $idUrl);
     } elseif ($type == DELETE) {
         $layout .= $ActionDelete->init($mySql, $queries, $lang, $module, $module_dispatch, $idUrl, $categorie, $ss_categorie, $search, $sort, $order, $pagination);
     } elseif ($type == UPDATE) {
         $layout .= $ActionUpdate->init($mySql, $queries, $lang, $module, $module_dispatch, $idUrl, $categorie, $ss_categorie, $search, $sort, $order, $pagination);
     } elseif ($type == ADD) {
         $layout .= $ActionAdd->init($mySql, $queries, $lang, $module, $module_dispatch, $categorie, $ss_categorie);
     }
     return $layout;
 }
Exemple #2
0
include_once 'view/helper/helper_layout.class.php';
include_once 'view/helper/helper_pagination.class.php';
include_once 'view/wrapper/classes/listing.class.php';
include_once 'controller/helper/helper_pagination.class.php';
include_once 'controller/helper/helper_other.class.php';
include_once 'controller/helper/helper_mail.class.php';
include_once 'controller/action/action.class.php';
include_once 'controller/action/action_add.class.php';
// Déclarartion des variables
$mySql = new MySql();
$queries = new Queries();
$HelperPagination = new HelperPagination();
$HelperOther = new HelperOther();
$HelperLayout = new HelperLayout();
$Action = new Action();
$ActionAdd = new ActionAdd();
$HelperMail = new HelperMail();
if (!empty($var->categorie)) {
    // Test si une catégorie a été choisie
    $module_dispatch = $var->module;
    if ($Action->init($lang, $mySql, $queries, $module_dispatch, $var->submit, $var->action, $var->idUrl)) {
        // Save, update, delete record
        $var->module_output .= $Action->output;
        $var->type = $Action->type;
        $var->idUrl = $Action->idInsert;
    } else {
        $Action->sendNewsletters($lang, $mySql, $queries, $module_dispatch, $HelperMail, $var->sujetSend, $var->contenuSend, $var->groupeSend);
        $var->module_output .= $Action->output;
    }
    if (!empty($var->ss_categorie)) {
        // Test la sous catégorie