Beispiel #1
0
$config = array('current_page' => isset($_GET['page']) ? $_GET['page'] : 1, 'total_record' => count($product->getProductByCatId($_GET["c_id"])), 'limit' => 6, 'link_full' => "index.php?view=product-cat&c_id={$_GET['c_id']}&page={page}", 'link_first' => "index.php?view=product-cat&c_id={$_GET['c_id']}", 'range' => 9);
$start = ($config['current_page'] - 1) * $config['limit'];
if ($_GET["c_id"]) {
    $temp = $product->getProductOfCat($_GET["c_id"], "pro_id", array($start, $config['limit']));
}
//echo "<pre>";
//	print_r($temp);
//echo "</pre>";
?>


       
        		<div class="sp-moi">
                	<?php 
$catpro_obj = new category_product();
$catpro = $catpro_obj->getCatById($_GET['c_id']);
?>
                        <div class="spm">
                          
                        <h3><?php 
echo $catpro['cat_name'];
?>
</h3>
                      
                        </div>
                       
                         <div class="list-spm">
                          <?php 
foreach ($temp as $val) {
    ?>
                            <div style="margin-top:10px;"  class="spm-details">
Beispiel #2
0
<?php

require_once '../models/class-cat-product.php';
$cat_obj = new category_product();
if (isset($_GET['id'])) {
    $temp = $cat_obj->getCatById($_GET['id']);
}
?>
<div class="panel panel-danger">
    <div class="panel-heading">
        <h3 class="panel-title">
            <i class="livicon" data-name="bell" data-loop="true" data-color="#fff" data-hovercolor="#fff" data-size="18"></i>
            <?php 
if (isset($_GET['act'])) {
    echo $_GET['act'] == 'update' ? 'Sửa' : 'Thêm';
} else {
    echo "Thêm";
}
?>
 danh mục
        </h3>
        <span class="pull-right">
            <i class="fa fa-fw fa-chevron-up clickable"></i>
            <i class="fa fa-fw fa-times removepanel clickable"></i>
        </span>
    </div>
    <div class="panel-body border">
        <form action="control/proccess-cat-product.php" method="post" class="form-horizontal form-bordered">
            <div class="form-group">
                <label class="col-md-3 control-label" for="example-text-input">Tên danh mục</label>
                <div class="col-md-6">