Пример #1
0

<?php 
require_once "models/class-product.php";
require_once "models/class-cat-product.php";
require_once 'models/class-phan-trang.php';
$pro_obj = new product();
$config = array('current_page' => isset($_GET['page']) ? $_GET['page'] : 1, 'total_record' => $pro_obj->countTable('product'), 'limit' => 6, 'link_full' => 'index.php?view=product&page={page}', 'link_first' => 'index.php?view=product', 'range' => 9);
$start = ($config['current_page'] - 1) * $config['limit'];
$product = $pro_obj->getAllKhuyenmai("", array($start, $config["limit"]));
?>

<div style="height:auto; margin-top:10px; float:left" class="cat-proall">
            	
		<div class="sp-moi">
        		<div style="height:50px; font-size:2em;margin-bottom:20px; color:#090" class="banchay">
                <marquee behavior="scroll" direction="left" scrollamount="10" style="z-index:9999">
                Hot - Hot - Hot &hearts; Hàng mới về
                </marquee>
                </div>
			
                <div class="list-spm">
                     <?php 
foreach ($product as $value) {
    ?>
                    <div class="spm-details">
                        <a href="index.php?view=product-detail&p_id=<?php 
    echo $value['pro_id'];
    ?>
"><img src="uploads/<?php 
    echo $value['image'];
Пример #2
0
<style>
.spkm-details:last-child
{
	border-bottom:none;
}
</style>

<?php 
require_once "models/class-product.php";
require_once 'models/class-phan-trang.php';
$pro_obj = new product();
$config = array('current_page' => isset($_GET['page']) ? $_GET['page'] : 1, 'total_record' => $pro_obj->countTable('product'), 'limit' => 4, 'link_full' => 'index.php?view=danhmuc-product-detail&page={page}', 'link_first' => 'index.php?view=danhmuc-product-detail', 'range' => 9);
$start = ($config['current_page'] - 1) * $config['limit'];
$kien = $pro_obj->getAllKhuyenmai("pro_id", array($start, $config["limit"]));
?>
	<div style="width:700px;" id="spkm">
			<div class="km">
				<img src="images/icon-arrow.jpg"><p style="margin-left:40px; color:#777777; margin-top:-19px; font-size:1.5em">Tin khuyến mại</p>
			</div>
            <?php 
foreach ($kien as $a) {
    ?>
			<div style="margin-top:20px; padding-bottom:20px;padding-top:10px;padding-right:10px; border-bottom:#CCC solid 1px;" class="spkm-details">
					<a href="index.php?view=tintucsp-detail&n_id=<?php 
    echo $a['pro_id'];
    ?>
"><img src="uploads/<?php 
    echo $a['image'];
    ?>
" width="240" height="180"/></a>
                    <div style="width:440px; float:right" class="noidung">