$p_Cat->setCatPro($p->getCatPro()); $ListPro_Cat = $p_Cat->loadLimit(6); Product::printListProduct($ListPro_Cat); ?> </div> <!--/CUNG LOAI SAN PHAM--> <!--CUNG NHA SAN XUAT--> <div class="latest box clearfix"> <div class="box-top"> <p>Cùng nhà sản xuất</p> </div> <?php $p_Bra = new Product(); $c_Bra = new Category(); $c_Bra->setBrand($c->getBrand()); $p_Bra->setCatPro($c_Bra); $ListPro_Bra = $p_Bra->loadLimit(6); Product::printListProduct($ListPro_Bra); ?> </div> <!--/CUNG NHA SAN XUAT--> <script type="text/javascript"> $(document).ready(function () { $('#product-detail button.btn-shopping-cart').on('click', function () { var proID = $(this).data('proid'); $('#txtProID').val(proID); var orderQuantity = $('#txtOrderQuantity').val(); $('#txtOrderQ').val(orderQuantity); $('#addToCart-form').submit();
if (isset($_POST["txtControl"])) { $control->setValue($_POST["txtControl"]); } if (isset($_POST["txtCatProID"])) { $Category->setCatID($_POST["txtCatProID"]); } if (isset($_POST["txtCatName"])) { $Category->setCatName($_POST["txtCatName"]); } if (isset($_POST["cboDevice"])) { $oDevice = new Device($_POST["cboDevice"]); $Category->setDevice($oDevice); } if (isset($_POST["cboBrand"])) { $oBrand = new Brand($_POST["cboBrand"]); $Category->setBrand($oBrand); } if ($control == Controls::Insert) { $Category->insert(); $insert = true; } else { if ($control == Controls::Update) { if (isset($_POST["chkStatus"])) { $Category->setStatus($_POST["chkStatus"]); } else { $Category->setStatus(0); } $Category->update(); $update = true; } }
$curPage = $_GET['page']; //truyền thứ tự trang cần xem } $offset = ($curPage - 1) * $rowsPerPage; // tính offset bắt đầu load if (isset($_GET["btnSearch"])) { $Product = new Product(); $Product->setProName($_GET["txtProName"]); $Price = $_GET["txtPrice"]; $Price = explode(',', $Price); $Product->setPrice($Price); require_once './entities/Category.php'; require_once './entities/Brand.php'; require_once './entities/Device.php'; $CatPro = new Category(); $CatPro->setBrand(new Brand($_GET["cboBra"])); $CatPro->setDevice(new Device($_GET["cboDevice"])); $Product->setCatPro($CatPro); $ListPro = $Product->loadLimit($rowsPerPage, $offset, "ProName"); $numberOfRows = $Product->countRecords(); $flag = true; } ?> <div class="box clearfix"> <ol class="breadcrumb box-top"> <li><a href="index.php"><i class="fa fa-home"></i></a></li> <li class="active">Tìm Kiếm</li> </ol> <div id="searchBody"> <form action="search.php" method="get"> <div class="col-md-12 row">