Beispiel #1
0
                <div class="col-md-6">
                    <input type="text" id="example-email" name="position" class="form-control" placeholder="Thứ tự" value="<?php 
if (isset($_GET['id'])) {
    echo $temp['position'];
}
?>
"></div>
            </div>
             <div class="form-group">
                <label class="col-md-3 control-label" for="example-select">Lựa chọn danh mục cha</label>
                <div class="col-md-6">
                    <select id="example-select" name="parent_id" class="form-control" size="1">
                        <option value="0">Không có danh mục cha</option>
                        <?php 
//$temp_cat = $cat_obj->getAllCat();
$temp_cat = isset($_GET['id']) ? $cat_obj->getAllCatExceptId($_GET['id'], 'position') : $cat_obj->getAllCat('position');
$id = isset($_GET['id']) ? $temp['parent_id'] : 0;
echo buildCatDeQuy($temp_cat, $id);
?>
                    </select>
                </div>
            </div>
             <div class="form-group">
                <label class="col-md-3 control-label">Hiển thị ra trang chủ </label>
                <div class="col-md-9">
                    <div class="checkbox mar-left5">
                        <label for="example-checkbox1">
                            <input type="checkbox" id="example-checkbox1" <?php 
if (isset($_GET['id'])) {
    echo $temp['home'] == 1 ? "checked" : "";
}