<?php
include "scrinit.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:12px; }
<p style="font-size:11px;"></p>
</style>
<body>
<div id="wrap">
<div id="header">
     <h4><?php include 'logo.php'?> </h4>
</div>
<body>
<h3>ΔΙΟΡΘΩΣΗ/ΕΠΙΣΤΡΟΦΗ ΔΙΑΓΩΝΙΣΜΑΤΟΣ </h3>
<?php
date_default_timezone_set("Europe/Athens");
require "dbconnect.php";
$usr=$_SESSION['usr'];
$name = $_SESSION['n'];

$dt=$_SESSION['dt'];
echo " ΔΗΛΩΜΕΝΑ ΔΙΑΓΩΝΙΣΜΑΤΑ "."<br>";	

$sql1 = "SELECT * FROM declarations WHERE teacher='$usr'" ;
if (!mysqli_query($con,$sql1)) {die('Error: ' . mysqli_error($con));   }
$res=mysqli_query($con,$sql1);
$c=mysqli_num_rows($res);

if ($c==0){echo " ΔΕΝ ΥΠΑΡΧΟΥΝ ΔΗΛΩΜΕΝΑ ΔΙΑΓΩΝΙΣΜΑΤΑ";}
else
{
echo "<table class='myTable' >
<tr style='border:1px solid black;font-size:12px'  >
<tr>
<th>Α/Α</th>
<th>ΗΜΕΡ. ΔΗΛΩΣΗΣ</th>
<th>ΗΜΕΡ. ΔΙΑΓΩΝ.</th>
<th>ΜΑΘΗΜΑ</th>
<th>ΤΜΗΜΑ/ΣΥΝΔ.</th>
<th>ΠΕΡΙΟΔ.</th>
<th>ΔΙΑΡΚ.</th>
<th>ΗΜΕΡ. ΕΠΙΣΤΡΟΦΗΣ</th>
</tr>";	

while ($row = mysqli_fetch_array($res)) 
{
	$id=$row['id'];
	$perapo=$row['perapo'];
	$permexri=$row['permexri'];
	$testdate=$row['testdate'];
	$decladate=$row['decladate'];
	$subject=$row['subject'];
	$duration=$row['duration'];
	$class=$row['class'];
	$return=$row['returndate'];


echo "<tr>";
echo "<td>" .  "<a href=\"diagoedit.php?data=".$id."\">"."<b>".$id."</b>". "</a>". "</td>";
echo "<td>" . $decladate. "</td>";
echo "<td>" . $testdate. "</td>";
echo "<td>" . $subject. "</td>";
echo "<td>" . $class. "</td>";
echo "<td>" . $perapo.' - '.$permexri. "</td>";
echo "<td>" . $duration. "</td>";
echo "<td>" . $return. "</td>";
echo "</tr>"; 

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

echo "<br>"."<br>";
//echo "<B>"." *** ΓΙΑ ΕΠΙΣΤΡΟΦΗ ΣΤΗΝ ΠΡΟΗΓΟΥΜΕΝΗ ΟΘΟΝΗ ==> ΚΛΕΙΣΤΕ ΤΟ ΠΑΡΑΘΥΡΟ "."</B>";

?>
<br /> <br />
<input type='button' value='Επιστροφή ' onclick='javascript: window.close();' /> 
</body>
</html>
