Exemple #1
0
<?php

if (isset($_GET['promotion_id'])) {
    $promotion_id = (int) $_GET['promotion_id'];
    require_once "model/Promotion.php";
    $model = new Promotion();
    $detail = $model->getDetailPromotion($promotion_id);
}
?>

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>

<script type="text/javascript" src="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