Exemple #1
0
<?php

if (isset($_GET['nhaxe_id'])) {
    $nhaxe_id = (int) $_GET['nhaxe_id'];
    require_once "model/Nhaxe.php";
    $model = new Nhaxe();
    $detail = $model->getDetailNhaxe($nhaxe_id);
}
?>
<script type="text/javascript" src="static/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="static/ckfinder/ckfinder.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 BrowseServer2( 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 = SetFileField2; // 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
Exemple #2
0
<?php

require_once "model/Image.php";
$model = new Image();
$link = "index.php?mod=image&act=list";
if (isset($_GET['nhaxe_id']) && $_GET['nhaxe_id'] > 0) {
    $nhaxe_id = (int) $_GET['nhaxe_id'];
    $link .= "&nhaxe_id={$nhaxe_id}";
} else {
    $nhaxe_id = -1;
}
require_once "model/Nhaxe.php";
$modelNhaxe = new Nhaxe();
$detailNhaxe = $modelNhaxe->getDetailNhaxe($nhaxe_id);
$listTotal = $model->getListImageByNhaxe($nhaxe_id, -1, -1);
$total_record = mysql_num_rows($listTotal);
$total_page = ceil($total_record / 8);
$page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
$offset = 8 * ($page - 1);
$list = $model->getListImageByNhaxe($nhaxe_id, $offset, 8);
?>
<div class="row">
    <div class="col-md-12">
    <button class="btn btn-primary btn-sm right" 
    onclick="location.href='index.php?mod=nhaxe&act=form&nhaxe_id=<?php 
echo $nhaxe_id;
?>
'">Chi tiết</button>
     <button class="btn btn-primary btn-sm right" 
    onclick="location.href='index.php?mod=branch&act=list&nhaxe_id=<?php 
echo $nhaxe_id;