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

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


</head>
<body>

<h3>ΣΤΟΙΧΕΙΑ ΜΑΘΗΤΗ/ΑΞΙΟΛΟΓΗΣΗΣ ΓΙΑ ΜΑΘΗΤΕΣ ΠΟΥ ΕΧΑΣΑΝ ΔΙΑΓΩΝΙΣΜΑ</h3>
<?php
require "dbconnect.php";
$usr=$_SESSION['usr'];
$ac=$_SESSION['access'];
$go='true';
$cod=$_GET['data'];echo $cod;
if ($cod > 0)
{
	$sql = $dbcon->prepare("SELECT a.tmima,a.onoma,a.eponimo,a.mitroo,af.* FROM allstudentinfo as a,
		aksiologisi as ak,aksinfo as af WHERE ak.bathmos=-1 and ak.code=af.code and a.mitroo=ak.mitroo and af.code =? and af.pmpteacher=? ");
	$sql->execute([$cod,$usr]);
}
else
{
$sql = $dbcon->prepare("SELECT a.tmima,a.onoma,a.eponimo,a.mitroo,af.* FROM allstudentinfo as a,
		aksiologisi as ak,aksinfo as af WHERE ak.bathmos=-1 and ak.code=af.code and a.mitroo=ak.mitroo and af.pmpteacher=? ");
$sql->execute([$usr]);
}
$count=$sql->rowCount();

if ($count > 0 )
{
echo "<table class='myTable' >
<tr style='border:1px solid black' >
<tr bgcolor='#66CC99'>
<tr>
<th>A/A</th>
<th>ΜΗΤΡΩΟ</th>
<th>ΤΜΗΜΑ</th>
<th>ΌΝΟΝΑΤΕΠΩΝΥΜΟ ΜΑΘΗΤΗ / ΤΡΙΑΣ</th>
<th>ΤΜΗΜΑ-ΣΥΝΔ</th>
<th>ΜΑΘΗΜΑ</th>
<th>ΤΕΤΡΑΜ</th>
<th>ΤΥΠΟΣ</th>
<th>ΔΙΑΡΚΕΙΑ</th>
<th>ΜΕΓ ΒΑΘΜΟΣ</th>
<th>ΗΜΕΡΟΜΗΝΙΑ</th>
</tr>";
$i=1;
while ($row=$sql->fetch(PDO::FETCH_ASSOC)) 
{
	$am=$row['mitroo'];
	$tm1=$row['tmima'];
	$epo=$row['eponimo']." ".$row['onoma'];;
	$tmima=$row['tmima'];$subj=$row['subject'];$tetr=$row['tetramino'];$type=$row['type'];
	$diarkia=$row['diarkia'];$maxm=$row['maxmark'];$dated=date('d-m-Y', strtotime($row['date']));
	echo "<tr>";
	echo "<td>". $i . "</td>"; 
	echo "<td>" . "<a href=\"simvmeet31.php?m=".$am."\">"."<b>".$am."</b>". "</a>". "</td>";
	echo "<td>". $tm1 . "</td>";
	     echo "<td>". $epo . "</td>";
	     echo "<td>". $tmima."</td>";
		 echo "<td>". $subj."</td>";
		 echo "<td>". $tetr."</td>";
		 echo "<td>". $type."</td>";
		 echo "<td>". $diarkia."</td>";
		 echo "<td>". $maxm."</td>";
		 echo "<td>". $dated."</td>";
	     echo "</tr>";
		 
	  echo "<tr>";

	$i++;
}
echo "</table>";
}
?>

	 

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