<?php
require_once 'ayar/Config.php';
include "header.php";
?>
  <?php if ($Site->site_ayarlari('blog-title') != ''){ // Meta Title ?>
  <title>
    <?php echo $Site->site_ayarlari('blog-title'); ?>
  </title>
  <?php } else { ?>
  <title>Blog</title>
  <?php } ?>
  <?php if ($Site->site_ayarlari('blog-keywords') != ''){ // Meta Keywords ?>
  <meta name="keywords" content="<?php echo $Site->site_ayarlari('blog-keywords'); ?>">
  <?php } else { ?>
  <?php } ?>
  <?php if ($Site->site_ayarlari('blog-description') != ''){  // Meta Description ?>
  <meta name="description" content="<?php echo $Site->site_ayarlari('blog-description'); ?>">
  <?php } else { ?>
  <?php } ?>
  <!--===== Başlık =====-->
  <section class="padding bg_light">

    <div class="container">
      <div class="row">
        <div class="col-md-12 bottom20"><br>
          <br>
          <br>
          <br>
          <h2 class="text-uppercase"><span class="color_red"> BLOG </span></h2>
          <br>
          <span style="font-size:12px; color:#000000;"><a href="./">ANA SAYFA</a> / <a href="blog">BLOG</a></span> </div>
      </div>
  </section>

  <section id="news-section-1" class="news-section-details  padding">
    <div class="container">
      <div class="row">
        <div class="col-md-12 col-sm-12">

          <?php
        $blog = $Site->blog_listele();
        foreach ($blog as $key => $value){
          if($value["aktifkontrol"]=="aktif"|| $Site->adminyetki(session("id"),'yetki')==1){
        $blog_resim = explode(",",$value['anasayfa_resim']);

      ?>
            <div class="col-md-4 margin_bottom">
              <div class="image"><a href="blog/<?php echo $value['blog_seflink'] ?>"><img style="height:250px;" src="upload/blog/<?php echo $value['anasayfa_resim']; ?>" alt="image"></a></div>
              <div class="sim-lar-text">
                <h3><?php echo substr($value['blog_baslik'],0,28); ?>...</h3>
                <p class="bottom10"><span><i class="fa fa-calendar-o"></i> <?php echo $value['blog_tarih']; ?> &nbsp;/&nbsp; <i class="fa fa-bullhorn"></i> <?php echo $value['blog_okunma']; ?> okunma. </span></p>
                <p>
                  <?php echo  substr($value['blog_text'],0,160); ?>...</p>
                <a href="blog/<?php echo $value['blog_seflink'] ?>" class="link_arrow top20">Devamını Oku</a>
              </div>
            </div>
          <?php  } } ?>
        </div>
      </div>
    </div>
  </section>



  <?php include "footer.php"; ?>
