Example #1
0
 public function init()
 {
     parent::init();
     $this->view->language = Cible_FunctionsGeneral::getLanguageSuffix($this->_currentInterfaceLanguage);
     $this->view->headLink()->appendStylesheet($this->view->locateFile('newsletterStats.css'));
     $this->view->headScript()->appendFile($this->view->locateFile('jquery.dataTables.min.js', 'datatable'));
     $this->view->headScript()->appendFile($this->view->locateFile('dataTables.fourButtonNavigation.js', 'datatable/plugins'));
     $this->view->headScript()->appendFile($this->view->locateFile('statisticAction.js'));
     $this->nlObject = new NewsletterLog(array('moduleId' => $this->_moduleID));
 }
 public function toExcelAction()
 {
     $this->filename = 'StaticTexts.xlsx';
     $this->tables = array('Static_Texts' => array('ST_Identifier', 'ST_Desc_backend', 'ST_Value', 'ST_LangID'));
     $this->fields = array('ST_LangID' => array('width' => '', 'label' => ''), 'ST_Desc_backend' => array('width' => '', 'label' => ''), 'ST_Value' => array('width' => '', 'label' => ''));
     $this->filters = array();
     $staticText = new StaticTexts();
     $this->select = $staticText->select()->where('Static_Texts.ST_Editable = ?', 1)->where('Static_Texts.ST_Type = ?', 'client');
     parent::toExcelAction();
 }
Example #3
0
 public function init()
 {
     $this->view->headScript()->appendFile($this->view->locateFile('tiny_mce.js', 'tiny_mce'));
     $this->view->headScript()->appendFile($this->view->locateFile('mcimagemanager.js', 'tiny_mce/plugins/imagemanager/js/'));
     parent::init();
     $dataPath = "../../" . $this->_config->document_root . "/data/";
     $this->_imageFolder = $dataPath . "images/" . $this->_moduleTitle . "/";
     $this->_rootImgPath = Zend_Registry::get("www_root") . "/data/images/" . $this->_moduleTitle . "/";
     $this->_imgMenuFolder = $dataPath . "images/" . $this->_folderMenu . "/";
     $this->_rootMenuImgPath = Zend_Registry::get("www_root") . "/data/images/" . $this->_folderMenu . "/";
 }
 /**
  * Set some properties to redirect and process actions.
  *
  * @access public
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     // Sets the called action name. This will be dispatched to the method
     $this->_currentAction = $this->_getParam('action');
     // The action (process) to do for the selected object
     $this->_actionKey = $this->_getParam('actionKey');
     $this->_formatName();
     $this->view->assign('cleaction', $this->_labelSuffix);
     $dataImagePath = "../../" . $this->_config->document_root . "/data/images/";
     if (isset($this->_objectList[$this->_currentAction])) {
         $this->_imageFolder = $dataImagePath . $this->_moduleTitle . "/" . $this->_objectList[$this->_currentAction] . "/";
     }
     if (isset($this->_objectList[$this->_currentAction])) {
         $this->_rootImgPath = Zend_Registry::get("www_root") . "/data/images/" . $this->_moduleTitle . "/" . $this->_objectList[$this->_currentAction] . "/";
     }
 }
Example #5
0
 public function init()
 {
     parent::init();
     $dirModuleName = $this->getRequest()->getModuleName();
     $this->_moduleName = Cible_Translation::getCibleText("module_{$dirModuleName}");
     $this->view->assign('moduleName', $this->_moduleName);
     /* if( isset( $this->_config->modules->$dirModuleName->id ) )
               $this->_moduleId = $this->_config->modules->$dirModuleName->id;
               else
               Throw new Exception('Fails to set moduleId');
     
               if( isset( $this->_config->modules->$dirModuleName->defaultController ) )
               $this->_defaultController = str_replace("'",'',$this->_config->modules->$dirModuleName->defaultController);
     
               if( isset( $this->_config->modules->$dirModuleName->defaultAction ) )
               $this->_defaultAction = str_replace("'",'',$this->_config->modules->$dirModuleName->defaultAction);
              */
     Zend_Registry::set('baseUrl', $this->view->baseUrl());
     $this->view->TreeView = $this->view->getTreeView();
 }
