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 / sigorta1.snrsoft.com.tr / | Server Ip : 172.67.216.244 |
Filename | /home/cuneytsener53/sigorta1.snrsoft.com.tr/blog.php |
Size | 6.11 kb |
Permission | rw-r--r-- |
Owner | |
Create time | 02-Mar-2025 05:46 |
Last modified | 10-Nov-2021 07:47 |
Last accessed | 04-Apr-2025 06:23 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php include 'inc/head.php';
$metakey=$db->prepare("SELECT * from meta where meta_id=4");
$metakey->execute(array(0));
$metakeyprint=$metakey->fetch(PDO::FETCH_ASSOC);
$sayfada = 4;
$sorgu=$db->prepare("SELECT * from blog");
$sorgu->execute();
$toplam_icerik=$sorgu->rowCount();
$toplam_sayfa = ceil($toplam_icerik / $sayfada);
$sayfa = isset($_GET['sayfa']) ? (int) $_GET['sayfa'] : 1;
if($sayfa < 1) $sayfa = 1;
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"
)); ?>
<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 'inc/header.php'; ?>
<section class="page-title page-title-layout5 bg-overlay">
<div class="bg-img"><img src="trex/<?php echo $settingsprint['ayar_resimyorum']; ?>" alt="background"></div>
<div class="container">
<div class="row">
<div class="col-12">
<h1 class="pagetitle__heading"><?php echo $widgetprint['widget_bblog']; ?></h1>
<nav>
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="<?=$settingsprint['ayar_siteurl']?>">Anasayfa</a></li>
</ol>
</nav>
</div>
</div>
</div>
</section>
<section class="blog-grid pb-50">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-8">
<div class="row">
<?php while($blogcek=$blogsor->fetch(PDO::FETCH_ASSOC)) { ?>
<div class="col-sm-12 col-md-6 col-lg-6">
<div class="post-item">
<div class="post__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']; ?>" loading="lazy">
</a>
</div>
<div class="post__body">
<div class="post__meta-cat">
<a href="<?=seo('blog-'.$blogcek["blog_baslik"]).'-'.$blogcek["blog_id"]?>"><?=substr($blogcek['blog_tarih'],10)?></a>
</div>
<h4 class="post__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></h4>
<p class="post__desc">
<?php echo substr(strip_tags($blogcek['blog_detay']), 0,110).'...'; ?>
</p>
<a href="<?=seo('blog-'.$blogcek["blog_baslik"]).'-'.$blogcek["blog_id"]?>" class="btn btn__secondary btn__link btn__rounded">
<span>Devamını oku</span>
<i class="icon-arrow-right"></i>
</a>
</div>
</div>
</div>
<?php } ?>
</div>
<div class="row">
<div class="col-12 text-center">
<nav class="pagination-area">
<ul class="pagination justify-content-center">
<?php $gosterilecekbuton = 3; // gösterilecek sayfa.
if ($toplam_sayfa > 1) {
if ($sayfa > 1) { ?>
<li>
<a href="?=sayfa=1"><i class="fa fa-angle-double-left"></i></a>
</li>
<li>
<a href="?sayfa=<?php echo $sayfa-1; ?>"><i class="fa fa-angle-left"></i></a>
</li>
<?php }
for ($i= $sayfa - $gosterilecekbuton; $i < $sayfa + $gosterilecekbuton +1; $i++) {
if ($i > 0 and $i <= $toplam_sayfa) {
if ($i == $sayfa) { ?>
<li>
<a class="current" href="?sayfa=<?php echo $i ?>"><?php echo $i ?> <span class="sr-only">(current)</span></a>
</li>
<?php } else { ?>
<li>
<a href="?sayfa=<?php echo $i ?>"><?php echo $i ?> <span class="sr-only">(current)</span></a>
</li>
<?php } } } if ($sayfa != $toplam_sayfa) { ?>
<li>
<a href="?sayfa=<?php echo $sayfa+1; ?>"><i class="fa fa-angle-right"></i></a>
</li>
<li>
<a href="?sayfa=<?php echo $toplam_sayfa; ?>"><i class="fa fa-angle-double-right"></i></a>
</li>
<?php } } ?>
</ul>
</nav><!-- .pagination-area -->
</div><!-- /.col-12 -->
</div>
</div>
<?php include ('inc/sidebarb.php'); ?>
</div>
</div>
</section>
<?php include 'inc/footer.php'; ?>
$metakey=$db->prepare("SELECT * from meta where meta_id=4");
$metakey->execute(array(0));
$metakeyprint=$metakey->fetch(PDO::FETCH_ASSOC);
$sayfada = 4;
$sorgu=$db->prepare("SELECT * from blog");
$sorgu->execute();
$toplam_icerik=$sorgu->rowCount();
$toplam_sayfa = ceil($toplam_icerik / $sayfada);
$sayfa = isset($_GET['sayfa']) ? (int) $_GET['sayfa'] : 1;
if($sayfa < 1) $sayfa = 1;
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"
)); ?>
<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 'inc/header.php'; ?>
<section class="page-title page-title-layout5 bg-overlay">
<div class="bg-img"><img src="trex/<?php echo $settingsprint['ayar_resimyorum']; ?>" alt="background"></div>
<div class="container">
<div class="row">
<div class="col-12">
<h1 class="pagetitle__heading"><?php echo $widgetprint['widget_bblog']; ?></h1>
<nav>
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="<?=$settingsprint['ayar_siteurl']?>">Anasayfa</a></li>
</ol>
</nav>
</div>
</div>
</div>
</section>
<section class="blog-grid pb-50">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-8">
<div class="row">
<?php while($blogcek=$blogsor->fetch(PDO::FETCH_ASSOC)) { ?>
<div class="col-sm-12 col-md-6 col-lg-6">
<div class="post-item">
<div class="post__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']; ?>" loading="lazy">
</a>
</div>
<div class="post__body">
<div class="post__meta-cat">
<a href="<?=seo('blog-'.$blogcek["blog_baslik"]).'-'.$blogcek["blog_id"]?>"><?=substr($blogcek['blog_tarih'],10)?></a>
</div>
<h4 class="post__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></h4>
<p class="post__desc">
<?php echo substr(strip_tags($blogcek['blog_detay']), 0,110).'...'; ?>
</p>
<a href="<?=seo('blog-'.$blogcek["blog_baslik"]).'-'.$blogcek["blog_id"]?>" class="btn btn__secondary btn__link btn__rounded">
<span>Devamını oku</span>
<i class="icon-arrow-right"></i>
</a>
</div>
</div>
</div>
<?php } ?>
</div>
<div class="row">
<div class="col-12 text-center">
<nav class="pagination-area">
<ul class="pagination justify-content-center">
<?php $gosterilecekbuton = 3; // gösterilecek sayfa.
if ($toplam_sayfa > 1) {
if ($sayfa > 1) { ?>
<li>
<a href="?=sayfa=1"><i class="fa fa-angle-double-left"></i></a>
</li>
<li>
<a href="?sayfa=<?php echo $sayfa-1; ?>"><i class="fa fa-angle-left"></i></a>
</li>
<?php }
for ($i= $sayfa - $gosterilecekbuton; $i < $sayfa + $gosterilecekbuton +1; $i++) {
if ($i > 0 and $i <= $toplam_sayfa) {
if ($i == $sayfa) { ?>
<li>
<a class="current" href="?sayfa=<?php echo $i ?>"><?php echo $i ?> <span class="sr-only">(current)</span></a>
</li>
<?php } else { ?>
<li>
<a href="?sayfa=<?php echo $i ?>"><?php echo $i ?> <span class="sr-only">(current)</span></a>
</li>
<?php } } } if ($sayfa != $toplam_sayfa) { ?>
<li>
<a href="?sayfa=<?php echo $sayfa+1; ?>"><i class="fa fa-angle-right"></i></a>
</li>
<li>
<a href="?sayfa=<?php echo $toplam_sayfa; ?>"><i class="fa fa-angle-double-right"></i></a>
</li>
<?php } } ?>
</ul>
</nav><!-- .pagination-area -->
</div><!-- /.col-12 -->
</div>
</div>
<?php include ('inc/sidebarb.php'); ?>
</div>
</div>
</section>
<?php include 'inc/footer.php'; ?>