Beispiel #1
0
<?php 
include_once "./header.php";
include_once './commonlib.php';
$conn = getConnection('ibabymall');
$prodCNT = getTotalProducts($conn);
$prodlist = getBrandList($conn);
$brandCNT = getTotalBrands($conn);
$storeCNT = getTotalStores($conn);
$conn2 = getConnection('jared');
$newsCNT = getTotalNews($conn2);
?>
<!--
<div class="alert alert-danger">正在進行資料庫更新,請稍待片刻...</div>
-->
        <div class="col-lg-3 col-md-6">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-3">
                            <i class="fa fa-shopping-cart fa-4x"></i>
                        </div>
                        <div class="col-xs-9 text-right">
                            <div class="huge"><?php 
echo $prodCNT;
?>
</div>
                            <div>產品數量</div>
                        </div>
                    </div>
                </div>
                <a href="">
Beispiel #2
0
<?php 
include_once "./header.php";
include_once "./commonlib.php";
$conn = getConnection("ibabymall");
$brand_id = (int) $_GET['id'] ? (int) $_GET['id'] : 1;
$showpage = (int) $_GET['page'] ? (int) $_GET['page'] : 1;
$total = getProductTotalByBrandId($conn, $brand_id);
$each_page_count = 50;
$page_max = ceil($total / $each_page_count);
$showpage = max(1, min($showpage, $page_max));
$start = ($showpage - 1) * $each_page_count;
$ary = getProductListByBrandId($conn, $brand_id, $start, $each_page_count);
/* calc this store in which page */
$brand_ary = getBrandList($conn);
for ($i = 0; $i < sizeof($store_ary); $i++) {
    if ($brand_ary[$i][0] == $brand_id) {
        $brand_list_page = $i;
    }
}
$brand_list_page = floor($brand_list_page / 50) + 1;
?>


<style>
.small.photo{
    height: 50px;
    width: 50px;
}
</style>
    <nav>
      <ul class="pager">