<?php if(!defined("Hacking")){die("404 Not Found"); } ?>

<div id="tour-11" class="header-content">
  <h2><i class="fa fa-newspaper-o"></i>Blog Ekle</h2>
</div>
<div class="body-content animated fadeIn">
  <?php
    if($_POST){

        // Formdan gelen bilgileri

        $blog_baslik          = post('blog_baslik');

        $blog_seo_etiket      = post('blog_seo_etiket');

        $blog_seo_aciklama    = post('blog_seo_aciklama');

        $blog_text            = $_POST['blog_text'];

        $anasayfa_resim           = $_FILES["anasayfa_resim"];

        $tarih_ayari      = $_POST["tarih_ayari"];
        $saat_ayari      = $_POST["saat_ayari"];



        // İçerik Ekleme

        $blog->blog_ekle($blog_baslik,$blog_seo_etiket,$blog_seo_aciklama,$blog_text,$anasayfa_resim,$tarih_ayari,$saat_ayari);

    }

?>
  <form action="" method="post" name="" enctype="multipart/form-data" onsubmit="return boyutkontrol(4194304)">
    <div class="row">
      <div class="col-md-12">
        <div class="panel rounded shadow">
          <div class="panel-heading">
            <div class="pull-left">
              <h3 class="panel-title"><i class="fa fa-edit"></i>Blog Adı</h3>
            </div>
            <div class="clearfix"></div>
          </div>
          <div class="panel-body no-padding">
            <div class="form-body">
              <div class="form-group">
                <input class="form-control" name="blog_baslik" placeholder="Blog Adı Yazın" type="text">
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col-md-6">
        <div class="panel rounded shadow">
          <div class="panel-heading">
            <div class="pull-left">
              <h3 class="panel-title"><i class="fa fa-cog"></i>Blog SEO Ayarları</h3>
            </div>
            <div class="clearfix"></div>
          </div>
          <div class="panel-body no-padding">
            <div class="form-body">
              <div class="form-group">
                <label class="control-label"><i class="fa fa-edit"></i>&nbsp;Blog Kelimeleri (Keywords)</label>
                <input class="form-control rounded" id="tags_2" name="blog_seo_etiket" placeholder="(Her Kelimeyi Virgülle Ayırın),php,pdo,mysql,html,css,jquery,show yazılım vs.." type="text">
              </div>
              <div class="form-group">
                <label class="control-label"><i class="fa fa-edit"></i>&nbsp;Blog Açıklaması (Description)</label>
                <input class="form-control rounded" name="blog_seo_aciklama" placeholder="Blog Başlığının aynısını ya da Blogla ilgili kısa yazı yazabilirsiniz." type="text">
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="col-md-6">
        <div class="panel rounded shadow">
          <div class="panel-heading">
            <div class="pull-left">
              <h3 class="panel-title"><i class="fa fa-picture-o"></i>Blog Resmi</h3>
            </div>
            <div class="clearfix"></div>
          </div>
          <div class="panel-body no-padding">
            <div class="form-body">
              <div class="form-group">
                <input class="form-control rounded" name="anasayfa_resim" id="resimboyut" style="border:1px solid #989898!important"  type="file">
              </div>
            </div>
          </div>
        </div>
        <div class="panel rounded shadow">
          <div class="panel-heading">
            <div class="pull-left">
              <h3 class="panel-title"><i class="fa fa-clock-o"></i>Yayınlanma Zaman Ayarı</h3>
            </div>
            <div class="clearfix"></div>
          </div>
          <div class="panel-body no-padding">
            <div class="form-body">
              <div class="form-group">
                <input class="form-control rounded col-md-8" name="tarih_ayari" style="border:1px solid #989898!important"  type="date" value="<?=tarih(0,0,0,"Y-m-d")?>">
                <input class="form-control rounded col-md-4" name="saat_ayari" style="border:1px solid #989898!important"  type="time" value="<?=date('H:i')?>"><br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col-md-12">
        <div class="panel rounded shadow">
          <div class="panel-heading">
            <div class="pull-left">
              <h3 class="panel-title"><i class="fa fa-cog"></i>Açıklama</h3>
            </div>
            <div class="clearfix"></div>
          </div>
          <div class="panel-body no-padding">
            <div class="form-body">
              <div class="form-group">
                <textarea class="ckeditor" cols="80" id="editor1" name="blog_text" rows="10"></textarea>
              </div>
            </div>
            <div class="form-footer">
              <div class="pull-left">
                <button class="btn btn-primary mr-5" type="submit">
                <li class="fa fa-floppy-o"></li>
                &nbsp;&nbsp;Ekle</button>
              </div>
              <div class="clearfix"></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </form>
</div>
