<?php
	$sPage="stats_month";
	require("admin/§lib_inc.php");
?>
<CENTER>
<BR>
<H1>Détail des visites du mois
<?php
	$indice_mois=isset($_REQUEST["indice_mois"])?$_REQUEST["indice_mois"] : -1; 
	$indice_annee=isset($_REQUEST["indice_annee"])?$_REQUEST["indice_annee"] : -1; 

	$sTitle  = decode_lng_text("STATS_MONTH_TITLE");
	$sTitle .= " ";
	$sTitle .= $indice_mois;
	$sTitle .= "/";
	$sTitle .= $indice_annee;

	require("§menu.php");
?>
</H1>
<BR>
<P><TABLE BORDER=1 WIDTH="60%" BGCOLOR=#c1c1FF BORDERCOLOR=#7777aa cellpadding=1 cellspacing=0>
<TR bgcolor=red align=center>
<TD><B><FONT COLOR=white><?php display_lng_text("STATS_DAY") ?></FONT></B></TD>
<TD><B><FONT COLOR=white><?php display_lng_text("STATS_VISITOR") ?></FONT></B></TD>
<TD><B><FONT COLOR=white><?php display_lng_text("STATS_PAGE") ?></FONT></B></FONT></TD></TR>
<?php
	$indice_jour=1;

	for(;;)
	{
		$debut_jour=mktime(0,0,0,$indice_mois,$indice_jour,$indice_annee);
		$debut_jour_suivant=$debut_jour+3600*24;

		$result = mysql_query( "select count(distinct IP,NAVIGATEUR,FLOOR(HEURE/3600)) as SOMME1,count(distinct IP,NAVIGATEUR,FLOOR(HEURE/3600),PAGE) as SOMME2 from OXG_VISITES WHERE HEURE>$debut_jour AND HEURE<$debut_jour_suivant") or mysql_die();
		$iCptMois=0;
		$row = mysql_fetch_array($result);

		if($row["SOMME1"]!=0)
		{
			echo "<TR><TD align=center>";
			echo "<A HREF='§stats_day.php?indice_mois=$indice_mois&indice_annee=$indice_annee&indice_jour=$indice_jour'>$indice_jour</A>";
			echo "</TD><TD align=right>";
			echo $row["SOMME1"];
			echo "</TD><TD align=right>";
			echo $row["SOMME2"];
			echo "</TD></TR>";
		}

		$indice_jour++;
		if($indice_jour==32)
		{
			break;
		}
	}
?>
</TABLE>
<?php
	affiche_pied_page(false);
?>