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

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Απουσίες Μαθήματος</title>
<style type="text/css">
table { border-collapse:collapse;border:solid 2px #00F ;}
table td {border:solid 2px #00F; padding:2px ; word-wrap:break-word;} 
table th { border:2px solid black; background-color: #CCF;padding:2px;font-size:10pt;word-wrap:break-word; }
<p style="font-size:10px;"></p>
</style>

</head>

<body>
<h2>ΔΗΛΩΣΗ ΟΜΙΛΟΥ</h2>
<?php
require "dbconnect.php"; 
$dt=$_SESSION['dt'];

$dt1=date_format(new DateTime('2014/09/05'), 'Y-m-d'); 
$name = $_SESSION['n'];
$usr=$_SESSION['pmp'];

echo "ΜΑΘΗΤΗΣ / ΤΡΙΑ : "."<b>".$name."</b>"."<br>";
echo "<br>"."ΗΜΕΡΟΜΗΝΙΑ:".$dt1;
echo "<br>"; 


$sql=mysqli_query($con,"SELECT * FROM omiloi" );
$c=mysqli_num_rows($sql);


?>


<form method="POST"  action="omilosin.php">
 
<?php
echo "<table >
<tr>
<th>ΚΩΔ.</th>
<th>ΟΜΙΛΟΣ</th>
<th>ΘΕΣΕΙΣ</th>
<th>ΠΕΡΙΓΡΑΦΗ</th>
<th>ΔΗΛΩΣΗ</th>
</tr>";

while($row = mysqli_fetch_array($sql))
     {
	$code=$row['Code'];	
	$name=$row['Name'];
	$max=$row['maxplithos'];	
	$plithos=$row['plithos'];
	$maxplithos=$row['maxplithos'];
	$perigrafi=$row['perigrafi'];
		 
	 echo "<tr>";
	 echo "<td>" .$code. "</td>";
	 echo "<td>". $name. "</td>";
	 echo "<td>". $plithos ." /".$maxplithos. "</td>";
	 echo "<td style='word-wrap: break-word;'  >". $perigrafi  . "</td>";  
	 if ($plithos == 0){
	    echo "<td >". "<input type='radio' name='dilosi' value='$code' disabled >" ."</td>";}
	 else {
		echo "<td>". "<input type='radio' name='dilosi' value='$code' >" ."</td>"; 
	 }
	 echo "</tr>";
}

echo "</table>";



?>
<br />
<input type="Submit" name="subomilos" value="Καταχώρηση Επιλογής Ομίλου">
</form>

<br /><br />
<a  href='omiloilogin.php'  style="color:blue "  >  Επιστροφή στην Αρχική Σελίδα  </a>

</body>
</html>