function editzoneAction() { $zid = $this->_getParam('zid'); $tblPowerbanZone = new Pandamp_Modules_Misc_Banner_Zone_Model_PowerbanZones(); $rowset = $tblPowerbanZone->find($zid)->current(); if ($rowset) { $this->view->rowset = $rowset; } }
function fetchZoneAction() { $start = $this->_getParam('start') ? $this->_getParam('start') : 0; $end = $this->_getParam('limit') ? $this->_getParam('limit') : 10; $tblBannerZone = new Pandamp_Modules_Misc_Banner_Zone_Model_PowerbanZones(); $rowset = $tblBannerZone->fetchAll(null, 'zname ASC', $end, $start); $a = array(); $a['totalCount'] = $tblBannerZone->countPowerbanZones(); $ii = 0; if ($a['totalCount'] != 0) { foreach ($rowset as $row) { $a['zone'][$ii]['guid'] = $row->zid; $a['zone'][$ii]['title'] = $row->zname; $ii++; } } if ($a['totalCount'] == 0) { $a['zone'][0]['guid'] = 'XXX'; $a['zone'][0]['title'] = "No Data"; } echo Zend_Json::encode($a); }
function deleteZone($zid) { $tblPowerbanZone = new Pandamp_Modules_Misc_Banner_Zone_Model_PowerbanZones(); $rowset = $tblPowerbanZone->find($zid); if (count($rowset)) { $row = $rowset->current(); $row->delete(); $regcache = Zend_Registry::getInstance(); $cache = $regcache->get('regcache'); $cache->clean(Zend_Cache::CLEANING_MODE_ALL); } }