Пример #1
0
 /**
  * IndexAction for Permissions
  *
  * @return void
  */
 function indexAction()
 {
     $models = new Company_Model_Contact();
     $this->view->title = "Contacts list";
     $page = $this->_getParam('page', 1);
     $company_id = $this->getRequest()->getParam('company_id');
     $paginator = Zend_Paginator::factory($models->fetchCompany($company_id));
     $contact = Zend_Registry::get('company');
     $paginator->setItemCountPerPage($contact->paginator);
     $paginator->setCurrentPageNumber($page);
     $paginator->setPageRange($contact->paginator);
     $this->view->paginator = $paginator;
 }
Пример #2
0
 function consultAction()
 {
     //get the page of the table
     $this->gpms = new Zend_Session_Namespace('gpms');
     if ($this->gpms->storage->out_production == 0) {
         return $this->_helper->_redirector->gotoSimple('index', 'company', 'company');
     }
     //         die();
     $this->company = new Zend_Session_Namespace('company');
     $page = $this->_getParam('page', 1);
     $models = new Company_Model_Contact();
     $paginator = Zend_Paginator::factory($models->fetchCompany($this->company->id));
     $contact = Zend_Registry::get('company');
     $paginator->setItemCountPerPage($contact->paginator);
     $paginator->setCurrentPageNumber($page);
     $paginator->setPageRange($contact->paginator);
     $this->view->paginator = $paginator;
     //get the dates for the table
     $model = new Company_Model_Company();
     $select_company = $model->fetchEntry($_SESSION["company"]["id"]);
     $this->view->select_company = $select_company;
     //send information to the view
     $this->view->title = "Production Consult";
 }