<?php 
session_start();
?>
<head>
	<title>Visualsoft Office Manager - Ταμειακές</title>
	<link href="logos/ofm1.ico" rel="shortcut icon" type="image/x-icon"> 
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">	
</head>
<?php  

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

$tblName='tameiakes_errors';
$FocusField='btnClose'; 
// $PageName= basename($_SERVER['PHP_SELF']);
$MyFormName=str_replace('.php', '', basename($_SERVER['PHP_SELF']));
$RequiredField="Error_No";
$myTopCaption_Text="ΤΑΜΕΙΑΚΕΣ ΕΛΕΓΧΟΣ ΛΑΘΩΝ";
$closeCap=" Επιστροφή ";
$IDcField="IDError";
$CloseType="GoBack";
include 'include/header.php';	
?>

<html > 
 
<?php

//========================================
 
# echo "<br><br>======>>>>>>> Session IDError: " .$_SESSION['IDError'] ;
# print_r($_SESSION); 

$IDError = 0;$IDc = 0;$IDPelati = 0;$IDApp= 0;
$Tameiaki_Model='';$Eponymia='';$AFM='';$Tilefono='';$Kinito='';$email='';
 

$HmEggrafis= date_create('now')->format('d/m/Y'); 
// $ActivateStartDate=formatMyDate(date(),"MySqlToGr")

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

$IDError = $rs['IDError'];
$Tameiaki_Model=$rs['Tameiaki_Model'];
$Error_No=$rs['Error_No'];
$Error_Perigrafi = $rs['Error_Perigrafi'];
$Error_Solution= $rs['Error_Solution'];
$Sxolia=$rs['Sxolia'];
 
// ============================
            $nn=0; 
// ============================
include 'include/buttons_bar_top.php';  
?> 

<form name="<?= $MyFormName;?>" id="<?= $MyFormName;?>" method="post" action=""> 
 <body  OnLoad="javascript:onLoadFocus();"  >
 
 <div id="block_container" > 
 <div id="bloc1" class="fieldset2  " > 
	<h1>ΣΤΟΙΧΕΙΑ ΤΑΜΕΙΑΚΗΣ</h1> 
	<div class="row"  >
		<div class="col-20"><label class="b" for="Tameiaki_Model">Ταμειακή </label></div>
			<div class="col-30">
				<input type="text" hidden id="ID_Tam_Model" name="ID_Tam_Model"> </input>
				<input type="text" hidden id="Tameiaki_Model" name="Tameiaki_Model" value="<?= $Tameiaki_Model;?>"> </input>
				<select id="cboTameiaki_Model" name="cboTameiaki_Model"  title="Επιλογή Ταμειακής..." onclick="javascript:comboChange(this,'Tameiaki_Model','ID_Tam_Model');tam_model_update(document.getElementById('ID_Tam_Model').value);" > 
					<?php TameiakesModelsComboBoxMake($conn, $Tameiaki_Model); ?>
				</select>
			</div>
	</div>

	<div class="row"  >
		<div class="col-20"><label for="Error_No">Λάθος No</label></div>
		<div class="col-20"><input type="text" id="Error_No" name="Error_No" value="<?= $Error_No;?>"></div>
	</div>	
	
	<div class="row"  >
		<div class="col-20"><label for="Error_Perigrafi">Περιγραφή</label></div>
		<div class="col-80 textarea-container" style="position: relative; display: inline;">	
				<textarea name="Error_Perigrafi" id="Error_Perigrafi" style="padding-right:26px; min-height:60px;overflow-y:scroll;" value="<?php echo $Error_Perigrafi;?>" ><?php echo $Error_Perigrafi;?></textarea>
				<a class="btnMicrophone" style="position:absolute;top:6;right:28;" onclick="runSpeechRecognition('Error_Perigrafi');"></a>
		</div>
	</div>	 
	
	<div class="row"><hr></div>
	
 	<div class="row"  >
		<div class="col-20"><label for="Error_Solution">Λύση Solution</label></div>
		<div class="col-80 textarea-container" style="position: relative; display: inline;">	
			<textarea name="Error_Solution" id="Error_Solution" style="padding-right:26px; min-height:140px;overflow-y:scroll;" value="<?php echo $Error_Solution;?>" ><?php echo $Error_Solution;?></textarea>
			<a class="btnMicrophone" style="position:absolute;top:6;right:28;" onclick="runSpeechRecognition('Error_Solution');"></a>
		</div>
	</div>	 
</div>

 		<!-- =============================== basika stoixeia part2 =======================-->
 <div id="bloc2" class="fieldset2 "  > 
	<h1>ΣΗΜΕΙΩΣΕΙΣ</h1> 
 
 		<div class="row">
			<div class="col-100 textarea-container" style="position: relative; display: inline;">	
					<textarea name="Sxolia" id="Sxolia" style="padding-right:26px; min-height:280px;overflow-y:scroll;" value="<?php echo $Sxolia;?>" ><?php echo $Sxolia;?></textarea>
			</div>
		</div>	
</div>

</div>        
</body>

 
<?php
 # include 'include/buttons_bar_down.php';
?>
	 <Div style="visibility:hidden;  position:absolute; margin-left:150px; margin-top:-500; top:50; width:15%; float:inline;" >
		  <input type="text" name="IDError" id="IDError"   value="<?= $IDError;?>">
		  <input type="text" name="PageName" id="PageName" value="<?= $MyFormName.'.php';?>">
		  <input type="text" name="tblName" id="tblName" value="<?= $tblName;?>">
		  <input type="text" name="IDcField" id="IDcField" value="<?= $IDcField;?>">
		  <input type="text" name="IDc" id="IDc" value="<?= $IDc;?>">
		  <input type="text" name="CloseType" id="CloseType" value="<?= $CloseType;?>">
	 </div>	
</form>

<?php
  include 'include/del_yes_no.php';
    
?> 

<script language="JavaScript" type="text/JavaScript">

  var ep = document.getElementById("Tameiaki_Model");
ep.addEventListener("keypress", function(event) {
  if (event.key === 'Enter') {
	   event.preventDefault(); 
	    pelatis_select(ep.value);
   }
});
 
function myBlurFunction() {
   alert("Δεν έχει γίνει αποθήκευση της καρτέλας. Να γίνει αποθήκευση της καρτέλλας; ");
}
 

 
</script>
 
<script type="text/javascript" src="js/mycheck.js"></script>
<script type="text/javascript" src="js/datepicker.js"></script>  
<script language="JavaScript" type="text/JavaScript">
function pel_upd(){ 
pelatis_update(document.getElementById("IDPelati").value);
//eponymia_upd();
}
function opendoc(e) {
	window.open(e.value);
}
 
function cboPosModelChange() {
	
}
</script>
<?php 
 include 'include/footer2020.php';
?> 
</html>

 
 