📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv3.demodesign.com.tr
📝
blogdetay.php
← Geri Dön
<?php require('ust.php');?> <?php $id = htmlspecialchars(trim($_GET['id'])); $query = $DB->prepare("UPDATE haberler SET hit = (hit+1) WHERE seo=?"); $update = $query->execute(array( $id )); if ( $update ){ echo ""; } ?> <?php $id = htmlspecialchars(trim($_GET['id'])); $sayfa = $DB->query("SELECT * FROM haberler WHERE seo= '$id'")->fetch(PDO::FETCH_ASSOC);?> <?php if($sayfa['sdurum']=='1'){?> <title><?php echo $sayfa['stitle']; ?></title> <meta name="keywords" content="<?php echo $sayfa['sseo']; ?>" /> <?php } else { ?> <title><?php echo $sayfa['baslik']; ?> - <?php echo $ayar['siteadi']; ?></title> <?php } ?> <meta name="description" content="<?php echo $ayar['des']; ?>"> <?php require('menu.php');?> <!-- blog CSS --> <link rel="stylesheet" type="text/css" href="css/blog.css" media="all"> <!-- Main Container --> <section class="blog_post bounceInUp animated"> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-9"> <div class="page-title"> <h1><?php echo $sayfa['baslik']; ?></h1> </div> <div class="entry-detail"> <div class="entry-photo"> <figure><img src="images/haberler/<?php echo $sayfa['resim']; ?>" alt="Blog"></figure> </div> <div class="entry-meta-data"> <span class="author"> <i class="fa fa-user"></i> Ekleyen: <a href="#"><?php echo $ayar['siteadi'];?></a></span> <span class="comment-count"> <i class="fa fa-eye"></i> <?php echo $sayfa['hit']; ?> defa okundu </span> <span class="date"><i class="fa fa-calendar"> </i> <?php echo substr($sayfa['tarih'],0,2);?> <?php echo substr($sayfa['tarih'],3,2) == '01' ? ' Ocak ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '02' ? ' Şubat ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '03' ? ' Mart ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '04' ? ' Nisan ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '05' ? ' Mayıs ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '06' ? ' Haziran ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '07' ? ' Temmuz ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '08' ? ' Ağustos ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '09' ? ' Eylül ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '10' ? ' Ekim ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '11' ? ' Kasım ' : null; ?> <?php echo substr($sayfa['tarih'],3,2) == '12' ? ' Aralık ' : null; ?> <?php echo substr($sayfa['tarih'],-13,4);?></span> <div class="rating"> <i class="fa fa-star"></i> <i class="fa fa-star"></i> <i class="fa fa-star"></i> <i class="fa fa-star"></i> <i class="fa fa-star"></i> <span> <?php $diger = $sayfa['id'];?> <?php $sorgu = $DB->prepare("SELECT COUNT(*) FROM yorumlar where durum='1' and blogid='$diger'"); $sorgu->execute(); $say = $sorgu->fetchColumn(); echo ''.$say.''; ?> Yorum</span></div> </div> <?php $diger = $sayfa['id'];?> <?php $tr = $DB->query("select * from sayfa_resim where konu='haberler' and resim_id='$diger' order by id desc")->fetchAll(PDO::FETCH_ASSOC); foreach($tr as $dr){ ?> <div class="col-sm-2 col-lg-2 col-md-2"> <div class="single-banner"> <a class="example-image-link" href="images/diger/<?php echo $dr['sayfaresim']; ?>" data-lightbox="example-1"> <img src="images/diger/<?php echo $dr['sayfaresim']; ?>" alt=""> </a> </div> </div> <?php } ?> <div class="content-text clearfix"> <?php echo $sayfa['metin']; ?> </div> <div class="entry-tags"> <span>Etiketler:</span> <?php /* Veritabanı Listeleme Sorgusu */ ## PDO İçin ## $etiketler = $sayfa['sseo']; ## Etiketleri virgüllü bir şekilde aldık ## $etiketler = explode(',', $etiketler); ## Virgülleri ayırarak dizi haline getirdik ## foreach( $etiketler as $anahtar => $deger ){ echo '<a>'.$deger.'</a>,'; } ## Foreach döngüsüne sokarak dizimizi parçalayıp değerleri yazıdırıyoruz ## ?> </div> </div> <!-- Comment --> <div class="single-box"> <h2 class="">BLOG YORUMLARI</h2> <div class="comment-list"> <ul> <?php $diger = $sayfa['id'];?> <?php $dee = $DB->query("select * from yorumlar where durum='1' and blogid='$diger' order by sira asc")->fetchAll(PDO::FETCH_ASSOC); $__URUN__ = false; foreach ($dee as $de) { $__URUN__ = true; ?> <li> <div class="avartar"> <img src="images/avatar.png" alt="Avatar"> </div> <div class="comment-body"> <div class="comment-meta"> <span class="author" style="color: black;"><b><?php echo $de['isim']; ?></b></span> <span class="date"><?php echo $de['tarih']; ?></span> </div> <div class="comment"> <b><?php echo $de['baslik']; ?></b> </br> <?php echo $de['yorum']; ?> </div> </div> </li> <?php if(empty($de['cevap'])){?> <?php } else { ?> <li> <ul> <li> <div class="avartar"> <img src="images/ayarlar/<?php echo $ayar['logo']; ?>" alt="Avatar"> </div> <div class="comment-body"> <div class="comment-meta"> <span class="author" style="color: black;"><b><?php echo $ayar['siteadi']; ?></b></span> <span class="date">Cevapladı</span> </div> <div class="comment"> <?php echo $de['cevap']; ?></div> </div> </li> </ul> </li> <?php } ?> <?php } if (!$__URUN__){ echo " <h5>Bu bloga henüz yorum yapılmamış. İlk yorumu siz yapmak ister misiniz ?</h5> "; } ?> </ul> </div> </div> <div class="single-box comment-box"> <h2>YORUM YAZIN</h2> <div class="coment-form"> <form action="" method="POST"> <div class="row"> <div class="col-sm-6"> <label for="name">Adınız Soyadınız</label> <input id="name" type="text" class="form-control" name="isim" value="<?php echo $_SESSION['isim'];?>" required> </div> <div class="col-sm-6"> <label for="email">Eposta Adresiniz (Gizlenecektir)</label> <input id="email" type="text" class="form-control" name="eposta" value="<?php echo $_SESSION['email'];?>" required> </div> <div class="col-sm-12"> <label for="website">Yorum Başlığı</label> <input id="website" type="text" name="baslik" class="form-control" required> </div> <input type="hidden" name="blogid" value="<?php echo $sayfa['id'];?>"/> <input type="hidden" name="cevap" value=""/> <div class="col-sm-12"> <label for="message">Yorumunuz</label> <textarea name="yorum" id="message" rows="8" class="form-control" required></textarea> </div> </div> <button name="yorumgonder" type="submit" class="button"><span>Yorumu Gönder</span></button> </form> </div> </div> <!-- ./Comment --> </div> <!-- right colunm --> <aside class="right sidebar col-xs-12 col-sm-3"> <!-- Popular Posts --> <div class="block blog-module wow fadeInUp"> <p class="title_block">Benzer Bloglar</p> <div class="block_content"> <!-- layered --> <div class="layered"> <div class="layered-content"> <ul class="blog-list-sidebar"> <?php $haber = $DB->query("select * from haberler where durum='1' order by id desc limit 18")->fetchAll(PDO::FETCH_ASSOC); foreach($haber as $blog){ ?> <li> <div class="post-thumb"> <a href="blog/<?php echo $blog['seo']; ?>"><img src="images/haberler/<?php echo $blog['resim']; ?>" alt="Blog"></a> </div> <div class="post-info"> <h5 class="entry_title"><a href="blog/<?php echo $blog['seo']; ?>"><?php echo $blog['baslik']; ?></a></h5> <div class="post-meta"> <span class="date"><i class="fa fa-calendar"> </i> <?php echo $blog['tarih']; ?></span> <span class="comment-count"> <i class="fa fa-eye"> </i> <?php echo $blog['hit']; ?> </span> </div> </div> </li> <?php } ?> </ul> </div> </div> <!-- ./layered --> </div> </div> <!-- ./Popular Posts --> <div class="block blog-module wow fadeInUp"> <p class="title_block">Son Yorumlar</p> <div class="block_content"> <!-- layered --> <div class="layered"> <div class="layered-content"> <ul class="recent-comment-list"> <?php $sennn = $DB->query("select * from yorumlar where durum='1' order by id asc")->fetchAll(PDO::FETCH_ASSOC); foreach($sennn as $deb){ ?> <?php $diger = $deb['blogid'];?> <?php $tektek = $DB->query("select * from haberler where durum='1' and id='$diger' order by id desc limit 3")->fetchAll(PDO::FETCH_ASSOC); foreach($tektek as $sonyorum){ ?> <li> <h5><a href="blog/<?php echo $sonyorum['seo']; ?>"><?php echo $deb['baslik']; ?></a></h5> <div class="comment"> <?php echo mb_substr($deb['yorum'],0,100);?>... </div> <div class="author">Posted by <a href="blog/<?php echo $sonyorum['seo']; ?>"><?php echo $ayar['siteadi'];?></a></div> </li> <?php } }?> </ul> </div> </div> <!-- ./layered --> </div> </div> <!-- tags --> <div class="popular-tags-area wow fadeInUp"> <div class="sidebar-bar-title"> <h3>Etiketler</h3> </div> <div class="tag"> <ul> <?php $haberx = $DB->query("select * from haberler where durum='1' order by id desc")->fetchAll(PDO::FETCH_ASSOC); foreach($haberx as $blogx){ ?> <li><a href="blog/<?php echo $blogx['seo']; ?>"><?php echo $blogx['seo']; ?></a></li> <?php } ?> </ul> </div> </div> <!-- ./tags --> <!-- Banner --> <!-- ./Banner --> </aside> <!-- ./right colunm --> </div> </div> </section> <!-- Main Container End --> <?php require('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