Example #1
0
    ?>
">
            <a class="cat-product-item" href="productsByCat.php?DeviceID=<?php 
    echo $ItemDev->getDeviceID();
    ?>
">
                <?php 
    echo $ItemDev->getDeviceName();
    ?>
            </a>

            <div class="list-group">
                <?php 
    $c = new Category();
    $c->setDevice($ItemDev);
    $ListCat = $c->loadLimit();
    foreach ($ListCat as $ItemCat) {
        ?>
                    <a href="productsByCat.php?CatID=<?php 
        echo $ItemCat->getCatID();
        ?>
" class="list-group-item">
                        <i class="fa fa-circle"></i><?php 
        echo $ItemCat->getCatName();
        ?>
                    </a>
                <?php 
    }
    ?>
            </div>
        </div>
Example #2
0
if (isset($_POST['Status']) & !empty($_POST['Status'])) {
    $filterCategory->setStatus($_POST['Status']);
}
if (isset($_POST['SortName']) & !empty($_POST['SortName'])) {
    $SortName = $_POST['SortName'];
}
if (isset($_POST['SortType']) & !empty($_POST['SortType'])) {
    $SortType = $_POST['SortType'];
}
$numberOfRows = $filterCategory->countRecords();
// Số lượng dòng của bảng
$ListCategories = array();
if ($rowsPerPage == -1) {
    // nếu là chọn hiển thị là ALL
    $rowsPerPage = $numberOfRows;
    $ListCategories = $filterCategory->loadLimit($rowsPerPage, 0, $SortName, $SortType);
} else {
    $ListCategories = $filterCategory->loadLimit($rowsPerPage, $offset, $SortName, $SortType);
}
//tổng số trang cần hiển thị
$self = $_SERVER['PHP_SELF'];
// Lay dia chi truc tiep cua PHP dang mo
$pagination = new Pagination($curPage, $rowsPerPage, $offset, $numberOfRows, $self);
//end Paging
?>
<div id="mainData">
    <table class="table table-bordered">
        <tbody>
        <?php 
$crypter = new Crypter("nhatanh");
$encrypted = $crypter->Encrypt($_SESSION["token"]);