public function freereportAction() { $publisher_user = new Publisher_Model_DbTable_Publishers(); $params = $this->getRequest()->getParams(); $category = $this->_request->getParam('category'); $brand = $this->_request->getParam('brand'); $productid = $this->_request->getParam('product_id'); $frmdate = $this->_request->getParam('frmdate'); $todate = $this->_request->getParam('todate'); $publisher_id = $this->_request->getParam('publisher'); $publisher_user_data = $publisher_user->fetchAll("user_type='publisher' and publisher!=''"); $brand_exp = explode("**", $brand); if ($this->getRequest()->isPost()) { $productData = $this->modelBooks->getProductFreeReport($category, $brand_exp[0], $productid, $frmdate, $todate, $publisher_id); } else { $productData = $this->modelBooks->getProductFreeReport($category, $brand_exp[0], $productid, $frmdate, $todate, $publisher_id); } $formData['category'] = $category; $formData['brand'] = $brand; $formData['product_id'] = $productid; $formData['from_date'] = $frmdate; $formData['to_date'] = $todate; $formData['publisher'] = $publisher_id; $this->view->prodList = $productData; $page = $this->_getParam('page', 1); $paginator = Zend_Paginator::factory($productData); $paginator->setItemCountPerPage(10); $paginator->setCurrentPageNumber($page); $this->view->totalCount = count($productData); $this->view->pageSize = 10; $this->view->page = $page; $this->view->prodList = $paginator; $this->view->publisher_data = $publisher_user_data; $this->view->formData = $formData; }