0) { $tpl->box['pseudovisit'] = $tpl->gettemplate("index","ifloggued"); if($_USER['lastpost']>0) { $_USER['lastpost'] = getlocaltime($_USER['lastpost']); $tpl->box['pseudovisit'] .= $tpl->gettemplate("index","ifmsgposted"); } else $tpl->box['pseudovisit'] .= $tpl->gettemplate("index","ifnomsgposted"); } else $tpl->box['pseudovisit'] = $tpl->gettemplate("index","ifnotloggued"); if(!empty($_FORUMCFG['indexnews'])) { $_FORUMCFG['indexnews'] = getformatrecup($_FORUMCFG['indexnews']); $tpl->box['boxnews'] = $tpl->gettemplate("index","newsbox"); } else $tpl->box['boxnews'] = NULLSTR; //////////////////////////////////////////////////////////////////////////////// // #### gestion des connectés #### ///////////////////////////////////////////// $InfoMember = get_connected(); if($_FORUMCFG['conn_accueil'] == "Y") { $tpl->box['statsconnectes'] = NULLSTR; $tpl->box['nb_connected'] = $tpl->attlang("board_connected"); if(!empty($InfoMember['listconnected']) && strlen($InfoMember['listconnected'])>0) { if($_GENERAL[0]) $tpl->box['statsconnectes'] = $tpl->gettemplate("entete","statsconnectes"); $tpl->box['listconnected'] = $tpl->gettemplate("entete","listconnectes"); } else $tpl->box['listconnected'] = NULLSTR; $tpl->box['boxconnected'] = $tpl->gettemplate("entete","boxconnectes"); } else $tpl->box['boxconnected'] = ""; $cache .= $tpl->gettemplate("index","boxaccueil"); //////////////////////////////////////////////////////////////////////////////// // #### stats maximum connectés //////////////////////////////////////////////// $_FORUMCFG['timetopmembers'] = getlocaltime($_FORUMCFG['timetopmembers']); if($InfoMember['nbmembres'] > $_FORUMCFG['topmembers']) { $updusers = $sql->query("UPDATE ".$_PRE."config SET valeur=\"".$InfoMember['nbmembres']."\" WHERE options='topmembers'"); $updusers = $sql->query("UPDATE ".$_PRE."config SET valeur=\"".time()."\" WHERE options='timetopmembers'"); } ///////////////////////////////////////////////////////////////////////////////// // #### Affichage catégories + forums + modos #### ////////////////////////////// $query = $sql->query("SELECT * FROM ".$_PRE."categorie ORDER BY catorder"); $nb = mysql_numrows($query); $tpl->box['affforumcontent'] = NULLSTR; $tpl->box['linknewmsg'] = NULLSTR; if ($nb==0) $tpl->box['affforumcontent'] .= $tpl->gettemplate("index","nocat"); else { $TabForum = array(); $TabModos = array(); $sqlforums = $sql->query("SELECT * FROM ".$_PRE."forums ORDER BY forumcat,forumorder"); $nbforums = mysql_numrows($sqlforums); if($nbforums>0) while($TabForum[] = mysql_fetch_array($sqlforums)); $sqlmodo = $sql->query("SELECT * FROM ".$_PRE."moderateur ORDER BY forumident,modoorder"); $nbmodos = mysql_numrows($sqlmodo); if($nbmodos>0) while($TabModos[] = mysql_fetch_array($sqlmodo)); while($Cats = mysql_fetch_array($query)) { $tpl->box['forumlist'] = affforumlist($Cats['catid']); if(strlen($tpl->box['forumlist']) > 0) { $Cats['cattitle'] = getformatrecup($Cats['cattitle']); if(strlen($Cats['catcoment']) > 0) { $Cats['catcoment'] = getformatrecup($Cats['catcoment']); $tpl->box['catcoment'] = $tpl->gettemplate("index","catcoment"); } else $tpl->box['catcoment'] = ""; $tpl->box['affforumcontent'] .= $tpl->gettemplate("index","affcategorie"); $tpl->box['affforumcontent'] .= $tpl->box['forumlist']; } else $tpl->box['affforumcontent'] .= ""; } if(strlen($tpl->box['affforumcontent'])>0 && $_USER['userid']>0) $tpl->box['linknewmsg'] = $tpl->gettemplate("index","linknewmsg"); else $tpl->box['linknewmsg'] = " "; } ///////////////////////////////////////////////////////////////////////////////// // #### Recherche et affichage des messages privés #### ///////////////////////// if($_USER['userstatus']>1) { if($_USER['nbpmvu']==0) { $PrivateMsg['imgnewpm'] = "off"; $tpl->box['totalmsg'] = $tpl->attlang("nonewpm"); } else { $PrivateMsg['imgnewpm'] = "on"; if($_USER['nbpmvu']==1) $tpl->box['totalmsg'] = $tpl->attlang("onepm"); else eval("\$tpl->box['totalmsg']=\"".$tpl->attlang("multipm")."\";"); } $tpl->box['affforumcontent'] .= $tpl->gettemplate("index","boxpm"); } ///////////////////////////////////////////////////////////////////////////////// // #### Gestion anniversaire #### /////////////////////////////////////////////// $now = time(); if($_FORUMCFG['nextdailyupdate'] < $now) { updatebirth(); $sql->query("UPDATE ".$_PRE."config SET valeur='".(mktime(0,0,0,strftime("%m",$now),strftime("%d",$now),strftime("%Y",$now))+86400)."' WHERE options='nextdailyupdate'"); } if(strlen($_FORUMCFG['birth'])>0) $tpl->box['birth'] = $tpl->gettemplate("index","ifbirth"); else $tpl->box['birth'] = $tpl->attlang("ifnobirth"); ///////////////////////////////////////////////////////////////////////////////// // #### Affichage de la page #### /////////////////////////////////////////////// $tpl->box['fuseaux'] = getfuseauhoraire(); $_FORUMCFG['statlastmember'] = getformatrecup($_FORUMCFG['statlastmember']); $cache .= $tpl->gettemplate("index","accueilgeneral"); $tps = number_format(get_microtime() - $tps_start,4); $cache .= $tpl->gettemplate("baspage","endhtml"); $tpl->output($cache); ///////////////////////////////////////////////////////////////////////////////// ?>