<?php
include "scrinit.php";
include "logo.php";

?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<style type="text/css">
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid black;padding:6px;font-size:15px; }
<p style="font-size:12px;"></p>
</style>
<body>
<h3> ΚΑΤΑΣΤΑΣΗ ΑΝΑΠΛΗΡΩΣΕΩΝ ΜΕΧΡΙ <?php echo $dt;?> </h3>
<?php
require "dbconnect.php";
$dt=$_SESSION['dt'];
$pmp=$_SESSION['usr'];

$result = mysqli_query($con,"SELECT id,date,period,pmpapon FROM anaplirosi where teacher='$pmp' order by date");

$dates=array();
// emfanise ton pinaka 
echo "<table class='myTable' >
<tr style='border:1px solid black'  >
<th>ΑΡΙΘΜ.</th>
<th>ID</th>
<th>ΗΜΕΡΟΜΗΝΙΑ</th>
<th>ΠΕΡΙΟΔΟΣ</th>
<th>ΑΠΩΝ/ΑΠΟΥΣΑ</th>
</tr>";
$i=0;
while ($row = mysqli_fetch_array($result))
{
  $id=$row['id'];
  $datean=$row['date'];
  $pmpapon = $row['pmpapon'];
  $per = $row['period'];
  $i++;
  echo "<tr>";
  echo "<td>".$i."</td>";
  echo "<td>".$id."</td>";
  echo "<td>".$datean."</td>";
  echo "<td>".$per."</td>";
  echo "<td>".$pmpapon."</td>";
  echo "</tr>";
}

echo "</table>";
echo "<br>"."<br>";

?>	
<br /><br />
<a  href=<?php echo $menu;?> style="color:blue "  > <button> Επιστροφή στο Μενού   </a>
</body>
</html>
