📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv8.demodesign.com.tr
📝
shop.php
← Geri Dön
<?php // +------------------------------------------------------------------------+ // | @author Ercan Agkaya (Themerig) // | @author_url 1: https://www.themerig.com // | @author_url 2: https://codecanyon.net/user/themerig // | @author_email: support@themerig.com // +------------------------------------------------------------------------+ // | Techno Cms - E-Commerce Script // | Copyright (c) 2018 Techno CMS. All rights reserved. // +------------------------------------------------------------------------+ include ('includes/head.php'); include ('includes/header.php'); echo'<section class="flat-breadcrumb"> <div class="container"> <div class="row"> <div class="col-md-12">'; if(empty($_GET['sub_category'])){ $katkont = $db->prepare("SELECT * FROM category where category_s_name=? "); $katkont-> execute(array($_GET['category'])); $katkont= $katkont->fetch(PDO::FETCH_OBJ); if(empty($katkont)){ echo $_GET['category']; if ($_GET['category']=="xpanel"){ header("location:".$ayars['web_adress']."xpanel/index.php"); }else{ //header("Location:index.php"); } } }else { $katakont = $db->prepare("SELECT * FROM category where category_s_name=? "); $katakont-> execute(array($_GET['category'])); $katakont= $katakont->fetch(PDO::FETCH_OBJ); $katalkont = $db->prepare("SELECT * FROM category where category_s_name=? "); $katalkont-> execute(array($_GET['sub_category'])); $katalkont= $katalkont->fetch(PDO::FETCH_OBJ); if(empty($katakont) || empty($katalkont)){ //header("Location:../index.php"); } } if (!empty($_GET['sub_category'])) { echo'<ul class="breadcrumbs"> <li class="trail-item"> <a href="" title="">Anasayfa</a> <span><img src="images/icons/arrow-right.png" alt=""></span> </li>'; if (!empty($back_category_id['category_name'])) { echo'<li class="trail-item"> <a href="'.seo($back_category_id['category_name']).'" title="">'.$back_category_id['category_name'].'</a> <span><img src="images/icons/arrow-right.png" alt=""></span> </li>'; echo'<li class="trail-item"> <a href="'.seo($back_category_id['category_name']).'/'.seo($category_id['category_name']).'" title="">'.$category_id['category_name'].'</a> <span><img src="images/icons/arrow-right.png" alt=""></span> </li>'; } else { echo'<li class="trail-item"> <a href="'.seo($category_id['category_name']).'" title="">'.$category_id['category_name'].'</a> <span><img src="images/icons/arrow-right.png" alt=""></span> </li>'; } echo'<li class="trail-end"> <a href="'.seo($category_id['category_name']).'/'.seo($category_parent['category_name']).'" title="">'.$category_parent['category_name'].'</a> </li> </ul>'; } else if (!empty($_GET['category'])) { echo'<ul class="breadcrumbs"> <li class="trail-item"> <a href="" title="">Anasayfa</a> <span><img src="images/icons/arrow-right.png" alt=""></span> </li> <li class="trail-end"> <a href="'.seo($category_parent['category_name']).'" title="">'.$category_parent['category_name'].'</a> </li> </ul>'; } echo'</div> </div> </div> </section>'; ?> <main id="shop" class="style3"> <div class="container"> <div class="row"> <div class="col-lg-3 col-md-4"> <div class="sidebar "> <div class="widget widget-categories"> <div class="widget-title"> <h3><center>Alt Kategoriler</center><span></span></h3> </div> <ul class="cat-list style1 widget-content"> <?php if($category_id['id']){ $idd=$category_id['id']; $katt=$category_id['category_name']; }else{ $idd=$category_parent['id']; $katt=$category_parent['category_name']; } $altlar = $db->prepare("SELECT * FROM category where parent=? "); $altlar-> execute(array($idd)); $altlar= $altlar->fetchAll(PDO::FETCH_OBJ); foreach ($altlar as $alt ) { ?> <li> <a href="<?=seo($katt)."/".seo($alt->category_name)?>"><span><?=$alt->category_name?><i></i></span></a> </li> <?php } ?> </ul><!-- /.cat-list --> </div> </div> </div> <div class="col-lg-9 col-md-8"> <?php if($banners["shopbanner"]['status']==1){ ?> <div class="main-shop"> <div class="banner-box style10"> <div class="inner-box"> <a href="<?=$banners["shopbanner"]['link']?>" title=""> <img src="<?= $banners["shopbanner"]['resim']?>" alt="" style="height: 350px;;width: 100%;object-fit: cover;"> </a> </div> </div> </div> <?php } ?> </div> </div> <div class="row"> <div class="col-md-12"> <div class="main-shop urun-carousel"> <div class="wrap-imagebox"> <div class="flat-row-title style1"> <?php echo ' <span> '.$category_parent['category_name'].' AİT ÜRÜNLER LİSTELENMEKTEDİR. </span> <div class="clearfix"></div> </div><!-- /.flat-row-title style1 --> <div class="sort-product style1" style="display:none;"> <ul class="icons"> <li> <img src="images/icons/list-1.png" alt=""> </li> <li> <img src="images/icons/list-2.png" alt=""> </li> <li class="filter waves-effect"> Kategori Seçimi </li> </ul><!-- /.icons --> <div class="box-filter" style="z-index: 9999999999;"> <div class="widget widget-categories"> <div class="widget-title"> <h3>Kategoriler<span></span></h3> </div> <ul class="cat-list style1 widget-content"> '; if (!empty($_GET['sub_category'])) { $multi_sub_category = $db->prepare("SELECT * FROM category WHERE parent = '".$category_parent['id']."'"); $multi_sub_category->execute(); if($multi_sub_category->rowCount()) { echo'<li class="active"> <span class="active">'.$category_parent['category_name'].'<i>('.$multi_sub_category->rowCount().')</i></span> <ul class="cat-child cats" style="display: block;">'; foreach ($multi_sub_category as $sub_row) { echo'<li> <a href="'.seo($category_parent['category_name']).'/'.seo($sub_row['category_name']).'" title="">'.$sub_row['category_name'].'</a> </li>'; } echo'</ul> </li>'; } else { echo'<div class="widget widget-categories" style="width: 100%;"> <ul class="cat-list style1 widget-content"> <li> <span>'.$category_id['category_name'].'<i>(1)</i></span> <ul class="cat-child cats" style="display: block;"> <li> <a style="color: #f28b00;" href="'.seo($category_id['category_name']).'/'.seo($category_parent['category_name']).'" title="">'.$category_parent['category_name'].'</a> </li> </ul> </li> </ul> </div>'; } } else if (!empty($_GET['category'])) { $sub_category = $db->prepare("SELECT * FROM category WHERE parent = '".$category_parent['id']."'"); $sub_category->execute(); if($sub_category->rowCount()) { foreach ($sub_category as $sub_row) { $multi_sub_category = $db->prepare("SELECT * FROM category WHERE parent = ".$sub_row['id']); $multi_sub_category->execute(); echo'<li> <a href="'.seo($category_parent['category_name']).'/' . seo($sub_row['category_name']) . '" title="">'.$sub_row['category_name'].' <i>('.$multi_sub_category->rowCount().')</i></a> </li>'; } } } echo ' </ul><!-- /.cat-list --> </div><!-- /.widget-categories --> </div><!-- /.box-filter --> <div class="sort"> <div class="popularity"> <select name="popularity"> <option value="">Gelişmiş sıralama</option> </select> </div> </div><!-- /.sort --> <div class="clearfix"></div> </div><!-- /.sort-product style1 --> <div class="row"> '; /*echo $idler; echo $_GET['sub_category']."-". $_GET['category'];*/ if (empty($_GET['sub_category'])) { $anakat = $db->prepare("SELECT * FROM category where category_s_name=? "); $anakat-> execute(array($_GET['category'])); $anakat= $anakat->fetch(PDO::FETCH_OBJ); $altkat = $db->prepare("SELECT * FROM category where parent=? "); $altkat-> execute(array($anakat->id)); $altkat= $altkat->fetchAll(PDO::FETCH_OBJ); foreach ($altkat as $katid) { $idler.= $katid->id.","; } $idler=rtrim($idler,","); $sorgu = "category in (".$idler.")"; } else { $kat = $db->prepare("SELECT * FROM category where category_s_name=? "); $kat-> execute(array($_GET['sub_category'])); $kat= $kat->fetch(PDO::FETCH_OBJ); $sorgu = "category = ".$kat->id; } /*$item = $db->prepare("SELECT * FROM items WHERE " . $sorgu . " "); $item->execute();*/ $sira = 0; if($_GET['s']){ $slug = $_GET['s']; }else{ $slug=1; } $kactane = 6; $nereden = $slug*$kactane-$kactane; $verisay = $db->query("SELECT * FROM itemsy WHERE " . $sorgu )->rowCount(); $toplamsayfa = ceil($verisay/$kactane); if($toplamsayfa==0){$toplamsayfa=1;} if($slug>$toplamsayfa){header("location:../".seo($category_id['category_name']).'/'.seo($category_parent['category_name'])."?s=1");} $anahizsorgu = $db->prepare("SELECT * FROM itemsy where $sorgu ORDER by id DESC LIMIT $nereden,$kactane"); $anahizsorgu->execute([$kategori['id']]); $say=$anahizsorgu->rowCount(); $url = 'https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; $url=explode("?", $url); $tur= $url[0]; $item = $db->prepare("SELECT * FROM itemsy WHERE " . $sorgu . " order by id desc LIMIT $nereden,$kactane "); $item->execute(); if ($item->rowCount()) { foreach ($item as $row) { $new_price = number_format($row['new_price'], 2, ',', '.'); $old_price = number_format($row['old_price'], 2, ',', '.'); if (strlen($row['title']) > 63) { $title = substr($row['title'], 0, 33) . '<a>...</a>'; } else { $title = $row['title']; } $gallery = $db->prepare("SELECT * FROM gallery WHERE `item_id` = '{$row['id']}' "); $gallery->execute(); if ($gallery->rowCount()) { foreach ($gallery as $gallery) { } } $kat = $db->prepare("SELECT * FROM category where id=? "); $kat-> execute(array($row['category'])); $kat= $kat->fetch(PDO::FETCH_OBJ); $anakat = $db->prepare("SELECT * FROM category where id=? "); $anakat-> execute(array($kat->parent)); $anakat= $anakat->fetch(PDO::FETCH_ASSOC); $url= seo($anakat['category_name']) . '/'. seo($kat->category_name) . '/' . seo($row['title'] . "-e" . $row['id']); $category = $kat->category_name; echo ' <div class="col-md-4 col-sm-6"> <div class="product-box"> <div class="imagebox style8"> <div class="box-image owl-carousel-1"> '; ?> <?php $gallery = $db->prepare("SELECT * FROM gallery where item_id=? ORDER BY que"); $gallery-> execute(array($row['id'])); $gallery= $gallery->fetchAll(PDO::FETCH_ASSOC); for ($i=0; $i <2 ; $i++) { ?> <a href="<?=$url?>" title="" id="gallery-<?=$gallery["id"]?>"> <img src="<?=$row["foto_url"]?>" alt="" id="gallery-<?=$gallery["id"]?>-img"> </a> <?php } echo ' </div><!-- /.box-image --> <div class="box-content"> <div class="cat-name"> <a href="#" title="">' . $category . '</a> </div> <div class="product-name"> <a href="' . $url . '" title="">' . $title . '<br />#' . $row['id'] . $row['code'] . '</a> </div> <div class="price"> '; if ($new_price != "") { echo ' <span class="sale"> ' . $new_price . ' TL </span> '; } else { echo ' '; } ?> </div> </div><!-- /.box-content --> <div class="box-bottom"> <div class="btn-add-cart"> <form onsubmit="return false" action="POST" id="add_to_cart_<?=$row['id']?>"> <input type="hidden" value="<?=$row['id']?>" name="item_id"> <input type="hidden" value="<?=$_COOKIE['COOKIE_KEY']?>" name="cookies_rand_id"> <input type="hidden" value="<?=$new_price?>" name="new_price"> <input type="hidden" value="<?=$old_price?>" name="old_price"> </form> <?php if($row['sale_status']>0){?> <a href="javascript:void(0);" onclick="to_cart_manual(<?=$row['id']?>);" title=""> <input type="text" hidden="" value="<?=$row["id"]?>" name="item_id"/> <div id="result_spin_a_sepet_<?=$row['id']?>"></div> <img src="images/icons/add-cart.png" alt="" >Sepete Ekle </a> <?php }else{?> <a href="javascript:void(0);" title=""> <input type="text" hidden="" name="item_id"/> <div id="result_spin_a_sepet_<?=$row['id']?>"></div> Tükenmiş </a> <?php }?> </div> <div class="compare-wishlist"> </div> </div><!-- /.box-bottom --> </div><!-- /.imagebox style8 --> </div><!-- /.product-box --> </div><!-- /.col-md-4 col-sm-6 --> <?php $sira++; } } ?> </div><!-- /.row --> </div><!-- /.wrap-imagebox --> <div class="blog-pagination"> <span> </span> <ul class="flat-pagination style1"> <?php if ($slug>1) { ?> <li class="prev"> <a href="<?=$tur?>?s=<?=$slug-1?>" title=""> <img src="images/icons/left-1.png" alt="">Geri </a> </li> <?php } for ($i=$slug-3; $i<$slug+3; $i++) { if ($i>0 && $i<=$toplamsayfa) { if ($i==$slug) { echo '<li class="active"><a class="waves-effect" href="'.$tur.'?s='.($i).'">'.($i).'</a></li>'; //echo ' <a href="/film-izle/'.($i).'" class="active">'.$i.'</a>'; }else{ echo ' <li class=""><a class="waves-effect" href="'.$tur.'?s='.($i).'">'.($i).'</a></li>'; //echo ' <a href="/film-izle/'.($i).'">'.$i.'</a>'; } } }?> <?php if ($slug<$toplamsayfa) { ?> <li class="next"> <a href="<?=$tur?>?s=<?=($slug+1)?>" title=""> İleri<img src="images/icons/right-1.png" alt=""> </a> </li> <?php } ?> </ul> <div class="clearfix"></div> </div> <br><br><br><br> </div><!-- /.main-shop --> </div><!-- /.col-md-12 --> </div><!-- /.row --> </div><!-- /.container --> </main><!-- /#shop --> <?php include ('includes/footer.php');
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula