0byt3m1n1-V2
Path:
/
home
/
nlpacade
/
www
/
fonctions
/
substitutions
/
[
Home
]
File: substitcontenu.php
<?php include_once("classes/Contenu.class.php"); include_once("classes/Contenudesc.class.php"); /* Substitutions de type contenu */ function substitcontenu($texte){ global $motcle, $id_contenu; $tcontenu = new Contenu(); $tcontenudesc = new Contenudesc(); if($id_contenu){ $tcontenu->charger($id_contenu); $tcontenudesc->charger($tcontenu->id, $_SESSION['navig']->lang); } $query = "select * from $tcontenu->table where id='$id_contenu'"; $resul = mysql_query($query, $tcontenu->link); $row = mysql_fetch_object($resul); $tcontenudesc->charger($row->id); $texte = str_replace("#CONTENU_ID", "$id_contenu", $texte); $texte = str_replace("#CONTENU_MOTCLE", "$motcle", $texte); $texte = str_replace("#CONTENU_NOM", $tcontenudesc->titre, $texte); $texte = str_replace("#CONTENU_CHAPO", $tcontenudesc->chapo, $texte); $texte = str_replace("#CONTENU_DESCRIPTION", $tcontenudesc->description, $texte); $texte = str_replace("#CONTENU_POSTSCRIPTUM", $tcontenudesc->postscriptum, $texte); return $texte; } ?>
©
2018.