public function brandAction() { $formFilter = new Product_Form_FrmProductFilter(); $this->view->formFilter = $formFilter; $list = new Application_Form_Frmlist(); $db = new Application_Model_DbTable_DbGlobal(); $request = $this->getRequest(); $id = $request->getParam("id", NULL); $productSql = "SELECT branch_id ,Name,IsActive\n\t\tFROM tb_branch WHERE Name!='' "; if ($this->getRequest()->isPost()) { $post = $this->getRequest()->getPost(); $productName = $this->getRequest()->getParam('id', Null); if ($post['g_name'] != '') { $productSql .= " AND Name LIKE '%" . trim($post['g_name']) . "%'"; } if ($post['branch_id'] != '' and $post['branch_id'] != 0) { $productSql .= " AND branch_id = " . trim($post['branch_id']); } } $productSql .= " ORDER BY Name"; $rows = $db->getGlobalDb($productSql); $glClass = new Application_Model_GlobalClass(); $rows = $glClass->getActive($rows, BASE_URL, true); $columns = array("BRAND_CAP", "STATUS_CAP"); $link = array('module' => 'product', 'controller' => 'index', 'action' => 'add-brand'); $urlEdit = BASE_URL . "/product/index/add-brand"; $this->view->list = $list->getCheckList(1, $columns, $rows, array('item_name' => $link, 'Name' => $link), $urlEdit); Application_Model_Decorator::removeAllDecorator($formFilter); }