public function indexAction() { try { $db = new Other_Model_DbTable_DbHoliday(); if ($this->getRequest()->isPost()) { $search = $this->getRequest()->getPost(); } else { $search = array('adv_search' => '', 'search_status' => -1, 'start_date' => date('Y-m-01'), 'end_date' => date('Y-m-d')); } $rs_rows = $db->getAllHoliday($search); $glClass = new Application_Model_GlobalClass(); $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true); $list = new Application_Form_Frmtable(); $collumns = array("HOLIDAY_NAME", "Amount Day", "START_DATE", "END_DATE", "NOTE", "STATUS", "BY"); $link = array('module' => 'other', 'controller' => 'holiday', 'action' => 'edit'); $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('holiday_name' => $link, 'start_date' => $link, 'amount_day' => $link)); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $frm = new Other_Form_FrmHoliday(); $frm = $frm->FrmAddHoliday(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_holiday = $frm; }
public function indexAction() { try { $db = new Other_Model_DbTable_DbHoliday(); if ($this->getRequest()->isPost()) { $search = $this->getRequest()->getPost(); } else { $search = array('adv_search' => '', 'status' => -1); } $rs_rows = $db->getAllHoliday($search); $glClass = new Application_Model_GlobalClass(); $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true); $list = new Application_Form_Frmtable(); $collumns = array("Holiday Name", "Amount", "Start Date", "End Date", "Status", "By"); $link = array('module' => 'other', 'controller' => 'Holiday', 'action' => 'edit'); $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('holiday_name' => $link)); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); echo $e->getMessage(); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $frm = new Application_Form_FrmAdvanceSearch(); $frm = $frm->AdvanceSearch(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_search = $frm; }