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
| error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
date_default_timezone_set('Europe/Paris');
/** Include PHPExcel_IOFactory */
require_once 'classes/PHPExcel/IOFactory.php';
require_once 'classes/PHPExcel/Writer/PDF.php';
require_once 'classes/PHPExcel/Writer/PDF/DomPDF.php';
require_once 'fonctions/fonctions_user.php';
require_once 'fonctions/Dates.php';
require_once 'classes/class_constantes.php';
require_once 'fonctions/fonctions_generales.php';
$Afficher_Trace = Recup_Param("TRACE", "materiel_bloc_Feuille_IV_xls", "");
if ($Afficher_Trace == "O") {
$TRACE = TRUE;
}
else {
$TRACE = FALSE;
}
require_once 'classes/class_materiel.php';
$Class_Materiel = new materiel($GLOBALS['bdd']);
require_once 'classes/class_licencies.php';
$Class_Licencies = new licencies($GLOBALS['bdd']);
require_once 'classes/class_fabricant.php';
$Class_Fabricants = new fabricant($GLOBALS['bdd']);
$Repertoire = "documents/TIV/";
$FicherXLS = $Repertoire . "Feuille_IV.xls";
if (!file_exists($FicherXLS)) {
echo "<h2 id='msgerror'>Le fichier $FicherXLS est inconnu.<br>Merci de voir avec le service informatique</h2>";
die();
}
$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF;
$rendererLibrary = 'autoload.inc.php';
$rendererLibraryPath = 'DomPDF/' . $rendererLibrary;
if (!PHPExcel_Settings::setPdfRenderer($rendererLibrary,$rendererLibraryPath)){
die(
"<h2 id='msgerror'>NOTICE: Please set the $rendererName and $rendererLibraryPath values" .
"<br />" .
"at the top of this script as appropriate for your directory structure</h2>"
);
} |
Partager