<?php

$_title         =  'Blog';

?>
<div class="container-fluid adres_cubugu">
  <div class="row">
  	<div class="container">
  		<div class="row">
  			<div class="col-md-12">
  				<ul>
  					<li><a href="index.php"><i class="fa fa-home"></i> Anasayfa</a> <span><i class="fa fa-arrow-right"></i></span></li>
  					<li><a href="blog">Blog</a></li>
  				</ul>
  			</div>
  		</div>
  	</div>
  </div>
</div>

<section class="bg-dis">
	<div class="container">
		<div class="row mt-15 mb-15">

      <div class="col-md-12">
        <div class="row">

          <?php
          $query = $db->query("SELECT * FROM blog", PDO::FETCH_ASSOC);
          if($query->rowCount()){
              foreach($query as $row){
          ?>
          <div class="col-md-3 mb-15 col-xs-6">
            <a href="blog/<?php echo $row['sef']; ?>" title="<?php echo $row['baslik']; ?>" class="urun">
              <img src="upload/<?php echo $row['img']; ?>" alt="<?php echo $row['baslik']; ?>" class="img-responsive img1">
              <img src="upload/<?php echo $row['img']; ?>" alt="<?php echo $row['baslik']; ?>" class="img-responsive img2">
              <b><?php echo $row['baslik']; ?></b>
            </a>
          </div>
          <?php } } ?>
        </div>


      </div>

    </div>
  </div>
</section>


<script type="text/javascript" src="js/fiyat-araligi.js"></script>
<script type="text/javascript">
$(function(){
  $('#slider-range').slider({
    range: true,
    min: <?php echo $endusuk_fiyat['fiyat']; ?>,
    max: <?php echo $enyuksek_fiyat['fiyat']; ?>,
    values: [ <?php echo $dusuk_fiyat; ?>, <?php echo $yuksek_fiyat; ?> ],
    slide: function( event, ui ) {
      $('#amount').val(ui.values[ 0 ] + ' TL - ' + ui.values[ 1 ] +' TL' );
    }
  });
  $('#amount').val( $('#slider-range').slider('values', 0 ) + ' TL - ' + $('#slider-range').slider('values', 1 ) + ' TL');
});
</script>