/*****************************************************************************/ /* Aztek Forum - PHP/Mysql forum */ /* Copyright (C) 2003, 2004 Le Guilcher Yannick */ /* */ /* This file is part of Aztek Forum. */ /* */ /* Aztek Forum is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License, or */ /* (at your option) any later version. */ /* */ /* Aztek Forum is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with Aztek Forum; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* */ /* Contact: webmaster@forum-aztek.com */ /* Website: http://www.forum-aztek.com */ /*****************************************************************************/ /********************************************/ /* Gestion de sécurité des variables entrantes */ /********************************************/ include("./common/safety.php"); /***************************************/ /* Initialise les données et fonctions */ /***************************************/ include("./index/init.php"); /************************************/ /* Exécute une action si nécessaire */ /************************************/ switch($action){ // Affiche la prévisualisation case "prev": include("./index/prev.php"); exit; break; // Mot de passe oublié case "new_passwd": $message=random_passwd($login); break; // Changement de mot de passe case "passwd": $message=modify_passwd($new_passwd_1,$new_passwd_2,$old_passwd); break; // On se logue case "login": if(empty($login)) $login=""; if(empty($cookie)) $cookie=""; $message=login($login, $passwd, $cookie); break; // Modifie le profil case "profile": if(!isset($show_email)) $show_email=0; if(!isset($alert_mp)) $alert_mp=0; if(!isset($other)) $other=""; if(!isset($fast_view)) $fast_view=0; if(!isset($smiley)) $smiley=0; if(!isset($avatar)) $avatar=""; $message=profile($email, $show_email, $alert_mp, $avatar, $town, $text, $url, $smiley, $msn, $aim, $skype, $yahoo, $icq, $other, $fast_view); break; // Déconnexion du membre case "disconnect": $message=disconnect(); break; // Nouvelle inscription case "subscribe": if(empty($cookie)) $cookie=""; if(empty($show_email)) $show_email=""; $message=subscribe($owner,$login,$passwd,$passwd2,$email,$show_email,$cookie); break; // Envoie un message sur une messagerie case "inbox_send": $message=inbox_send($recipient,$title,$text); break; // Vide les message supprimé de la corbeille case "inbox_purge": $message=inbox_purge(); break; // Change le sttut d'un message de la messgerie case "inbox_del": if(empty($select)) $select=0; inbox_del($select); break; // Déplace les rubriques case "move_cat": move_cat($id_cat, $dir); break; // Déplace les forums dans les rubriques case "move_forum": move_forum($id_forum, $dir); break; } /********************************/ /* Calcul les membres connectés */ /********************************/ if(!empty($PF["show_connected"])){ $expire=$SESSION_EXPIRE-$USER_CONNEXION_TIME; // Session php if($PHP_SESS_ENABLED){ // Recherche des connectés non invités $query = " SELECT atk_sessions.user, atk_sessions.session, atk_sessions.forum FROM atk_forums, atk_sessions WHERE atk_sessions.expire >= $expire AND atk_sessions.user <> 'nobody' AND atk_sessions.forum = atk_forums.id AND atk_forums.owner = '$owner' GROUP BY atk_sessions.session"; $sql = dbquery($query); // Recherche les connectés $ii = 0; $if = 0; while($row=mysql_fetch_array($sql)){ $SESS_USE[$row["session"]] = 1; $CONNECTED_INDEX[$ii++]=$row["user"]; $CONNECTED_INDEX_USER[$row["user"]]=1; } // Session fait "maison" } else { $query = " SELECT atk_sessions.user, atk_users.email, atk_users.show_email, atk_sessions.ip, atk_sessions.forum FROM atk_forums, atk_sessions LEFT OUTER JOIN atk_users ON atk_sessions.user=atk_users.login WHERE atk_sessions.expire >= $expire AND atk_sessions.forum = atk_forums.id AND atk_forums.owner = '$owner'"; $sql = dbquery($query); // Recherche les connectés $ii = 0; $NOBODY_INDEX = 0; $if = 0; $NOBODY_FORUM = 0; while($row=mysql_fetch_array($sql)){ // Enlève le dernier nombre de l'ip pour les no_ip qui changent toujours d'ip... ereg ("([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})", $row["ip"], $regs); $row["ip"] = $regs[1] . "." . $regs[2] . "." . $regs[3]; if($row["user"]=="nobody" && empty($IP_index[$row["ip"]])){ $IP_index[$row["ip"]]=1; $NOBODY_INDEX++; } if($row["user"]!="nobody" && empty($CONNECTED_INDEX_USER[$row["user"]])){ $CONNECTED_INDEX[$ii++]=$row["user"]; $CONNECTED_INDEX_USER[$row["user"]]=1; } } } } /**********************************/ /* Ne mets pas les pages en cache */ /**********************************/ no_cache(); /************************/ /* Début Affichage HTML */ /************************/ echo "
"; // Va chercher les metatags meta_tags(); // Récupère la feuille de style echo ""; echo ""; echo ""; /*******************************/ /* Options de personnalisation */ /*******************************/ // Mise en place du Fade if($PF["fade_link"] OR $PF["fade_icon"]) include("./javascript/Fade.js"); // Inclusion du fichier d'entete if($PF["top_url"] && substr($PF["top_url"],0, 7) != "http://") @include($PF["top_url"]); /***********************/ /* Affichage principal */ /***********************/ // Affichage du tableau principal qui contient tout echo "| ";
// Affichage du titre
// Affichage du titre
if($PF["url_title"]) echo " " . $PF["title"] . " "; // Affichage du texte d'intro if(!$PF["top_url"] && $PF["intro"]) echo "" . $PF["intro"] . " " . $LANG["GET-YOUR-FORUM"];
echo " - " . $LANG["ADMINISTRATION"] . "";
echo " - " . $LANG["MyStats"] . "";
echo " |