<?php
session_start();
require("dbconnect.php");
$menu= $_SESSION['menu'];
?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid black;padding:2px;font-size:11px; }
<p style="font-size:11px;"></p>
</style>

<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
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=800, height=900, top='+top+', left='+left);
}
</script>
</head>
<body  style="width:995px; margin:0 auto; ">

<?php 

echo "<br>";

$epilogi=$_GET['less'];
$sql=  mysqli_query($con,"SELECT  e.mitroo as mitr,al.tmima,al.eponimo,al.onoma,e.kat FROM allstudentinfo as al,epilogesball as e  WHERE al.mitroo=e.mitroo and e.epilogi='$epilogi' order by al.tmima,al.eponimo,al.onoma" );

echo " ΜΑΘΗΤΕΣ ΠΟΥ ΕΠΕΛΕΞΑΝ ΤΟ ΜΑΘΗΜΑ ".$epilogi ;
echo "<br>";
echo "<table class='myTable' >
<tr style='border:1px solid black;font-size:16px'  >
<tr>
<th>A/A</th>
<th>ΤΜΗΜΑ</th>
<th>ΜΗΤΡΩΟ</th>
<th>ΟΝΟΜΑ</th>
<th>KAT</th>
</tr>";	
$i=1;
while ($row=mysqli_fetch_array($sql))
{
   echo "<tr>";
   echo "<td>". $i. "</td>";
   echo "<td>". $row['tmima']. "</td>";
   $name=$row['eponimo']." ".$row['onoma'];
   echo "<td>". $row['mitr']. "</td>";
   echo "<td>".$name. "</td>";
   echo "<td>". $row['kat']. "</td>";
   echo "</tr>";
   $i++;
}
echo "</table>"; 



?>	
<br /><br />


</body>
</html>