Exemplo n.º 1
0
 public function init()
 {
     parent::init();
     $base_url = Zend_Registry::get('baseurl');
     $this->view->headScript()->appendFile($base_url . '/js/OpenLayers-2.13/OpenLayers.js');
     $this->view->inlineScript()->appendFile($base_url . '/js/html2canvas.js');
 }
Exemplo n.º 2
0
 public function init()
 {
     parent::init();
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(TRUE);
     $auth = $this->_request->getParam('auth', '');
     $page = $this->_request->getParam('action');
     /**
      * Access these pages without authentication
      */
     $pages_without_auth = array('get-warehouses-by-level', 'register-user');
     if (!in_array($page, $pages_without_auth) && (empty($auth) || !$this->authenticateUser($auth))) {
         $return = array(array("error" => 'Please provide authentication'));
         echo Zend_Json::encode($return);
         exit;
     }
 }
 public function init()
 {
     parent::init();
 }
Exemplo n.º 4
0
 public function init()
 {
     parent::init();
     $this->_helper->viewRenderer->setNoRender(TRUE);
     $this->_helper->layout()->disableLayout();
 }
Exemplo n.º 5
0
 public function loginAction()
 {
     $this->_helper->layout->setLayout('doc');
     $referrer = $this->_getParam('referrer', '');
     $form = new Form_LoginDoc();
     $error = false;
     if ($this->_request->isPost()) {
         $formData = $this->_request->getPost();
         if ($form->isValid($formData)) {
             try {
                 if (!$this->_identity->login($form->login_id->getValue(), base64_encode($form->password->getValue()))) {
                     $error = true;
                     throw new Exception();
                 }
                 $role = $this->_identity->getRoleId();
                 if ($role == 32) {
                     parent::_redirect('/docs/project-doc');
                 }
                 //$this->_populateSession();
                 if (isset($referrer) && !empty($referrer)) {
                     parent::_redirect(base64_decode($referrer));
                 } else {
                     parent::_redirect('/dashboard/index');
                 }
             } catch (Exception $e) {
                 App_FileLogger::info($e);
                 $form->populate($formData);
                 $error = "Email Or Password is incorrect!";
             }
         } else {
             $form->populate($formData);
         }
     }
     $this->view->headTitle('Log In');
     $this->view->form = $form;
     $this->view->error = $error;
 }
 public function init()
 {
     parent::init();
     $this->_helper->layout->setLayout("dashlets");
 }