| Current Path : /home/a/t/a/ataenra/www/ATA/INTRANET/GenPDF/2Synthese/ |
| Current File : /home/a/t/a/ataenra/www/ATA/INTRANET/GenPDF/2Synthese/genpdfsynthese.php |
<?php
//RECUPERATION DES DONNEES
//connexion a la base de donnée
require_once '../../Outils/co.php';
//recuperation les informations selon ID en get (page?ID=)
$ID = $_GET['ID'];
$Tp = $_GET['T'];
$A = $_GET['A'];
if($A =="Oui"){
$sth = $dbco->prepare("SELECT * FROM dossier D JOIN ".$Tp." P ON D.IDprojet = P.IDp JOIN client C ON D.IDclient = C.IDc JOIN simulationprime S ON S.IDps = D.IDprime WHERE ID = $ID");
$sth->execute();
$R = $sth->fetch(PDO::FETCH_OBJ);
}else{
$sth = $dbco->prepare("SELECT * FROM dossier D JOIN ".$Tp." P ON D.IDprojet = P.IDp JOIN client C ON D.IDclient = C.IDc WHERE ID = $ID");
$sth->execute();
$R = $sth->fetch(PDO::FETCH_OBJ);
}
$chemin ="../../../FICHIERS/$ID/Synthese";
// Création du nouveau répertoire
if(!is_dir($chemin)) {
mkdir($chemin, 0777,true);
}
$sth = $dbco->prepare("SELECT * FROM gest_routeur WHERE routeur_Famille = '".$R->typeprojet."'");
$sth->execute();
$I = $sth->fetch(PDO::FETCH_OBJ);
$table_gamme = $I->table_gamme;
$table_jointure = $I->table_jointure;
$table_jointure_access = $I->table_jointure_access;
$table_ensemble = $I->table_ensemble;
$table_produits = $I->table_produits;
$table_projet = $I->table_projet;
//FORMULAIRE SELON TYPE DE PROJET
require "Required/TypeProjet/syn_".$R->typeprojet.".php";
if($R->PrimeATA == "Non"){
require '../9JPgraph/genjpgraphqualitenr.php';
}
//LISTE DU MATERIEL
require "liste_articles.php";
//$pdf->Output("I", 'test');
$pdf->Output('F', '../../../FICHIERS/'.$ID.'/Synthese/synthese'.$ID.'.pdf');
header("location:../../../../index.php/agp");
?>