if (strstr($ModPath, "..") || strstr($ModStart, "..") || stristr($ModPath, "script") || stristr($ModPath, "cookie") || stristr($ModPath, "iframe") || stristr($ModPath, "applet") || stristr($ModPath, "object") || stristr($ModPath, "meta") || stristr($ModStart, "script") || stristr($ModStart, "cookie") || stristr($ModStart, "iframe") || stristr($ModStart, "applet") || stristr($ModStart, "object") || stristr($ModStart, "meta")) { die; } if (!function_exists("Mysql_Connexion")) { include "mainfile.php"; } include "modules/{$ModPath}/archive-stories.conf.php"; include "modules/{$ModPath}/cache.timings.php"; if (!isset($start)) { $start = 0; } include "header.php"; // Include cache manager if ($SuperCache) { $cache_obj = new cacheManager(); $cache_obj->startCachingPage(); } else { $cache_obj = new SuperCacheEmpty(); } if ($cache_obj->genereting_output == 1 or $cache_obj->genereting_output == -1 or !$SuperCache) { if ($arch_titre) { echo $arch_titre; } echo ' <hr /> <table id ="lst_art_arch" data-toggle="table" data-striped="true" data-search="true" data-show-toggle="true" data-mobile-responsive="true" data-icons-prefix="fa" data-icons="icons"> <thead> <tr> <th data-sortable="true" data-halign="center">' . translate("Articles") . '</th> <th data-sortable="true" data-halign="center" data-align="right">' . translate("reads") . '</th> <th data-halign="center" data-align="right">' . translate("Posted on") . '</th>
function viewarticle($artid, $page) { global $NPDS_Prefix, $prev, $user, $numpage; $numpage = $page; if (file_exists("sections.config.php")) { include "sections.config.php"; } if ($page == '') { sql_query("UPDATE " . $NPDS_Prefix . "seccont SET counter=counter+1 WHERE artid='{$artid}'"); } $result_S = sql_query("SELECT artid, secid, title, content, counter, userlevel FROM " . $NPDS_Prefix . "seccont WHERE artid='{$artid}'"); list($artid, $secid, $title, $Xcontent, $counter, $userlevel) = sql_fetch_row($result_S); list($secid, $secname, $rubid) = sql_fetch_row(sql_query("SELECT secid, secname, rubid FROM " . $NPDS_Prefix . "sections WHERE secid='{$secid}'")); list($rubname) = sql_fetch_row(sql_query("SELECT rubname FROM " . $NPDS_Prefix . "rubriques WHERE rubid='{$rubid}'")); $tmp_auto = explode(',', $userlevel); while (list(, $userlevel) = each($tmp_auto)) { $okprint = autorisation_section($userlevel); if ($okprint) { break; } } if ($okprint) { $old_title = $title; $pindex = substr(substr($page, 5), 0, -1); if ($pindex != '') { $pindex = ' - ' . translate("Next Page") . ' ' . $pindex; } if ($sections_chemin) { $title = aff_langue($rubname) . ' - ' . aff_langue($secname) . ' - ' . aff_langue($title) . ' ' . $pindex; } else { $title = aff_langue($title) . ' ' . $pindex; } include "header.php"; $title = aff_langue($old_title); global $SuperCache; if ($SuperCache) { $cache_obj = new cacheManager(); $cache_obj->startCachingPage(); } else { $cache_obj = new SuperCacheEmpty(); } if ($cache_obj->genereting_output == 1 or $cache_obj->genereting_output == -1 or !$SuperCache) { $words = sizeof(explode(' ', $Xcontent)); if ($prev == 1) { echo '<input type="button" value="' . translate("Back to console") . '" onclick="javascript:history.back()" /><br /><br />'; } if (function_exists("themesection_title")) { themesection_title($title); } else { echo '<h3>' . $title . '</h3>'; } echo '<p class="text-muted">(' . $words . ' ' . translate("total words in this text)") . ' - ' . translate("read:") . ' ' . $counter . ' ' . translate("times") . ' <a href="sections.php?op=printpage&artid=' . $artid . '" title="' . translate("Printer Friendly Page") . '" data-toggle="tooltip" ><i class="fa fa-print fa-lg"></i></a></p>'; preg_match_all('#\\[page.*\\]#', $Xcontent, $rs); $ndepages = count($rs[0]); if ($page != '') { $Xcontent = substr($Xcontent, strpos($Xcontent, $page) + strlen($page)); $multipage = true; } else { $multipage = false; } $pos_page = strpos($Xcontent, '[page'); $longueur = mb_strpos($Xcontent, ']', $pos_page, 'iso-8859-1') - $pos_page + 1; if ($pos_page) { $pageS = substr($Xcontent, $pos_page, $longueur); $Xcontent = substr($Xcontent, 0, $pos_page); $Xcontent .= ' <div class="center-block"> <ul class="pagination pagination-sm"> <li class="page-item disabled"><a class="page-link" href="#">' . $ndepages . ' pages</a></li>'; if ($pageS !== '[page0]') { $Xcontent .= ' <li class="page-item"><a class="page-link" href="sections.php?op=viewarticle&artid=' . $artid . '">' . translate("Top of the article") . '</a></li>'; } $Xcontent .= ' <li class="page-item active"><a class="page-link" href="#">' . preg_replace('#\\[(page)(.*)(\\])#', '\\1 \\2', $pageS) . '</a></li> <li class="page-item"><a class="page-link" href="sections.php?op=viewarticle&artid=' . $artid . '&page=' . $pageS . '" >' . translate("Next Page") . '</a></li> </ul> </div>'; } else { if ($multipage) { $Xcontent .= '<br /><br /><p class=""><a href="sections.php?op=viewarticle&artid=' . $artid . '&page=[page0]">' . translate("Top of the article") . '</a></p>'; } } $Xcontent = aff_code(aff_langue($Xcontent)); echo meta_lang($Xcontent); $artidtempo = $artid; if ($rubname != "Divers") { echo '<p><a class="btn btn-secondary" href="sections.php">' . translate("Return to Sections Index") . '</a></p>'; /* echo '<h4>***<strong>'.translate("Back to chapter:").'</strong></h4>'; echo '<ul class="list-group"><li class="list-group-item"><a href="sections.php?op=listarticles&secid='.$secid.'">'.aff_langue($secname).'</a></li></ul>'; $result3 = sql_query("SELECT artid, secid, title, userlevel FROM ".$NPDS_Prefix."seccont WHERE (artid<>'$artid' AND secid='$secid') ORDER BY ordre"); $nb_article = sql_num_rows($result3); if ($nb_article > 0) { echo '<h4>*<strong>'.translate("Other courses in chapter:").'</strong></h4>'; echo '<ul class="list-group">'; while (list($artid, $secid, $title, $userlevel) = sql_fetch_row($result3)) { $okprint2=autorisation_section($userlevel); if ($okprint2) { echo '<li class="list-group-item"><a href="sections.php?op=viewarticle&artid='.$artid.'">'.aff_langue($title).'</a></li>'; } } echo '</ul>'; }*/ } $artid = $artidtempo; $resultconnexe = sql_query("SELECT id2 FROM " . $NPDS_Prefix . "compatsujet WHERE id1='{$artid}'"); if (sql_num_rows($resultconnexe) > 0) { echo '<br />'; echo "<strong>" . translate("You may be interested in:") . "</strong>"; echo '<ul>'; while (list($connexe) = sql_fetch_row($resultconnexe)) { $resultpdtcompat = sql_query("SELECT artid, title, userlevel FROM " . $NPDS_Prefix . "seccont WHERE artid='{$connexe}'"); list($artid2, $title, $userlevel) = sql_fetch_row($resultpdtcompat); $okprint2 = autorisation_section($userlevel); if ($okprint2) { echo '<li><a href="sections.php?op=viewarticle&artid=' . $artid2 . '">' . aff_langue($title) . '</a></li>'; } } echo '</ul>'; } } sql_free_result($result_S); if ($SuperCache) { $cache_obj->endCachingPage(); } include 'footer.php'; } else { header("Location: sections.php"); } }
function fiche_detail($Xlid) { global $ModPath, $ModStart; include "header.php"; // Include cache manager global $SuperCache; if ($SuperCache) { $cache_obj = new cacheManager(); $cache_obj->startCachingPage(); } else { $cache_obj = new SuperCacheEmpty(); } if ($cache_obj->genereting_output == 1 or $cache_obj->genereting_output == -1 or !$SuperCache) { settype($xlid, 'integer'); $browse_key = $Xlid; $link_fiche_detail = "fiche_detail"; $inter = 'cid'; include "modules/sform/links/link_detail.php"; } if ($SuperCache) { $cache_obj->endCachingPage(); } include "footer.php"; }
function theindex($op, $catid, $marqeur) { include "header.php"; // Include cache manager global $SuperCache; if ($SuperCache) { $cache_obj = new cacheManager(); $cache_obj->startCachingPage(); } else { $cache_obj = new SuperCacheEmpty(); } if ($cache_obj->genereting_output == 1 or $cache_obj->genereting_output == -1 or !$SuperCache) { // Appel de la publication de News et la purge automatique automatednews(); global $theme; if ($op == "newcategory" or $op == "newtopic" or $op == "newindex" or $op == "edito-newindex") { aff_news($op, $catid, $marqeur); } else { if (file_exists("themes/{$theme}/central.php")) { include "themes/{$theme}/central.php"; } else { if ($op == "edito" or $op == "edito-nonews") { aff_edito(); } if ($op != "edito-nonews") { aff_news($op, $catid, $marqeur); } } } } if ($SuperCache) { $cache_obj->endCachingPage(); } include "footer.php"; }