Example #1
0
 public function __construct($set, $map, $data)
 {
     parent::__construct();
     parent::rqst();
     $this->set = $set;
     $this->map = $map;
     $this->data = $data[0];
     if (isset($_POST['crud'])) {
         $validation = crud_validation($this->map);
         $post = $validation['post'];
         $error = $validation['error'];
         $this->data = array_merge($this->data, $post);
         if ($error) {
             foreach ($error as $e => $v) {
                 $this->map[$e]['error'] = $v;
             }
         } else {
             switch ($post['method']) {
                 case 'edit':
                     $data = array_intersect_key($post, array_flip($this->set['cols']));
                     $this->update($this->set['tbl'], $data, $this->set['actionID'] . '=' . $post[$this->set['actionID']]);
                     break;
                     //                    case 'add':
                     //                        $this->update(REVIEWS_TABLE, $data, 'id=' . $data['id']);
                     //                        break;
             }
             $hook = $this->set['hook'];
             if ($hook) {
                 call_user_func($hook['func'], $this->data[$hook['param']]);
             }
             Redirect($this->build_url('delete'));
         }
     }
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     if (empty($this->date)) {
         $this->date = today();
     }
 }
Example #3
0
 public function __construct($lg = 'fr')
 {
     include BASE . 'config/locale.php';
     parent::__construct();
     $this->myLanguage = $lg;
     $defaultLg = 'en';
     $this->allLanguages = $this->getAllLanguages();
     $this->allLanguagesSession = $arrLangue;
     $lgTrad = $this->getLangueTradution();
     $infoWeb = $this->dbQS(1, '_website');
     $infoWebTraduction = $this->dbQS($lgTrad, '_website_traduction', 'langue');
     if (empty($infoWebTraduction)) {
         $infoWebTraductionTemp = $this->dbQS($defaultLg, '_website_traduction', 'langue');
         if (!empty($infoWebTraductionTemp)) {
             unset($infoWebTraductionTemp['id']);
             $infoWebTraductionTemp['langue'] = $lgTrad;
             $this->dbQI($infoWebTraductionTemp, '_website_traduction');
         }
     }
     $infoWebTraduction = $this->dbQS($lgTrad, '_website_traduction', 'langue');
     if (!empty($infoWeb) && !empty($infoWebTraduction)) {
         $this->configWeb = $infoWeb;
         $this->configWeb['oauth_google_active'] = $infoWeb['oauth_google_active'] === '1' ? true : false;
         $this->configWeb['oauth_facebook_active'] = $infoWeb['oauth_facebook_active'] === '1' ? true : false;
         $this->configWeb['statut_tinymce'] = html_entity_decode($infoWebTraduction['statut_tinymce']);
         $this->configWeb['title'] = $infoWebTraduction['title'];
         $this->configWeb['slogan'] = $infoWebTraduction['slogan'];
         $this->configWeb['description'] = $infoWebTraduction['description'];
         $this->configWeb['copyright'] = $infoWebTraduction['copyright'];
         $this->configWeb['year'] = $infoWebTraduction['year'];
         $this->configWeb['keywords'] = $infoWebTraduction['keywords'];
         $this->configWeb['date_modification'] = $infoWebTraduction['date_modification'];
         $this->configWeb['langue_groupe'] = @unserialize($this->configWeb['langue_groupe']);
         if (!is_array($this->configWeb['langue_groupe'])) {
             $this->configWeb['langue_groupe'] = array();
         }
         foreach ($arrLangue as $k => $v) {
             if (!array_key_exists($k, $this->configWeb['langue_groupe']) && $infoWeb['langue_front'] !== $k) {
                 unset($arrLangue[$k]);
             }
         }
         $this->allLanguagesWebsite = $arrLangue;
     }
 }
