<?php
session_start();
if ($_SESSION['islogin']=='' ) { 
  echo "ΠΡΕΠΕΙ ΝΑ ΕΓΓΡΑΦΕΙΤΕ ΓΙΑ ΝΑ ΧΡΗΣΙΜΟΠΟΙΗΣΕΤΕ ΤΟ ΣΥΣΤΗΜΑ"."<BR>";
  sleep(2);
  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" />
<title>Untitled Document</title>
</head>
<style>
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid black;padding:3px;font-size:13px; }
.fieldset
{
    width:400px;
	background: #F5F9F0;
	border:2px solid green;
    -moz-border-radius:8px;
    -webkit-border-radius:8px;	
    border-radius:8px;	
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
function popupCenter(pageURL, title, w, h) {
    var left = (screen.width / 2)  - (w / 2);
    var top  = (screen.height / 2) - (h / 2);
    var targetWin = window.open(pageURL, title,w,h);
}
</script>
<body>

<h3>ΑΚΡΟΑΣΕΙΣ ΜΑΘΗΤΩΝ</h3>
<?php
require "dbconnect.php";
$date=$_SESSION['dt'];
$mitroo=mysqli_real_escape_string($con,$_GET['m']);
$time=date("H:i:s");

$sql=mysqli_query($con,"select * from simvrantevou where mitroo='$mitroo' order by date DESC");

echo "<table class='myTable' >
<tr style='border:1px solid black' bgcolor=#F0FFF0 >
<th>A/A</th>
<th>ΗΜΕΡΟΜ.</th>
<th>ΕΝΑΡΞΗ</th>
<th>ΛΗΞΗ</th>
<th>ΠΕΡΙΓΡΑΦΗ</th>
<th>ΕΝΕΡΓΕΙΕΣ</th>
</tr>";

$i=1;
while($row=mysqli_fetch_array($sql))
{
	$id=$row['id'];
	$date=$row['date'];
	$timefrom=$row['timefrom'];
	$timeto=$row['timeto'];
	$perigrafi=$row['perigrafi'];
	$energies=$row['energies'];
	echo "<tr>";
	echo "<td>";
	$idx=$mitroo."/".$id;
	?>
	<a href="#" onClick="window.open('simvmeet2.php?data=<?php echo $idx; ?>',' ','width=900,height=700')"><?php echo $id; ?></a>
	<?php
	echo "</td>";
	echo "<td>".$date."</td>";
	echo "<td>".$timefrom."</td>";
	echo "<td>".$timeto."</td>";
	echo "<td>".$perigrafi."</td>";
	echo "<td>".$energies."</td>";
	echo "</tr>";
	$i++;
}
echo "<tr>";
echo "<td colspan='6'>";
$sqlx=mysqli_query($con,"select MAX(id) as mid from simvrantevou");
$rowx=mysqli_fetch_array($sqlx);
$id=$rowx['mid']+1;
$idx=$mitroo."/".$id;
?>
<a href="#" onClick="window.open('simvmeet2.php?data=<?php echo $idx; ?>',' ','width=700,height=600')"><?php echo "<b>".'Νέα Συνέντευξη'."</b>"; ?></a>
<?php
echo "</td>"."</tr>"; 
echo "</table>";
?>	
<br /><br />
<input type="button" name="epistrofi" value="Επιστροφή" onClick="self.close()"> 
</body>
</html>