/** * Delete entries * * @param array|string $where SQL WHERE clause(s) * @return int|string */ public function delete($user_id, $company_id) { $model_contact = new Client_Model_Contact(); $data["acl_users_id"] = 0; $model_contact->update($data, 'acl_users_id = ' . (int) $user_id . ' and company_id =' . $company_id); //delete resource $table = $this->getTable(); $table->delete('acl_users_id = ' . (int) $user_id . ' and companies_id =' . $company_id); }
public function consultAction() { $this->client = new Zend_Session_Namespace('client'); if ($this->client->id == null) { return $this->_helper->_redirector->gotoSimple('consult', 'client', 'client'); } $page = $this->_getParam('page', 1); $models = new Client_Model_Contact(); $paginator = Zend_Paginator::factory($models->fetchClient($this->client->id)); $contact = Zend_Registry::get('client'); $paginator->setItemCountPerPage($contact->paginator); $paginator->setCurrentPageNumber($page); $paginator->setPageRange($contact->paginator); $this->view->paginator = $paginator; //get the dates for the table $model = new Client_Model_Client(); $select_client = $model->fetchEntry($_SESSION["client"]["id"]); //Zend_Debug::dump($select_client); $this->view->select_client = $select_client; //send information to the view $this->view->title = "Production Consult"; }
public function outlitterAction() { if ($this->getRequest()->isPost()) { $del = $this->getRequest()->getPost('del'); if ($del == 'Yes') { $id = $this->getRequest()->getPost('id'); $model = new Client_Model_Contact(); $model->outLitter($id); } return $this->_helper->_redirector->gotoSimple('consult', 'client', 'client'); } else { $id = $this->_getParam('id', 0); if ($id > 0) { $model = new Client_Model_Contact(); $this->view->contact = $model->fetchEntry($id); } } }