<?php
include "scrinit.php";
include $menu;
$dt=$_SESSION['dt'];
?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>entopismos mathiti</title>
</script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(function() {
 $("#tmimaid").bind("change", function() {
     $.ajax({
         url: "change.php",
         data: "tmimaid="+$("#tmimaid").val(),
         success: function(html) {
             $("#nameid").html(html);
         }
     });
 }); 
});

function popupCenter(pageURL, title, w, h) {
    var left = (screen.width / 2)  - (w / 2);
    var top  = (screen.height / 2) - (h / 2);
    var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=900, height=300, top='+top+', left='+left);
}
</script>

</head>

<body>
<br><h4> ΕΠΙΛΟΓΗ ΔΙΑΔΙΚΑΣΙΑΣ</h4><br />

<form method="post" name = "form1">
<br />
ΗΜΕΡΟΜΗΝΙΑ: <input type="date"  name = 'dt' value= <?php echo $dt; ?> > 
<br /><br />

  <select name="epidel" size="3"  >
  
  <option value=1>Διαγραφή  Απουσίας μαθητή/τριας</option> 
  <option value=2>Διαγραφή  Απουσιών  ημέρας</option>
  </select>
  <br><br />
  <input type="submit" name="submit1" value="Επιβεβαίωση Επιλογής" >
</form>

<?php
require "dbconnect.php";
$gym=$_SESSION['gym'];
if(isset($_POST['epidel']))
{

$dt=$_POST['dt'];
$_SESSION['dt']=$dt;
$epidel=$_POST['epidel'];

$sql2 = mysqli_query($con,"SELECT DISTINCT tmima FROM allstudentinfo ORDER BY tmima ASC");
if ($epidel==1) 
{  
	?>
	<form action='deleteapou1.php' method='post'> 
	<?php
	include "selectst.php";
	?>
	<input type="submit" name="submit1" value="Επιβεβαίωση Επιλογής" >
	</form>
	<?php
}
if ($epidel==2) 
{ 
	include "deleteapou1.php" ; 
}
}
?>
</body>
</html>