<!doctype html>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Duyuru 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;
}

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

.col-75 {
  float: left;
  width: 75%;
  margin-top: 6px;
}
body {
  float: left;
  width: 75%;
  padding-left: 60px;
}
/* Clear floats after the columns */
.satir:after {
  content: "";
  display: table;
  clear: both;
  padding:10px;
}

/* 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>


<form method="POST" action="duyurukayit.php">
   
   

        Tarih:      <input type="date" value="<?php echo date('Y-m-d'); ?>" name= "tarih" >
        Duyuru:   <input type="text"  name= "duyuru" >
        Dahil Edilecek Çocuklar:
<?php            
         $sorgu = $conn->query("SELECT * FROM ogrenci WHERE durum='Aktif'"); 

    //sınıf bilgisi çekme alanı bitiş

        //kayıt sayfasına sıralı veri girişi için gerekli alan    
        $i=0;   
            
        // $sorgu = $conn->query("SELECT * FROM ogrenci WHERE sinif='$sinif' "); üst kısımda if içerisine yerleştirildi
                while ($sonuc = $sorgu->fetch_assoc()) { 
                $ogrenciadi = $sonuc['ogrenciadi'];
                $aidat = $sonuc['aidat'];
                $aidatgunu = $sonuc['aidatgunu'];
                $id = $sonuc['id']; 
                $i=$i+1;
                //echo "<br>Öğrenci İsimleri: ";
                //echo  date('Y-m-'.$aidatgunu.'');
                //echo $aidatgunu;
                ?>
                <div class="satir">
                <input type="checkbox" name="<?php echo $i; ?>"  value="<?php echo $ogrenciadi; ?>" checked> <?php echo $ogrenciadi; ?>
                </div>
    <?php 
                }
    ?>


<input type="text" style="display:none" value="<?php echo $i; ?>" name= "ogrencisayisi" readonly>
<input type="submit" value="Duyuru Ekle">

</form>

</body>

<p align="center" style=" padding-top:100px;">Güç İçinde!</p>



</html>

