1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<?php
error_reporting(E_ALL);
session_start();
header('Content-type: text/html; charset=utf-8');
include('includes/fonctions.php');
connexionbdd();
global $current_user;
get_currentuserinfo();
$type=$_POST['type'];
$dateAide=$_POST['dateAide'];
$nom=$_POST['nom'];
$prenom=$_POST['prenom'];
$nomcomplet=$nom.' '.$prenom;
$nreg=$_POST['nreg'];
$rue=$_POST['rue'];
$num=$_POST['num'];
$boite=$_POST['boite'];
$cp=$_POST['cp'];
$commune=$_POST['commune'];
$tel=$_POST['tel'];
$mail=$_POST['mail'];
$datej=$_POST['datej'];
$dateNaissance=$_POST['dateNaissance'];
$lieuNaissance=$_POST['lieuNaissance'];
$permis=$_POST['permis'];
$on = '<img src="images/permis_on.jpg" />';
$off = '<img src="images/permis_off.jpg" />';
if ($permis = 'B')
{
$permis_b = $on;
$permis_c = $off;
}
elseif ($permis = 'C')
{
$permis_b = $off;
$permis_c = $on;
}
//Nom du futur fichier.
$nom_fichier1 = 'permis/'.$nomcomplet.' - annexe_permis.doc';
$myContent_permis = file_get_contents("template_permis.doc");
$newFile1 = fopen("$nom_fichier1", "w");
$myContent_permis = str_replace("@NOMCOMPLET@",$nomcomplet,$myContent_permis);
$myContent_permis = str_replace("@NREG@",$nreg,$myContent_permis);
$myContent_permis = str_replace("@ADR",$adr,$myContent_permis);
$myContent_permis = str_replace("@CP",$cp,$myContent_permis);
$myContent_permis = str_replace("@TEL@",$tel,$myContent_permis);
$myContent_permis = str_replace("@MAIL@",$mail,$myContent_permis);
$myContent_permis = str_replace("@DATEJ@",$datej,$myContent_permis);
$myContent_permis = str_replace("@PERMIS_B@",$permis_b,$myContent_permis);
$myContent_permis = str_replace("@PERMIS_C@",$permis_c,$myContent_permis);
fwrite($newFile1,$myContent_permis);
fclose($newFile1);
?>
<center>
L'annexe au permis a bein été créer
</center>
<br><br> |
Partager