Example #4
0
 public function __construct($lg = 'fr')
 {
     $this->fileLocale = BASE . 'config/locale.php';
     include $this->fileLocale;
     $this->arrLangue = $arrLangue;
     $this->fileTemp = LANGUE . 'temp.lg.php';
     include $this->fileTemp;
     $this->wTranslate = $wTranslate;
     parent::__construct();
     $this->myLanguage = $lg;
     $fileLangue = LANGUE . $lg . '.lg.php';
     include $fileLangue;
     $this->_w = $_w;
     $defaultLg = 'en';
     $this->allLanguages = $this->getAllLanguages();
     $this->allLanguagesSession = $this->arrLangue;
     $lgTrad = $this->getLangueTradution();
     $infoWeb = $this->dbQS(Constant::$websiteId, '_website');
     $infoWebTraduction = $this->dbQS($lgTrad, '_website_traduction', 'langue');
     if (empty($infoWebTraduction)) {
         $infoWebTraductionTemp = $this->dbQS($defaultLg, '_website_traduction', 'langue');
         if (!empty($infoWebTraductionTemp)) {
             unset($infoWebTraductionTemp['id']);
             $infoWebTraductionTemp['langue'] = $lgTrad;
             $this->dbQI($infoWebTraductionTemp, '_website_traduction');
         }
     }
     $infoWebTraduction = $this->dbQS($lgTrad, '_website_traduction', 'langue');
     if (!empty($infoWeb) && !empty($infoWebTraduction)) {
         $this->configWeb = $infoWeb;
         $this->configWeb['oauth_google_active'] = $infoWeb['oauth_google_active'] === '1' ? true : false;
         $this->configWeb['oauth_facebook_active'] = $infoWeb['oauth_facebook_active'] === '1' ? true : false;
         $this->configWeb['statut_tinymce_edit'] = $this->_cleanPHP($infoWebTraduction['statut_tinymce']);
         $this->configWeb['privacy_tinymce_edit'] = $this->_cleanPHP($infoWebTraduction['privacy_tinymce']);
         $this->configWeb['signature_tinymce_edit'] = $this->_cleanPHP($infoWebTraduction['signature_tinymce']);
         $this->configWeb['cgu_tinymce_edit'] = $this->_cleanPHP($infoWebTraduction['cgu_tinymce']);
         $this->configWeb['terms_tinymce_edit'] = $this->_cleanPHP($infoWebTraduction['terms_tinymce']);
         $this->configWeb['privacy_tinymce'] = html_entity_decode($infoWebTraduction['privacy_tinymce']);
         $this->configWeb['statut_tinymce'] = html_entity_decode($infoWebTraduction['statut_tinymce']);
         $this->configWeb['terms_tinymce'] = html_entity_decode($infoWebTraduction['terms_tinymce']);
         $this->configWeb['signature_tinymce'] = html_entity_decode($infoWebTraduction['signature_tinymce']);
         $this->configWeb['cgu_tinymce'] = html_entity_decode($infoWebTraduction['cgu_tinymce']);
         // $this->configWeb['transfer_tinymce_edit']   =  $this->_cleanPHP($this->configWeb['transfer_tinymce']);
         // $this->configWeb['check_tinymce_edit']      =  $this->_cleanPHP($this->configWeb['check_tinymce']);
         // $this->configWeb['cash_tinymce_edit']       =  $this->_cleanPHP($this->configWeb['cash_tinymce']);
         // $this->configWeb['transfer_tinymce']        =  html_entity_decode($this->configWeb['transfer_tinymce']);
         // $this->configWeb['check_tinymce']           =  html_entity_decode($this->configWeb['check_tinymce']);
         // $this->configWeb['cash_tinymce']            =  html_entity_decode($this->configWeb['cash_tinymce']);
         $this->configWeb['title'] = $infoWebTraduction['title'];
         $this->configWeb['slogan'] = $infoWebTraduction['slogan'];
         $this->configWeb['description'] = $infoWebTraduction['description'];
         $this->configWeb['copyright'] = $infoWebTraduction['copyright'];
         $this->configWeb['year'] = $infoWebTraduction['year'];
         // $this->configWeb['currency']                =  $infoWebTraduction['currency'];
         $this->configWeb['keywords'] = $infoWebTraduction['keywords'];
         $this->configWeb['date_modification'] = $infoWebTraduction['date_modification'];
         // $this->configWeb['store_vat']               = $infoWebTraduction['store_vat'];
         // $this->configWeb['shipping_free_info']      = $infoWebTraduction['shipping_free_info'];
         // $this->configWeb['shipping_free_active']    = $infoWebTraduction['shipping_free_active'];
         // $this->configWeb['shipping_slow_info']      = $infoWebTraduction['shipping_slow_info'];
         // $this->configWeb['shipping_slow_amount']    = $infoWebTraduction['shipping_slow_amount'];
         // $this->configWeb['shipping_slow_active']    = $infoWebTraduction['shipping_slow_active'];
         // $this->configWeb['shipping_fast_info']      = $infoWebTraduction['shipping_fast_info'];
         // $this->configWeb['shipping_fast_amount']    = $infoWebTraduction['shipping_fast_amount'];
         // $this->configWeb['shipping_fast_active']    = $infoWebTraduction['shipping_fast_active'];
         $this->configWeb['langue_groupe'] = @unserialize($this->configWeb['langue_groupe']);
         $this->configWeb['addresses'] = @unserialize($this->configWeb['addresses']);
         if (!is_array($this->configWeb['langue_groupe'])) {
             $this->configWeb['langue_groupe'] = array();
         }
         foreach ($arrLangue as $k => $v) {
             if (!array_key_exists($k, $this->configWeb['langue_groupe']) && $infoWeb['langue_front'] !== $k) {
                 unset($arrLangue[$k]);
             }
         }
         $this->allLanguagesWebsite = $arrLangue;
     }
 }
Example #5
0
 public function __construct()
 {
     parent::__construct();
     $this->table = "Pays";
 }
Example #6
0
 public function __construct()
 {
     parent::__construct();
     $this->table = "Historique";
 }
Example #7
0
 /**
  * Constructor
  */
 public function __construct()
 {
     //$this->idsecretaire = new \Doctrine\Common\Collections\ArrayCollection();
     $this->idsecretaire = array();
     parent::__construct();
     $this->table = "Cadre";
 }
Example #8
0
 public function __construct()
 {
     parent::__construct();
     $this->table = "Administrator";
 }
Example #9
0
 public function __construct()
 {
     parent::__construct();
     $this->table = "Timbre";
 }
Example #10
0
 public function __construct()
 {
     parent::__construct();
     $this->map = self::map();
 }
 public function __construct()
 {
     parent::__construct();
     $this->setTabela('usuarios');
 }
Example #12
0
 public function __construct()
 {
     parent::__construct();
     $this->table = "Abonnement";
 }
Example #13
0
 public function __construct()
 {
     parent::__construct();
     $this->table = "Loggingadmin";
 }
Example #14
0
 public function __construct()
 {
     parent::__construct();
     $this->table = "Entreprise";
 }
Example #15
0
 public function __construct()
 {
     parent::__construct();
     $this->table = "Langue";
 }