<?php
session_start();
ob_start();
if ($_SESSION['islogin']=='' ) { 
  echo "ΠΡΕΠΕΙ ΝΑ ΕΓΓΡΑΦΕΙΤΕ ΓΙΑ ΝΑ ΧΡΗΣΙΜΟΠΟΙΗΣΕΤΕ ΤΟ ΣΥΣΤΗΜΑ"."<BR>";
  sleep(3);
  header("Location: loginall.php"); /* Redirect browser */
  exit();
  }
$menu = $_SESSION['menu'];
include $menu;
?><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</script>
<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, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=800, height=800, top='+top+', left='+left);
}

function submitform()
{
    document.forms["diagonismanew"].submit();
}

function pop_up(url){
window.open(url,'win2','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=no, width=1000, height=600, directories=no,location=no') 
}

</script>

<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:12px;"></p>
</style>

<?php
date_default_timezone_set("Europe/Athens");
require "dbconnect.php";
$dt=$_SESSION['dt'];
echo "<br>";
echo "ΣΤΟΙΧΕΙΑ ΕΚΠΑΙΔΕΥΤΙΚΩΝ"."<BR>";
$res = mysqli_query($con,"SELECT PMP,pass,Name,kinito  FROM teachers ORDER BY Name ");
 
echo "<table class='myTable' >
<tr style='border:1px solid black;font-size:12px'  >
<tr>
<th>A/A.</th>
<th>ΠΜΠ</th>
<th>ΚΩΔΙΚΟΣ</th>
<th>Ονοματεπώνυμο</th>
<th>Τηλέφωνο</th>
</tr>";	
$i=1;
  while ($row = mysqli_fetch_array($res)){
     $pmp=$row['PMP'];
	 $onoma=$row['Name'];
	 $kinito=$row['kinito'];
     $pas=$row['pass'];
     echo "<tr>";
     echo "<td>" . $i. "</td>";
     echo "<td>" . $pmp. "</td>";
     echo "<td>" . $pas. "</td>";
	 echo "<td>" . $onoma. "</td>";
     echo "<td>" . $kinito. "</td>";
     echo "</tr>"; 
$i++;
}
echo "</table>";

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