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

<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);
}
</script>
<style type="text/css">
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid black;padding:2px;font-size:9pt; }
<p style="font-size:09px;"></p>


body {
    font: 0.8em/1em Verdana, Geneva, Arial, Helvetica, sans-serif;
    background-color:#FFF; }

#wrap {
   font-size: 1em/1.1em;
   width: 900px;
   padding: 15px;
   margin: 0 auto; 
   background-color: #fff;
   position: relative; }

/* These styles create the dropdown menus. */
#navbar {
   margin: 0;
   padding: 0;
   height: 1.2em; }
#navbar li {
   list-style: none;
   float: left; }
#navbar li a {
   display: block;
   padding: 3px 8px;
   background-color: #5e8ce9;
   color: #fff;
   text-decoration: none; }


#header h1 img { 
border: none; 
}  
 
</style>


</head>
<body>

<br /><br />
<h2>ΔΙΑΧΕΙΡΙΣΗ ΚΑΘΥΣΤΕΡΗΣΕΩΝ</h2>
<ul id="navbar">


<li class='has-sub'><a href='#' onClick="popupCenter('epistoli.php')"><span>ΔΗΜ. ΕΠΙΣΤΟΛΗΣ </span></a>
   </li>  
 <li class='has-sub'><a href='#'><span>|</span></a>
   </li> 
<li class='has-sub'><a href='#' onClick="popupCenter('smskath.php')"><span>ΑΠΟΣΤΟΛΗ SMS </span></a>
   </li>  
 <li class='has-sub'><a href='#'><span>|</span></a>
 </li> 
<li class='has-sub'><a href='#' onClick="popupCenter('mathitisp2d.php')"><span>ΔΕΛΤΙΟ ΑΠΟΒΟΛΗΣ </span></a>
   </li>  
 <li class='has-sub'><a href='#'><span>|</span></a> 
   </li>        
<li class='has-sub'><a href='#'><span><?php echo "Date: ".date('d-m-Y');?> </span></a>
   </li> 
 
</div>
<br /><br />
<?php


require("dbconnect.php");

$dt=date("Y-m-d");
$name = $_SESSION['n'];
$vdpmp=$_SESSION['usr'];
$tcode=$_GET['data'];
$_SESSION['mtim']=$tcode;
echo "<br>";
echo "ΗΜΕΡΟΜΗΝΙΑ : ".$dt;
echo "<br>";echo "<br>"; 
echo " ΒΟΗΘΟΣ : ".$name;
echo "<br>";echo "<br>";
$sql=mysqli_query($con,"select peramount,stu_id from timoria where timoriacode='$tcode'");
$row = mysqli_fetch_array($sql);
$pini=$row['peramount'];
$am=$row['stu_id'];
$_SESSION['am']=$am;
$_SESSION['mitroo']=$am;
$_SESSION['mitr']=$am;
$sql=mysqli_query($con,"select * from apousies where timoriacode='$tcode'");
$i=1;
while ($row = mysqli_fetch_array($sql)) 
{
	 $kath[$i]=$row['kath'];
	 $per[$i]=$row['period'];
	 $datet[$i]=$row['dateout'];
	 $tim[$i]=$i;
	 $i++;
}    

$_SESSION['datet']=$datet;
$_SESSION['kath']=$kath;
$_SESSION['per']=$per;
$_SESSION['pini']=$pini;
$_SESSION['tim']=$tim;

$sql = mysqli_query($con,"SELECT tmima,eponimo,onoma FROM allstudentinfo WHERE mitroo='$am' " );
$row = mysqli_fetch_array($sql);
$stname=$row['eponimo']."  ".$row['onoma'];
$tmima=$row['tmima'];
echo "Ποινή ".$pini." περιόδων για το μαθητή/τρια: ".$stname. " του τμήματος: ".$tmima;

?>
<br /><br />
<a  href="reptimokath.php" style="color:blue "  >  <button>Επιστροφή στην προηγούμενη οθόνη</button>  </a>
</body>
</html>