<?php
include "scrinit.php";
include "logo.php";
require "dbconnect.php";
date_default_timezone_set("Europe/Athens");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<style type="text/css">
table.o { border-collapse:collapse;border:solid 2px #00F ;}
table.o td {border:solid 2px #00F; padding:2px ; word-wrap:break-word;} 
table.o th { border:2px solid black; background-color: #CCF;padding:2px;font-size:10pt;word-wrap:break-word; }
<p style="font-size:10px;"></p>
</style>
<body>

<?php
$usr=$_SESSION['usr'];
$sql=mysqli_query($con,"SELECT d.*,p.portfolio,a.tmima,a.eponimo,a.onoma FROM ddkteach as d,ddkportfolio as p,
 allstudentinfo as a  where d.pmp='$usr' and a.mitroo=d.mitroo and d.pcode=p.code order by a.tmima,d.date" );
$c=mysqli_num_rows($sql);
$i=1;
echo "ΜΑΘΗΤΕΣ/ΤΡΙΕΣ ΜΕ ΚΑΤΑΧΩΡΗΣΗ ΔΔΚ";
echo "<table class='o' >
<tr>
<th>Α/Α</th>
<th>ΜΗΤΡΩΟ</th>
<th>ΤΜΗΜΑ</th>
<th>ΜΑΘΗΤΗΣ/ΤΡΙΑ</th>
<th>ΚΩΔΙΚΟΣ</th>
<th>ΠΕΡΙΓΡΑΦΗ ΔΡΑΣΗΣ</th>
<th>ΒΑΘΜΟΣ</th>
<th>ΤΕΛΕΥΤΑΙΑ ΕΝΗΜΕΡΩΣΗ</th>
</tr>";
$i=1;
while ($row = mysqli_fetch_array($sql))
	{
		$perig=$row['portfolio'];
		$mitroo=$row['mitroo'];
		$code=$row['pcode'];
		$name=$row['eponimo']." ".$row['onoma'];
		$dat=$row['date'];
		$bathmos=$row['bathmos'];
		$tmima=$row['tmima'];
		echo "<tr>";
	    echo "<td>".$i."</td>";
		echo "<td>".$mitroo."</td>";
		echo "<td>".$tmima."</td>";
		echo "<td>".$name."</td>";
		echo "<td>".$code."</td>";
	    echo "<td>".$perig."</td>";
		echo "<td>".$bathmos."</td>";
		echo "<td>".date('d-m-Y', strtotime($dat))."</td>";
		echo "</tr>";
		$i++;
	}
echo "</table>";

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