<? include('lock.php');?> 
<? include('config.php');?>
<? include('style.php');?> 
<? include('welcome.php');?>
<? include('me1.php');?>

<!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" />
 
  
<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;
}
.style2 {
	color: #FF0000;
	font-weight: bold;
}
-->
</style>

</head>

<body>
<p>
<p align="center" class="style2">1 ατομο 
  <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
        <div align="center">ΔΥΠΑ: 
          <textarea name="text" cols="150" rows="10"></textarea>
          <br>
          <input name="συμπληρωση" type="submit" />
    </div>
</form>
  <?

function multiexplode ($delimiters,$string) {

    $ready = str_replace($delimiters, $delimiters[0], $string);
    $launch = explode($delimiters[0], $ready);
    return  $launch;
}

$text          = $_POST['text'];


$exploded = multiexplode(array(":",",",".","(",")","\n\r"),$text);





$str = $exploded [2];
$arr = explode(' ',$str);

$str1 = $exploded [9];
$arr1 = explode(' ',$str1);


$str2 = $exploded [7];
$arr2 = explode(' ',$str2);


//----------------------------------------


$str7 = $exploded [14];
$arr7 = explode(' ',$str7);

$str8 = $exploded [21];
$arr8 = explode(' ',$str8);


$str9 = $exploded [19];
$arr9 = explode(' ',$str9);

//-------------------------------------------

$str3 = $exploded [26];
$arr3 = explode(' ',$str3);

$str5 = $exploded [33];
$arr5 = explode(' ',$str5);


$str6 = $exploded [31];
$arr6 = explode(' ',$str6);

//-----------------------------------------

$str10 = $exploded [38];
$arr10 = explode(' ',$str10);

$str11 = $exploded [45];
$arr11 = explode(' ',$str11);


$str12 = $exploded [43];
$arr12 = explode(' ',$str12);

//---------------------------

$str4 = $exploded [32];
$arr4 = explode(' ',$str4);


?>
</p>
<p>&nbsp;</p>
<table width="100%" border="1">
<form method="post" action="in1_oaed.php" >
  <tr  class="style1" >
    
  <td width="29%">Ονοματεπωνυμο 
    <input type="text" name="name" size="40" class="inputbox"    value="<? echo $arr1 [1];?> <? echo $arr1 [2];?> "required/>  </td>
    <td width="25%">Αρ. επιταγης 
    <input type="text" name="epitagi" size="40" class="inputbox"    value="<? echo $arr2 [1];?> "required/></td>
    <td width="24%">Κατοικος 
    <input type="text" name="katoikos" size="40" class="inputbox"value="-"required/></td>
  </tr>
  
   <tr  class="style1" >
   <td width="22%">ΑΜΚΑ 
    <input type="text" name="amka" size="25" class="inputbox"  value="<? echo $arr [1];?> "required/></td>
	<td colspan="1"></td>
	<td width="22%">ΑΦΜ 
    <input type="text" name="afm" size="25" class="inputbox"  value="0"required/></td>
	</tr>
   <tr><td colspan="4">&nbsp;</td></tr>
   <tr class="style1" >
    <td>    πληθος δωματίων
             <select name="plithos_dom" >
              <option value="1" selected>1</option>
              <option value="2">2</option>
              <option value="3">3</option>
              <option value="4">4</option>
              <option value="5">5</option>
            </select></td>
    <td>αρ.δωματιου/ων 
      <input type="text" name="room" size="7" class="inputboxa"  /></td>
    <td colspan="2">τυπος δωματιων<select name="typos_domatio" >
              <option value="2" selected>δικλινο(α)</option>
              <option value="3">δικλινο(α) με προσθηκη κλινης</option>
              <option value="4">τρικλινο(α) με προσθηκη κλινης</option>
              <option value="5">σουιτα (5 ατομων)</option>
              <option value="6">σουιτα (5 ατομων) με προσθηκη κλινης</option>
                                 </select></td>
  </tr>
  <tr class="style1" >
    <td>Ημ.αφιξης
    <input type="date" name="date_in" size="25"   required></td>
    <td>Ημ.αναχωρ
    <input type="date" name="date_out" size="25"   required></td>
    <td>αρ. ωφελούμενων
    <select name="ar_ofel">
              <option value="0" selected>0</option>
              <option value="1">1</option>
              <option value="2">2</option>             
              <option value="3">3</option>
              <option value="4">4</option>
              <option value="5">5</option>
              <option value="6">6</option>
              <option value="7">7</option>
      </select></td>
    <td>περιοδος
      <select name="periodos">
        <option value="a">ΠΕΡΙΟΔΟΣ Α 2024-25</option>
        <option value="b" selected>ΠΕΡΙΟΔΟΣ Β 2024-25</option>
        
      </select></td>
  </tr>
   <tr><td colspan="4"><input type="text" name="hotel" size="5" class="inputbox" value="<? echo $hotel ?>" hidden> </td></tr>
  
  <tr class="style1" >
    <td>Εξουσ/μενος
      <input type="text" name="onoma_ex" size="25"  ></td>
    <td>Ημ.εξουσιοδοτησης
    <input type="date" name="im_ex" size="25"  ></td>
    <td colspan="2">Ιδιοτητα
    <select name="idiotita_ex">
              <option value=""selected></option> 
            <option value="γονέας των οφελούμενων">γονέας των οφελούμενων</option>
            <option value="σύζυγος" >σύζυγος</option>
            <option value="ενηλικος ωφελούμενος του δικαιουχου" >ενήλικος ωφελούμενος του δικαιούχου</option>
          </select></td>
  </tr>
</table>
<p align="center"><input type="submit" name="submit" value="συνέχεια καταχώρησης" class="inputsbt"/>
</p>
     
 
</body>
</html>