<?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";
?>

<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:2px solid black;border-radius:5px;padding:4px;font-size:12pt; }
<p style="font-size:11px;"></p>
</style>

</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
</script>
<link href="style.css" rel="stylesheet">
<body>
<div class="container">
<div class="main">
<h2>ΕΠΙΛΟΓΗ ΣΕΜΙΝΑΡΙΩΝ ΓΙΑ ΔΙΗΜΕΡΟ ΕΝΗΜΕΡΩΣΗΣ ΕΠΑΓΓΕΛΜΑΤΩΝ</h2>
<?php
require "dbconnect.php";
$usr=$_SESSION['$usr'];
$usr=6662;
$sql=mysqli_query($con,"select * from seminaria");
$i=1;
while($row=mysqli_fetch_array($sql))
{
   $rd[$i]=$row['semname'];
   $rc[$i]=$row['semcode'];
   $i++;   
}
$sql=mysqli_query($con,"select d.*,a.eponimo,a.onoma,a.tmima from dilosisem as d, allstudentinfo as a
     where d.mitroo=a.mitroo and d.mitroo='$usr'" );
if (mysqli_num_rows($sql) > 0)
{
  $i=1;
  while($row=mysqli_fetch_array($sql))
  {
   $name=$row['eponimo']." ".$row['onoma'];
   $tmima=$row['tmima'];
   $mitroo=$row['mitroo'];
   $rs[$i]=$row['semcode'];
   $i++;   
  }	
}
echo $name." ( ";
echo $tmima." )"."<br>"."<br>";	
?>
<form action="radio_value.php" method="post">
<?php
echo "<table style='width:600px' border-radius:5px class='myTable' >
<tr style='border:1px solid black;' bgcolor='#819FF7'  >
<th colspan='3'> ΠΡΩΤΗ ΗΜΕΡΑ 21-12-16 </th>
<tr>
<th>ΣΕΜΙΝΑΡΙΟ1</th>
<th>ΣΕΜΙΝΑΡΙΟ2</th>
<th>ΣΕΜΙΝΑΡΙΟ3</th>
</tr>";
?>	
<tr>
<td> <input name="radio1" type="radio" <?php if($rc[1]== $rs[1]) echo 'checked'; ?> value=<?php echo $rc[1];?>><?php echo $rd[1];?> </td>
<td> <input name="radio1" type="radio" <?php if($rc[2]== $rs[1]) echo 'checked'; ?> value=<?php echo $rc[2];?>><?php echo $rd[2];?> </td>
<td> <input name="radio1" type="radio" <?php if($rc[3]== $rs[1]) echo 'checked'; ?> value=<?php echo $rc[3];?>><?php echo $rd[3];?> </td>
</tr>
<tr>
<td> <input name="radio2" type="radio" <?php if($rc[4]== $rs[2]) echo 'checked'; ?> value=<?php echo $rc[4];?>><?php echo $rd[4];?> </td>
<td> <input name="radio2" type="radio" <?php if($rc[5]== $rs[2]) echo 'checked'; ?> value=<?php echo $rc[5];?>><?php echo $rd[5];?> </td>
<td> <input name="radio2" type="radio" <?php if($rc[6]== $rs[2]) echo 'checked'; ?> value=<?php echo $rc[6];?>><?php echo $rd[6];?> </td>
</tr>
</table> <br><br>
<?php
echo "<table style='width:600px' class='myTable' >
<tr style='border:1px solid black' bgcolor='#819FF7'  >
<th colspan='3'> ΔΕΥΤΕΡΗ ΗΜΕΡΑ 22-12-16 </th>
<tr>
<th>ΣΕΜΙΝΑΡΙΟ1</th>
<th>ΣΕΜΙΝΑΡΙΟ2</th>
<th>ΣΕΜΙΝΑΡΙΟ3</th>
</tr>";
?>
<tr>
<td> <input name="radio3" type="radio" <?php if($rc[7]== $rs[1]) echo 'checked'; ?> value=<?php echo $rd[7];?> ><?php echo $rd[7];?> </td>
<td> <input name="radio3" type="radio" <?php if($rc[8]== $rs[1]) echo 'checked'; ?> value=<?php echo $rd[8];?>><?php echo $rd[8];?> </td>
<td> <input name="radio3" type="radio" <?php if($rc[9]== $rs[1]) echo 'checked'; ?> value=<?php echo $rd[9];?>><?php echo $rd[9];?> </td>
</tr>
<tr>
<td> <input name="radio4" type="radio" <?php if($rc[10]== $rs[1]) echo 'checked'; ?> value=<?php echo $rd[10];?>><?php echo $rd[10];?> </td>
<td> <input name="radio4" type="radio" <?php if($rc[11]== $rs[1]) echo 'checked'; ?> value=<?php echo $rd[11];?>><?php echo $rd[11];?> </td>
<td> <input name="radio4" type="radio" <?php if($rc[12]== $rs[1]) echo 'checked'; ?> value=<?php echo $rd[12];?>><?php echo $rd[12];?> </td>
</tr>
</table>
<br><br><br>
<input type="hidden" name="mitroo" value=<?php echo $mitroo;?> />
<input name="submit" type="submit" value="ΑΠΟΘΗΚΕΥΣΗ ΕΠΙΛΟΓΩΝ">
</form>
</div>
</div>

</body>
</html>