<? 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: #19315E;
}
.style4 {font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold;  color: #19315E; }
body {
	background-color: #FFFFFF;
}
.style8 {color: #003366}
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;
}
input[type=text] {
    padding: 0;
    height: 30px;
    position: relative;
    left: 0;
    outline: none;
    border: 1px solid #cdcdcd;
    border-color: rgba(0,0,0,.15);
    background-color: white;
    font-size: 14px;
}
input[type=date] {
    padding: 0;
    height: 30px;
    position: relative;
    left: 0;
    outline: none;
    border: 1px solid #cdcdcd;
    border-color: rgba(0,0,0,.15);
    background-color: white;
    font-size: 14px;
}
select{
    padding: 0;
    height: 30px;
    position: relative;
    left: 0;
    outline: none;
    border: 1px solid #cdcdcd;
    border-color: rgba(0,0,0,.15);
    background-color: white;
    font-size: 14px;
}
-->
</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>
  
    <tr class="style1">
      <th width="15" align="left"> </th>
      <th width="300" align="left">Ονοματεπώνυμο</th>
      <th width="100" align="center">ΑΦΜ</th>
      <th width="100" align="center">ΑΜΚΑ</th>
      <th width="250" align="center">Αρ.Επιταγής</th>
      <th width="60" align="center">Δωμάτιο</th>
      <th width="80" align="center">Ημ.Αφιξ</th>
      <th width="80" align="center">Ημ.Αναχ</th>
      <th width="60" align="center">Διαν/σεις</th>
      <th width="50" align="center">Επιδότηση</th>
      <th width="50" align="center">Συμμετοχή</th>    
    </tr>  
  <tbody>
  <?   
   $id= $_GET['id'];
   $ar_symb_a= $_GET['ar_symb'];
   
   
  $dataprof = mysqli_query($bd, "SELECT * FROM `oaed_thea` where `ar_symb` = '$ar_symb_a' ORDER BY `dik_ofel` DESC LIMIT 1 ") 
      or die(mysqli_error()); 
	     
      while($rowttof = mysqli_fetch_array( $dataprof )) 
 {   
 $aa_ar_ofel=$rowttof['dik_ofel']+1;
 
 }


 ?>
  
  
  
  
  
  
  <?   
  $counter="1";
  $us=$row['id'];
  $datapr = mysqli_query($bd, "SELECT * FROM `oaed_thea` where `id`='$id' ") 
      or die(mysqli_error()); 
	     
      while($rowtt = mysqli_fetch_array( $datapr )) 
 {
 
  $datein=date('d/m/Y',  strtotime($rowtt['date_in'])); 
  $dateout=date('d/m/Y',  strtotime($rowtt['date_out'])); 
 $ar_s=$rowtt['ar_symb'];

 ?>
    
     <? echo '<tr class="style1" style="background:',(($c=!$c)? '#FFFFFF' : '#FFFF99' ),'">';?>
    
      <td bgcolor="#DDDDDD" ><?php echo $counter++  ;?></td>
      <?     echo '<td align="legt"  style="font-size:12px";> <a href="dik_cart.php?id='.$rowtt['id'].'" title="εμφάνιση καρτέλας κράτησης">&nbsp;'.$rowtt['name'].' </a></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>
   
 
    
  </tbody>
</table>





<p>&nbsp;</p>
<p align="center" class="style7">Καταχώρηση ωφελούμενων</p>


	 <table border="0" align="center" >
	 
	 

	 
  
  <form method="post" action="in_of_oaed.php">
            
        <tr class="style1" bgcolor="#FFF">
          <td width="100" align="right" >Ονοματεπωνυνο<font color="red">*</font></td>
          <td width=""><input type="text" name="name" size="40" class="inputbox" required></td>
          <td width="50"> </td>
          <td align="right" >Α.Φ.Μ. </td>
          <td width=""><input type="text" name="afm" size="25" class="inputbox" ></td>
        </tr>
                
	<tr class="style1" bgcolor="#FFF">
          <td align="right" >Αρ. επιταγης </td>
          <td width="100"><input type="text" name="epitagi" size="40" class="inputbox" value="<?php echo $eptg;?>" ></td>
          <td width="50"> </td>
        <td align="right" >ΑΜΚΑ<font color="red">*</font> </td>
          <td width=""><input type="text" name="amka" size="25" class="inputbox" required></td>  
        </tr>
		<tr class="style1" bgcolor="#FFF">
  
          <td width="100" align="right" >&nbsp;</td>
          <td width="">&nbsp;</td>
           <td width="50"></td>
          <td width="100" align="right"  >&nbsp;</td>
          <td width="">&nbsp;</td>
          </tr>
        <tr class="style1" bgcolor="#FFF">
         <td width="100" align="right"  >Ημ.αφιξης</td>
          <td width=""><input type="date" name="date_in" size="25" class="inputbox" value="<?php echo $rowtt['date_in'];?>" readonly></td>
         
         <td width="50"> </td>
         
          <td width="100" align="right" >Ημ.αναχωρ</td>
          <td width=""><input type="date" name="date_out" size="25" class="inputbox" value="<?php echo $rowtt['date_out'];?>" readonly></td>
          </tr>
          
          <tr class="style1" bgcolor="#FFF">  
          <td width=""><input type="text" name="dianiktere" size="1" class="inputbox" value="<?php echo $rowtt['dianiktere'];?>" hidden>
          <td width=""><input type="text" name="epidotisi" size="1" class="inputbox" value="<?php echo $rowtt['epidotisi'];?>" hidden>
          <td width=""><input type="text" name="simetoxi" size="1" class="inputbox" value="<?php echo $rowtt['simetoxi'];?>" hidden>
          <td width=""><input type="text" name="imeres" size="1" class="inputbox" value="<?php echo $rowtt['imeres'];?>" hidden>
          <td width=""><input type="text" name="ar_symb" size="1" class="inputbox" value="<?php echo $rowtt['ar_symb'];?>" hidden>
          <td width=""><input type="text" name="dik_ofel" size="1" class="inputbox" value="<?php echo $aa_ar_ofel ;?>" hidden>
          <td width=""><input type="text" name="ar_ofel" size="1" class="inputbox" value="<?php echo $rowtt['ar_ofel'];?>" hidden>
        </tr>
          
          
          
         <tr class="style1" bgcolor="#FFF">  
         <td width="100" align="right" >πληθος δωματίων</td>
         <td width=""><input type="text" name="plithos_dom" size="1" class="inputbox" value="<?php echo $rowtt['plithos_dom'];?>" readonly>
         &nbsp;τυπος δωματιων<input type="text" name="typos_domatio" size="10" class="inputbox" value="<?php echo $rowtt['typos_domatio'];?>" hidden><? if ($rowtt['typos_domatio']=='1') echo ' ΜΟΝΟΚΛΙΝΟ/A';
                                                    if ($rowtt['typos_domatio']=='2') echo ' ΔΙΚΛΙΝΟ/A ';  
						    if ($rowtt['typos_domatio']=='3') echo ' ΤΡΙΚΛΙΝΟ/A ';  
						    if ($rowtt['typos_domatio']=='4') echo ' ΤΕΤΡΑΚΛΙΝΟ/Α ';  												?>
            </td>
           <td width="50"></td>
          <td width="100" align="right"  >περιοδος</td>
          <td width=""><input type="text" name="periodos" size="1" class="inputbox" value="<?php echo $rowtt['periodos'];?>" readonly>
            </td>
        </tr>
  
        <tr class="style1" bgcolor="#FFF">  
          <td width="100" align="right" >&nbsp;</td>
          <td width="">&nbsp;</td>
           <td width="50"></td>
          <td width="100" align="right"  >&nbsp;</td>
          <td width="">&nbsp;</td>
        </tr>
         <td width="100"> </td>
         
        
       <tr class="style1" bgcolor="#FFF">
    <td width="" align="right"  >αριθμός δωματιου/ων</td>
         <td width=""><input type="text" name="room" size="7" class="inputbox"  value="<?php echo $rowtt['room'];?>" readonly></td></td>
    <td width="50"><input type="text" name="hotel" size="5" class="inputbox" value="<?php echo $hotel;?>" hidden></td>
          <td width="" align="right" >συμφων. συμ/χή ατόμου<font color="red">*</font></td>
          <td width=""><input type="text" name="simf_simetox" size="10" class="inputbox" value="<?php echo $rowtt['simf_simetox'];?>" required> €</td>
        </tr>
        
         <tr class="style1" bgcolor="#FFF">
         <td width="100" align="right"  >Βασικός δικαούχος</td>
          <td width=""><input type="text" name="onoma_dik" size="25" class="inputbox" value="<?php echo $rowtt['onoma_dik'];?>" readonly></td>
         
         <td width="50"> </td>
         
          <td width="100" align="right" >Ημ.εξουσιοδότησης</td>
          <td width=""><input type="date" name="im_ex" size="25" class="inputbox" value="<?php echo $rowtt['im_ex'];?>" readonly></td>
          </tr>
        
        
</table>    
       
     <?	 }  ?>
   <p align="center"><input type="submit" name="submit" value="συνέχεια καταχώρησης" class="button"/>
   </p>
     <p align="center">-</p> 
 <p align="center"><button type="reset" value="Reset" class="button">ακύρωση εγγραφών</button></p>
<p align="center" class="style7">οφελουμενοι</p>
<p align="center" class="style4"></p>
<table width="1150" cellpadding="2" cellspacing="2"  align="center">
  <p align="center"></p>
  
    <tr class="style1">
      <th width="15" align="left"> </th>
      <th width="300" align="left">Ονοματεπώνυμο</th>
      <th width="100" align="center">ΑΦΜ</th>
      <th width="100" align="center">ΑΜΚΑ</th>
      
      <th width="250" align="center">Αρ.Επιταγής</th>
      
      <th width="60" align="center">Δωμάτιο</th>
      <th width="80" align="center">Ημ.Αφιξ</th>
       
        <th width="80" align="center">Ημ.Αναχ</th>
      
      <th width="60" align="center">Διαν/σεις</th>
      <th width="50" align="center">Επιδότηση</th>
      <th width="50" align="center">Συμμετοχή</th>
        <th width="20" align="left">del</th>
    </tr>
  
  <tbody>
  
  
  
  
  <? 
  
  $counter="1";
  $us=$row['id'];
  $datapr = mysqli_query($bd, "SELECT * FROM `oaed_thea` where `ar_symb`='$ar_s' and `dik_ofel` !='1' ORDER BY `dik_ofel` ASC ") 
      or die(mysqli_error()); 
	     
      while($rowtt = mysqli_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' : '#FFFF99' ),'">';?>
    
      <td bgcolor="#DDDDDD" ><?php echo $counter++  ;?></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" bgcolor="#FFffff"><a href="oaed_del.php?id= ' .$id . '"><img src="images/delete12.png" alt="del" height="12" width="12"></td>';?>
    
    
     <?	 }  ?>
    
  </tbody>
</table>