public function indexAction() { $acUser = new Zend_Session_Namespace(); if (!$this->getRequest()->isXmlHttpRequest()) { $this->_helper->layout()->enableLayout(); } else { $this->_helper->layout()->disableLayout(); } $pObj = new Application_Model_DbTable_Projects(); $clientObj = new Application_Model_DbTable_ProjectClients(); $acUser->level == 'admin' ? $res = $pObj->getProjects() : ($res = $clientObj->getClientProject($acUser->userID)); $this->view->projectList = $res; $this->view->noAJpre = true; }