'; } else { //echo 'NOK
'; } $news = ''; setlocale (LC_ALL, 'fr_FR'); $listeNouvelles = get_list(); foreach($listeNouvelles as $nouvelle) { //$news .= '

' . ucfirst(strftime("%A%e %B",$nouvelle[4])) . '

'; $news .= '

' . stripslashes($nouvelle[1]) . '

'; $news .= '

' . str_replace('\"','"',stripslashes($nouvelle[2])) . '

'; } /** * Get article list */ function get_list() { global $dbid; $fields = array('article_id', 'article_title', 'article_content', 'article_timestamp', 'article_release_timestamp', 'article_creation_timestamp' ); $order_direction = 'DESC'; $order_field = 'ta.article_timestamp'; $where = ''; $sql = "SELECT " . n2s_database::fields('ta', $fields) . " FROM " . ARTICLE_TABLE . " AS ta WHERE ta.article_section = 'ACCUEIL' AND ta.article_release_timestamp <= " . n2s_time::current_timestamp() . " ORDER BY " . $order_field . " " . $order_direction . " LIMIT 0, 10;"; if ($res =& $dbid->query($sql)) { while ($res->fetchInto($row)) { //n2s_clean_output($row); $list[] = $row; } } if (isset($list)) { return $list; } } $navibar = getNavi(''); //echo $navibar; $titre = genTitre(''); $stuff = links(); $index = file_get_contents('documents/index.html', true); $desc = getDesc(''); $kword = getKword(''); // affichage $coquille = file_get_contents('modele/default.html',true); $page = str_replace('{title}', $titre,$coquille); $page = str_replace('{content}',$index,$page); $page = str_replace('{navibar}',$navibar,$page); $page = str_replace('{desc}',$desc,$page); $page = str_replace('{kword}',$kword,$page); $page = str_replace('{nouvelles}',$news,$page); $page = str_replace('{lang}',$_SESSION['Webtactik_Lang'],$page); $page = str_replace('{linkFace}',$stuff[$_SESSION['Webtactik_Lang']][3][1],$page); echo $page; ?>