本文整理汇总了PHP中Core::model方法的典型用法代码示例。如果您正苦于以下问题:PHP Core::model方法的具体用法?PHP Core::model怎么用?PHP Core::model使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core::model方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defaults
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);
}
示例2: _initDefault
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);
}
}
示例3: display
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);
}
示例4: deleteNhucaudaotao
function deleteNhucaudaotao()
{
$arrNcdtDelete = JRequest::get('arrNcdtDelete');
$model = Core::model('Daotao/Nhucaudaotao');
$model->removeNhucaudaotao($arrNcdtDelete);
exit;
}
示例5: getDanhsachTrichngang
/**
* 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);
}
示例6: ds_nhucaudaotaocanhan
function ds_nhucaudaotaocanhan()
{
$model = Core::model('Daotao/Nhucaudaotao');
$rowNCDT = $model->ds_nhucaudaotaocanhan($model->getEmpidByJos(jFactory::getUser()->id));
Core::printJson($rowNCDT);
die;
}
示例7: deleteQuyhoachcanbo
function deleteQuyhoachcanbo()
{
$arrQhcbDelete = JRequest::get('arrQhcbDelete');
$model = Core::model('Hoso/Quyhoachcanbo');
return Core::PrintJson($model->deleteQuyhoachcanbo($arrQhcbDelete));
die;
}
示例8: danhsachchibo
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);
}
示例9: _getKetqua
private function _getKetqua()
{
$formData = JRequest::get('');
$model_hoso = Core::model('Thonto/Timkiem');
$items = $model_hoso->getDataTimkiem($formData);
$this->assignRef('items', $items);
}
示例10: _dsach_giahanhdld
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;
}
示例11: ds_quyhoachcb
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;
}
示例12: _initDefaultPage
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();
}
示例13: getDulieuPhuluc6
public function getDulieuPhuluc6()
{
$model = Core::model('Thonto/Thongke');
$result = $model->getmau6();
header('Content-type: application/json');
echo json_encode($result);
die;
}
示例14: luutaisan
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;
}
示例15: rebuild
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');
}
}