<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Kreş Gider Girişi</title>

<style>
* {
  box-sizing: border-box;
}

input[type=text],[type=date], select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

label {
  padding: 12px 12px 12px 0;
  display: inline-block;
}

input[type=submit] {
  background-color: #4CAF50;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  float: right;
  margin-top:5px;

}

input[type=submit]:hover {
  background-color: #45a049;
}

.ana {
  border-radius: 5px;
  background-color: #f2f2f2;
  padding: 20px;
}
    #tumsayfa {
    width: 80%;
    position: relative;
    margin: auto;
    margin-top: 6px;
    display:block;
    }

.col-25 {
  float: left;
  width: 25%;
  margin-top: 6px;
}

.col-75 {
  float: left;
  width: 75%;
  margin-top: 6px;
}

/* Clear floats after the columns */
.satir:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive layout - when the screen is less than 600px wide, make the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .col-25, .col-75, input[type=submit] {
    width: 100%;
    margin-top: 5px;
  }
}
</style>
    <?php include '../menu.php';?>
    <?php include '../baglanti.php';?>
</head>
<body>
    <div id="tumsayfa">
    

    
    <h3 align="center">Gider Düzenleme</h3>
 <?php 


if ($_GET) 
{




// id'si seçilen veriyi silme sorgumuzu yazıyoru
$sorgu = $conn->query("SELECT * FROM gider WHERE id =".(int)$_GET['id']); 
while ($sonuc = $sorgu->fetch_assoc()) { 

$odemetarihi = $sonuc['odemetarihi']; // Veritabanından çektiğimiz id satırını $id olarak tanımlıyoruz.
$odemeyeri = $sonuc['odemeyeri'];
$sube = $sonuc['sube'];
$tutar = $sonuc['tutar'];
$odemeyapan = $sonuc['odemeyapan'];
$kategori = $sonuc['kategori'];
$tur = $sonuc['tur'];
$evrak= $sonuc['evrak'];
$id = $sonuc['id'];
$not1 = $sonuc['not1'];

}
}

?>



<form method="POST" autocomplete="off"  action="giderduzenlekayit.php">
  <div class="satir" style="display:none;">Kayıt Numarası <input type="text" name="id" value="<?php echo $id; ?>"></div>
  <div class="satir">Tutar <input type="text" name="tutar" value="<?php echo $tutar; ?>" required="required"></div>
  <div class="satir">Şube <select name="sube">
                  <option value="<?php echo $sube; ?>"><?php echo $sube; ?></option>
                  <option value="Gelişim">Gelişim</option>
                  <option value="Tırtıl">Tırtıl</option>
                </select></div>  
  <div class="satir">Ödeme Yapılan Yer <input type="text" value="<?php echo $odemeyeri; ?>" name="odemeyeri"></div>
  <div class="satir">Ödeme Tarhi <input type="date" value="<?php echo date('Y-m-d'); ?>" name="odemetarihi"></div>
  <div class="satir">Ödeme Yapan 
                <select name="odemeyapan">
                    <option value="<?php echo $odemeyapan; ?>"><?php echo $odemeyapan; ?></option>
                    <option value="Adem Gemici">Adem Gemici</option>
                    <option value="Tuğba Gemici">Tuğba Gemici</option>
                    <option value="Muhammet Selman AYAS">Muhammet Selman Ayas</option>
                    <option value="Diğer">Diğer</option>
                </select></div>
  <div class="satir">Kategori 
                <select name="kategori">
                  <option value="<?php echo $kategori; ?>"><?php echo $kategori; ?></option>
                  <option value="Mutfak">Mutfak</option>
                  <option value="Personel">Personel</option>
                  <option value="Kırtasiye">Kırtasiye</option>
                  <option value="Fatura">Fatura</option>
                  <option value="Genel">Genel</option>
                  <option value="Yakıt">Yakıt</option>
                  <option value="Diğer">Diğer</option>
                </select>  
    </div>
  <div class="satir">Ödeme Şekli 
  
                <select name="tur">
                  <option value="<?php echo $tur; ?>"><?php echo $tur; ?></option>
                  <option value="Nakit">Nakit</option>
                  <option value="Kredi Kartı">Kredi Kartı</option>
                </select>  
  
  </div>
    <div class="satir">Evrak 
  
                <select name="evrak">
                  <option value="<?php echo $evrak; ?>"><?php echo $evrak; ?></option>
                  <option value="Fatura">Fatura</option>
                  <option value="Fiş">Fiş</option>
                  <option value="Yok">Yok</option>
                </select>  
  
  </div>
  <div class="satir">Not <input type="text" value="<?php echo $not1; ?>" name="not"></div>
  <div class="satir"><input type="submit" value="Kaydet"></div>
    
</form>


</div>
</body>
</html>