<?php 
session_start();
 
if($_SESSION['CheckPWD']==false){
	header("Location: login.php");
}

$tblName='efories';
$IDcField='IDc';
$FocusField="Kodikos";
$RequiredField="DOY";
$CloseType="Close";
$MyFormName=str_replace('.php', '', basename($_SERVER['PHP_SELF']));
$myTopCaption_Text=" ΚΑΤΑΣΤΗΜΑΤΑ ΔΟΥ ";

//include 'include\Header.php';
# include 'myFunctions.php';
?>
 
<html > 
   <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,300italic,700&subset=latin,greek,greek-ext" rel="stylesheet" type="text/css">
	<head><meta name=”theme-color” content=”#999999” /></head>
	<link rel="shortcut icon" href="icons/Asthenis_24x24.ico" />
    <link rel="stylesheet" href="css/vsFormIstoriko.css" />  
	<link rel="stylesheet" href="css/vsButtons.css" />	
	<link rel="stylesheet" href="css/checkbox/chkBoxStyle2.css">
<?php
  include 'DelYesNo.php';
?>
 
<?php

//========================================
//        Patients Record Read
//========================================
$closeCap=" Επιστροφή ";
// print_r($_SESSION); 
$IDc=0;$DOY='';$Sxolia='';

if($conn == false){
	 echo 'Δεν υπαρχει συνδεση...<br>';
	  dbConnect();
}
   $IDc = gConvertField($_COOKIE[$IDcField], '0');
 $query = "SELECT * FROM ".$tblName . " WHERE ". $IDcField . "=" . $IDc ;
 
 //echo '<br>'. $query ;
$result = mysqli_query($conn, $query);
    $rs = mysqli_fetch_assoc($result);

$IDc = gConvertField($rs['IDc'],0);
$Kodikos=$rs['Kodikos'];
$DOY=$rs['DOY']; $Dnsi=$rs['Dnsi']; $TKPoli=$rs['TKPoli'];
$Til1=$rs['Til1']; $Til2=$rs['Til2']; $Sxolia=$rs['Sxolia'];

$isReserveChk="";
if ($isReserve=="-1"){$isReserveChk="checked";}
if($IDc==0){$LeftCap="Νέα εγγραφή";}else{$LeftCap="Μεταβολή εγγραφής";}
 
// ============================
   
// ============================
 
?> 

 <form  name="<?php echo $MyFormName;?>" id="<?php echo $MyFormName;?>" method="post" action="_rs.php"> 
 <body  OnLoad="javascript:onLoadFocus();"  >

 <div id="aa" class="vsBoxNew" style="margin-top:-5px;"  >
   <h1>
		<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" style="margin-top:1px;">
		<tr>
			<td align="left"> </td>
			<td style="font-weight:normal;width:220px;" align="center" class="titleRight"><?php echo $LeftCap ;?> </td>
		</tr>  
		</table>
   </h1>
   
    <div id="dataDiv" >

	<table border="0"  >
 		<tr>
			<td width="120px">
			<label for="IDc">Κωδικός</label>
			<input type="text" id="Kodikos" name="Kodikos"  required value="<?php echo $Kodikos;?>">
			</td>
			<td width="120px"></td>
 	    <td>
			 
		</td>
 
		</tr> 
		<tr>
			<td colspan="2">
			<label for="DOY">ΔΟΥ</label>
			<input type="text" id="DOY" name="DOY" required value="<?php echo $DOY;?>">
			</td>
		</tr>
		<tr>
			<td >
			<label for="Dnsi">Διεύθυνση</label>
			<input type="text" id="Dnsi" name="Dnsi" required value="<?php echo $Dnsi;?>">
			</td>
			<td >
			<label for="TKPoli">ΤΚ-Πόλη</label>
			<input type="text" id="TKPoli" name="TKPoli" required value="<?php echo $TKPoli;?>">
			</td>
		</tr>
 		<tr>
			<td >
			<label for="Til1">Τηλέφωνο 1</label>
			<input type="text" id="Til1" name="Til1" required value="<?php echo $Til1;?>">
			</td>
			<td >
			<label for="Til2">Τηλέφωνο 2</label>
			<input type="text" id="Til2" name="Til2" required value="<?php echo $Til2;?>">
			</td>
		</tr>
		
		<tr>
			<td colspan="2">
			<label for="Sxolia">Σημειώσεις</label><textarea name="Sxolia" id="Sxolia"  style="height:60px;" value="<?php echo $Sxolia;?>" ><?php echo $Sxolia;?></textarea>
			</td>
		</tr>
	</table>
 
 </div>

 </div>
 
<?php
  include 'include/ButtonsBarDown.php';
?>
	
 </body>
 
 <Div style="  position:absolute; margin-left:150px; margin-top: 150px; top:-500; width:20%; " >
	  <input type="text" name="PageName" id="PageName" value="<?php echo $MyFormName.'.php';?>">
	  <input type="text" name="isReserve" id="isReserve" value="<?php echo $isReserve;?>">
	  <input type="text" name="tblName" id="tblName" value="<?php echo $tblName;?>">
	  <input type="text" name="IDcField" id="IDcField" value="<?php echo $IDcField;?>"> 
	  <input type="text" id="IDc" name="IDc"  required value="<?php echo $IDc;?>">	  
	  <input type="text" name="CloseType" id="CloseType" value="<?php echo $CloseType;?>">
	  
 </div>	
				<!---   ΚΛΕΙΝΕΙ ΤΟ FRAME  visibility:hidden; --->
</form>

<?php 
  include 'js/vsFunctions.js';
?>
<script language="JavaScript" type="text/JavaScript"> 
  function confirmExit(){ window.close();}
</script> 


</html>

 
 