<?php
session_start();
ob_start();
$menu = $_SESSION['menu'];
include $menu;
?><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(function() {
 $("#tmimaid").bind("change", function() {
     $.ajax({
         url: "change.php",
         data: "tmimaid="+$("#tmimaid").val(),
         success: function(html) {
             $("#nameid").html(html);
         }
     });
 }); 
});


function popupCenter(pageURL, title, w, h) {
    var left = (screen.width / 2)  - (w / 2);
    var top  = (screen.height / 2) - (h / 2);
    var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=800, height=800, top='+top+', left='+left);
document.forms["carservice"].submit();	
}

function submitform()
{
    document.forms["carservice"].submit();
}

function pop_up(url){
window.open(url,'win2','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=800,height=800,directories=no,location=no') 
}

</script>

<style type="text/css">
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid black;padding:2px;font-size:11px; }
<p style="font-size:09px;"></p>
</style>

<?php
date_default_timezone_set("Europe/Athens");
require "dbconnect.php";
$usr=$_SESSION['usr'];
$ac=$_SESSION['access'];

if (isset($_POST['egki1']))
{
$type= $_POST['type'];	
$perigrafi= $_POST['perigrafi'];
$datein= $_POST['datein'];
$aranaf=$_POST['code'];
$datedue=$_POST['datedue'];
$bdresp = $_POST['bdres'];
$tresp = $_POST['tres'];
$status=$_POST['status'];
	
$sql="update egkiklioi set datein='$datein',datedue='$datedue',type='$type',perigrafi='$perigrafi',
bdres='$bdresp',tres='$tresp',user='$usr',status='$status' where id='$aranaf' "; 
 

if (!mysqli_query($con,$sql))
        {
         die('Error: ' . mysqli_error($con));
         }

   if (!$sql) 
   { 
   echo "error";
   }
  else
   {
	echo "<br>"."Η ενημέρωση των στοιχείων έγινε με επιτυχία ";
    echo "<br>"."<br>";
   }
}
  
?>
<br><br>
<a  href=<?php echo $menu;?> style="color:blue "  > <button> Επιστροφή στο Μενού   </a>

</body>
</html>