]]jkjjgdjffksdkdxdsghfghdfghfgdfsdsdfsdfsfdsbcxvxcbccwewqeqwewqskfgj
במ12[cxvbcxvbxcvbcxvcxvbcvxcvbsdfsdfsdfsdfsdfsdfxcvbxcvxbbxqwqewqewv;'
/
home
/
u506006416
/
domains
/
crystalmiracle.co.in
/
public_html
/
Upload FileeE
HOME
<?php include_once "slug-generate.php"; include_once("admin/include/config.php"); $sel_obj= new config(); $catName = generateSlug($_REQUEST['catName']) ?? 'N-A'; // @$page=$_GET["page"]; if(isset($_POST["action"])) { $cat_id=$_POST['cat_id']; if (isset($_POST['page'])) { $page=$_POST['page']; }else{ $page=1; } $temp_id=$_POST['temp_id']; if($page=="" || $page=="1") { $page1=0; }else{ $page1=($page*12)-12; } // $page=''; if(isset($_POST["brand"])) { $cat_ids = implode(",", $_POST["brand"]); $cat_condition= "`type`= 1 AND b_id IN('".$brand."') AND `cat_id`=".$cat_id; $cat_condition=" `cat_id` IN(".$cat_ids .") OR cat_id IN(SELECT cat_id FROM category WHERE parent_id IN (".$cat_ids.")) "; $record_per_page=12; $get_record_q=$sel_obj->uniquevalue("p_id","multiple_category",$cat_condition); $get_record = count($get_record_q); $get_round_num=($get_record/$record_per_page); $get_round_num=ceil($get_round_num); $brand_condition= " `cat_id` IN(".$cat_ids .") OR cat_id IN(SELECT cat_id FROM category WHERE parent_id IN (".$cat_ids.")) LIMIT $page1 , $record_per_page"; $brand_query=$sel_obj->uniquevalue("p_id","multiple_category",$brand_condition); } else { $cat_condition="`cat_id`=".$cat_id ." OR cat_id IN(SELECT cat_id FROM category WHERE parent_id=".$cat_id.") "; $record_per_page=12; //$get_record=$sel_obj->all_count_row("multiple_category", $cat_condition); $get_record_q=$sel_obj->uniquevalue("p_id","multiple_category",$cat_condition); $get_record = count($get_record_q); $get_round_num=($get_record/$record_per_page); $get_round_num=ceil($get_round_num); $cate_condition="`cat_id`=".$cat_id." OR cat_id IN(SELECT cat_id FROM category WHERE parent_id=".$cat_id.") LIMIT $page1 , $record_per_page"; $brand_query=$sel_obj->uniquevalue("p_id","multiple_category",$cate_condition); } // -----------------------------common ---------------------------------------------- ?> <div id="shop-1" class="tab-pane active"> <div class="row"> <?php if(is_array($brand_query) && !empty($brand_query)) { foreach($brand_query as $p_data) { $p_condition="`p_id`=".$p_data['p_id']; $p_query=$sel_obj->display_rcd("product",$p_condition); if(is_array($p_query) AND !empty($p_query)) { foreach($p_query as $p_data){ ?> <div class="col-xl-4 col-md-4 col-sm-6"> <article class="list-product"> <div class="img-block"> <?php if($p_data['combo_product_ids'] !=""): $comboData = json_decode($p_data['combo_product_ids']); if(count($comboData) > 0): ?> <span class="comtitlo">Combo Product</span> <?php endif;endif;?> <?php $offers_data = json_decode($p_data['offers'], true); if(!empty($offers_data)) : ?> <span class="comtitlo">Offer</span> <?php endif; ?> <a href="<?=BASE_URL?>product-details/<?php echo $p_data['p_id'];?>/<?=generateSlug($p_data['p_name']);?>" class="thumbnail"> <img class="first-img" src="<?=BASE_URL?>admin/upload/<?php echo $p_data['p_img'];?>" alt="" /> </a> </div> <div class="product-decs"> <h2> <a href="<?=BASE_URL?>product-details/<?php echo $p_data['p_id'];?>/<?=generateSlug($p_data['p_name']);?>" class="product-link"><?php echo $p_data['p_name'];?></a> </h2> <?php if($p_data['price']!='') { ?> <div class="pricing-meta"> <ul> <?php if($p_data['d_price']!='') { ?> <li><small>M.R.P.</small></li> <?php if($p_data['d_price']<1 || intval($p_data['quan_available']<1)){ ?> <li><b class="text-danger ml-4">Out of stock</b></li> <?php }else{ ?> <li class="current-price"><b><?php echo "₹".$p_data['d_price'];?></b></li> <?php } ?> <?php } else { ?> <li class="current-price"><b><?php echo "₹".$p_data['price'];?></b></li> <?php } if($p_data['d_price']>0) { ?> <?php } ?> </ul> </div> <hr> <ul> <?php if($p_data['buyType'] ==1): ?> <li class="cart"> <?php if($p_data['d_price']<1 || intval($p_data['quan_available']<1)){ ?> <a class="btn btnadct disabled"> + Add To Cart</a></a> <?php }else{ ?> <a class="shop_btns single_add_to_cart_btn" href="javascript:;" data-p_code="<?php echo $p_data['p_code'];?>" data-p_img="<?php echo $p_data['p_img'];?>" data-product_id="<?php echo $p_data['p_id'];?>" data-gst="<?php echo $gst=str_replace("%"," ",$p_data['gst']);?>" data-temp_id="<?php echo $temp_id;?>" data-r_p="<?php echo $p_data['price'];?>" data-o_p="<?php echo $p_data['d_price'];?>" data-qtn="1" data-p_name="<?php echo $p_data['p_name'];?>" data-shipping_price="<?php echo $p_data['shipping_price'];?>" data-packaging_price="<?php echo $p_data['packaging_price'];?>">ADD TO CART </a> <?php } ?> </li> <?php else: ?> <li class="cart"> <a href="<?=BASE_URL?>enquiry-now.php?product=<?=base64_encode($p_data['p_id'])?>" class="btn btnadct btn-info" >ENQUIRY NOW </a> </li> <?php endif;?> </ul> <?php } ?> </div> </article> </div> <?php } } } } else { ?> <h3>No Data Found</h3> <?php } ?> </div> </div> <div class="pro-pagination-style text-center"> <ul> <?php // echo $get_round_num; if ($page>1) { $prepage = $page-1; echo "<li><a href='".BASE_URL."category/$cat_id/$prepage/$catName' class=''>PREV</a></li>"; } for ($b=1; $b<=3; $b++) { if($b==$page){ $active = 'active'; }else{ $active = ''; } if ($b<=$get_round_num) { echo "<li><a href='".BASE_URL."category/$cat_id/".$b."/$catName' class=".$active.">".$b."</a></li>"; } } if ($page>3) { echo ".....<li><a href='".BASE_URL."category/$cat_id/".$page."/$catName' class='active'>".$page."</a></li>"; } if ($get_round_num > $page) { echo "<li><a href='".BASE_URL."category/$cat_id/".($page+1)."/$catName' class=''>NEXT</a></li>"; } ?> </ul> </div> <?php // ------action ends } ?> <style> .btnadct { background: none !important; } .btnadct:hover { background: #cf292b !important; } </style>