public function searchAction() { $translate = Zend_Registry::get('Zend_Translate'); $this->view->title = 'Quản lý chức vụ - ' . $translate->_('TEXT_DEFAULT_TITLE'); $this->view->headTitle($this->view->title); $layoutPath = APPLICATION_PATH . '/templates/' . TEMPLATE_USED; $option = array('layout' => 'hethong/layout', 'layoutPath' => $layoutPath); Zend_Layout::startMvc($option); $chucvuModel = new Front_Model_Chucvu(); if ($this->_kw) { $list_chucvu = $chucvuModel->fetchData(array('keyword' => $this->_kw), 'cv_order ASC'); } else { $this->_redirect('hethong/chucvu/'); $list_chucvu = $chucvuModel->fetchData(array(), 'cv_order ASC'); } $paginator = Zend_Paginator::factory($list_chucvu); $paginator->setItemCountPerPage(NUM_PER_PAGE); $paginator->setCurrentPageNumber($this->_page); $this->view->page = $this->_page; $this->view->paginator = $paginator; }
public function indexAction() { $translate = Zend_Registry::get('Zend_Translate'); $this->view->title = 'Quản lý yêu cầu cập nhật thông tin - ' . $translate->_('TEXT_DEFAULT_TITLE'); $this->view->headTitle($this->view->title); $layoutPath = APPLICATION_PATH . '/templates/' . TEMPLATE_USED; $option = array('layout' => '1_column/layout', 'layoutPath' => $layoutPath); Zend_Layout::startMvc($option); $employeesEditModel = new Front_Model_EmployeesEdit(); $chucvuModel = new Front_Model_Chucvu(); $list_chuc_vu = $chucvuModel->fetchData(array('cv_status' => 1)); $phongbanModel = new Front_Model_Phongban(); $list_phong_ban = $phongbanModel->fetchAll(); $pb_selected = $this->_getParam('phongban', 0); $phong_ban = array(); $list_phong_ban_option = $phongbanModel->fetchData(0, $phong_ban); $phong_ban_choosed = array(); $phongbanModel->fetchData($pb_selected, $phong_ban_choosed); $pb_ids = array($pb_selected); foreach ($phong_ban_choosed as $pb) { $pb_ids[] = $pb->pb_id; } if (!$pb_selected) { $list_employees = $employeesEditModel->fetchData(array(), 'eme_date_modified DESC'); } else { $list_employees = $employeesEditModel->fetchByPhongBan($pb_ids); } $paginator = Zend_Paginator::factory($list_employees); $paginator->setItemCountPerPage(NUM_PER_PAGE); $paginator->setCurrentPageNumber($this->_page); $this->view->page = $this->_page; $this->view->paginator = $paginator; $this->view->list_chuc_vu = $list_chuc_vu; $this->view->list_phong_ban = $list_phong_ban; $this->view->list_phong_ban_option = $list_phong_ban_option; $this->view->pb_id = $pb_selected; }
public function indexAction() { $translate = Zend_Registry::get('Zend_Translate'); $this->view->title = 'Lọc danh sách theo chức vụ - ' . $translate->_('TEXT_DEFAULT_TITLE'); $this->view->headTitle($this->view->title); $layoutPath = APPLICATION_PATH . '/templates/' . TEMPLATE_USED; $option = array('layout' => 'danhsach/layout', 'layoutPath' => $layoutPath); Zend_Layout::startMvc($option); $filter_selected = $this->_getParam('id', 0); $emModel = new Front_Model_Employees(); $chucvuModel = new Front_Model_Chucvu(); $list_chuc_vu = $chucvuModel->fetchData(array('cv_status' => 1)); $filters = array(); if ($filter_selected) { $filters['em_chuc_vu'] = $filter_selected; } $list_items = $emModel->getListNhanVienDanhSachTheoChucVu($filters); $paginator = Zend_Paginator::factory($list_items); $paginator->setItemCountPerPage(NUM_PER_PAGE); $paginator->setCurrentPageNumber($this->_page); $this->view->page = $this->_page; $this->view->paginator = $paginator; $this->view->filter = $list_chuc_vu; $this->view->filter_selected = $filter_selected; }
public function nangluongAction() { $translate = Zend_Registry::get('Zend_Translate'); $this->view->title = 'Quản lý cán bộ - ' . $translate->_('TEXT_DEFAULT_TITLE'); $this->view->headTitle($this->view->title); $layoutPath = APPLICATION_PATH . '/templates/' . TEMPLATE_USED; $option = array('layout' => '1_column/layout', 'layoutPath' => $layoutPath); Zend_Layout::startMvc($option); $pb_selected = $this->_getParam('phongban', 0); $chucvuModel = new Front_Model_Chucvu(); $list_chuc_vu = $chucvuModel->fetchData(array('cv_status' => 1)); $ngachcongchucModel = new Front_Model_NgachCongChuc(); $list_ngach_cong_chuc = $ngachcongchucModel->fetchData(array('ncc_status' => 1)); $phongbanModel = new Front_Model_Phongban(); $list_phong_ban = $phongbanModel->fetchAll(); $phong_ban = array(); $list_phong_ban_option = $phongbanModel->fetchData(0, $phong_ban); $phong_ban_choosed = array(); $phongbanModel->fetchData($pb_selected, $phong_ban_choosed); $pb_ids = array($pb_selected); foreach ($phong_ban_choosed as $pb) { $pb_ids[] = $pb->pb_id; } $list_nang_luong = $this->_helper->global->checkNangLuong(); $this->view->pb_id = $pb_selected; $this->view->list_nhan_vien = $list_nang_luong; $this->view->list_chuc_vu = $list_chuc_vu; $this->view->list_phong_ban = $list_phong_ban; $this->view->list_phong_ban_option = $list_phong_ban_option; $this->view->list_ngach_cong_chuc = $list_ngach_cong_chuc; }
public function formnghihuuAction() { $this->_helper->layout()->disableLayout(); $emID = $this->_getParam('id', 0); $emModel = new Front_Model_Employees(); $em_info = $emModel->fetchRow('em_id =' . $emID); $chucvuModel = new Front_Model_Chucvu(); $list_chuc_vu = $chucvuModel->fetchData(array('cv_status' => 1)); $ngachcongchucModel = new Front_Model_NgachCongChuc(); $list_ngach_cong_chuc = $ngachcongchucModel->fetchData(array('ncc_status' => 1)); $phongbanModel = new Front_Model_Phongban(); $list_phong_ban = $phongbanModel->fetchAll('pb_status=1'); $error_message = array(); $success_message = ''; if ($this->_request->isPost()) { $current_time = new Zend_Db_Expr('NOW()'); $data = array(); $data['em_nghi_huu'] = 1; $data['em_ngay_nghi_huu'] = $current_time; $success_message = $emModel->update($data, 'em_id=' . $emID); if ($success_message) { $thongbao_model = new Front_Model_ThongBao(); $data = array(); $data['tb_from'] = 0; $data['tb_to'] = $emID; $data['tb_tieu_de'] = '[Nghỉ hưu] Bạn vừa được duyệt nghỉ hưu'; $data['tb_noi_dung'] = 'Phòng tổ chức vừa chuyển trạng thái của bạn sang nghỉ hưu.'; $data['tb_status'] = 0; $data['tb_date_added'] = $current_time; $data['tb_date_modified'] = $current_time; $thongbao_model->insert($data); } $em_info = $emModel->fetchRow('em_id =' . $emID); } $this->view->error_message = $error_message; $this->view->success_message = $success_message; $this->view->em_id = $emID; $this->view->employee_info = $em_info; $this->view->list_chuc_vu = $list_chuc_vu; $this->view->list_phong_ban = $list_phong_ban; $this->view->list_ngach_cong_chuc = $list_ngach_cong_chuc; }