<? include('lock.php');?> 
<? include('config.php');?>
<? include('style.php');?> 
<? include('welcome.php');?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
input.numbox{
	width:30px;
	height:20px;
}
textarea.mainbox{
	width:200px;
	height:100px;
	font-size:30;
	font-weight:bold;
}
</style>

<style type="text/css">
<!--
.style1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	font-weight: bold;
	color: #333;
}
.style7 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 22px;
	font-weight: bold;
	color: #333;
}
.style4 {font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; }
a:link {
	color: #19315E;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #19315E;
}
a:hover {
	text-decoration: none;
	color: #19315E;
}
a:active {
	text-decoration: none;
	color: #19315E;
}
body {
	background-color: #FFFFFF;
}
.style8 {color: #003366}
-->
</style>
<p align="center" class="style7">πινακας δικαιουχων B΄περιόδου</p>
<p align="center" class="style4"><a href="home.php" >επιστροφή στην αρχική σελίδα</a></p>
<table width="1300" cellpadding="2" cellspacing="2"  align="center">
  <p align="center"></p>
  <thead> 
    <tr class="style1">
      <th width="15" align="left"> </th>
      <th width="80" align="left"> </th>
      <th width="350" align="left">Ονοματεπώνυμο</th>
      <th width="100" align="center">ΑΦΜ</th>
      <th width="100" align="center">ΑΜΚΑ</th>
      
      <th width="400" align="center">Αρ.Επιταγής</th>
      
      <th width="60" align="center">Δωμάτιο</th>
      <th width="80" align="center">Ημ.Αφιξ</th>
       
        <th width="80" align="center">Ημ.Αναχ</th>
      
      <th width="50" align="center">Διανυκτ</th>
      <th width="50" align="center">Επιδότηση</th>
      <th width="50" align="center">Συμμετοχή</th>
        <th width="20" align="left">del</th>
    </tr>
  
  <tbody>
  
  
  
  
  <? 
  
  $dataprs = mysql_query("SELECT Sum(epidotisi), Sum(simetoxi), Sum(dianiktere) FROM `oaed_thea` where `periodos`='d'   ORDER BY `date_in` ASC, `id` ASC ") 
      or die(mysql_error()); 
	     
      while($rowtts = mysql_fetch_array( $dataprs )) 
 {
    $sumepid=$rowtts['Sum(epidotisi)'];
    $sumsime=$rowtts['Sum(simetoxi)'];
    $sumdiak=$rowtts['Sum(dianiktere)'];
  }
  
  $counter="1";
  $us=$row['id'];
  $datapr = mysql_query("SELECT * FROM `oaed_thea` where `periodos`='d'   ORDER BY `date_in` ASC, `id` ASC ") 
      or die(mysql_error()); 
	     
      while($rowtt = mysql_fetch_array( $datapr )) 
 {
 
  $datein=date('d/m/Y',  strtotime($rowtt['date_in'])); 
  $dateout=date('d/m/Y',  strtotime($rowtt['date_out'])); 
 
 ?>
    
     <? echo '<tr class="style1" style="background:',(($c=!$c)? '#FFFFFF' : '#ccc' ),'">';?>
    
      <td bgcolor="#DDDDDD" ><?php echo $counter++  ;?></td>
      
      <td align="left"><? if ($rowtt['dik_ofel']=="1") echo ' ΔΙΚΑΙΟΥΧΟΣ ';
                          if ($rowtt['dik_ofel']!="1") echo ' ΩΦΕΛΟΥΜΕΝΟΣ ';  ?></td>
      <td align="left"><?php echo $rowtt['name'];?></td>
      <td align="center"><?php echo $rowtt['afm'];?> </td>
      <td align="center"><?php echo $rowtt['amka'];?></td> 
      <td align="center"><?php echo $rowtt['epitagi'];?></td>
      <td align="center"><?php echo $rowtt['room'];?></td>
      <td align="center"><?php echo $datein;?></td>
      <td align="center"><?php echo $dateout;?></td>
      <td align="center"><?php echo $rowtt['dianiktere'];?></td>
      <td align="right"><?php echo $rowtt['epidotisi'];?></td>
      <td align="right"><?php echo $rowtt['simetoxi'];?></td>
      
 
    <? echo '<td align="center" width="50" span class="style29"><a href="edit_dik.php?id=' . $rowtt['id'] . '">edit</td>'?>
    <? echo '<td align="center" bgcolor="#FFffff"><a href="oaed_del.php?id= ' .$rowtt['id'] . '"><img src="images/delete12.png" alt="del" height="12" width="12"></td>';?>
     <?	 }  ?>
    <? echo '<tr class="style1">';?>
      <td align="right"></td>   
      <td align="right"></td>   
      <td align="right"></td>
      <td align="right"></td>      
      <td align="right"></td>   
      <td align="right"></td>
      <td align="right"></td>  
       <td align="right"></td>  
      <td align="right" bgcolor="#CCCCCC" >Σύνολα</td>
      <td align="center" bgcolor="#CCCCCC" ><?php echo $sumdiak;?></td>
      <td align="right" bgcolor="#CCCCCC" ><?php echo $sumepid;?> </td>
      <td align="right" bgcolor="#CCCCCC" ><?php echo $sumsime;?></td> 
  </tbody>
</table>



</table>