Example #1
1
 function defaults()
 {
     $document = JFactory::getDocument();
     $document->addScript(JUri::base(true) . '/media/cbcc/js/jquery/jquery.maskedinput.min.js');
     $document->addScript(JUri::base(true) . '/media/cbcc/js/jquery/upload/jquery.fileupload.js');
     $document->addScript(JUri::base(true) . '/media/cbcc/js/jquery.colorbox-min.js');
     $document->addScript(JUri::base(true) . '/media/cbcc/js/jquery/upload/jquery.iframe-transport.js');
     $document->addScript(JUri::base(true) . '/media/cbcc/js/bootstrap.tab.ajax.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/jquery/jquery.cookie.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/jstree/jquery.jstree.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/caydonvi.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/jquery.dataTables.min.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/dataTables.bootstrap.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/dataTables.tableTools.min.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/datatables.default.config.js');
     $document->addStyleSheet(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/css/dataTables.tableTools.css');
     $model = Core::model('Thongke/Thongke');
     $idUser = JFactory::getUser()->id;
     $idRoot = Core::getManageUnit($idUser, 'com_thongke', 'treeview', 'treethongke');
     if ($idRoot == null) {
         $this->setLayout('hoso_404');
     } else {
         $root['root_id'] = $idRoot;
         $tmp = $model->getThongtin(array('name, type'), 'ins_dept', null, array('id=' . $root['root_id']), null);
         $root['root_name'] = $tmp[0]->name;
         $root['root_showlist'] = $tmp[0]->type;
     }
     $this->assignRef('root_info', $root);
 }
Example #2
0
 public function _initDefault()
 {
     $document = JFactory::getDocument();
     $document->addCustomTag('<link href="' . JURI::base(true) . '/media/cbcc/css/jquery.fileupload.css" rel="stylesheet" />');
     $document->addCustomTag('<link href="' . JURI::base(true) . '/media/cbcc/css/colorbox.css" rel="stylesheet" />');
     $document->addStyleSheet(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/css/dataTables.tableTools.css');
     $document->addStyleSheet(JURI::root(true) . '/media/cbcc/js/jquery/select2/select2.css');
     $document->addStyleSheet(JURI::root(true) . '/media/cbcc/js/jquery/select2/select2-bootstrap.css');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/jquery.dataTables.min.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/dataTables.bootstrap.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/dataTables.tableTools.min.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/dataTables-1.10.0/datatables.default.config.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/bootstrap.tab.ajax.js');
     $document->addScript(JURI::root(true) . '/media/cbcc/js/jquery/select2/select2.min.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/jquery/select2/select2_locale_vi.js');
     $document->addScript(JURI::base(true) . '/components/com_hoso/js/hoso_tiepnhanlai.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/jquery/jquery.autosize-min.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/jquery/jquery.slimscroll.min.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/jquery/upload/jquery.iframe-transport.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/jquery/upload/jquery.fileupload.js');
     $document->addScript(JURI::base(true) . '/media/cbcc/js/jquery.colorbox-min.js');
     $model = Core::model('Thonto/Hoso');
     $idUser = JFactory::getUser()->id;
     $idRoot = '1';
     if ($idRoot == null) {
         $this->setLayout('hoso_404');
     } else {
         $id_donvi = $model->getInfoOfRootTree($idRoot);
         $this->assignRef('id_donvi', $id_donvi);
         $this->assignRef('idUser', $idUser);
     }
 }
Example #3
0
 function display($tpl = null)
 {
     $model = Core::model('Thongke/Bcdaotaoboiduong');
     $ketqua = array();
     $data = JRequest::get('donvi_id');
     $tungay = $data['tungay_bcdaotaocc'];
     $denngay = $data['denngay_bcdaotaocc'];
     $donvi_id = $data['donvi_id'];
     $json = array();
     $json[1] = $model->hienthiBaocao($donvi_id, 1, 1, $tungay, $denngay);
     $json[2] = $model->hienthiBaocao($donvi_id, 1, 2, $tungay, $denngay);
     $json[3] = $model->hienthiBaocao($donvi_id, 1, 3, $tungay, $denngay);
     $json[4] = $model->hienthiBaocao($donvi_id, 1, 4, $tungay, $denngay);
     $json[5] = $model->hienthiBaocao($donvi_id, 2, 1, $tungay, $denngay);
     $json[6] = $model->hienthiBaocao($donvi_id, 2, 2, $tungay, $denngay);
     $json[7] = $model->hienthiBaocao($donvi_id, 2, 3, $tungay, $denngay);
     $json[8] = $model->hienthiBaocao($donvi_id, 2, 4, $tungay, $denngay);
     $json[9] = 0;
     $json[10] = 0;
     $json[11] = $model->hienthiBaocao($donvi_id, 4, 1, $tungay, $denngay);
     $json[12] = $model->hienthiBaocao($donvi_id, 4, 2, $tungay, $denngay);
     $json[13] = $model->hienthiBaocao($donvi_id, 4, 3, $tungay, $denngay);
     $json[14] = $model->hienthiBaocao($donvi_id, 5, 1, $tungay, $denngay);
     $json[15] = $model->hienthiBaocao($donvi_id, 5, 2, $tungay, $denngay);
     $json[16] = $model->hienthiBaocao($donvi_id, 6, 3, $tungay, $denngay);
     $json[17] = $model->hienthiBaocao($donvi_id, 0, null, $tungay, $denngay);
     $this->assignRef('json', $json);
     $this->assignRef('tungay', $tungay);
     $this->assignRef('denngay', $denngay);
     if (is_null($tpl)) {
         $tpl = 'excel';
     }
     parent::display($tpl);
 }
Example #4
0
 function deleteNhucaudaotao()
 {
     $arrNcdtDelete = JRequest::get('arrNcdtDelete');
     $model = Core::model('Daotao/Nhucaudaotao');
     $model->removeNhucaudaotao($arrNcdtDelete);
     exit;
 }
Example #5
0
    /**
     * Lấy danh sách trích ngang của đơn vị hoặc phòng ban theo trạng thái hồ sơ
     *
     * @param   integer  $id_donvi  Mã đơn vị hoặc phòng ban.
     * @param   integer  $status  Trạng thái hồ sơ.
     * 
     * @return  null|array JSON  Trả về danh sách trích ngang của đơn vị hoặc phòng ban theo trạng thái hồ sơ.
     *
     */
    public function getDanhsachTrichngang($id_donvi)
    {
        $db = JFactory::getDbo();
        $db->sql("SET character_set_client=utf8");
        $db->sql("SET character_set_connection=utf8");
        $db->sql("SET character_set_results=utf8");
        $query = '	SELECT lft,rgt
						FROM thonto_tochuc
						WHERE id = ' . $db->quote($id_donvi);
        $db->setQuery($query);
        $row = $db->loadAssoc();
        $columns = array(array('db' => 'a.id', 'dt' => 0), array('db' => 'a.hoten', 'dt' => 1), array('db' => 'a.ngaysinh', 'dt' => 2), array('db' => 'IF(a.gioitinh = "Nam", "Nam", "Nữ")', 'alias' => 'gioitinh', 'dt' => 3), array('db' => 'a.dienthoailienhe', 'dt' => 4), array('db' => 'a.email', 'dt' => 5), array('db' => 'b.s_name', 'dt' => 6), array('db' => 'IF(a.dadaotaonghiepvu = "1","Có","Không")', 'alias' => 'nghiepvu', 'dt' => 7), array('db' => 'a.congtac_thonto', 'dt' => 8), array('db' => 'a.congtac_chucvu', 'dt' => 9), array('db' => 'd.ten', 'alias' => 'nghenghiep', 'dt' => 10), array('db' => 'a.ngayvaodang', 'dt' => 11), array('db' => 'a.ngaychinhthuc', 'dt' => 12), array('db' => 'c.ten', 'dt' => 13));
        $table = 'thonto_hosocanbo AS a';
        $primaryKey = 'a.id';
        $join = '	LEFT JOIN cla_sca_code AS b ON a.chuyenmon_trinhdo_code = b.code AND b.tosc_code = 2
					LEFT JOIN thonto_loaibaohiemyte AS c ON a.loaibaohiemyte_id = c.id
					LEFT JOIN thonto_nghenghiephientai AS d ON a.nghenghiephientai = d.id
					INNER JOIN (SELECT id 
							FROM thonto_tochuc 
							WHERE kieu IN (4,5)
								AND trangthai_id = 1 
								AND lft >= ' . $db->quote($row['lft']) . '
								AND rgt <= ' . $db->quote($row['rgt']) . ') AS e ON a.congtac_thonto_id = e.id';
        $where = 'a.trangthai = 1 
					GROUP BY a.id';
        $datatables = Core::model('Core/Datatables');
        return $datatables->simple($_POST, $table, $primaryKey, $columns, $join, $where);
    }
Example #6
0
 function ds_nhucaudaotaocanhan()
 {
     $model = Core::model('Daotao/Nhucaudaotao');
     $rowNCDT = $model->ds_nhucaudaotaocanhan($model->getEmpidByJos(jFactory::getUser()->id));
     Core::printJson($rowNCDT);
     die;
 }
 function deleteQuyhoachcanbo()
 {
     $arrQhcbDelete = JRequest::get('arrQhcbDelete');
     $model = Core::model('Hoso/Quyhoachcanbo');
     return Core::PrintJson($model->deleteQuyhoachcanbo($arrQhcbDelete));
     die;
 }
Example #8
0
 public function danhsachchibo()
 {
     $id = $_GET['px_id'];
     $model = Core::model('Thonto/Chibo');
     $row = $model->getThongtin('*', 'thonto_chibo', null, 'donvi_id=' . $id, 'id asc');
     Core::PrintJson($row);
 }
Example #9
0
 private function _getKetqua()
 {
     $formData = JRequest::get('');
     $model_hoso = Core::model('Thonto/Timkiem');
     $items = $model_hoso->getDataTimkiem($formData);
     $this->assignRef('items', $items);
 }
Example #10
0
 public function _dsach_giahanhdld()
 {
     $model = Core::model('Thongke/Thongke');
     $donvi_id = $_POST['donvi_id'];
     $json = $model->getGiahanhdld($donvi_id, 'select id from bc_hinhthuc where is_hopdong = 1');
     Core::PrintJson($json);
     die;
 }
Example #11
0
 function ds_quyhoachcb()
 {
     $donvi_id = JRequest::getVar('donvi_id');
     $model = Core::model('Hoso/Quyhoachcanbo');
     $rowQHCB = $model->ds_quyhoachcanbo($donvi_id);
     return Core::PrintJson($rowQHCB);
     die;
 }
Example #12
0
 private function _initDefaultPage()
 {
     $model = Core::model('Danhmuc/CbGoidaotaoboiduong');
     $document = JFactory::getDocument();
     //$document->addScript(JURI::root(true).'/media/cbcc/js/jquery/jquery.validate.min.js');
     //$document->addScript(JURI::root(true).'/media/cbcc/js/jquery/jquery.validate.default.js');
     $this->items = $model->fetchAll();
 }
Example #13
0
 public function getDulieuPhuluc6()
 {
     $model = Core::model('Thonto/Thongke');
     $result = $model->getmau6();
     header('Content-type: application/json');
     echo json_encode($result);
     die;
 }
Example #14
0
 function luutaisan()
 {
     $values = array();
     parse_str($_POST['form_taisan'], $values);
     $kekhai_id = $_POST['kekhai_id'];
     $model = Core::model('Kekhaitaisan/Kekhaitaisan');
     Core::PrintJson($model->saveTaisan($kekhai_id, $values));
     die;
 }
Example #15
0
 public function rebuild()
 {
     $model = Core::model('Tochuc/InsCap');
     if ($model->rebuild()) {
         $this->setRedirect('index.php?option=com_tochuc&controller=cap', 'Xử lý thành công', 'success');
     } else {
         $this->setRedirect('index.php?option=com_tochuc&controller=cap', 'Lỗi', 'error');
     }
 }
Example #16
0
 public function dsach_tuyendung()
 {
     $model = Core::model('Thongke/Thongke');
     $donvi_id = $_POST['donvi_id'];
     $ketqua = array();
     $kq = $model->getThongtin('qtht.hosochinh_id as id, qtht.ngaysinh, qtht.hoten as e_name, qtht.congtac_chucvu, phong.name as congtac_phong, qtht.luong_ngaybatdau, qtht.luong_tenngach, qtht.luong_mangach, qtht.luong_bac, qtht.luong_heso', 'hosochinh_quatrinhhientai qtht', array('inner' => 'ins_dept dv on dv.id = qtht.congtac_donvi_id', 'inner ' => 'ins_dept phong on phong.id = qtht.congtac_phong_id'), 'dv.ins_loaihinh =1 and qtht.hoso_trangthai="00" and qtht.luong_hinhthuc_id = 9 and dv.id = ' . $donvi_id, null);
     Core::PrintJson($kq);
     die;
 }
Example #17
0
 public function dsach_cctsbnn()
 {
     $model = Core::model('Thongke/Thongke');
     $donvi_id = $_POST['donvi_id'];
     $ketqua = array();
     $kq = $model->getDanhsach($donvi_id, Core::config('cbcc/bienche/tapsu'), '3,2,25');
     Core::PrintJson($kq);
     die;
 }
Example #18
0
 public function _getthongtinKekhai()
 {
     // lấy đợt và
     $model = Core::model('Kekhaitaisan/Kekhaitaisan');
     $nguoikekhai = $model->getInfoNguoikekhai($model->getHosoidByJos(JFactory::getUser()->id));
     $hosochinh_id = $nguoikekhai[0]->hosochinh_id;
     $this->assignRef('hosochinh_id', $hosochinh_id);
     $this->assignRef('nguoikekhai', $nguoikekhai);
 }
Example #19
0
 public function dsach_hdchuyenccvc()
 {
     $model = Core::model('Thongke/Thongke');
     $donvi_id = $_POST['donvi_id'];
     $ketqua = array();
     $kq = $model->getDanhsach($donvi_id, 'select id from bc_hinhthuc where is_hopdong = 1', '3,2,25');
     Core::PrintJson($kq);
     die;
 }
Example #20
0
 public function _default()
 {
     $title = JRequest::getVar('title');
     $this->assignRef('title', $title);
     $model = Core::model('Kekhaitaisan/KktsCapcongtrinh');
     $items = $model->findAll();
     $this->assignRef('items', $items);
     $this->sidebar = JHtmlSidebar::render();
 }
Example #21
0
 public function getThonto()
 {
     $phuongxa_ids = JRequest::getVar('phuongxa_ids');
     $model_hoso = Core::model('Thonto/Timkiem');
     $result = $model_hoso->getThonto($phuongxa_ids);
     header('Content-type: application/json');
     echo json_encode($result);
     die;
 }
Example #22
0
 public function frmtinhhinhquanly()
 {
     $thonto_id = (int) $_GET['thonto_id'];
     $dot = (int) $_GET['dot'];
     $model = Core::model('Thonto/Chibo');
     $row = $model->getThongtin('*', 'thonto_tinhhinhquanly', null, 'thonto_id=' . $thonto_id . ' and dotbaocao_id=' . $dot, 'id asc');
     $noidunghop = $model->getThongtin('*', 'thonto_thongtinhopgiaoban', null, 'tinhhinhquanly_id=' . (int) $row[0]->id, 'id asc');
     $this->assignRef('noidunghop', $noidunghop);
     $this->assignRef('row', $row[0]);
 }
Example #23
0
 public function delete()
 {
     $model = Core::model('Danhmuc/CbGoidaotaoboiduong');
     $id = JRequest::getInt('id');
     if ($model->delete($id)) {
         $this->setRedirect('index.php?option=com_tochuc&controller=goidaotao', 'Xử lý thành công', 'success');
     } else {
         $this->setRedirect('index.php?option=com_tochuc&controller=goidaotao', 'Lỗi', 'error');
     }
 }
Example #24
0
 public function xoathonto()
 {
     $id = JRequest::getInt('id', null);
     $model = Core::model('Thonto/Tochuc');
     if ($model->xoathonto($id)) {
         $this->setRedirect("index.php?option=com_thonto&controller=tochuc&task=default", "Xử lý thành công!", 'success');
     } else {
         $this->setRedirect("index.php?option=com_thonto&controller=tochuc&task=default", "Xử lý không thành công!", 'error');
     }
 }
Example #25
0
 public function frmtinhhinhhoatdong()
 {
     $thonto_id = (int) $_GET['thonto_id'];
     $dot = (int) $_GET['dot'];
     $model = Core::model('Thonto/Chibo');
     $row = $model->getThongtin('*', 'thonto_tinhhinhhoatdong', null, 'thonto_id=' . $thonto_id . ' and dotbaocao_id=' . $dot, 'id asc');
     $kiennghi = $model->getThongtin('*', 'thonto_xulykiennghi', null, 'tinhhinhhoatdong_id=' . (int) $row[0]->id, 'id asc');
     $this->assignRef('kiennghi', $kiennghi);
     $this->assignRef('row', $row[0]);
 }
Example #26
0
 function hienthithongke()
 {
     $data = JRequest::get('data');
     $tungay = $data['tungay'];
     $denngay = $data['denngay'];
     $model = Core::model('Daotao/Thongkenhucaudaotao');
     $ketqua = $model->hienthithongke($data, $tungay, $denngay);
     Core::printJson($ketqua);
     die;
 }
Example #27
0
 private function _getEditKyluat()
 {
     $id_quatrinh = JRequest::getInt('id_quatrinh', null);
     $model = Core::model('Thonto/Khenthuongkyluat');
     if ($id_quatrinh == null) {
         $item = array();
     } else {
         $item = $model->getInfoKyluat($id_quatrinh);
     }
     $this->assignRef('item', $item);
 }
 function __construct()
 {
     parent::__construct();
     $this->selectModel = Core::model('Baocaothongke/Select');
     $this->leftModel = Core::model('Baocaothongke/Left');
     $this->whereModel = Core::model('Baocaothongke/Where');
     $this->shareModel = Core::model('Baocaothongke/Share');
     $this->_ids[] = JRequest::getVar('ids_bienchetienluong', 0, 'post', 'array');
     $this->maxDepth = JRequest::getVar('exp_lev_bienchetienluong');
     $this->displayLoaiBC = JRequest::getVar('bienchetienluong_hienthiloaibc');
 }
Example #29
0
 private function _getHosoEdit()
 {
     $model = Core::model('Thonto/Hoso');
     $idHoso = JRequest::getInt('idHoso', null);
     if ($idHoso == null) {
         $item = array();
     } else {
         $item = $model->getInfoOfHoso($idHoso);
     }
     $this->assignRef('item', $item);
 }
Example #30
0
 private function _getEditCongtac()
 {
     $id_quatrinh = JRequest::getInt('id_quatrinh', null);
     $model = Core::model('Thonto/Congtac');
     if ($id_quatrinh == null) {
         $item = array();
     } else {
         $item = $model->getInfoCongtac($id_quatrinh);
     }
     $this->assignRef('item', $item);
 }