Example #6
0
 public function toExcelAction()
 {
     $this->filename = 'Profil.xlsx';
     //        $this->type = 'Excel5';
     //        $this->type = 'CSV';
     $searchfor = $this->_request->getParam('searchfor');
     $profile = new GenericProfile();
     $this->select = $profile->getSelectStatement();
     $this->tables = array('GenericProfiles' => array('GP_LastName', 'GP_FirstName', 'GP_Email'));
     $this->fields = array('lastName' => array('width' => '', 'label' => ''), 'firstName' => array('width' => '', 'label' => ''), 'email' => array('width' => '', 'label' => ''));
     $this->filters = array();
     parent::toExcelAction();
 }
 public function toExcelAction()
 {
     $this->filename = 'Administrators.xlsx';
     $this->tables = array('Extranet_Users' => array('EU_ID', 'EU_LName', 'EU_FName', 'EU_Email'));
     $this->fields = array('EU_FName' => array('width' => '', 'label' => ''), 'EU_LName' => array('width' => '', 'label' => ''), 'EU_Email' => array('width' => '', 'label' => ''));
     $this->filters = array();
     $administratorData = new ExtranetUsers();
     $this->select = $administratorData->select();
     parent::toExcelAction();
 }
Example #8
0
 /**
  * Set some properties to redirect and process actions.
  *
  * @access public
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     // Sets the called action name. This will be dispatched to the method
     $this->_currentAction = $this->_getParam('action');
     // The action (process) to do for the selected object
     $this->_actionKey = $this->_getParam('actionKey');
     $this->_formatName();
     $this->view->assign('cleaction', $this->_labelSuffix);
     $dataImagePath = "../../" . $this->_config->document_root . "/data/images/";
     if (isset($this->_objectList[$this->_currentAction])) {
         $this->_imageFolder = $dataImagePath . $this->_moduleTitle . "/" . $this->_objectList[$this->_currentAction] . "/";
     }
     if (isset($this->_objectList[$this->_currentAction])) {
         $this->_rootImgPath = Zend_Registry::get("www_root") . "/data/images/" . $this->_moduleTitle . "/" . $this->_objectList[$this->_currentAction] . "/";
     }
     // Set the default objects according to the modules list;
     $modulesProfiles = Cible_FunctionsModules::modulesProfile();
     $this->view->profilesList = $modulesProfiles;
     foreach ($modulesProfiles as $id => $name) {
         $value = $name['M_MVCModuleTitle'];
         if (!in_array($value, $this->_objectList)) {
             switch ($value) {
                 //                    case 'newsletter':
                 //                        $this->_objectList[$value] = 'NewsletterProfilesObject';
                 //                        break;
                 case 'order':
                     $this->_objectList[$value] = 'MemberProfilesObject';
                     break;
                 case 'retailers':
                     $this->_objectList[$value] = 'RetailersObject';
                     break;
                     //                    case 'member':
                     //                        $this->_objectList[$value] = 'MemberProfilesObject';
                     ////                        $this->_joinTables[] = $this->_objectList[$value];
                     //                        break;
                     //                    case 'parent':
                     //                        $this->_objectList[$value] = 'ParentProfilesObject';
                     ////                        $this->_joinTables[] = $this->_objectList[$value];
                     //                        break;
                     //                    case 'medical':
                     //                        $this->_objectList[$value] = 'MedicalProfilesObject';
                     ////                        $this->_joinTables[] = $this->_objectList[$value];
                     //                        break;
                 //                    case 'member':
                 //                        $this->_objectList[$value] = 'MemberProfilesObject';
                 ////                        $this->_joinTables[] = $this->_objectList[$value];
                 //                        break;
                 //                    case 'parent':
                 //                        $this->_objectList[$value] = 'ParentProfilesObject';
                 ////                        $this->_joinTables[] = $this->_objectList[$value];
                 //                        break;
                 //                    case 'medical':
                 //                        $this->_objectList[$value] = 'MedicalProfilesObject';
                 ////                        $this->_joinTables[] = $this->_objectList[$value];
                 //                        break;
                 default:
                     $this->_objectList[$value] = ucfirst($value) . 'ProfilesObject';
                     break;
             }
         }
         $this->_objectList = array_unique($this->_objectList);
     }
     switch (Zend_Registry::get('languageID')) {
         case '1':
             $this->view->jQuery()->addJavascriptFile("{$this->view->baseUrl()}/js/jquery/localizations/ui.datepicker-fr.js");
             break;
         case '2':
             $this->view->jQuery()->addJavascriptFile("{$this->view->baseUrl()}/js/jquery/localizations/ui.datepicker-en.js");
             break;
         default:
             $this->view->jQuery()->addJavascriptFile("{$this->view->baseUrl()}/js/jquery/localizations/ui.datepicker-fr.js");
             break;
     }
     $this->view->headScript()->appendFile($this->view->locateFile('jquery.validate.min.js', 'jquery'));
     $this->view->headScript()->appendFile($this->view->locateFile('additional-methods.min.js', 'jquery'));
     $this->view->headLink()->appendStylesheet($this->view->locateFile('profile.css'));
 }