HOME SHELL

NULLCOMMUNITY
 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 / spor2.snrsoft.com.tr /

Server Ip : 172.67.216.244




Filename/home/cuneytsener53/spor2.snrsoft.com.tr/blog.php
Size9.25 kb
Permissionrw-r--r--
Owner
Create time02-Mar-2025 05:46
Last modified14-Sep-2019 07:02
Last accessed05-Apr-2025 01:41
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?php
include 'include/head.php';
$metakey=$db->prepare("SELECT * from meta where meta_id=4");
$metakey->execute(array(0));
$metakeyprint=$metakey->fetch(PDO::FETCH_ASSOC);
?>
<title><?php echo $metakeyprint['meta_title'] ?></title>
<meta name="description" content="<?php echo $metakeyprint['meta_descr'] ?>">
<meta name="keywords" content="<?php echo $metakeyprint['meta_keyword'] ?>">
<?php include 'include/header.php';
include 'include/menu.php';
$sayfada = 6; // sayfada gösterilecek içerik miktarını belirtiyoruz.

$sorgu=$db->prepare("SELECT * from blog");
$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;

$blogsor=$db->prepare("SELECT * from blog order by blog_id DESC limit $limit,$sayfada");
$blogsor->execute(array(
'bloglimit' => "$limit,$sayfada"
));
?>
<!-- page title & breadcrumbs start -->
<div class="services2-bg page-head parallax overlay" style="background: rgba(0, 0, 0, 0) url(trex/<?php echo $settingsprint['ayar_title1']; ?>);">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="section-title text-center">
<h3><?php echo $widgetprint['widget_bblog']; ?></h3>
</div>
</div>
<!-- /.colour-service-1-->
<div class="col-md-12">
<ol class="breadcrumb">
<li><a href="<?php echo $settingsprint['ayar_siteurl'] ?>">Anasayfa</a></li>
<li>।</li>
<li><a><?php echo $widgetprint['widget_bblog']; ?></a></li>
</ol>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
<!-- /.page-header -->
<!-- page title & breadcrumbs end -->

<div class="news blog-left-sidebar pad90">
<div class="container">
<div class="row">
<div class="col-md-9 ">
<div class="row pb90">
<?php
while($blogcek=$blogsor->fetch(PDO::FETCH_ASSOC)) {


$aylar = array(

1=>"Ocak",

2=>"Şubat",

3=>"Mart",

4=>"Nisan",

5=>"Mayıs",

6=>"Haziran",

7=>"Temmuz",

8=>"Ağustos",

9=>"Eylül",

10=>"Ekim",

11=>"Kasım",

12=>"Aralık"

);
$Gun= substr($blogcek['blog_tarih'],8,2);
$Ay= (int) substr($blogcek['blog_tarih'],5,2);
$Yil= substr($blogcek['blog_tarih'],0,4);
$kategorisor=$db->prepare("SELECT * from kategorilerb where kategori_id=:SorguId");
$kategorisor->execute(array('SorguId' => $blogcek["blog_kategori"]));
$kategoricek=$kategorisor->fetch(PDO::FETCH_ASSOC);
?>
<div class="col-md-6">
<div class="blog-box mb20">
<div class="blog-img">
<a href="<?=seo('blog-'.$blogcek["blog_baslik"]).'-'.$blogcek["blog_id"]?>"><img src="trex/<?php echo $blogcek['blog_resim']; ?>" alt="<?php echo $blogcek['blog_baslik']; ?>"></a>
</div>
<div class="blog-date">
<span class="date"><?php echo $Gun ?></span>
<span class="month"><?php echo $aylar[$Ay]; ?></span>
</div>
<div class="blog-content">
<div class="blog-title">
<a href="<?=seo('blog-'.$blogcek["blog_baslik"]).'-'.$blogcek["blog_id"]?>"><?php
$karakter = strlen( $blogcek['blog_baslik'] );
if ( $karakter > 35 )
{
echo mb_substr( $blogcek['blog_baslik'], 0, 35, 'UTF-8' ) . '...';
}
else
{
echo $blogcek['blog_baslik'];
}
?></a>
</div>
<div class="meta">
<div class="coment-counter">
<span><a href="<?=seo('konu-kategori-'.$kategoricek["kategori_ad"]).'-'.$kategoricek["kategori_id"]?>"><?php echo $kategoricek['kategori_ad']; ?></a></span>
</div>
</div>
<div class="news-introtxt">
<p><?php echo substr(strip_tags($blogcek['blog_detay']), 0,120).'...'; ?></p>
</div>
<div class="blog-footer">
<a href="<?=seo('blog-'.$blogcek["blog_baslik"]).'-'.$blogcek["blog_id"]?>">DEVAMINI OKU</a>
</div>
</div>
</div>
</div>
<?php } ?>
</div>


</div>
<!--/.col9 -->
<div class="col-md-3">
<div class="single-tab-area">
<div class="single-tab">
<ul id="single-tab" class="nav nav-tabs single-tab-link">
<li class="nav-item full-width"><a style="background-color: #616161;" style="background-color: #616161;" class="nav-link text-left text-uppercase active">KATEGORİLER</a></li>
<?php
$kategorisor=$db->prepare("SELECT * from kategorilerb order by kategori_sira ASC");
$kategorisor->execute(array(0));
while ($kategoricek=$kategorisor->fetch(PDO::FETCH_ASSOC)) {
if ($kategoricek['kategori_id']==$_GET['kategori_id']) { ?>
<li class="nav-item full-width"><a href="<?=seo('konu-kategori-'.$kategoricek["kategori_ad"]).'-'.$kategoricek["kategori_id"]?>" class="nav-link text-left text-uppercase active"><?php echo $kategoricek['kategori_ad']; ?></a></li>

<?php } else { ?>

<li class="nav-item full-width"><a href="<?=seo('konu-kategori-'.$kategoricek["kategori_ad"]).'-'.$kategoricek["kategori_id"]?>" class="nav-link text-left text-uppercase "><?php echo $kategoricek['kategori_ad']; ?></a></li>

<?php } } ?>
<li class="nav-item full-width"><a href="blog" class="nav-link text-left text-uppercase active">TÜM KATEGORİLER </a></li>
</ul>
</div>
</div>
</div>
</div>
<!--./row-->
</div>
<!--./container-->
<div class="container">
<div class="row">
<div class="col-md-12">
<nav aria-label="Page navigation mt60">
<ul class="pagination justify-content-center">

<?php $gosterilecekbuton = 3; // gösterilecek sayfa.
if ($sayfa > 1) {
?>
<li class="page-item"><a class="page-link" href="?sayfa=<?php echo $sayfa-1; ?>">GERİ</i></a></li>
<?php }
for ($i= $sayfa - $gosterilecekbuton; $i < $sayfa + $gosterilecekbuton +1; $i++) {
if ($i > 0 and $i <= $toplam_sayfa) {
if ($i == $sayfa) {
?>
<li class="page-item active" >
<a class="page-link" href="?sayfa=<?php echo $i ?>"><?php echo $i ?> <span class="sr-only">(current)</span></a>
</li>
<?php
} else {
?>
<li class="page-item">
<a class="page-link" href="?sayfa=<?php echo $i ?>"><?php echo $i ?> <span class="sr-only">(current)</span></a>
</li>
<?php
}
}
}
if ($sayfa != $toplam_sayfa) {
?>
<li class="page-item"><a class="page-link" href="?sayfa=<?php echo $sayfa+1; ?>">İLERİ</a></li>
<?php } ?>



</ul>
</nav>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
<?php include 'include/footer.php'; ?>