Samx Here
n1udSecurity


Server : Apache
System : Linux webd348.cluster026.gra.hosting.ovh.net 5.15.148-ovh-vps-grsec-zfs-classid #1 SMP Thu Feb 8 09:41:04 UTC 2024 x86_64
User : hednacluml ( 122243)
PHP Version : 8.3.9
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
Directory :  /home/hednacluml/jobs/tmp/cache/skel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/hednacluml/jobs/tmp/cache/skel/html_8d3827c7ae7d58c5598e7ae96e8a2695.php
<?php

/*
 * Squelette : plugins/auto/article_pdf/article_pdf.html
 * Date :      Fri, 20 Sep 2024 15:23:00 GMT
 * Compile :   Fri, 20 Sep 2024 16:45:23 GMT
 * Boucles :   _rubrique_mere, _auteurs, _keywords, _yahoo, _principale
 */ 

function BOUCLE_rubrique_merehtml_8d3827c7ae7d58c5598e7ae96e8a2695(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'rubriques';
		$command['id'] = '_rubrique_mere';
		$command['from'] = array('rubriques' => 'spip_rubriques');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("rubriques.titre",
		"rubriques.lang");
		$command['orderby'] = array();
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	$command['where'] = 
			array(
quete_condition_statut('rubriques.statut','!','publie',''), 
			array('=', 'rubriques.id_rubrique', sql_quote($Pile[$SP]['id_rubrique'], '','bigint(21) NOT NULL AUTO_INCREMENT')));
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = Spip\Compilateur\Iterateur\Factory::create(
		"SQL",
		$command,
		array('plugins/auto/article_pdf/article_pdf.html','html_8d3827c7ae7d58c5598e7ae96e8a2695','_rubrique_mere',18,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	lang_select($GLOBALS['spip_lang']);
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
		$t0 .= interdire_scripts(texte_script(((($a = supprimer_tags(pdf_first_clean(supprimer_numero(supprimer_numero(typo($Pile[$SP]['titre'], "TYPO", $connect, $Pile[0])))))) OR (is_string($a) AND strlen($a))) ? $a : '')));
		lang_select();
	}
	lang_select();
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_rubrique_mere @ plugins/auto/article_pdf/article_pdf.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_auteurshtml_8d3827c7ae7d58c5598e7ae96e8a2695(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'auteurs';
		$command['id'] = '_auteurs';
		$command['from'] = array('auteurs' => 'spip_auteurs','L1' => 'spip_auteurs_liens');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("auteurs.nom");
		$command['orderby'] = array();
		$command['join'] = array('L1' => array('auteurs','id_auteur'));
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	$command['where'] = 
			array(
quete_condition_statut('auteurs.statut','!5poubelle','!5poubelle',''), 
			array('=', 'L1.id_objet', sql_quote($Pile[$SP]['id_article'], '','bigint(21) NOT NULL DEFAULT \'0\'')), 
			array('=', 'L1.objet', sql_quote('article')));
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = Spip\Compilateur\Iterateur\Factory::create(
		"SQL",
		$command,
		array('plugins/auto/article_pdf/article_pdf.html','html_8d3827c7ae7d58c5598e7ae96e8a2695','_auteurs',22,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t1 = interdire_scripts(texte_script(((($a = pdf_first_clean(safehtml(supprimer_numero(typo($Pile[$SP]['nom'], "TYPO", $connect, $Pile[0]))))) OR (is_string($a) AND strlen($a))) ? $a : '')));
		$t0 .= ((strlen($t1) && strlen($t0)) ? ', ' : '') . $t1;
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_auteurs @ plugins/auto/article_pdf/article_pdf.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_keywordshtml_8d3827c7ae7d58c5598e7ae96e8a2695(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'mots';
		$command['id'] = '_keywords';
		$command['from'] = array('mots' => 'spip_mots','L1' => 'spip_mots_liens');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("mots.titre");
		$command['orderby'] = array();
		$command['join'] = array('L1' => array('mots','id_mot'));
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	$command['where'] = 
			array(
			array('=', 'L1.id_objet', sql_quote($Pile[$SP]['id_article'], '','bigint(21) NOT NULL DEFAULT \'0\'')), 
			array('=', 'L1.objet', sql_quote('article')));
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = Spip\Compilateur\Iterateur\Factory::create(
		"SQL",
		$command,
		array('plugins/auto/article_pdf/article_pdf.html','html_8d3827c7ae7d58c5598e7ae96e8a2695','_keywords',23,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t1 = interdire_scripts(texte_script(((($a = supprimer_tags(pdf_first_clean(supprimer_numero(typo($Pile[$SP]['titre'], "TYPO", $connect, $Pile[0]))))) OR (is_string($a) AND strlen($a))) ? $a : '')));
		$t0 .= ((strlen($t1) && strlen($t0)) ? ', ' : '') . $t1;
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_keywords @ plugins/auto/article_pdf/article_pdf.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_yahoohtml_8d3827c7ae7d58c5598e7ae96e8a2695(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!($id_rubrique = intval($Pile[$SP]['id_rubrique'])))
		return '';
	include_spip('inc/rubriques');
	$hierarchie = calcul_hierarchie_in($id_rubrique,true);
	if (!$hierarchie) return "";
	
	if (!isset($command['table'])) {
		$command['table'] = 'rubriques';
		$command['id'] = '_yahoo';
		$command['from'] = array('rubriques' => 'spip_rubriques');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("rubriques.titre",
		"rubriques.lang");
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	$command['orderby'] = array("FIELD(rubriques.id_rubrique, $hierarchie)");
	$command['where'] = 
			array(
			array('IN', 'rubriques.id_rubrique', "($hierarchie)"));
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = Spip\Compilateur\Iterateur\Factory::create(
		"SQL",
		$command,
		array('plugins/auto/article_pdf/article_pdf.html','html_8d3827c7ae7d58c5598e7ae96e8a2695','_yahoo',24,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	lang_select($GLOBALS['spip_lang']);
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
		$t0 .= (
' ' .
interdire_scripts(texte_script(((($a = supprimer_tags(pdf_first_clean(supprimer_numero(supprimer_numero(typo($Pile[$SP]['titre'], "TYPO", $connect, $Pile[0])))))) OR (is_string($a) AND strlen($a))) ? $a : ''))) .
' - ');
		lang_select();
	}
	lang_select();
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_yahoo @ plugins/auto/article_pdf/article_pdf.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_principalehtml_8d3827c7ae7d58c5598e7ae96e8a2695(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'articles';
		$command['id'] = '_principale';
		$command['from'] = array('articles' => 'spip_articles');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("articles.id_rubrique",
		"articles.id_article",
		"articles.date_redac",
		"articles.date",
		"articles.surtitre",
		"articles.titre",
		"articles.soustitre",
		"articles.chapo",
		"articles.descriptif",
		"articles.texte",
		"articles.ps",
		"articles.date_modif",
		"articles.lang");
		$command['orderby'] = array();
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	$command['where'] = 
			array(
quete_condition_statut('articles.statut','publie,prop,prepa/auteur','publie',''), 
quete_condition_postdates('articles.date',''), 
			array('=', 'articles.id_article', sql_quote(($Pile[0]['id_article'] ?? null), '','bigint(21) NOT NULL AUTO_INCREMENT')));
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = Spip\Compilateur\Iterateur\Factory::create(
		"SQL",
		$command,
		array('plugins/auto/article_pdf/article_pdf.html','html_8d3827c7ae7d58c5598e7ae96e8a2695','_principale',10,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	lang_select($GLOBALS['spip_lang']);
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
		$t0 .= (
'

	$conf_url_site = \'' .
texte_script(((($a = url_absolue(vider_url(urlencode_1738(generer_objet_url($Pile[$SP]['id_article'], 'article', '', '', true))))) OR (is_string($a) AND strlen($a))) ? $a : '')) .
'\' ;
	$conf_nom_site = \'' .
interdire_scripts(texte_script(((($a = supprimer_tags(pdf_first_clean(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0])))) OR (is_string($a) AND strlen($a))) ? $a : ''))) .
'\' ;

	// Recuperation et definition des differents elements

	$site=\'' .
interdire_scripts(texte_script(((($a = supprimer_tags(pdf_first_clean(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0])))) OR (is_string($a) AND strlen($a))) ? $a : ''))) .
'\';
	$rubrique=\'' .
(($t1 = BOUCLE_rubrique_merehtml_8d3827c7ae7d58c5598e7ae96e8a2695($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
		$t1 :
		(interdire_scripts(texte_script(((($a = supprimer_tags(pdf_first_clean(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0])))) OR (is_string($a) AND strlen($a))) ? $a : ''))))) .
'\';
	$DateParution=\'' .
texte_script(((($a = pdf_first_clean(affdate(normaliser_date($Pile[$SP]['date_redac'])))) OR (is_string($a) AND strlen($a))) ? $a : '')) .
'\';
	$DateMiseEnLigne=\'' .
interdire_scripts(texte_script(((($a = nom_jour(normaliser_date($Pile[$SP]['date']))) OR (is_string($a) AND strlen($a))) ? $a : ''))) .
' ' .
interdire_scripts(texte_script(((($a = pdf_first_clean(affdate(normaliser_date($Pile[$SP]['date'])))) OR (is_string($a) AND strlen($a))) ? $a : ''))) .
'\';

	/*$auteur=\'' .
BOUCLE_auteurshtml_8d3827c7ae7d58c5598e7ae96e8a2695($Cache, $Pile, $doublons, $Numrows, $SP) .
'\';*/
	$motsclef=\'' .
BOUCLE_keywordshtml_8d3827c7ae7d58c5598e7ae96e8a2695($Cache, $Pile, $doublons, $Numrows, $SP) .
'\';
	$yahoo=\'-' .
BOUCLE_yahoohtml_8d3827c7ae7d58c5598e7ae96e8a2695($Cache, $Pile, $doublons, $Numrows, $SP) .
'\';

	$logo_site=\'' .
texte_script(extraire_attribut(quete_html_logo(quete_logo('id_syndic', 'ON', "'0'", ''), '', ''),'src')) .
'\';
	$logo_site = preg_replace(\',[?][0-9]+$,\',\'\',$logo_site);
	// attention à l\'ordre des filtres SPIP
	$logo_fichier=\'' .
extraire_attribut(texte_script(((($a = quete_html_logo(quete_logo('id_article', 'ON', $Pile[$SP]['id_article'], $Pile[$SP]['id_rubrique']), '', '')) OR (is_string($a) AND strlen($a))) ? $a : '')),'src') .
'\'; //fonctionne correctement
	$logo_fichier = preg_replace(\',[?][0-9]+$,\',\'\',$logo_fichier);
//  ' .
(($t1 = strval(vider_url(urlencode_1738(generer_objet_url($Pile[$SP]['id_article'], 'article', '', '', true)))))!=='' ?
		('$logo_lien="' . $t1 . '";') :
		'') .
'

	' .
(($t1 = strval(interdire_scripts(texte_script(((($a = supprimer_tags(pdf_first_clean(typo($Pile[$SP]['surtitre'], "TYPO", $connect, $Pile[0])))) OR (is_string($a) AND strlen($a))) ? $a : '')))))!=='' ?
		('$surtitre=\'' . $t1 . '\';') :
		'') .
'
	' .
(($t1 = strval(interdire_scripts(texte_script(((($a = supprimer_tags(pdf_first_clean(supprimer_numero(supprimer_numero(typo($Pile[$SP]['titre'], "TYPO", $connect, $Pile[0])))))) OR (is_string($a) AND strlen($a))) ? $a : '')))))!=='' ?
		('$titre=\'' . $t1 . '\';') :
		'') .
'
	' .
(($t1 = strval(interdire_scripts(texte_script(((($a = supprimer_tags(pdf_first_clean(typo($Pile[$SP]['soustitre'], "TYPO", $connect, $Pile[0])))) OR (is_string($a) AND strlen($a))) ? $a : '')))))!=='' ?
		('$soustitre=\'' . $t1 . '\';') :
		'') .
'
	' .
(($t1 = strval(interdire_scripts(texte_script(((($a = pdf_first_clean(propre($Pile[$SP]['chapo'], $connect, $Pile[0]))) OR (is_string($a) AND strlen($a))) ? $a : '')))))!=='' ?
		('$chapo=\'' . $t1 . '\';') :
		'') .
'
	' .
(($t1 = strval(interdire_scripts(texte_script(((($a = pdf_first_clean(propre($Pile[$SP]['descriptif'], $connect, $Pile[0]))) OR (is_string($a) AND strlen($a))) ? $a : '')))))!=='' ?
		('$descriptif=\'' . $t1 . '\';') :
		'') .
'
	' .
(($t1 = strval(interdire_scripts(texte_script(((($a = pdf_first_clean(abs_url(filtrer('image_graver', filtrer('image_reduire',propre($Pile[$SP]['texte'], $connect, $Pile[0]),'400','400'))))) OR (is_string($a) AND strlen($a))) ? $a : '')))))!=='' ?
		('$texte= \'' . $t1 . '\';') :
		'') .
'
	' .
(($t1 = strval(interdire_scripts(texte_script(((($a = pdf_first_clean(propre($Pile[$SP]['ps'], $connect, $Pile[0]))) OR (is_string($a) AND strlen($a))) ? $a : '')))))!=='' ?
		('$ps=\'' . $t1 . '\';') :
		'') .
'
	' .
(($t1 = strval(interdire_scripts(texte_script(((($a = pdf_first_clean(calculer_notes())) OR (is_string($a) AND strlen($a))) ? $a : '')))))!=='' ?
		('$notes=\'' . $t1 . '\';') :
		'') .
'

	$copyright = \'' .
texte_script(((($a = pdf_first_clean(_T('articlepdf:copyright'))) OR (is_string($a) AND strlen($a))) ? $a : '')) .
interdire_scripts(texte_script(((($a = supprimer_tags(pdf_first_clean(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0])))) OR (is_string($a) AND strlen($a))) ? $a : ''))) .
texte_script(((($a = pdf_first_clean(_T('articlepdf:tous_droits_reserves'))) OR (is_string($a) AND strlen($a))) ? $a : '')) .
'\';

	$id_article = "' .
$Pile[$SP]['id_article'] .
'";

	$files_pdf = \'' .
interdire_scripts(pdf_nommer_ancien(supprimer_numero(typo($Pile[$SP]['titre'], "TYPO", $connect, $Pile[0])),'article',$Pile[$SP]['id_article'])) .
'\';
	$file_out = _DIR_STOCK_PDF . $files_pdf ;

	$files_pdf_new = \'' .
interdire_scripts(pdf_nommer(supprimer_numero(typo($Pile[$SP]['titre'], "TYPO", $connect, $Pile[0])),'article',$Pile[$SP]['id_article'])) .
'\';
	$file_out_new = _DIR_STOCK_PDF . $files_pdf_new ;

	//creer un pdf avec un nouveau nom que si un ancien n\'existe pas
	if (!file_exists($file_out)) {
		$file_out = $file_out_new ;
		$files_pdf = $files_pdf_new;
	}

	if (file_exists($file_out))
	{
		clearstatcache();
		$damo = date(\'YmdHi\' , strtotime("' .
normaliser_date($Pile[$SP]['date_modif']) .
'")) ;
		$dage = date(\'YmdHi\' , filemtime($file_out)) ;
		if ($damo > $dage)
		{
			unlink($file_out);
		}
	}

	');
		lang_select();
	}
	lang_select();
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_principale @ plugins/auto/article_pdf/article_pdf.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}

//
// Fonction principale du squelette plugins/auto/article_pdf/article_pdf.html
// Temps de compilation total: 30.018 ms
//

function html_8d3827c7ae7d58c5598e7ae96e8a2695($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0) {

	if (isset($Pile[0]["doublons"]) AND is_array($Pile[0]["doublons"]))
		$doublons = nettoyer_env_doublons($Pile[0]["doublons"]);

	$connect = '';
	$page = (
'<'.'?php header("X-Spip-Cache: 0"); ?'.'>'.'<'.'?php header("Cache-Control: no-cache, must-revalidate"); ?'.'><'.'?php header("Pragma: no-cache"); ?'.'><?php

	// Mode release => 
	$debug=0;
	// Mode debug => 
	#$debug=1;

	' .
(($t1 = BOUCLE_principalehtml_8d3827c7ae7d58c5598e7ae96e8a2695($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
		('
	' . $t1 . '
	') :
		('
	header("Location: index.php");
	exit;
	')) .
'

	if ($debug == 1 && file_exists($file_out))
	{
		unlink($file_out);
	}

	if (!file_exists($file_out))
	{

		define(\'FPDF_FONTPATH\',_DIR_FPDF_LIB.\'font\');
		include_spip(_DIR_FPDF_LIB.\'fpdf\');
		include_spip(\'pdf/lib_pdf_global\');
		include_spip(\'pdf/lib_pdf_spip\');

		//--------------------------------
		// Debut génération du PDF
		//--------------------------------
		$pdf=new PDF_SPIP();
		$pdf->debug=$debug;

		$pdf->SetCompression(false);
		$pdf->SetDisplayMode(\'fullpage\', \'single\');

		// haut, gauche,  bas, droite
		$pdf->SetAllMargins(12,15,12,10);

		$pdf->SetTitle($titre);
		$pdf->SetCreator($site);
		$pdf->SetCopyright($copyright);
		$pdf->SetSubject($rubrique);
		$pdf->SetKeywords($motsclef);

		$pdf->Build($file_out);

		$lier_pdf = pipeline(\'build_pdf\',array(
			\'args\'=>array(
				\'objet\' 	=> \'article\',
				\'id_objet\' 	=> $id_article,
				\'file_name\' => $files_pdf
			),
			\'data\'=> $file_out,
    	));

	}

	$id_document = isset($lier_pdf[\'data\'][$file_out]) ? $lier_pdf[\'data\'][$file_out] : 0;
	if($id_document > 0){
		$file_out = \'' .
vider_url(urlencode_1738(generer_objet_url('$id_document', 'document', '', '', true))) .
'\';
	}

		// Vous voulez afficher un pdf
		header("Content-type: application/pdf");
	//Si on est en mutualisé avec masquages des vraies urls d\'images
	if (stripos($GLOBALS[\'spip_pipeline\'][\'affichage_final\'],\'mutualisation_url_img_courtes\')){
		$file_out = str_replace(_DIR_IMG,_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES,$file_out);
	}
	// Affiche le PDF directement dans l\'onglet de Firefox
	header("location: ". url_de_base() . $file_out);

	exit;
');

	return analyse_resultat_skel('html_8d3827c7ae7d58c5598e7ae96e8a2695', $Cache, $page, 'plugins/auto/article_pdf/article_pdf.html');
}

SAMX