<?php
require 'database.inc.php';
//session_start();
//session_register("lg_user");
//session_register("lg_password");
//session_register("lg_admin");
//session_register("lg_menu1");
//session_register("lg_menu2");
//session_register("lg_menu3");
//session_register("lg_menu4");
//session_register("lg_menu5");
//session_register("lg_menu6");
if ((!empty($User)) && (!empty($Passwd))) {
	$lg_user = $User;
	$lg_password = $Passwd;
}
if (Test_User($lg_user, $lg_password) == TRUE) {
	$requette = "DELETE FROM absenceemploye" . ID_GARAGE . " WHERE NoClient='$NoClient' AND Debut='" . substr($Start, 0, 10) . "' AND DebutMA=" . substr($Start, 10, 1);
	if ($resultat = Connection::executeRawQuery($requette)) {
		echo "<script language=JavaScript>\n";
		echo "window.opener.location.reload();\n";
		echo "window.close();\n";
		echo "</script>\n";
	} else {
		echo $requette;
		echo "<BR>KO";
	}
}
