<?php
require_once 'ayar/Config.php';
if ($Site->modul_ayarlari('anasayfaurunler') != "pasif") {
include "header.php";
mysql_unbuffered_query('SET NAMES utf8');
mysql_query("SET NAMES UTF8");
// Gelen Sayfa
$gelen = @get('id');
?>
  <?php if ($Site->sayfad($gelen,'sayfa_title') != ''){ ?>
  <title>
    <?php echo $Site->sayfad($gelen,'sayfa_title'); ?>
  </title>
  <?php } else { ?>
  <title>
    <?php echo $Site->sayfad($gelen,'sayfa_baslik'); ?>
  </title>
  <?php } ?>
  <?php if ($Site->sayfad($gelen,'sayfa_etiket') != ''){ // Meta Keywords ?>
  <meta name="keywords" content="<?php echo $Site->sayfad($gelen,'sayfa_etiket'); ?>">
  <?php } else { ?>
  <?php } ?>
  <?php if ($Site->sayfad($gelen,'sayfa_aciklama') != ''){  // Meta Description ?>
  <meta name="description" content="<?php echo $Site->sayfad($gelen,'sayfa_aciklama'); ?>">
  <?php } else { ?>
  <?php } ?>
  <section id="agent-p-2" class="property-details bg_light padding">

    <br>
    <div class="container">
      <div class="row">
        <div class="col-xs-12 bottom40"> </div>
      </div>
      <h2 class="text-uppercase"><span class="color_red"> &nbsp; <?php echo $Site->sayfad($gelen,'sayfa_baslik'); ?> </span></h2>
      <?php if ($Site->sayfad($gelen,'sayfa_yazisi') != '') {
    ?>

      <div class="container">
        <?php echo substr($Site->sayfad($gelen,'sayfa_yazisi'),0,500); ?>
        <div id="devami" class="collapse">
          <?php echo substr($Site->sayfad($gelen,'sayfa_yazisi'),500,99999); ?>
        </div>
        <center>
          <a onclick="#"><b data-toggle="collapse" data-target="#devami"><i class="fa fa-angle-down"></i> DEVAMINI OKU ...</b> </a>
        </center>
      </div>

      <br>
      <?php } ?>
      <div class="col-md-12">
        <div class="row">
          <?php
  $ssss = mysql_query("SELECT *
  FROM cat_urun JOIN urunler
  ON cat_urun.cid = $gelen
  WHERE urunler.kategori_id = cat_urun.uid
  ORDER BY sira ASC");
    mysql_unbuffered_query('SET NAMES utf8');
    mysql_query("SET NAMES UTF8");
   while ($urunl = mysql_fetch_array($ssss)) {
     date_default_timezone_set('Europe/Istanbul');
     $tarih = $urunl['tarih_zamanlama'];
     $saat = $urunl['saat_zamanlama'];
     if(strtotime($tarih." ".$saat)<time())
       {
  ?>
  <?php if($urunl['aktifkontrol'] == "aktif"){ ?>
            <div class="col-md-4 col-sm-6">
              <div class="property_item bottom40">
                <div class="image"> <a href="urun/<?php echo $urunl['urun_seflink'] ?>"><img src="upload/images/<?php echo $urunl['anasayfa_resim']; ?>"  style="height:250px;" alt="listin" class="img-responsive"></a>
                  <div class="property_meta">
                    <h4 style="color:#FFFFFF;"><?php echo $urunl['urun_baslik'] ?></a></h4>
                  </div>
                  <div class="price"><span class="tag">
                    <?php
                    if ($Site->modul_ayarlari('fiyatgoster') == "aktif") {
                        if($urunl['fiyat_goster']==1){
                          echo $urunl['urun_fiyat']; ?> <i class="fa fa fa-try"></i>
                          <?php } else { ?> Fiyat Sorunuz
                        <?php }}
                        else {
                          echo $Site->modul_ayarlari('fiyattext');
                        } ?>
                  </span></div>

                  <div class="overlay">
                    <div class="centered"><a class="link_arrow white_border" href="urun/<?php echo $urunl['urun_seflink'] ?>">Ürün Detayı</a></div>
                  </div>
                </div>
                <div class="proerty_content">
                  <div class="proerty_text">
                    <span class="bottom10"><?php echo  substr($urunl['urun_text'],0,200); ?>
                      <a href="urun/<?php echo $urunl['urun_seflink'] ?>"><b>İncele »</b></span>
                  </div>
                  <div>
                    <ul class="pull-right">
                      <li><a href="#"></a></li>
                    </ul>
                  </div>
                </div>

              </div>

            </div>
          <?php } }}?>
        </div>
      </div>
    </div>
    </div>
  </section>
  <?php include "footer.php";
}
else {
  git("../index.php",0);
}?>
