Ejemplo n.º 1
0
 function init()
 {
     if (!Zend_Auth::getInstance()->hasIdentity()) {
         $this->_redirect('/');
     }
     $user = Zend_Auth::getInstance()->getStorage()->read();
     #GROUPS
     $group_DB = new Application_Model_DbTable_Group();
     if (isset($_SESSION['Default']['field'])) {
         $groups = $group_DB->getAll($user->ganID, $_SESSION['Default']['field']);
         if ($groups) {
             $this->view->groups = $groups;
         }
     } else {
         $this->view->error = true;
     }
     #Layout
     $this->_helper->layout->setLayout('layout');
     $this->config = Zend_Registry::get('config');
     #SEO:
     $this->view->title = $this->view->lang->_('SITE_TITLE');
     $this->view->sitedesc = $this->view->lang->_('SITE_DESC');
     $this->view->sitekeywords = $this->view->lang->_('SITE_KEYWORDS');
     #MSG
     $this->msger = $this->_helper->getHelper('FlashMessenger');
     $this->view->flashmsgs = $this->msger->getMessages();
     $this->lang = Zend_Registry::get('lang');
     $this->view->userRole = $_SESSION['Default']['role'];
     if (isset($_SESSION['Default']['field'])) {
         $fieldID = $_SESSION['Default']['field'];
         $fields_DB = new Application_Model_DbTable_Field();
         $this->view->fieldName = $fields_DB->getFieldName($fieldID);
     }
 }
Ejemplo n.º 2
0
 function init()
 {
     if (!Zend_Auth::getInstance()->hasIdentity()) {
         $this->_redirect('/');
     }
     $this->user = Zend_Auth::getInstance()->getStorage()->read();
     #Layout
     $this->_helper->layout->setLayout('layout');
     $this->config = Zend_Registry::get('config');
     $this->msger = $this->_helper->getHelper('FlashMessenger');
     $this->view->flashmsgs = $this->msger->getMessages();
     $this->lang = Zend_Registry::get('lang');
     date_default_timezone_set('Asia/Tel_Aviv');
     $this->view->userRole = $_SESSION['Default']['role'];
     if (isset($_SESSION['Default']['field'])) {
         $fieldID = $_SESSION['Default']['field'];
         $fields_DB = new Application_Model_DbTable_Field();
         $this->view->fieldName = $fields_DB->getFieldName($fieldID);
     }
 }
Ejemplo n.º 3
0
 function init()
 {
     if (!Zend_Auth::getInstance()->hasIdentity()) {
         $this->_redirect('/');
     }
     #Layout
     $this->_helper->layout->setLayout('layout');
     $this->config = Zend_Registry::get('config');
     #SEO:
     $this->view->title = $this->view->lang->_('SITE_TITLE');
     $this->view->sitedesc = $this->view->lang->_('SITE_DESC');
     $this->view->sitekeywords = $this->view->lang->_('SITE_KEYWORDS');
     $this->msger = $this->_helper->getHelper('FlashMessenger');
     $this->lang = Zend_Registry::get('lang');
     $this->view->userRole = $_SESSION['Default']['role'];
     if (isset($_SESSION['Default']['field'])) {
         $fieldID = $_SESSION['Default']['field'];
         $fields_DB = new Application_Model_DbTable_Field();
         $this->view->fieldName = $fields_DB->getFieldName($fieldID);
     }
 }
Ejemplo n.º 4
0
 public function editfieldAction()
 {
     $fieldID = $this->_request->getParam('f');
     $fields_DB = new Application_Model_DbTable_Field();
     $fieldName = $fields_DB->getFieldName($fieldID);
     $form = new Application_Form_AddField(array('fieldname' => $fieldName));
     $this->view->form = $form;
 }