senturksun adlı üyeden alıntı:
mesajı görüntüle
$bak = $DB->prepare("select * from urunler where kategori='$diger' ORDER BY id DESC" );son hocam tırnağı yanlış yerde kapamışım
15
●489
$bak = $DB->prepare("select * from urunler where kategori='$diger' ORDER BY id DESC" );son hocam tırnağı yanlış yerde kapamışım
İçerik geldi ama sıralama aynı üstad. Bir değişiklik olmadı.
<?php
$id = $_GET['id'];
$dirilis = $DB->query("SELECT * FROM urunk WHERE seo= '$id'")->fetch(PDO::FETCH_ASSOC);?>
<?php $diger = $dirilis['seo'];?>
<?php if($dirilis['sdurum']=='1'){?>
<title><?php echo $dirilis['stitle']; ?></title>
<meta name="keywords" content="<?php echo $dirilis['sseo']; ?>" />
<?php } else { ?>
<title><?php echo $dirilis['baslik']; ?> - <?php echo $ayar['siteadi']; ?></title>
<?php } ?>
<?php
$id = $_GET['id'];
$query = $DB->prepare("UPDATE urunk SET hit = (hit+1) WHERE seo='$id'");
$update = $query->execute(array(
$id
));
if ( $update ){
echo "";
}
?>
<!-- start of top banner -->
<div class="top-banner bg-dark">
<div class="container"></br></br></br></br></br></br></br></br>
<div class="row">
<div class="col-xs-12 col-sm-6">
<div class="main-heading no-border style2">
<h2 class="heading text-uppercase"><?php echo $ayar['slogan']; ?> <span class="clr"><?php echo $dirilis['baslik']; ?></span></h2>
</div>
</div>
<div class="col-xs-12 col-sm-6 text-right">
<!-- start of social -->
<ul class="list-inline social text-center">
<li><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $url;?>/kategoriler/<?php echo $dirilis['seo']; ?>.html"><i class="fa fa-facebook"></i></a></li>
<li><a target="_blank" href="https://twitter.com/intent/tweet?url=<?php echo $url;?>/kategoriler/<?php echo $dirilis['seo']; ?>.html"><i class="fa fa-twitter"></i></a></li>
<li><a target="_blank" href="https://plus.google.com/share?url=<?php echo $url;?>/kategoriler/<?php echo $dirilis['seo']; ?>.html"><i class="fa fa-google-plus"></i></a></li>
<li><a target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo $url;?>/kategoriler/<?php echo $dirilis['seo']; ?>.html"><i class="fa fa-linkedin"></i></a></li>
<li class="print"><a onclick="myFunction()"><span class="icon-printer"></span></a></li>
<script>
function myFunction() {
window.print();
}
</script>
</ul><!-- end of social -->
</div>
</div>
</div>
</div><!-- end of top banner -->
</br>
<div class="container">
<div class="row">
<div id="isotop-holder" class="mar-b-xs">
<!-- start of item -->
<?php
$sayfa = intval(@$_GET['sayfa']);
if (!$sayfa) {
$sayfa = 1;
}
$bak = $DB->prepare("select * from urunler where kategori='$diger'");
$bak->execute(array());
$toplam= $bak->rowCount();
$limit = 6;
$goster = $sayfa*$limit-$limit;
$sayfasayisi = ceil($toplam/$limit);
$forlimit = 2;
$pr = $DB->query("select * from urunler where kategori='$diger' ORDER BY sira ASC limit $goster,$limit")->fetchAll(PDO::FETCH_ASSOC);
foreach ($pr as $tr) {
?>
<div class="item col3 filter1 filter3 mar-b-xs">
<div class="col-xs-12">
<div class="bg-dark">
<img src="images/urunler/<?php echo $tr['resim']; ?>" alt="image description" class="img-responsive2 img">
<a href="urunler/<?php echo $tr['seo']; ?>.html" class="zoom"><span class="icon-search"></span></a>
<a href="urunler/<?php echo $tr['seo']; ?>.html"/><div class="over text-center">
<h4 class="text-uppercase"><a href="urunler/<?php echo $tr['seo']; ?>.html"/><?php echo $tr['baslik']; ?></a></h4>
<span class="txt">ÜRÜN KODU : <?php echo $tr['rusbaslik']; ?></span>
<span class="txt">
<?php echo $dirilis['baslik']; ?>
</span>
</div></a>
</div>
</div>
</div><!-- end of item -->
<?php } ?>
</div>
</div>
</div>
<div class="text-center mar-b-md">
<!-- start of num pagination -->
<nav class="num-pagination">
<ul class="list-inline">
<li class="active arrow next"><a href="#"><span class="icon-right-arrow"></span></a></li>
<?php
for ($i= $sayfa - $forlimit ; $i < $sayfa + $forlimit + 1 ; $i++) {
if ($i>0 and $i<=$sayfasayisi) {
if ($i == $sayfa) {
echo "<li class='active'><a href='#'>".$i."</a></li>";
}else{
echo " <li><a href='kategoriler/".$dirilis['seo'].".html?sayfa=".$i."'>".$i."</a></li>";
}
}
}
?>
<li class="arrow"><a href="#"><span class="icon-right-arrow"></span></a></li>
</ul>
</nav><!-- end of num pagination -->
</div>
<!-- start of subscribe holder -->