<? include('lock.php');?> 
<? include('config.php');?>
<? include('welcome.php');?>
<? include('nav_start.php');?>
<? include('nav_di.php');?> 
<? include('style.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: 10px;
	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">πινακας ΑΠΥ</p>
<p align="center" class="style4"><a href="home.php" >επιστροφή στην αρχική σελίδα</a></p>
<table width="1200" cellpadding="2" cellspacing="2"  align="center">
  <p align="center"></p>
  <thead>
    <tr class="style1">
      <th width="15" align="left"> </th>
      <th width="350" align="left">Ονοματεπώνυμο</th>      
      <th width="250" align="center">Αρ.Επιταγής</th>
      <th width="80" align="center">Ημ.Αφιξ</th>
      <th width="80" align="center">Ημ.Αναχ</th>
      <th width="60" align="center">Δωμάτιο</th>
      <th width="120" align="center">ΑΠΥ ΟΑΕΔ</th>
      <th width="" align="center">in</th>
      <th width="150" align="center">ΑΠΥ ΠΕΛΑΤΗ</th>
      <th width="" align="center">in</th>
   </tr>
  
  <tbody>
  
  
  
  
  <? 
  
  $dataprs = mysql_query("SELECT Sum(epidotisi), Sum(simetoxi), Sum(dianiktere) FROM `oaed_thea` where `periodos`='A'  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` 
                         left join par_oaed
                         on par_oaed.id_pel=oaed_thea.id
                         left join par_pel
                         on par_pel.id_pel=oaed_thea.id
                         where `dik_ofel`='1'  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>

      <?  echo '<td align="legt"  style="font-size:10px";> <a href="dik_cart.php?id='.$rowtt['id'].'" title="εμφάνιση καρτέλας κράτησης">&nbsp;'.$rowtt['name'].' </a></td>'; ?>
      <td align="center"><?php echo $rowtt['epitagi'];?></td>      
      <td align="center"><?php echo $datein;?></td>
      <td align="center"><?php echo $dateout;?></td>
      <td align="center"><?php echo $rowtt['room'];?></td>
      <td align="center"><?php echo $rowtt['par_aa'];?></td>
    <? echo '<td align="center" width="80" span class="style29"><a href="add_apy.php?id=' . $rowtt['id'] . ' "><img src="images/kartela.png" title="επιδοτηση ΟΑΕΔ" style="width:15px;height:15px;" /></td>'?>  
      <td align="center"><?php echo $rowtt['par_aaa'];?></td>
       <? echo '<td align="center" width="80" span class="style29"><a href="add_apy_p.php?id=' . $rowtt['id'] . ' "><img src="images/kartela.png" title="συμμετοχη πελατη" style="width:15px;height:15px;" /></td>'?>   
     <?	 }  ?>
    
  </tbody>
</table>



</table>