<?php require admin_view('include/header'); ?>
<!-- Content Wrapper. Contains page content -->
<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>Programci Düzenle</h1>
        </div>
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="index">Görsel Panel</a></li>
            <li class="breadcrumb-item"><a href="programci-listele">Programcılar</a></li>
            <li class="breadcrumb-item active">Programcı Düzenle</li>
          </ol>
        </div>
      </div>
    </div><!-- /.container-fluid -->
  </section>

  <!-- Main content -->
  <section class="content">

    <!-- Default box -->
    <div class="card card-info">
      <div class="card-header">
        <h3 class="card-title">Programci Düzenle</h3>
      </div>
      <!-- /.card-header -->
      <!-- form start -->
      <form action="" method="POST" enctype="multipart/form-data">
        <div class="card-body">  
        <div class="form-group row">
            <label for="inputEmail3" class="col-sm-2 col-form-label">Email</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="email" value="<?= $row['email'] ?>" placeholder="E-Mail Adresi">
            </div>
          </div>  

          <div class="form-group row">
            <label for="inputEmail3" class="col-sm-2 col-form-label">Şifre</label>
            <div class="col-sm-8">
              <input type="password" class="form-control" name="sifre" placeholder="Şifre" required="">
            </div>
          </div>  
          <div class="form-group row">
            <label for="inputEmail3" class="col-sm-2 col-form-label">İsim</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="programci" value="<?= $row['programci'] ?>" placeholder="ismi">
            </div>
          </div>  
          <div class="form-group row">
            <label for="inputEmail3" class="col-sm-2 col-form-label">Program Adı</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="program" value="<?= $row['program'] ?>" placeholder="program Adı">
            </div>
          </div> 

          <div class="form-group row">
            <label for="inputEmail3" class="col-sm-2 col-form-label">Facebook Adı</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="facebook" value="<?= $row['facebook'] ?>" placeholder="Facebook">
            </div>
          </div> 
          <div class="form-group row">
            <label for="inputEmail3" class="col-sm-2 col-form-label">Twitter Adı</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="twitter" value="<?= $row['twitter'] ?>" placeholder="Twitter">
            </div>
          </div> 
          <div class="form-group row">
            <label for="inputEmail3" class="col-sm-2 col-form-label">instagram Adı</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="instagram" value="<?= $row['instagram'] ?>" placeholder="İnstagram">
            </div>
          </div>   
          <div class="form-group row">
            <label for="inputEmail3" class="col-sm-2 col-form-label">Durumu</label>
            <div class="col-sm-2">
              <select name="durum" class="form-control" required="">
               <option <?php if ($row['durum']=="yes") {echo 'selected=""';} ?> value="yes"> Aktif</option>
               <option <?php if ($row['durum']=="no") {echo 'selected=""';} ?> value="no"> Pasif</option>
             </select>
           </div>
         </div>
         <div class="form-group row">
          <label for="image" class="col-sm-2 col-form-label">Resim</label>
          <div class="col-sm-8"> 
            <input type="file" class="form-control" name="image">  
            <p style="margin-left:10px;font-size:13px;margin-top:5px;">Tavsiye edilen görselin boyutları 400x400 px olmalıdır.</p>
          </div> 
        </div> 
      </div>
      <!-- /.card-body --> 
      <div class="card-footer">
       <?php if ($row['edit_date']>"0000-00-00 00:00:00") { ?>
        <div class="col-lg-6">
          <p>Güncelleme Tarihi: <?= tarih('j F Y - H:i:s',$row['edit_date']); ?></p>
        </div>
        <div class="col-lg-6">
        <?php } else { ?>
          <div class="col-lg-12">
          <?php } ?>

          <button type="submit" name="proedit" class="btn btn-info"><i class="fas fa-save"></i> Güncelle</button> 
        </div>
        <!-- /.card-footer -->
      </form>
    </div>
    <!-- /.card -->

  </section>
  <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php require admin_view('include/footer'); ?>