当前位置: 首页>>代码示例>>PHP>>正文


PHP category::getAllCat方法代码示例

本文整理汇总了PHP中category::getAllCat方法的典型用法代码示例。如果您正苦于以下问题:PHP category::getAllCat方法的具体用法?PHP category::getAllCat怎么用?PHP category::getAllCat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在category的用法示例。


在下文中一共展示了category::getAllCat方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildCatDeQuy

</option>
                        <?php 
}
?>
                    </select>
                </div>
            </div>
            <div class="form-group" id="hidden-cat">
                <label class="col-md-3 control-label" for="example-select">Danh mục</label>
                <div class="col-md-6">
                    <select id="example-select" name="cat_id" class="form-control" size="1">
                        <option value="0">Please select</option>
                          <?php 
//$temp_cat = $cat_obj->getAllCat();
$cat_obj = new category();
$temp_cat = $cat_obj->getAllCat('position');
echo buildCatDeQuy($temp_cat, 0);
?>
                    </select>
                </div>
            </div>
            <div class="form-group" id="hidden-cat-product">
                <label class="col-md-3 control-label" for="example-select">Danh mục sản phẩm</label>
                <div class="col-md-6">
                    <select id="example-select" name="cat_pro_id" class="form-control" size="1">
                        <option value="0">Please select</option>
                          <?php 
//$temp_cat = $cat_obj->getAllCat();
$cat_obj = new category_product();
$temp_cat = $cat_obj->getAllCat('position');
echo buildCatDeQuy($temp_cat, 0);
开发者ID:vudinhkien,项目名称:APTECH,代码行数:31,代码来源:form-menu.php

示例2: category

if (isset($_GET['id'])) {
    echo $temp['content'];
}
?>
</textarea>
                </div>
            </div>  
               
               <div class="form-group">
                <label class="col-md-3 control-label" for="example-select">Danh mục</label>
                <div class="col-md-6">
                    <select id="example-select" name="cat_id" class="form-control" size="1">
                        <option value="0">Please select</option>
                        <?php 
$cat_obj = new category();
$temp_cat = $cat_obj->getAllCat();
foreach ($temp_cat as $val) {
    ?>
                        <option value="<?php 
    echo $val['cat_id'];
    ?>
" <?php 
    if (isset($_GET['id'])) {
        if ($val['cat_id'] == $temp['cat_id']) {
            echo "selected";
        }
    }
    ?>
><?php 
    echo $val['cat_name'];
    ?>
开发者ID:vudinhkien,项目名称:APTECH,代码行数:31,代码来源:form-news.php

示例3: listCatTable

<?php

require_once '../models/class-cat.php';
$cat_obj = new category();
$sort = '';
if (isset($_GET['sort'])) {
    $sort = $_GET['sort'];
}
switch ($sort) {
    case 'cat':
        $a = $cat_obj->getAllCat('cat_name');
        break;
    case 'position':
        $a = $cat_obj->getAllCat('position');
        break;
    default:
        $a = $cat_obj->getAllCat();
}
?>
    <table class="table table-bordered table-striped table-condensed flip-content">
        <thead class="flip-content">
            <tr>
                <th><a href="index.php?view=list-cat&sort=cat">Category Name</a></th>
                <th width="10%" class="numeric"><a href="index.php?view=list-cat&sort=position">Thứ tự</a></th>
                <th width="5%" class="numeric">Sửa</th>
                <th width="5%" class="numeric">Xóa</th>
            </tr>
        </thead>
        <tbody>
        <?php 
echo listCatTable($a);
开发者ID:vudinhkien,项目名称:APTECH,代码行数:31,代码来源:list-cat.php

示例4: buildCatDeQuy

                <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" : "";
}
开发者ID:vudinhkien,项目名称:APTECH,代码行数:31,代码来源:form-cat.php


注:本文中的category::getAllCat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。