$idcat = $row->id; $namecat = $row->category_name; echo "<li><a " . is_selected($idcat, $cat, "class=\"selected\"", "") . " href=\"/products/list/?type=" . $type . "&cat=" . $idcat . "#wrapproduct\">" . $namecat . "</a></li>"; } } //end fetch category list ?> </ul> <!--END MENU CATEGORIES--> <!--START PRODUCT ITEM--> <div class="wraplistitem"> <ul class="productitem"> <?php $data = get_products_list($type, $cat, $rowspage, $p); $maxpage = 1; if (isset($data["maxpage"])) { $maxpage = $data["maxpage"]; } if ($data["result"]) { foreach ($data["result"] as $row) { $id = $row->id; $product_name = $row->product_name; $product_price = $row->product_price; $product_img = $row->img; $cretime = $row->cretime; $nowtime = strtotime(date("d M Y")); $diff = $nowtime - strtotime($cretime); $tickernew = ""; if ($diff <= 302400) {
<?php session_start(); $products = file_get_contents('js/productsdetails.json'); $j_products = json_decode($products, true); include 'function.php'; if (isset($_POST['type']) != "") { $_SESSION['type'] = $_POST['type']; } elseif (isset($_POST['brand']) != "") { $_SESSION['brand'] = $_POST['brand']; } // echo $_POST['type']; $products = get_products_list($_SESSION['brand'], $_SESSION['type']); if ($products) { ?> <div class="clearing" style="height: 10px; background: #fff;"></div> <?php foreach ($products as $product => $p) { ?> <?php //print_r($p); ?> <!-- related product list --> <div class="col-xs-12 related_product"> <div class="col-xs-5 image_box"><a class="choose_product" href="javascript:void(0);"> <span style="display: none;" class="data"> <?php $p["brand"] = $_SESSION['brand']; $p["category"] = $_SESSION['category']; $p["type"] = $_SESSION['type']; echo json_encode($p);