<?php if (isset($_GET['page_id'])) { $page_id = (int) $_GET['page_id']; require_once "model/Page.php"; $model = new Page(); $detail = $model->getDetailPage($page_id); } require_once "model/Tinh.php"; $modelTinh = new Tinh(); $arrHot = $modelTinh->getListTinh(-1, '', 1, 0, 20); ?> <script type="text/javascript" src="static/ckeditor/ckeditor.js"></script> <script type="text/javascript" src="static/ckfinder/ckfinder.js"></script> <script type="text/javascript" src="static/js/ajaxupload.js"></script> <script type="text/javascript"> function BrowseServer( startupPath, functionData ){ var finder = new CKFinder(); finder.basePath = 'ckfinder/'; //Đường path nơi đặt ckfinder finder.startupPath = startupPath; //Đường path hiện sẵn cho user chọn file finder.selectActionFunction = SetFileField; // hàm sẽ được gọi khi 1 file được chọn finder.selectActionData = functionData; //id của text field cần hiện địa chỉ hình //finder.selectThumbnailActionFunction = ShowThumbnails; //hàm sẽ được gọi khi 1 file thumnail được chọn finder.popup(); // Bật cửa sổ CKFinder } //BrowseServer function SetFileField( fileUrl, data ){ document.getElementById( data["selectActionData"] ).value = fileUrl; $('#hinh_dai_dien').attr('src','../' + fileUrl).show(); }
require_once "model/Tinh.php"; $modelTinh = new Tinh(); require_once "model/Place.php"; $modelPlace = new Place(); require_once "model/Nhaxe.php"; $modelNhaxe = new Nhaxe(); require_once "model/Car.php"; $modelCar = new Car(); $link = "index.php?mod=ticket&act=listshort"; $page_show = 20; /* get ds nha xe */ $arrNhaxe = $modelNhaxe->getListNhaxe('', -1, -1, -1); /* end get ds nha xe */ /* get ds noi di */ $arrListTinhKey = array(); $arrListTinh = $modelTinh->getListTinh(-1, '', -1, -1, -1); if (!empty($arrListTinh)) { foreach ($arrListTinh['data'] as $value) { $arrListTinhKey[$value['tinh_id']] = $value; } } /* end get ds place */ /* get ds place */ $arrListPlaceKey = array(); $arrListPlace = $modelPlace->getListPlace(-1, '', -1, -1); if (!empty($arrListPlace)) { foreach ($arrListPlace['data'] as $value) { $arrListPlaceKey[$value['place_id']] = $value; } } /* end get ds place */