Statistiques du site

Voici les statistiques du site datant des 7 derniers jours.
Ces données sont indicatives et ne peuvent être utilisées pour toute mesure légale d'audience du site.

"; $requete = mysql_query("SELECT * from stats order by id desc"); $dernier_id = mysql_result($requete,0,"id"); $id_dernier = $dernier_id-8; if ($id_dernier < "0") { $id_dernier = "0"; } $requete = mysql_query("SELECT * from stats where id > $id_dernier order by id desc LIMIT 1,7"); $res = mysql_numrows($requete); if ($res != "0") { // MEILLEURS SCORES $requete_best_vu = mysql_query("SELECT * from stats where id > $id_dernier order by vu desc"); $date_best_vu = mysql_result($requete_best_vu,0,"date"); if ($date_actuel == $date_best_vu) { $date_best_vu = mysql_result($requete_best_vu,1,"date"); } $requete_best_topic = mysql_query("SELECT * from stats where id > $id_dernier order by topic desc"); $date_best_topic = mysql_result($requete_best_topic,0,"date"); if ($date_actuel == $date_best_topic) { $date_best_topic = mysql_result($requete_best_topic,1,"date"); } $requete_best_post = mysql_query("SELECT * from stats where id > $id_dernier order by post desc"); $date_best_post = mysql_result($requete_best_post,0,"date"); if ($date_actuel == $date_best_post) { $date_best_post = mysql_result($requete_best_post,1,"date"); } $requete_best_prive = mysql_query("SELECT * from stats where id > $id_dernier order by prive desc"); $date_best_prive = mysql_result($requete_best_prive,0,"date"); if ($date_actuel == $date_best_prive) { $date_best_prive = mysql_result($requete_best_prive,1,"date"); } $requete_best_connect = mysql_query("SELECT * from stats where id > $id_dernier order by connect desc"); $date_best_connect = mysql_result($requete_best_connect,0,"date"); if ($date_actuel == $date_best_connect) { $date_best_connect = mysql_result($requete_best_connect,1,"date"); } $requete_best_inscription = mysql_query("SELECT * from stats where id > $id_dernier order by inscription desc"); $date_best_inscription = mysql_result($requete_best_inscription,0,"date"); if ($date_actuel == $date_best_inscription) { $date_best_inscription = mysql_result($requete_best_inscription,1,"date"); } $requete_best_login = mysql_query("SELECT * from stats where id > $id_dernier order by login desc"); $date_best_login = mysql_result($requete_best_login,0,"date"); if ($date_actuel == $date_best_login) { $date_best_login = mysql_result($requete_best_login,1,"date"); } // TABLEAU STATS echo ""; $i = "0"; WHILE ($i != $res) { $j = $i; $date = mysql_result($requete,$j,"date"); $topic = mysql_result($requete,$j,"topic"); $post = mysql_result($requete,$j,"post"); $prive = mysql_result($requete,$j,"prive"); $login = mysql_result($requete,$j,"login"); $vu = mysql_result($requete,$j,"vu"); $inscription = mysql_result($requete,$j,"inscription"); $connect = mysql_result($requete,$j,"connect"); echo ""; $i++; } echo "

Date

Sujets

Posts

MP

Connexions

Pages vues

Inscriptions

Max. connect.

$date

"; if ($date == $date_best_topic) { echo "$topic"; } else { echo "$topic"; } echo "

"; if ($date == $date_best_post) { echo "$post"; } else { echo "$post"; } echo "

"; if ($date == $date_best_prive) { echo "$prive"; } else { echo "$prive"; } echo "

"; if ($date == $date_best_login) { echo "$login"; } else { echo "$login"; } echo "

"; if ($date == $date_best_vu) { echo "$vu"; } else { echo "$vu"; } echo "

"; if ($date == $date_best_inscription) { echo "$inscription"; } else { echo "$inscription"; } echo "

"; if ($date == $date_best_connect) { echo "$connect"; } else { echo "$connect"; } echo "

"; $total_topic = @mysql_result(mysql_query("select max(id) from topic"),0,0); $total_post = @mysql_result(mysql_query("select max(id) from post"),0,0); $total_mp = @mysql_result(mysql_query("select max(id) from prive"),0,0); $total_membre = @mysql_result(mysql_query("select count(id) from membres"),0,0); $total_vu = mysql_result(mysql_query("select sum(vu) from stats"),0,0); echo "
"; $max_topic = mysql_fetch_row(mysql_query("SELECT date,topic from stats order by topic desc LIMIT 0,1")); $max_post = mysql_fetch_row(mysql_query("SELECT date,post from stats order by post desc LIMIT 0,1")); $max_vu = mysql_fetch_row(mysql_query("SELECT date,vu from stats order by vu desc LIMIT 0,1")); $max_prive = mysql_fetch_row(mysql_query("SELECT date,prive from stats order by prive desc LIMIT 0,1")); $max_inscription = mysql_fetch_row(mysql_query("SELECT date,inscription from stats order by inscription desc LIMIT 0,1")); $max_connect = mysql_fetch_row(mysql_query("SELECT date,connect from stats order by connect desc LIMIT 0,1")); echo "

Total (approximatif)
$total_vu Pages vues.
$total_topic Sujets postés.
$total_post Messages postés.
$total_mp Messages Privés envoyés
".uptime()."
Taille de la base : ".dbsize()."

"; $nbr_icq = mysql_result(mysql_query("select count(id) from membres where icq != ''"),0,0); $pr_icq = round(100 * $nbr_icq / $total_membre,2); $nbr_msn = mysql_result(mysql_query("select count(id) from membres where msn != ''"),0,0); $pr_msn = round(100 * $nbr_msn / $total_membre,2); $nbr_aim = mysql_result(mysql_query("select count(id) from membres where aim != ''"),0,0); $pr_aim = round(100 * $nbr_aim / $total_membre,2); $moyenne_post = round($total_post / $total_membre,"2"); $dernier_membre = mysql_result(mysql_query("SELECT pseudo from membres order by id desc"),"0","pseudo"); $membre_actif = mysql_result(mysql_query("SELECT pseudo from membres order by nbr_message desc"),"0","pseudo"); echo "

A propos des membres
$total_membre Membres inscrits.
Environ $moyenne_post Post par membre.
Membre le plus actif : $membre_actif
Dernier arrivant : $dernier_membre
$pr_aim % de possesseurs de AIM
$pr_msn % de possesseurs de MSN
$pr_icq % de possesseurs de ICQ

Records
Sujets : $max_topic[1] ($max_topic[0])
Posts : $max_post[1] ($max_post[0])
MP : $max_prive[1] ($max_prive[0])
Pages vues : $max_vu[1] ($max_vu[0])
Inscriptions : $max_inscription[1] ($max_inscription[0])
Max. Connect : $max_connect[1] ($max_connect[0])

"; echo "
"; } mysql_close(); ?>