<?php 
include "scrinit.php";
include $menu;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>
<style type="text/css">
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid green;padding:2px;font-size:10pt; }
<p style="font-size:10px;"></p>
</style>

<title>Μέλος επιτροπής και Ομίλου</title>

<?php 
require("dbconnect.php");
$usr=$_SESSION['usr'];
$access=$_SESSION['access'];
$dt=$_SESSION['dt'];
$dtc= date('d-m-Y', strtotime($dt));

$sql = "SELECT code1,code2,code3,code4 from dilosiep where teach='$usr' ";
$result = $dbcon->prepare($sql);
$result->execute();
$count=$result->rowCount();
if ($count > 0)
{
$row =$result->fetch(PDO::FETCH_ASSOC);

$c1=$row['code1'];
$c2=$row['code2'];
$c3=$row['code3'];
$c4=$row['code4'];
	
$sql = "SELECT perigrafi from epitropes where code='$c1' ";	
$result = $dbcon->prepare($sql);
$result->execute();
$row =$result->fetch(PDO::FETCH_ASSOC);	
$per1=$row['perigrafi'];
$sql = "SELECT perigrafi from epitropes where code='$c2' ";	
$result = $dbcon->prepare($sql);
$result->execute();
$row =$result->fetch(PDO::FETCH_ASSOC);	
$per2=$row['perigrafi'];
$sql = "SELECT perigrafi from epitropes where code='$c3' ";	
$result = $dbcon->prepare($sql);
$result->execute();
$row =$result->fetch(PDO::FETCH_ASSOC);	
$per3=$row['perigrafi'];
$sql = "SELECT perigrafi from epitropes where code='$c4' ";	
$result = $dbcon->prepare($sql);
$result->execute();
$row =$result->fetch(PDO::FETCH_ASSOC);	
$per4=$row['perigrafi'];

echo "<b>"."ΜΕΛΟΣ ΣΤΙΣ ΕΠΙΤΡΟΠΕΣ:"."</b>"."<br>";
echo "<br>".$per1;
echo "<br>".$per2;
echo "<br>".$per3;
echo "<br>".$per4;
}
else
{
  echo "<b>"."ΔΕΝ ΕΙΣΤΕ ΜΕΛΟΣ ΣΕ ΕΠΙΤΡΟΠΗ"."</b>"."<br>";	
}
echo "<br>"."<br>";

echo "<b>"."ΜΕΛΟΣ ΣΤΟΝ ΟΜΙΛΟ:"."</b>"."<br>";
$sql = "SELECT o.omilos from omiloi as o, dilosiomilos as d where d.pmp='$usr' and d.code1=o.code ";
$result = $dbcon->prepare($sql);
$result->execute();
$count=$result->rowCount();
if ($count > 0)
{

$row =$result->fetch(PDO::FETCH_ASSOC);
$c1=$row['omilos'];
echo "<br>".$c1;
}
else
{
echo "<b>"."ΔΕΝ ΕΙΣΤΕ ΜΕΛΟΣ ΣΕ ΟΜΙΛΟ"."</b>"."<br>";		
}
?>
<br><br>
<br /><br />
<a  href=<?php echo $menu;?> style="color:blue "  > <button>Επιστροφή στο Μενού  </a>
</body>
</html>