<?php
session_start();
ob_start();
if ($_SESSION['islogin']=='' ) { 
  echo "ΠΡΕΠΕΙ ΝΑ ΕΓΓΡΑΦΕΙΤΕ ΓΙΑ ΝΑ ΧΡΗΣΙΜΟΠΟΙΗΣΕΤΕ ΤΟ ΣΥΣΤΗΜΑ"."<BR>";
  sleep(3);
  header("Location: loginall.php"); /* Redirect browser */
  exit();
  }
$menu = $_SESSION['menu'];
include 'logo.php';
date_default_timezone_set("Europe/Athens");
require "dbconnect.php";
?><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:09px;"></p>
</style>

<h3> </h3>
<?php
echo "<br>";
$dt=$_SESSION['dt'];

$id=$_GET['data'];
$sql1 = "SELECT a.*,al.onoma,al.eponimo FROM aksiologisi as a,allstudentinfo as al WHERE a.mitroo=al.mitroo and a.code='$id'" ;
if (!mysqli_query($con,$sql1)) {die('Error: ' . mysqli_error($con));   }
$res=mysqli_query($con,$sql1);


echo "<table class='myTable' >
<tr style='border:1px solid black;font-size:12px'  >
<tr>
<th>Α/Α</th>
<th>ΜΗΤΡΩΟ</th>
<th>ΜΑΘΗΤΗΣ</th>
<th>ΒΑΘΜΟΣ</th>
</tr>";	
$i=1;
while ($row = mysqli_fetch_array($res)) 
{
	$name=$row['eponimo']." ".$row['onoma'];
	$bathmos=$row['bathmos'];
	$mitroo=$row['mitroo'];
    echo "<tr>";
    echo "<td>" . $i. "</td>";
	echo "<td>" . $mitroo. "</td>";
    echo "<td>" . $name. "</td>";
    echo "<td>" . $bathmos. "</td>";
    echo "</tr>"; 
$i++;
}
echo "</table>";
echo "<br>"."<br>";

 ?>
 <br /> <br />
<input type="button" name="epistrofi" value="Επιστροφή" onClick="self.close()">

</body>
</html>