LiteSpeed Linux server2.poyrazhosting.com 3.10.0-962.3.2.lve1.5.77.el7.x86_64 #1 SMP Mon Dec 12 07:06:14 EST 2022 x86_64 safemode : OFF MySQL: OFF | Perl: OFF | cURL: ON | WGet: OFF > / home / cuneytsener53 / spor1.snrsoft.com.tr / | Server Ip : 172.67.216.244 |
Filename | /home/cuneytsener53/spor1.snrsoft.com.tr/blog-icerik.php |
Size | 5.15 kb |
Permission | rw-r--r-- |
Owner | |
Create time | 02-Mar-2025 05:46 |
Last modified | 18-Sep-2021 19:17 |
Last accessed | 05-Apr-2025 01:40 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php include "includes/header.php"; ?>
<?php
$refsor2=$db->prepare("SELECT * FROM news where id=:id");
$refsor2->execute(array('id' => $_GET['id']));
$refcek2=$refsor2->fetch(PDO::FETCH_ASSOC);
?>
<!--=================================
Page title -->
<section class="page-title bg-holder bg-overlay-black-50" data-jarallax='{"speed": 0.6}' style="background-image: url(images/bg/06.jpg);">
<div class="container">
<div class="row">
<div class="col-12 text-center">
<h1 class="text-stroke-primary display-3 font-weight-bold text-uppercase"><?php echo $refcek2['title']; ?></h1>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Anasayfa</a></li>
<li class="breadcrumb-item active" aria-current="page"><?php echo $refcek2['title']; ?></li>
</ol>
</nav>
</div>
</div>
</div>
</section>
<!--=================================
Page title -->
<!--=================================
Blog single-->
<section class="space-ptb">
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="blog-detail">
<div class="blog-post">
<div class="blog-post-image">
<img class="img-fluid mb-4" src="<?php echo $site; ?>/panel/uploads/news_v/730x411/<?php echo $refcek2['img_url']; ?>" alt="<?php echo $refcek2['title']; ?>">
</div>
<div class="blog-post-content border-0">
<div class="blog-post-description">
<h3 class="post-title"><a href="javascript:;" class="site-text-primary"><?php echo $refcek2['title']; ?></a></h3>
<?php echo date('d.m.Y H:i', strtotime($refcek2['createdAt']));?>
<?php echo $refcek2['description']; ?>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4 mt-5 mt-lg-0">
<div class="blog-sidebar">
<div class="widget">
<div class="widget-title">
<h6>Popüler Yazılar</h6>
</div>
<?php
$sayfada = 6; // sayfada gösterilecek içerik miktarını belirtiyoruz.
$sorgu=$db->prepare("select * from news");
$sorgu->execute();
$toplam_icerik=$sorgu->rowCount();
$toplam_sayfa = ceil($toplam_icerik / $sayfada);
// eğer sayfa girilmemişse 1 varsayalım.
$sayfa = isset($_GET['sayfa']) ? (int) $_GET['sayfa'] : 1;
// eğer 1'den küçük bir sayfa sayısı girildiyse 1 yapalım.
if($sayfa < 1) $sayfa = 1;
// toplam sayfa sayımızdan fazla yazılırsa en son sayfayı varsayalım.
if($sayfa > $toplam_sayfa) $sayfa = $toplam_sayfa;
$limit = ($sayfa - 1) * $sayfada;
$refsor=$db->prepare("select * from news order by id DESC limit $limit,$sayfada");
$refsor->execute();
while ($refcek=$refsor->fetch(PDO::FETCH_ASSOC)) {
if ($refcek['isActive']==1){
?>
<div class="d-flex mb-3 align-items-top">
<a href="blog-icerik/<?=seo($refcek['title'])."-".$refcek['id']?>">
<div class="avatar avatar-xl h-auto">
<img class="img-fluid" src="<?php echo $site; ?>/panel/uploads/news_v/730x411/<?php echo $refcek['img_url']; ?>" alt="<?php echo $refcek['title'];?>">
</div>
</a>
<div class="ml-3">
<a class="text-dark" href="blog-icerik/<?=seo($refcek['title'])."-".$refcek['id']?>"><b><?php echo $refcek['title'];?> </b></a>
<a class="d-flex font-sm text-dark" href="blog-icerik/<?=seo($refcek['title'])."-".$refcek['id']?>"><?php echo date('d.m.Y H:i', strtotime($refcek['createdAt']));?></a>
</div>
</div>
<?php }} ?>
</div>
</div>
</div>
</div>
</div>
</section>
<!--=================================
Blog single-->
<?php include "includes/footer.php"; ?>
<?php
$refsor2=$db->prepare("SELECT * FROM news where id=:id");
$refsor2->execute(array('id' => $_GET['id']));
$refcek2=$refsor2->fetch(PDO::FETCH_ASSOC);
?>
<!--=================================
Page title -->
<section class="page-title bg-holder bg-overlay-black-50" data-jarallax='{"speed": 0.6}' style="background-image: url(images/bg/06.jpg);">
<div class="container">
<div class="row">
<div class="col-12 text-center">
<h1 class="text-stroke-primary display-3 font-weight-bold text-uppercase"><?php echo $refcek2['title']; ?></h1>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Anasayfa</a></li>
<li class="breadcrumb-item active" aria-current="page"><?php echo $refcek2['title']; ?></li>
</ol>
</nav>
</div>
</div>
</div>
</section>
<!--=================================
Page title -->
<!--=================================
Blog single-->
<section class="space-ptb">
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="blog-detail">
<div class="blog-post">
<div class="blog-post-image">
<img class="img-fluid mb-4" src="<?php echo $site; ?>/panel/uploads/news_v/730x411/<?php echo $refcek2['img_url']; ?>" alt="<?php echo $refcek2['title']; ?>">
</div>
<div class="blog-post-content border-0">
<div class="blog-post-description">
<h3 class="post-title"><a href="javascript:;" class="site-text-primary"><?php echo $refcek2['title']; ?></a></h3>
<?php echo date('d.m.Y H:i', strtotime($refcek2['createdAt']));?>
<?php echo $refcek2['description']; ?>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4 mt-5 mt-lg-0">
<div class="blog-sidebar">
<div class="widget">
<div class="widget-title">
<h6>Popüler Yazılar</h6>
</div>
<?php
$sayfada = 6; // sayfada gösterilecek içerik miktarını belirtiyoruz.
$sorgu=$db->prepare("select * from news");
$sorgu->execute();
$toplam_icerik=$sorgu->rowCount();
$toplam_sayfa = ceil($toplam_icerik / $sayfada);
// eğer sayfa girilmemişse 1 varsayalım.
$sayfa = isset($_GET['sayfa']) ? (int) $_GET['sayfa'] : 1;
// eğer 1'den küçük bir sayfa sayısı girildiyse 1 yapalım.
if($sayfa < 1) $sayfa = 1;
// toplam sayfa sayımızdan fazla yazılırsa en son sayfayı varsayalım.
if($sayfa > $toplam_sayfa) $sayfa = $toplam_sayfa;
$limit = ($sayfa - 1) * $sayfada;
$refsor=$db->prepare("select * from news order by id DESC limit $limit,$sayfada");
$refsor->execute();
while ($refcek=$refsor->fetch(PDO::FETCH_ASSOC)) {
if ($refcek['isActive']==1){
?>
<div class="d-flex mb-3 align-items-top">
<a href="blog-icerik/<?=seo($refcek['title'])."-".$refcek['id']?>">
<div class="avatar avatar-xl h-auto">
<img class="img-fluid" src="<?php echo $site; ?>/panel/uploads/news_v/730x411/<?php echo $refcek['img_url']; ?>" alt="<?php echo $refcek['title'];?>">
</div>
</a>
<div class="ml-3">
<a class="text-dark" href="blog-icerik/<?=seo($refcek['title'])."-".$refcek['id']?>"><b><?php echo $refcek['title'];?> </b></a>
<a class="d-flex font-sm text-dark" href="blog-icerik/<?=seo($refcek['title'])."-".$refcek['id']?>"><?php echo date('d.m.Y H:i', strtotime($refcek['createdAt']));?></a>
</div>
</div>
<?php }} ?>
</div>
</div>
</div>
</div>
</div>
</section>
<!--=================================
Blog single-->
<?php include "includes/footer.php"; ?>