📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
b2be-ticaretscripti.demodesign.com.tr
/
new
📝
arama.php
← Geri Dön
<title>Arama Sonuçları</title> <meta name="keywords" content="<?php echo $ayar["sitekey"]; ?>"> <meta name="description" content="<?php echo $ayar["sitedesc"]; ?>"> <meta property="og:url" content="<?php echo $url; ?>" /> <meta property="og:title" content="Üyelik Sözleşmesi ve Rıza Metni" /> <meta property="og:description" content="<?php echo $ayar["sitedesc"]; ?>" /> <?php $arama = temizle($_POST["arama"]); $ara = explode(" ", $arama); $adi = ""; $urunkodu = ""; foreach ($ara as $a) { $adi .= "adi LIKE '%" . $a . "%' AND "; $urunkodu .= "urunkodu LIKE '%" . $a . "%' AND "; $barkodkodu .= "instagram LIKE '%" . $a . "%' AND "; } $adi = substr($adi, 0, -4); $urunkodu = substr($urunkodu, 0, -4); $barkodkodu = substr($barkodkodu, 0, -4); ?> <ul class="breadcrumb"> <li><a href="<?php echo $url; ?>"><i class="fa fa-home"></i></a></li> <li><a href="#">Arama Sonuçları</a></li> </ul> <h1 class="title page-title"><span>Arama</span></h1> <div id="product-search" class="container"> <div class="row"> <div id="content" class="col-sm-12"> <div class="main-products-wrapper"> <div class="products-filter"> <div class="grid-list"> <button id="btn-grid-view" class="view-btn active" data-toggle="tooltip" title="Tablo" data-view="grid"></button> <button id="btn-list-view" class="view-btn " data-toggle="tooltip" title="Liste" data-view="list"></button> <span> <?php $katsorgu = $ozy->prepare("SELECT COUNT(*) FROM urunler where durum='1' and adi like '%{$arama}%' or urunkodu like '%{$arama}%'"); $katsorgu->execute(); $katsay = $katsorgu->fetchColumn(); ?> Toplam <?= $katsay ?> adet ürün bulundu. </span> </div> <div class="select-group"> <form action="" method="GET"> <?php if (isset($_GET["filtreleme"]) && $_GET["filtreleme"] != "") { $fitregelenveri = temizle($_GET["filtreleme"]); foreach ($fitregelenveri as $filtreverisi) { ?> <input type="hidden" name="filtreleme[]" value="<?php echo $filtreverisi; ?>" /> <?php } } ?> <?php if (isset($_GET["markalar"]) && $_GET["markalar"] != "") { $markagelenveri = temizle($_GET["markalar"]); foreach ($markagelenveri as $markaverisi) { ?> <input type="hidden" name="markalar[]" value="<?php echo $markaverisi; ?>" /> <?php } } ?> <input type="hidden" name="pages" value="<?php echo temizle($_GET["pages"]); ?>" /> <input type="hidden" name="fiyatfiltre" value="<?php echo temizle($_GET["fiyatfiltre"]); ?>" /> <div class="input-group input-group-sm sort-by"> <label class="input-group-addon" for="input-sort">Sırala:</label> <select id="input-sort" class="form-control" name="siralama" onchange='this.form.submit()'> <option <?php echo $_GET["siralama"] == "onerilen" ? 'selected="selected"' : null; ?> value="onerilen">Önerilen Sıralama</option> <option <?php echo $_GET["siralama"] == "dusukfiyat" ? 'selected="selected"' : null; ?> value="dusukfiyat">Önce En Düşük Fiyat</option> <option <?php echo $_GET["siralama"] == "yuksekfiyat" ? 'selected="selected"' : null; ?> value="yuksekfiyat">Önce En Yüksek Fiyat</option> <option <?php echo $_GET["siralama"] == "encokyorum" ? 'selected="selected"' : null; ?> value="encokyorum">En Çok Yorum Alan</option> <option <?php echo $_GET["siralama"] == "enbegenilen" ? 'selected="selected"' : null; ?> value="enbegenilen">En Çok Beğenilen</option> <option <?php echo $_GET["siralama"] == "eskitarih" ? 'selected="selected"' : null; ?> value="eskitarih">En Eski Tarihe Göre</option> <option <?php echo $_GET["siralama"] == "yenitarih" ? 'selected="selected"' : null; ?> value="yenitarih">En Yeni Tariha Göre</option> </select> </div> </form> </div> </div> <style> .product-list a div img { height: 185px !important; } </style> <div class="main-products product-grid"> <?php $pages = intval(@$_GET["pages"]); if (!$pages) { $pages = 1; } $bak = $ozy->prepare("select * from urunler where durum='1'"); $bak->execute([]); $toplam = $bak->rowCount(); $limit = 20; $goster = $pages * $limit - $limit; $sayfasayisi = ceil($toplam / $limit); $forlimit = 200; if (isset($_GET["siralama"]) && $_GET["siralama"] != "0") { if (temizle($_GET["siralama"] == "dusukfiyat")) { $pageoku = $ozy->query("select *, if( idurum=1,ifiyat,fiyat ) AS simdikifiyat from urunler where durum='1' and $adi or $urunkodu or $barkodkodu order by simdikifiyat ASC limit $goster,$limit")->fetchAll(PDO::FETCH_ASSOC); } elseif (temizle($_GET["siralama"] == "yuksekfiyat")) { $pageoku = $ozy->query("select *, if( idurum=1,ifiyat,fiyat ) AS simdikifiyat from urunler where durum='1' and $adi or $urunkodu or $barkodkodu order by simdikifiyat DESC limit $goster,$limit")->fetchAll(PDO::FETCH_ASSOC); } elseif (temizle($_GET["siralama"] == "encokyorum")) { $pageoku = $ozy->query("select * from urunler where durum='1' and $adi or $urunkodu or $barkodkodu order by yorum DESC limit $goster,$limit")->fetchAll(PDO::FETCH_ASSOC); } elseif (temizle($_GET["siralama"] == "enbegenilen")) { $pageoku = $ozy->query("select * from urunler where durum='1' and $adi or $urunkodu or $barkodkodu order by hit DESC limit $goster,$limit")->fetchAll(PDO::FETCH_ASSOC); } elseif (temizle($_GET["siralama"] == "eskitarih")) { $pageoku = $ozy->query("select * from urunler where durum='1' and $adi or $urunkodu or $barkodkodu order by tarih DESC limit $goster,$limit")->fetchAll(PDO::FETCH_ASSOC); } elseif (temizle($_GET["siralama"] == "yenitarih")) { $pageoku = $ozy->query("select * from urunler where durum='1' and $adi or $urunkodu or $barkodkodu order by tarih ASC limit $goster,$limit")->fetchAll(PDO::FETCH_ASSOC); } elseif (temizle($_GET["siralama"] == "onerilen")) { $pageoku = $ozy->query("select * from urunler where durum='1' and $adi or $urunkodu or $barkodkodu order by sira DESC limit $goster,$limit")->fetchAll(PDO::FETCH_ASSOC); } } else { $pageoku = $ozy->query("select * from urunler where durum='1' and $adi or $urunkodu or $barkodkodu order by sira DESC limit $goster,$limit")->fetchAll(PDO::FETCH_ASSOC); } $__URUN__ = false; foreach ($pageoku as $katurunler) { $__URUN__ = true; ?> <div class="product-layout has-extra-button"> <div class="product-thumb"> <div class="image"> <a href="urun/<?php echo $katurunler['seo']; ?>" class="product-img"> <div> <img src="resimler/urunler/<?php echo $katurunler['resim']; ?>" srcset="resimler/urunler/<?php echo $katurunler['resim']; ?> 1x, resimler/urunler/<?php echo $katurunler['resim']; ?> 2x" width="750" height="750" alt="<?php echo $katurunler['adi']; ?>" title="<?php echo $katurunler['adi']; ?>" class="img-responsive img-first"> </div> </a> <div class="product-labels"> <?php if($katurunler['yeni']=='1'){?> <span class="product-label product-label-default"><b>Yeni</b></span> <?php } ?> </div> </div> <div class="caption"> <div class="stats" style="display: block !important;"> <span class="stat-1"><span><a href="#"><?= $ozy->query("select * from markalar where id='$katurunler[marka]' order by sira desc")->fetch(PDO::FETCH_ASSOC)["adi"]; ?></a></span></span> <span class="stat-2"><span style="float: right;"><?php echo $katurunler['urunkodu']; ?></span></span></div> <div class="name"><a href="urun/<?php echo $katurunler['seo']; ?>"><?php echo $katurunler['adi']; ?></a></div> <div class="description"><?php echo $katurunler['adi']; ?>..</div> <div class="price"> <div> <span class="price-normal"><?php echo urunfiyatbelirle($katurunler['kdv'],$katurunler['idurum'],$katurunler['fiyat'],$katurunler['ifiyat']);?></span> </div> </div> <div class="rating no-rating "> <div class="rating-stars"> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> </div> </div> <div class="buttons-wrapper"> <div class="button-group"> <div class="cart-group"> <form method="POST" action="" style="display: flex; flex: 1;"> <div class="stepper"> <input type="text" name="adet" value="1" data-minimum="1" class="form-control"> <input type="hidden" name="urunid" value="1"> <span> <i class="fa fa-angle-up"></i> <i class="fa fa-angle-down"></i> </span> </div> <?php if ($_SESSION['uyegirisdurumu'] == 'true') { echo '<button type="submit" name="sepetekle" class="btn btn-cart" data-loading-text="<span class="btn-text">Sepete Ekle</span>"><span class="btn-text">Sepete Ekle</span></button>'; } else { echo '<button type="button" onclick="alert(\'Ürünü satın almak için bayi girişi yapmalısınız.\')" class="btn btn-cart"><span class="btn-text">Sepete Ekle</span></button>'; } ?> </form> </div> <div class="wish-group"> <a class="btn btn-wishlist" title="Alışveriş Listeme Ekle" href="?favoriekle=<?php echo $katurunler['id']; ?>"><span class="btn-text">Alışveriş Listeme Ekle</span></a> <a class="btn btn-compare" style="display: block;" title="Karşılaştırma listesine ekle" href="?karsilastir=<?php echo $katurunler['id']; ?>"><span class="btn-text">Karşılaştırma listesine ekle</span></a> </div> </div> </div> </div> </div> </div> <?php } ?> <?php if (!$__URUN__) { echo "" . $_GET["arama"] . " kelimeye ait herhangi bir ürün bulunamadı :("; } ?> </div> <div class="row pagination-results" style="display: block;"> <div class="row"> <div class="col-lg-12"> <ul class="pagination-box"> <?php $geri = $_GET["pages"] - 1; ?> <?php $ileri = 1 + $_GET["pages"]; ?> <nav style="justify-content: center; display: flex;"> <ul class="pagination"> <li class="page-item <?php echo $_GET["pages"] == "1" ? "disabled" : null; ?>"> <a class="page-link" href="arama/?pages=<?php echo $geri; ?>" style='padding: 15px; font-size: 15px; font-weight: 600; float: right;'>Geri</a> </li> <?php for ($i = $pages - $forlimit; $i < $pages + $forlimit + 1; $i++) { if ($i > 0 and $i <= $sayfasayisi) { if ($i == $pages) { echo "<li class='page-item active'><a class='page-link' style='padding: 15px; font-size: 15px; font-weight: 600;'>" . $i . "</a></li>"; } else { echo "<li class='page-item'><a class='page-link' href='arama/?pages=" . $i . $eklenecekstr . "' style='padding: 15px; font-size: 15px; font-weight: 600;'>" . $i . "</a></li>"; } } } ?> <li class="page-item"> <a class="page-link" href="arama/?pages=<?php echo $ileri; ?>" style='padding: 15px; font-size: 15px; font-weight: 600;'>İleri</a> </li> </ul> </nav> </ul> </div> </div> </div> </div> </div> </div> </div>
💾 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