Viewing file: read.php (5.26 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? require("config.inc.php"); ?>
<? include("get_conf.inc.php"); ?>
<html>
<head>
<title>ezBOO WebStats</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
-->
</style>
<link rel="stylesheet" href="style1.css">
</head>
<body bgcolor="#FFFFFF">
<table width="760" border="1" cellspacing="0" cellpadding="2" bordercolor="#636563" class="normal">
<tr bordercolor="#666666">
<td height="60" valign="middle" align="center"><a href="index.php"><img src="image/logo_ez1.gif" width="200" height="40" border="0"></a></td>
<td colspan="2" bgcolor="#666666" class="titre" height="60">
<div align="center" class="titre"><font color="#FFFFFF">>><a href="index.php">
<font color="#FFFFFF"><? echo $msgAdminPanel ?> </font></a><< </font></div>
</td>
</tr>
<tr bordercolor="#FFFFFF">
<td colspan="3" bordercolor="#666666" height="200">
<p align="right"><?
function AL_Date( ) {
global $msgDaysArray;
global $msgMonthsArray;
echo $msgDaysArray[date("w")] ." ";
echo date("j")." ";
echo $msgMonthsArray[date("n")-1]." ".date("Y");
}
AL_Date( );
?></p>
<p align="right"> </p>
<p align="left"> <span class="normal"><?
$today = date("Y-m-d" , $reqdate);
switch ($period) {
case "jour":
echo date("d " , $reqdate).$msgMonthsArray[date("n", $reqdate)-1].date(" Y" , $reqdate);
break;
case "semaine":
$weeklowreqdate = ($reqdate-(86400*date("w" , $reqdate)));
$weekhighreqdate = ($reqdate+(86400*(6-date("w" , $reqdate)) ));
echo "<b>".$msgFrom."</b>".date("d " , $weeklowreqdate).$msgMonthsArray[date("n", $weeklowreqdate)-1].date(" Y" , $weeklowreqdate);
echo " <b>".$msgTo."</b>".date("d " , $weekhighreqdate ).$msgMonthsArray[date("n", $weekhighreqdate)-1].date(" Y" , $weekhighreqdate);
break;
case "mois":
echo $msgMonthsArray[date("n", $reqdate)-1].date(" Y", $reqdate);
break;
}
?></span><br>
<?
# Read logs
include("config_sql.php");
$c = mysql_connect("$server","$user","$password") or die("Impossible de se connecter au server SQL, essayez plus tard");
$db = mysql_select_db("$base") or die("Impossible de se selectionner la base SQL, essayez plus tard");
$today = date("Y-m-d" , $reqdate);
switch ($period) {
case "jour":
if ($stp!="") {
$q_string = "SELECT * FROM $table WHERE DAYOFYEAR(date)=DAYOFYEAR(FROM_UNIXTIME($reqdate)) and $stp='$stp2' order by date DESC";
} else
$q_string = "SELECT * FROM $table WHERE DAYOFYEAR(date)=DAYOFYEAR(FROM_UNIXTIME($reqdate)) order by date DESC";
$req = mysql_query ($q_string) or die ($msgSqlQuerryError);
break;
case "semaine":
if ($stp!="") {
$q_string = "SELECT * FROM $table WHERE WEEK(date)=WEEK(FROM_UNIXTIME('$reqdate')) AND $stp='$stp2' order by date DESC";
} else
$q_string = "SELECT * FROM $table WHERE WEEK(date)=WEEK(FROM_UNIXTIME('$reqdate')) order by date DESC";
$req = mysql_query ($q_string) or die ($msgSqlQuerryError);
break;
case "mois":
if ($stp!="") {
$q_string = "SELECT * FROM $table WHERE MONTH(date)=MONTH(FROM_UNIXTIME('$reqdate')) AND $stp='$stp2' order by date DESC";
} else
$q_string = "SELECT * FROM $table WHERE MONTH(date)=MONTH(FROM_UNIXTIME('$reqdate')) order by date DESC";
$req = mysql_query ($q_string) or die ($msgSqlQuerryError);
break;
}
$nb_champs=mysql_num_fields($req);
$nb_line=mysql_num_rows($req);
printf ("$nb_line $msgRecords");
if ($stp=="os" and $stp2=='???') echo " :$msgNotRecognizedOs";
if ($stp=="wb" and $stp2=='???') echo " :$msgNotRecognizedWb";
printf ("<br>");
$i=0;
echo "<table align=\"center\" width=\"650\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">";
echo "<tr>";
while($i<$nb_champs)
{
$nom_champs=mysql_field_name($req,$i);
echo "<td bgcolor=\"#CCCCCC\"><div align=\"center\"><b>$nom_champs</b></div></td>";
$i++;
}
echo "</tr>";
$i=0;
$j=0;
$sta = true;
while($j<$nb_line)
{
echo "<tr>";
while($i<$nb_champs)
{
if ($sta) { $color = "#CCCCFF" ; } else { $color = "#FFFFCC" ;}
$nom_champs=mysql_field_name($req,$i);
$$nom_champs=mysql_result($req,$j,$nom_champs);
if ( $nom_champs =="referer" ){
echo "<td bgcolor=\"$color\"><div align=\"left\">"."<a href=\"".$$nom_champs."\" target=\"_blank\">".$$nom_champs."</a>"."</div></td>";
} else {
echo "<td bgcolor=\"$color\"><div align=\"left\">".$$nom_champs."</div></td>";
}
$i++;
}
echo "</tr>";
$i=0;
$j++;
$sta = !$sta;
}
echo "</table>";
mysql_close ($c);
?></p>
<p align="center" class="verysmall"><a href="http://www.ezboo.com" target="_blank"><img src="image/logo_webstats.gif" width="100" height="40" border="0"></a><br>
<? echo $msgStatBy ?> <a href="http://www.ezboo.com" target="_blank">ezBOO</a>
<? echo $msgVersion ?> </p>
</td>
</tr>
</table>
</body>
</html>
|