<?php
session_start();
if (!isset($_SESSION['login'])) {
header ('Location: ../index.php');
exit();
}
/******************************************************************************************************************************************************
Connexion à la base
******************************************************************************************************************************************************/
include "../../connect/fc-phpconnect.php";
/*****************************************************************************************************************************************************
Récupération des données de la première ligne.
*****************************************************************************************************************************************************/
$date1 = $_POST['date_realisation'][1];
$date2 = $_POST['date_encodage'][2];
$user = $_SESSION['nom'];
$ref = $_POST['ref'][1];
$nom = $_POST['nom'][1];
$adr = $_POST['adr'][1];
$code = $_POST['postal'][1];
$commune = $_POST['commune'][1];
$address_mac = $_POST['mac'][1].":".$_POST['mac'][2].":".$_POST['mac'][3].":".$_POST['mac'][4].":".$_POST['mac'][5].":".$_POST['mac'][6] ;
$tech = $_POST['technicien'];
$heure_debut = $_POST['ha'][1].":".$_POST['ha'][2];
$heure_fin = $_POST['hd'][1].":".$_POST['hd'][2];
$telephone = $_POST['tel'][1];
$installation = $_POST['installation'];
$commentaire = $_POST['com'][1];
/*****************************************************************************************************************************************************
Insertion dans la base de la ligne 1.
*****************************************************************************************************************************************************/
$sql = "INSERT INTO prestation_beta (date_realisation, date_encodage, nom_utilisateur, ref_client, nom_client, adr_client, code_postal, commune, adr_modem, technicien, heure_debut, heure_fin, telephone, etat_installation, commentaire) values ( '".$date1."','".$date2."','".$user."','".$ref."','".$nom."','".$adr."','".$code."','".$commune."','".$address_mac."', '".$tech."','".$heure_debut."','".$heure_fin."','".$telephone."','".$installation."','".$commentaire."')";
$insert = mysql_query($sql) or die (mysql_error());
?>
<html>
<head>
</head>
<body>
<body background="../../img/grd-4px.gif">
<?php
echo "Merci les informations sont enregistrées.";
?>
<p align="center"><b><a href="../prestations/vdcabling.php">
<font size="4"><?php echo"" .$_SESSION['nom'];?> pour une prestation supplémentaire merci de cliquez ici</font></a></b></p>
<p><b><font color="#FF0000">
<a href="../deconnexion.php"><font color="#FF0000">Déconnexion</font></a>
</body>
</font>
</b>
</p>
</body>
</html>
Partager