Exemplo n.º 1
0
 public function inlitterAction()
 {
     if ($this->getRequest()->isPost()) {
         $del = $this->getRequest()->getPost('del');
         if ($del == 'Yes') {
             $id = $this->getRequest()->getPost('id');
             $model = new Company_Model_Contact();
             $model->inLitter('id = ' . (int) $id);
         }
         $company_id = $this->getRequest()->getPost('company_id');
         //check if its ownCompany
         return $this->_helper->_redirector->gotoSimple('index', 'company', 'company', array('company_id' => $company_id));
     } else {
         $id = $this->_getParam('id', 0);
         if ($id > 0) {
             $model = new Company_Model_Contact();
             $this->view->contact = $model->fetchEntry($id);
         }
     }
 }