public function init() { $this->_arrParam = $this->_request->getParams(); $this->loadTemplate(TEMPLATE_PATH . '/admin/system'); $this->_mainAction = $this->_arrParam['module'] . '/' . $this->_arrParam['controller'] . '/index'; $this->view->arrParam = $this->_arrParam; $tbl_tags = new Manager_Model_tags(); $this->view->data = $tbl_tags->listItemabout($status = -1); }
public function delete_muti($arrParam = null) { $db = Zend_Registry::get('connectDb'); $tbl_tags = new Manager_Model_tags(); if (count($arrParam['cid']) > 0) { $ids = implode(',', $arrParam['cid']); $where = 'id IN (' . $ids . ')'; $tbl_tags->delete($where); } }
public function save($data) { $introtext = stripslashes($data['introtext']); if ($data['key'] == 'add') { $db = Zend_Registry::get('connectDb'); $data1 = array('title' => $data['title'], 'introtext' => $introtext, 'published' => $data['published'], 'order' => $data['order']); $db->insert('tags', $data1); } else { $tbl_tags = new Manager_Model_tags(); $where = 'id =' . $data['id']; $data1 = array('title' => $data['title'], 'introtext' => $introtext, 'published' => $data['published'], 'order' => $data['order']); $tbl_tags->update($data1, $where); } }
public function mutiAction() { $tblsection = new Manager_Model_tags(); $tblsection->delete_muti($this->_arrParam); $this->_redirect('manager/tags'); $this->_helper->viewRenderer->setNoRender(); }