📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv1.demodesign.com.tr
/
includes
/
template
/
_pages
📝
products.php
← Geri Dön
<?php echo !defined("GUVENLIK") ? die("Vaoww! Bu ne cesaret?") : null;?> <?php $page_header_setting = $db->prepare("select * from page_header where page_id='products' order by id"); $page_header_setting->execute(); $pagehead = $page_header_setting->fetch(PDO::FETCH_ASSOC); ?> <?php $productsayar = $db->prepare("select * from urunmodul_ayar where id=:id"); $productsayar->execute(array( 'id' => 1 )); $prodayar = $productsayar->fetch(PDO::FETCH_ASSOC); ?> <?php $Sayfa = @intval($_GET['s']); if(!$Sayfa) $Sayfa = 1; $Say = $db->query("select * from urun where durum='1' and dil='$_SESSION[dil]' order by id DESC"); $ToplamVeri = $Say->rowCount(); $Limit = 24; $Sayfa_Sayisi = ceil($ToplamVeri/$Limit); if($Sayfa > $Sayfa_Sayisi){$Sayfa = 1;} $Goster = $Sayfa * $Limit - $Limit; $GorunenSayfa = 5; if(!empty($_GET)){ $urun_listele = $db->query("select * from urun where durum='1' and dil='$_SESSION[dil]' order by id DESC limit $Goster,$Limit"); $UrunAl = $urun_listele->fetchAll(PDO::FETCH_ASSOC); } if($_GET['sirala'] == 1){ $urun_listele = $db->query("select * from urun where durum='1' and dil='$_SESSION[dil]' order by id DESC limit $Goster,$Limit"); $UrunAl = $urun_listele->fetchAll(PDO::FETCH_ASSOC); } if($_GET['sirala'] == 2){ $urun_listele = $db->query("select * from urun where durum='1' and dil='$_SESSION[dil]' order by hit DESC limit $Goster,$Limit"); $UrunAl = $urun_listele->fetchAll(PDO::FETCH_ASSOC); } if($_GET['sirala'] == 3){ $urun_listele = $db->query("select * from urun where durum='1' and dil='$_SESSION[dil]' order by fiyat ASC limit $Goster,$Limit"); $UrunAl = $urun_listele->fetchAll(PDO::FETCH_ASSOC); } if($_GET['sirala'] == 4){ $urun_listele = $db->query("select * from urun where durum='1' and dil='$_SESSION[dil]' order by fiyat DESC limit $Goster,$Limit"); $UrunAl = $urun_listele->fetchAll(PDO::FETCH_ASSOC); } ?> <title><?php echo ucwords_tr($diller['urunlerimiz']) ?> | <?php echo $ayar['site_baslik']?></title> <meta name="description" content="<?php echo"$prodayar[meta_desc]" ?>"> <meta name="keywords" content="<?php echo"$prodayar[tags]" ?>"> <meta name="news_keywords" content="<?php echo"$prodayar[tags]" ?>"> <meta name="author" content="<?php echo"$ayar[site_baslik]" ?>" /> <meta itemprop="author" content="<?php echo"$ayar[site_baslik]" ?>" /> <meta name="robots" content="index follow"> <meta name="googlebot" content="index follow"> <meta property="og:type" content="website" /> <?php include "includes/config/header_libs.php";?> </head> <body> <?php include 'includes/template/pre-loader.php'?> <?php include 'includes/template/header.php'?> <!-- Page Header ====================== !--> <style> .page-headers-main{width:<?php if($pagehead['width']==1){?> 90%; <?php }else {?> 100% <?php }?> ; padding:<?php echo $pagehead['padding'] ?>px 0 <?php echo $pagehead['padding'] ?>px 0 ; border:1px solid #<?php echo $pagehead['border_color'] ?>; <?php if($pagehead['shadow'] == 1 ) {?> -webkit-box-shadow: inset 0px 5px 10px -7px rgba(0,0,0,0.1); -moz-box-shadow: inset 0px 5px 10px -7px rgba(0,0,0,0.1); box-shadow: inset 0px 5px 10px -7px rgba(0,0,0,0.1); <?php } ?> <?php if($pagehead['tip'] == 0 ) {?> background:#<?php echo $pagehead['bg_color'] ?> ; <?php } ?> <?php if($pagehead['tip'] == 1 ) {?> background:url(images/uploads/<?php echo $pagehead['bg_image'] ?>) ; box-shadow: inset 5000px 0 0 0 rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 1); <?php } ?> } .product-main-box-img .buttons .text{background-color: #<?php echo $prodayar['incele_button_back'] ?>; } </style> <div class="page-headers-main"> <div class="page-headers-main-in"> <div class="page-headers-main-left font-raleway font-18 font-small font-spacing" style="color:#<?php echo $pagehead['text_color'] ?>;"> <?php echo ucwords_tr($diller['urunlerimiz']) ?> </div><div class="page-headers-main-right font-raleway font-12 font-spacing"> <span style="color:#<?php echo $pagehead['pasif_text_color'] ?>; padding-right: 15px;"><?php echo $diller['buradasiniz'] ?>:</span> <a href="index.html" style="color:#<?php echo $pagehead['text_color'] ?> !important;"><span style="padding-right: 15px; font-weight: 600; color:#<?php echo $pagehead['text_color'] ?> !important;"><?php echo $diller['anasayfa'] ?></span></a> <span style="color:#<?php echo $pagehead['pasif_text_color'] ?>; padding-right: 15px;">/</span> <a href="urunler" style="color:#<?php echo $pagehead['text_color'] ?>;"><span style="padding-right: 15px; color:#<?php echo $pagehead['text_color'] ?>;"><?php echo ucwords_tr($diller['urunlerimiz']) ?></span></a> </div> </div> </div> <!-- Page Header ====================== !--> <!-- CONTENT AREA ============== !--> <div class="products-page-main"> <div class="products-left-bar-main"> <?php include'includes/template/products-cat-leftbar.php'; ?> </div><div class="products-right-main"> <?php if ($odemeayar['kargolimit_product'] == 1) {?> <?php if($odemeayar['kargo_limit'] == 0 || $odemeayar['kargo_limit'] == null) {} else { ?> <!-- Kargo Bedava =========================================================================== ===========================!--> <style> .kargo-limit-left-div{width: 100%; height: auto; margin: 0 auto; padding: 15px; background: linear-gradient(to right, #<?=$odemeayar['kargolimit_bg_1']?>, #<?=$odemeayar['kargolimit_bg_2']?>); margin-bottom: 50px; } </style> <div class="kargo-limit-left-div"> <div class="kargo-limit-left-div-inside font-<?=$odemeayar['kargolimit_font']?>" style="color:#<?=$odemeayar['kargolimit_text_color']?>"> <i class="fa fa-truck"></i> <?php echo number_format($odemeayar['kargo_limit'], 2); ?> <?php echo $odemeayar['simge'] ?></strong> <?=$diller['kargo-limit-aciklamasi']?> </div> </div> <!-- Kargo Bedava =========================================================================== ===========================!--> <?php }?> <?php }?> <div class="products-right-nav-head"> <div class="products-right-nav-head-txt"> <?php echo $diller['urun-toplam-sayi'] ?> <strong><?php echo $ToplamVeri ?></strong> </div> <div class="products-right-nav-head-select"> <select id="dynamicList"> <option value="urunler?sirala=1" <?php if($_GET['sirala'] == 1) { echo'selected'; }?> ><?php echo $diller['urun-siralama-yeni'] ?></option> <option value="urunler?sirala=2" <?php if($_GET['sirala'] == 2) { echo'selected'; }?>><?php echo $diller['urun-siralama-populer'] ?></option> <option value="urunler?sirala=3" <?php if($_GET['sirala'] == 3) { echo'selected'; }?>><?php echo $diller['urun-siralama-artan'] ?></option> <option value="urunler?sirala=4" <?php if($_GET['sirala'] == 4) { echo'selected'; }?>><?php echo $diller['urun-siralama-azalan'] ?></option> </select> </div> </div> <div class="products-right-products-area"> <?php if($ToplamVeri == 0) { ?> <div class="alert alert-secondary" role="alert"> Henüz ürün eklenmemiş! </div> <?php }?> <?php foreach($UrunAl as $prohit){ $pro_list_cat = $db->prepare("select * from urun_cat where id=:id and durum=:durum and dil=:dil order by id desc limit 1 "); $pro_list_cat->execute( array( 'id' => $prohit['kat_id'], 'durum'=> 1, 'dil' => $_SESSION['dil'] ) ); $pro_cat = $pro_list_cat->fetch(PDO::FETCH_ASSOC); $starDec = $db->prepare("SELECT SUM(yildiz) AS orta FROM urun_yorum where onay=:onay and urun_id=:urun_id; "); $starDec->execute(array( 'onay' => '1', 'urun_id' => $prohit['id'] )); $yildiz = $starDec->fetch(PDO::FETCH_ASSOC); $yorumsayisi = $db->prepare("select * from urun_yorum where onay=:onay and urun_id=:urun_id "); $yorumsayisi->execute(array( 'onay' => '1', 'urun_id' => $prohit['id'] )); $yorumcount = $yorumsayisi->rowCount(); if($yorumcount == null ) { $yildizhesap = '0'; } else { $yildizhesap = $yildiz['orta'] / $yorumcount; } $finalstarrate_kat = (int)$yildizhesap; //TODO ?> <div class="product-main-box"> <div class="product-main-box-in"> <div class="product-main-box-img"> <img src="images/product/<?php echo $prohit['gorsel'] ?>" alt="<?php echo $prohit['baslik'] ?>"> <?php if($prohit['stok'] > 0) { ?> <a href="urun/<?php echo $prohit['id'] ?>/<?php echo seo($prohit['baslik']) ?>"><div class="ovrly"></div></a> <div class="buttons"> <a href="urun/<?php echo $prohit['id'] ?>/<?php echo seo($prohit['baslik']) ?>" class="text" style="color:#<?php echo $prodayar['incele_button_color']?>;"><i class="fa fa-search" style="color:#<?php echo $prodayar['incele_button_color']?>"></i> <?php echo $diller['incele'] ?></a> </div> <?php } else {?> <a href="urun/<?php echo $prohit['id'] ?>/<?php echo seo($prohit['baslik']) ?>"><div class="opaovrly"></div></a> <div class="nostock"> <a href="urun/<?php echo $prohit['id'] ?>/<?php echo seo($prohit['baslik']) ?>" class="text" style="color:#<?php echo $prodayar['incele_button_color']?>;"> <i class="fa fa-times" style="color:#<?php echo $prodayar['incele_button_color']?>"></i> <?php echo $diller['stok-yok'] ?></a> </div> <?php }?> </div> <div class="product-main-box-baslik"> <div class="product-main-box-baslik-in"> <a href="urun/<?php echo $prohit['id'] ?>/<?php echo seo($prohit['baslik']) ?>"><?php echo $prohit['baslik'] ?></a> </div> </div> <div class="product-main-box-category"> <?php echo $pro_cat['baslik'] ?> </div> <?php if($prodayar['star_rate'] == 1) {?> <div class="product-main-box-rate"> <?php if($uyeayar['durum'] == '0' ) {?> <?php if($prohit['star_rate'] == 0){ ?> <span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($prohit['star_rate'] == 1){ ?> <span style="color:#ffb400">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($prohit['star_rate'] == 2){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($prohit['star_rate'] == 3){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($prohit['star_rate'] == 4){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($prohit['star_rate'] == 5){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span> <?php }?> <?php }?> <!-- ÜYELİK VARSA VE ÜRÜNE YORUMLAR KAPALIYSA YILDIZ SAYISINI GÖSTER !--> <?php if($uyeayar['durum'] == '1' ) {?> <?php if($prohit['yorum_durum'] == '0' ) {?> <?php if($prohit['star_rate'] == 0){ ?> <span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($prohit['star_rate'] == 1){ ?> <span style="color:#ffb400">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($prohit['star_rate'] == 2){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($prohit['star_rate'] == 3){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($prohit['star_rate'] == 4){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($prohit['star_rate'] == 5){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span> <?php }?> <?php } ?> <?php } ?> <!-- ÜYELİK VARSA VE ÜRÜNE YORUMLAR KAPALIYSA YILDIZ SAYISINI GÖSTER SON !--> <!-- ÜYELİK VARSA VE ÜRÜNE YORUM YAPILABİLİR İSE OYLAMA ORTALAMASINI GÖSTER !--> <?php if($prohit['yorum_durum'] == '1' ) {?> <?php if($uyeayar['durum'] == '1' ) {?> <?php if($finalstarrate_kat == 0){ ?> <span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($finalstarrate_kat == 1){ ?> <span style="color:#ffb400">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($finalstarrate_kat == 2){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($finalstarrate_kat == 3){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#CCC">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($finalstarrate_kat == 4){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#CCC">★</span> <?php }?> <?php if($finalstarrate_kat == 5){ ?> <span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span><span style="color:#ffb400">★</span> <?php }?> <?php } ?> <?php } ?> <!-- ÜYELİK VARSA VE ÜRÜNE YORUM YAPILABİLİR İSE OYLAMA ORTALAMASINI GÖSTER !--> </div> <?php }?> <div class="product-main-box-price"> <?php if($prohit['eski_fiyat']== '0') { } else { ?> <span style="font-size:15px; font-weight: 400; font-family: 'Open Sans', Arial; color:#999; display: inline-block; text-decoration: line-through;"><?php echo number_format($prohit['eski_fiyat'], 2); ?> <span class="font-exlight" style="color:#999"><?php echo $odemeayar['simge'] ?></span></span> <?php }?> <?php if($prohit['fiyat']== null || $prohit['fiyat']== '0') { } else { ?> <h1><?php echo number_format($prohit['fiyat'], 2); ?> <span class="font-exlight" style="color:#000"><?php echo $odemeayar['simge'] ?></span></h1> <?php }?> </div> </div> </div> <?php } ?> <!---- Sayfalama Elementleri ================== !--> <?php if($Sayfa >= 1){?> <nav aria-label="Page navigation example" style="margin-top: 50px;"> <ul class="pagination pagination-sm justify-content-center"> <?php } ?> <?php if($Sayfa > 1){?> <?php if($_GET['sirala'] == null){ ?> <li class="page-item"><a class="page-link" href="urunler?s=1"><?=$diller['sayfalama-ilk']?></a></li> <li class="page-item"><a class="page-link" href="urunler?s=<?=$Sayfa - 1?>"><?=$diller['sayfalama-onceki']?></a></li> <?php } else { ?> <li class="page-item"><a class="page-link" href="urunler?s=1&sirala=<?=$_GET['sirala']?>"><?=$diller['sayfalama-ilk']?></a></li> <li class="page-item"><a class="page-link" href="urunler?s=<?=$Sayfa - 1?>&sirala=<?=$_GET['sirala']?>"><?=$diller['sayfalama-onceki']?></a></li> <?php } ?> <?php } ?> <?php for($i = $Sayfa - $GorunenSayfa; $i < $Sayfa + $GorunenSayfa +1; $i++){ if($i > 0 and $i <= $Sayfa_Sayisi){ if($i == $Sayfa){ ?> <li class="page-item active" aria-current="page"> <?php if($_GET['sirala'] == null){ ?> <a class="page-link" href="urunler?s=<?=$i?>"><?=$i?><span class="sr-only">(current)</span></a> <?php } else { ?> <a class="page-link" href="urunler?s=<?=$i?>&sirala=<?=$_GET['sirala']?>"><?=$i?><span class="sr-only">(current)</span></a> <?php } ?> </li> <?php }else{ ?> <?php if($_GET['sirala'] == null){ ?> <li class="page-item"><a class="page-link" href="urunler?s=<?=$i?>"><?=$i?></a></li> <?php } else { ?> <li class="page-item"><a class="page-link" href="urunler?s=<?=$i?>&sirala=<?=$_GET['sirala']?>"><?=$i?></a></li> <?php } ?> <?php } } } ?> <?php if($urun_listele->rowCount() <=0) { } else { ?> <?php if($Sayfa != $Sayfa_Sayisi){?> <?php if($_GET['sirala'] == null){ ?> <li class="page-item"><a class="page-link" href="urunler?s=<?=$Sayfa + 1?>"><?=$diller['sayfalama-sonraki']?></a></li> <li class="page-item"><a class="page-link" href="urunler?s=<?=$Sayfa_Sayisi?>"><?=$diller['sayfalama-son']?></a></li> <?php } else { ?> <li class="page-item"><a class="page-link" href="urunler?s=<?=$Sayfa + 1?>&sirala=<?=$_GET['sirala']?>"><?=$diller['sayfalama-sonraki']?></a></li> <li class="page-item"><a class="page-link" href="urunler?s=<?=$Sayfa_Sayisi?>&sirala=<?=$_GET['sirala']?>"><?=$diller['sayfalama-son']?></a></li> <?php } ?> <?php }} ?> <?php if($Sayfa >= 1){?> </ul> </nav> <?php } ?> <!---- Sayfalama Elementleri ================== !--> </div> </div> </div> <!-- CONTENT AREA ============== !--> <script> $(function(){ // bind change event to select $('#dynamicList').on('change', function () { var url = $(this).val(); // get selected value if (url) { // require a URL window.location = url; // redirect } return false; }); }); </script> <?php include 'includes/template/footer.php'?> </body> </html> <?php include "includes/config/footer_libs.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