
Forum » » Le coin des codeurs » » recuperer le code de la liste de forum apparaissant en bas
Posté : 22-11-2006 16:53 
!PHP!<!--meta
<?php
//menu des forums
if ($SuperCache) {
$cache_clef="forum-jump-to";
$CACHE_TIMINGS[$cache_clef]=600;
$cache_obj->startCachingBlock($cache_clef);
}
if (($cache_obj->genereting_output==1) or ($cache_obj->genereting_output==-1) or (!$SuperCache)) >{
echo "<form action=\"viewforum.php\" method=\"post\">";
echo "<select class=\"TEXTBOX_STANDARD\" name=\"forum\" onchange=\"submit();\"><option value=\"-1\">".translate("Select a Forum")."</option>";
$sub_sql = "SELECT forum_id, forum_name, forum_type, fo rum_pass FROM forums ORDER BY cat_id,forum_index,forum _id";
if ($res = mysql_query($su b_sql)) {
while (list($forum _id, $forum_name, $forum_type, $forum_pass)=mysql_fetch_array($r es)) {
if&nb sp;(($forum_type != "9") or ($userdata)) {
  ; if (($forum_type == "7") or ($forum_type == "5")) {
  ; $ok_affich=false;
  ; } else {
  ; $ok_affich=true;
  ; }
  ; if ($ok_affich) echo "<option value=\"$forum_id\"> ".stripslashes($forum_name)."</option>\n";
t>}
}
}
echo "</select></form>";
}
if ($SuperCache) {
$cache_obj->endCachingBlock($cache_clef);
}
?>
meta-->
Cet article provient de NPDS REvolution 16
https://lab.grottes-et-karsts-de-chine.org/viewtopic.php?topic=21540&forum=5