[(#INCLURE{fond=controle_acces_article}{id_article})] $conf_url_site = "#URL_SITE_SPIP" ; $conf_nom_site = "[(#NOM_SITE_SPIP|pdf_first_clean)]" ; // Recuperation et definition des differents elements $site="[(#NOM_SITE_SPIP|pdf_first_clean)]"; $rubrique="[(#TITRE|supprimer_numero|pdf_first_clean)][(#NOM_SITE_SPIP|pdf_first_clean)]"; $date="[Première publication : (#DATE_REDAC|affdate|pdf_first_clean), et mis en ligne le ] [(#DATE|nom_jour)] [(#DATE|affdate|pdf_first_clean)]"; $auteur="[(#NOM|pdf_first_clean)]"; $motsclef="[(#TITRE|pdf_first_clean)]"; $yahoo="-- [(#TITRE|supprimer_numero|pdf_first_clean)] --"; [$logo_fichier="(#LOGO_ARTICLE_RUBRIQUE|fichier)";] [$logo_lien="(#URL_ARTICLE)";] [$surtitre="(#SURTITRE|pdf_first_clean)";] [$titre="(#TITRE|pdf_first_clean)";] [$soustitre="(#SOUSTITRE|pdf_first_clean)";] [$chapo="(#CHAPO|pdf_first_clean)";] [$descriptif="(#DESCRIPTIF|pdf_first_clean)";] [$texte= "(#TEXTE|pdf_first_clean)";] [$ps="(#PS|pdf_first_clean)";] [$notes="(#NOTES|pdf_first_clean)";] $id_article = #ID_ARTICLE ; $files_pdf = "article_".$id_article.".pdf" ; $file_out = $path_pdf . $files_pdf ; if (file_exists($file_out)) { header("Location: http://www.erasme.org"); clearstatcache ; $damo = date(YmdHi , strtotime("#DATE_MODIF")) ; $dage = date(YmdHi , filemtime($file_out)) ; if ($damo > $dage) {unlink($file_out); header("Location: http://www.erasme.org");} } header("Location: index.php"); exit; if (file_exists($file_out)&&($debug != 0)) { unlink($file_out); } if (! file_exists($file_out)) { define('FPDF_FONTPATH',$class_path.'font/'); require_once($class_path.'fpdf.php'); require_once($class_path.'lib_pdf_global.php'); require_once($class_path.'lib_pdf_spip.php'); //-------------------------------- // Debut génération du PDF //-------------------------------- $pdf->debug=$debug; $pdf=new PDF_SPIP(); $pdf->Open(); $pdf->SetDisplayMode (fullwidth, continuous); $pdf->SetTitle($titre); $pdf->SetCreator($site); $pdf->SetAuthor($auteur); $pdf->SetCompression(false); $pdf->SetSubject($rubrique); $pdf->SetKeywords($motsclef); $pdf->SetMargins(25,25); $pdf->SetAutoPageBreak(auto, 30); $pdf->AjouterChapitre() ; // Sortie $pdf->Output( $file_out ) ; } if (($debug == 0)&&(file_exists($file_out))) { header("location: ".$file_out."" ); } exit; ?>