<?php
include "scrinit.php";
include $menu;
date_default_timezone_set("Europe/Athens");
require "dbconnect.php";
$usr=$_SESSION['usr'];
$dt=$_SESSION['dt'];  
?><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:1px solid black;padding:5px;font-size:14px; }
table.myTable tr {border-width: 1px;padding: 5px;border-color: black;border-style: solid;	}
<p style="font-size:09px;"></p>
</style>
<body>


<?php
$date=$dt;
$day = date('D', strtotime($dt));

?>
<TABLE>
<TR>
<TD style="color: red;weight:bold;"> ΥΠΟΣΤΗΡΙΚΤΙΚΟ ΥΛΙΚΟ
<div style="overflow:scroll; border:1px solid black;background:#F5F9F0;width:520px; height: 700px">
<?php
echo "<table style='width:500px' class='myTable' >
<tr style='border:1px solid black' >
<tr bgcolor='#66CC99'>
<th >Αρ.</th>
<th > ΣΥΝΤΟΜΗ ΠΕΡΙΓΡΑΦΗ ΠΕΡΙΕΧΟΜΕΝΟΥ </th>
<th > ΑΡΧΕΙΟ </th>
</tr>";
$q=mysqli_query($con,"select * from ypostiriktiko where code='1' order by datein");
$i=1;
while ($row = mysqli_fetch_array($q))
{
	$per=$row['perigrafi'];
	$fname=trim($row['filename']);
	
    echo "<tr>";
    echo "<td>".$i."</td>";
    echo "<td>".$per."</td>";
	echo "<td align='center'>";
	$arr=explode(".",$fname);
	$extns=$arr[1];
	switch ($extns)
	{
	case "pdf":
        $imgx="files/imgpdf.jpg";
        break;
	case "docx":
        $imgx="files/imgdocx.jpg";
        break;
	case "txt":
        $imgx="files/imgtxt.jpg";
        break;	
	}
	
	$lnk="ypostiriksi/".$fname;
	
	?>
	<a href="<?php echo $lnk;?>" target="_blank"><img src="<?php echo $imgx;?>" width="30" height="30" /></a>
	<?php
	echo "</td>";
	echo "</tr>";
    $i++;
}
echo "</table>";
?>
</div>
</TD>
<td></td>
<TD style="color: red;weight:bold;">ΥΛΙΚΟ ΓΙΑ ΑΝΑΠΛΗΡΩΣΕΙΣ

<div style="overflow:scroll; border:1px solid black;background:#F5F9F0;width:520px; height: 700px">
<?php
echo "<table style='width:500px' class='myTable' >
<tr style='border:1px solid black' >
<tr bgcolor='#66CC99'>
<th >Αρ.</th>
<th > ΣΥΝΤΟΜΗ ΠΕΡΙΓΡΑΦΗ ΠΕΡΙΕΧΟΜΕΝΟΥ </th>
<th > ΑΡΧΕΙΟ </th>
</tr>";
$q=mysqli_query($con,"select * from ypostiriktiko where code='2' order by datein");
$i=1;
while ($row = mysqli_fetch_array($q))
{
	$per=$row['perigrafi'];
	$fname=trim($row['filename']);
	
    echo "<tr>";
    echo "<td>".$i."</td>";
    echo "<td>".$per."</td>";
	echo "<td align='center'>";
	$arr=explode(".",$fname);
	$extns=$arr[1];
	switch ($extns)
	{
	case "pdf":
        $imgx="files/imgpdf.jpg";
        break;
	case "docx":
        $imgx="files/imgdocx.jpg";
        break;
	case "txt":
        $imgx="files/imgtxt.jpg";
        break;	
	}
	
	$lnk="ypostiriksi/".$fname;
	
	?>
	<a href="<?php echo $lnk;?>" target="_blank"><img src="<?php echo $imgx;?>" width="30" height="30" /></a>
	<?php
	
	echo "</td>";
	echo "</tr>";
    $i++;
}
echo "</table>";
?>
</div>
</td>
</tr>
</table>


</body>
</html>