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
| <?php
include('configs/smarty.class.php');
require_once('configs/mysql.class.php');
$mysql = new MySQL;
$smarty = new MySmarty;
function insert_getContenu(){
$liste_news= $mysql->getNews();
$entetes= array();
$contenus= array();
$pieds= array();
foreach ($liste_news as $news) {
array_push($entetes, $news->entete);
array_push($contenus, $news->contenu);
array_push($pieds, $news->pied);
}
$smarty->assign('entetes', $entetes);
$smarty->assign('contenus', $contenus);
$smarty->assign('pieds', $pieds);
$smarty->assign('contenu', 'accueil.tpl');
}
$smarty->display('index.tpl');
?> |
Partager