
	
	<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1>Genel Ayarları 
          </h1>
        </div>
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="<?=SITE?>">Anasayfa</a></li>
            <li class="breadcrumb-item active">Genel Ayarları</li>
          </ol>
        </div>
      </div>
    </div><!-- /.container-fluid -->
  </section>
  <!-- Main content -->
  <section class="content">
    <div class="container-fluid">
     <div class="row"> 
      <div class="col-md-12">
        <?php
        if($_POST)
        {
          if(!empty($_POST["twitter"]) && !empty($_POST["facebook"])  && !empty($_POST["instagram"])  && !empty($_POST["youtube"]))
          {
           $twitter=$VT->filter($_POST["twitter"]);
           $facebook=$VT->filter($_POST["facebook"]);
           $instagram=$VT->filter($_POST["instagram"]);
           $youtube=$VT->filter($_POST["youtube"]); 

           $sosyal=$VT->SorguCalistir("UPDATE ayarlar","SET twitter=?, facebook=?, instagram=?, youtube=? WHERE ID=?",
            array($twitter,$facebook,$instagram,$youtube,1),1);

           if($sosyal!=false)
           {
            ?>
            <div class="alert alert-success">İşleminiz başarıyla kaydedildi.</div>
            <meta http-equiv="refresh" content="2;url=<?=SITE?>sosyal-meyda" />
            <?php
          }
          else
          {
            ?>
            <div class="alert alert-danger">Lütfen daha sonra tekrar deneyiniz.</div>
            <?php
          }
        }
        else
        {
         ?>
         <div class="alert alert-danger">Boş bıraktığınız alanları doldurunuz.</div>
         <?php
       }
     }
     ?> 
     <div class="card card-warning">
      <div class="card-header">
        <h3 class="card-title">Sosyal Medya</h3>
      </div>
      <!-- /.card-header --> 
      <form action="#" method="post"> 
        <div class="card-body"> 
          <div class="form-group row">
            <label for="inputPassword3" class="col-sm-2 col-form-label">Twitter</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" name="twitter" value="<?=$sitetwitter?>">
            </div>
          </div> 
          <div class="form-group row">
            <label for="inputPassword3" class="col-sm-2 col-form-label">Facebook</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" name="facebook" value="<?=$sitefacebook?>">
            </div>
          </div> 
          <div class="form-group row">
            <label for="inputPassword3" class="col-sm-2 col-form-label">instagram</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" name="instagram" value="<?=$siteinstagram?>">
            </div>
          </div> 
          <div class="form-group row">
            <label for="inputPassword3" class="col-sm-2 col-form-label">Youtube</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" name="youtube" value="<?=$siteyoutube?>">
            </div>
          </div>
        </div>
        <!-- /.card-body -->
        <div class="card-footer">
          <button type="submit" class="btn btn-info">Güncelle</button> 
          <!-- /.card-footer -->
        </form>
      </div>
    </div>
  </div> 
</div> 
</section>
<!-- /.content -->
</div>
