Viewing file: index2.php (11.19 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">
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<script language="JavaScript">
window.name = "original"
</script>
<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" valign="top">
<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>
<table width="750" border="0" cellspacing="0" cellpadding="3" align="center" bgcolor="#FFCCCC">
<tr>
<td width="314" class="titre" height="106">
<p class="titre" align="left"><b><? echo "<a href=\"http://".$sites[$table]."\" target=\"_blank\">$sites[$table]</a>"; ?><br>
</b><span class="normal"><span class="normal"><span class="normal">...</span>
</span><br>
<?
$today = date("Y-m-d" , $reqdate);
switch ($period) {
case "jour":
// echo $msgDay." ".date("d-m-Y" , $reqdate);
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></p>
</td>
<td width="424" class="normal" height="106">
<div align="right">
<p><a href="config.php"><? echo $msgConfig ?></a></p>
<p><a href="#" onClick="MM_openBrWindow('calendar.php?table=<? echo $table."&period=$period" ?>','','width=300,height=300')"><? echo $msgCalendar ?></a><br>
<br>
<a href="<? echo "read.php?table=$table&period=$period&reqdate=$reqdate"; ?>"><? echo $msgShowRowLogs ?></a><br>
<br>
<?
if ($period==jour) {
$ysreqdate = $reqdate - 86400;
$PHP_SELF2 = basename($PHP_SELF);
echo "<a href='$PHP_SELF2?table=$table&reqdate=$ysreqdate&reset=0&period=$period'>$msgPreviousDay <b><<</b></a>";
echo "<br>";
$tmreqdate = $reqdate + 86400;
echo "<a href='$PHP_SELF2?table=$table&reqdate=$tmreqdate&reset=0&period=$period'>$msgNextDay <b>>></b></a>";
echo "<br>";
}
if ($period==semaine) {
$ysreqdate = $reqdate - 7*86400;
$PHP_SELF2 = basename($PHP_SELF);
echo "<a href='$PHP_SELF2?table=$table&reqdate=$ysreqdate&reset=0&period=$period'>$msgPreviousWeek <b><<</b></a>";
echo "<br>";
$tmreqdate = $reqdate + 7*86400;
echo "<a href='$PHP_SELF2?table=$table&reqdate=$tmreqdate&reset=0&period=$period'>$msgNextWeek <b>>></b></a>";
echo "<br>";
}
?> </p>
</div>
</td>
</tr>
<tr>
<td colspan="2" class="normal" bgcolor="#CCCCCC">[ <a href="index2.php?table=<?php echo $table ?>&<?echo "reqdate=".time()."&reset=0"."&period=jour"; ?>"><? echo $msgDay ?></a>
] [ <a href="index2.php?table=<?php echo $table ?>&<?echo "reqdate=".time()."&reset=0"."&period=semaine"; ?>"><? echo $msgWeek ?></a>
] [ <a href="index2.php?table=<?php echo $table ?>&<?echo "reqdate=".time()."&reset=0"."&period=mois"; ?>"><? echo $msgMonth ?></a>
]</td>
</tr>
</table>
<p> </p>
<p align="center">
<?php
include ("config_sql.php");
require ("log_func.php");
// Get all config variables
/*
$c = mysql_connect("$server","$user","$password") or die($msgSqlConnectImpossible);
$db = mysql_select_db("$base") or die($msgBaseConnectImpossible);
$result = mysql_query ("SELECT * from $config_table");
$config = array("x" =>"x");
while($row = mysql_fetch_array($result)) {
$config = $config + array($row["variable"] => $row["value"] );
}
mysql_free_result ($result);
mysql_close ($c); // close sql connection
*/
$table_log = $table;
Archive($table_log);
print("<table width=\"750\" border=\"0\" cellspacing=\"3\" cellpadding=\"0\" class=\"normal\">");
print("<tr valign=\"top\"> ");
print("<td> ");
print("<div align=\"center\">");
if ($reset) { ClearAll($table_log); } # clear fields: "country provider os wb" to take into acount modif in log_func (ie: new browser new NIC extention ...)
ProcessEmptyEntry($table_log);
$today = date("Y-m-d" , $reqdate);
$today_2 = getdate($reqdate);
if ($period == "jour" and $config[d_show_hour]=='1') {
$valjour = HourSort($table_log, $reqdate );
$title = $msgDaysArray[$today_2[wday]]." ".$today_2[mday]." ".$msgMonthsArray[$today_2[mon]-1]." ".$today_2[year];
ProcessBarGraph($title,$valjour);
echo "<br>";
}
if ($period != "jour") {
if (($period=='semaine' and $config[w_show_day]=='1') or
($period=='mois' and $config[m_show_day]=='1')) {
$val = DaySort($table_log, $reqdate, $period );
ProcessBarGraph($msgDaySort,$val);
echo "<br>";
}
}
if (($period=='jour' and $config[d_show_month]=='1') or
($period=='semaine' and $config[w_show_month]=='1') or
($period=='mois' and $config[m_show_month]=='1')) {
$val = MonthSort($table_log, $reqdate );
ProcessBarGraph($msgMonthSort,$val);
}
echo "<br>";
if (($period=='jour' and $config[d_show_country]=='1') or
($period=='semaine' and $config[w_show_country]=='1') or
($period=='mois' and $config[m_show_country]=='1')) {
$val = ClassAndCountField($table_log, "country",$reqdate,$period);
ProcessBarGraph($msgCountrySort,$val);
}
echo "<br>";
if (($period=='jour' and $config[d_show_os]=='1') or
($period=='semaine' and $config[w_show_os]=='1') or
($period=='mois' and $config[m_show_os]=='1')) {
$val = ClassAndCountField($table_log, "os",$reqdate,$period);
ProcessBarGraph($msgOsSort,$val);
}
echo "<br>";
if (($period=='jour' and $config[d_show_browser]=='1') or
($period=='semaine' and $config[w_show_browser]=='1') or
($period=='mois' and $config[m_show_browser]=='1')) {
$val = ClassAndCountField($table_log, "wb",$reqdate,$period);
ProcessBarGraph($msgBrowserSort,$val);
}
echo "<br>";
print("</div> ");
print("</td>");
print("<td> ");
print("<div align=\"center\">");
if ( ($period == "jour") and ($valjour["Total"]>0) ) {
$title = $msgDaysArray[$today_2[wday]]." ".$today_2[mday]." ".$msgMonthsArray[$today_2[mon]-1]." ".$today_2[year];
if ($valjour["0 h"] =="") $valjour["0 h"]="0";
if ($valjour["1 h"] =="") $valjour["1 h"]="0";
if ($valjour["2 h"] =="") $valjour["2 h"]="0";
if ($valjour["3 h"] =="") $valjour["3 h"]="0";
if ($valjour["4 h"] =="") $valjour["4 h"]="0";
if ($valjour["5 h"] =="") $valjour["5 h"]="0";
if ($valjour["6 h"] =="") $valjour["6 h"]="0";
if ($valjour["7 h"] =="") $valjour["7 h"]="0";
if ($valjour["8 h"] =="") $valjour["8 h"]="0";
if ($valjour["9 h"] =="") $valjour["9 h"]="0";
if ($valjour["10 h"] =="") $valjour["10 h"]="0";
if ($valjour["11 h"] =="") $valjour["11 h"]="0";
if ($valjour["12 h"] =="") $valjour["12 h"]="0";
if ($valjour["13 h"] =="") $valjour["13 h"]="0";
if ($valjour["14 h"] =="") $valjour["14 h"]="0";
if ($valjour["15 h"] =="") $valjour["15 h"]="0";
if ($valjour["16 h"] =="") $valjour["16 h"]="0";
if ($valjour["17 h"] =="") $valjour["17 h"]="0";
if ($valjour["18 h"] =="") $valjour["18 h"]="0";
if ($valjour["19 h"] =="") $valjour["19 h"]="0";
if ($valjour["20 h"] =="") $valjour["20 h"]="0";
if ($valjour["21 h"] =="") $valjour["21 h"]="0";
if ($valjour["22 h"] =="") $valjour["22 h"]="0";
if ($valjour["23 h"] =="") $valjour["23 h"]="0";
$sval = $valjour["0 h"].";".$valjour["1 h"].";".$valjour["2 h"].";".$valjour["3 h"].";".$valjour["4 h"].";".$valjour["5 h"].";".$valjour["6 h"].";".$valjour["7 h"].";".$valjour["8 h"].";".$valjour["9 h"].";".$valjour["10 h"].";".$valjour["11 h"].";".$valjour["12 h"].";".$valjour["13 h"].";".$valjour["14 h"].";".$valjour["15 h"].";".$valjour["16 h"].";".$valjour["17 h"].";".$valjour["18 h"].";".$valjour["19 h"].";".$valjour["20 h"].";".$valjour["21 h"].";".$valjour["22 h"].";".$valjour["23 h"];
echo "<img src=\"img2.php?title=$title&sval=$sval\" >";
echo "<br>";
echo "<br>";
}
if (($period=='jour' and $config[d_show_reqpage]=='1') or
($period=='semaine' and $config[w_show_reqpage]=='1') or
($period=='mois' and $config[m_show_reqpage]=='1')) {
$val = ClassAndCountField($table_log, "request",$reqdate,$period);
ProcessBarGraph($msgRequestPage,$val);
}
echo "<br>";
if (($period=='jour' and $config[d_show_referer]=='1') or
($period=='semaine' and $config[w_show_referer]=='1') or
($period=='mois' and $config[m_show_referer]=='1')) {
$val = ClassAndCountField($table_log, "referer",$reqdate,$period);
ProcessBarGraph($msgRefererSort,$val);
}
echo "<br>";
if (($period=='jour' and $config[d_show_provider]=='1') or
($period=='semaine' and $config[w_show_provider]=='1') or
($period=='mois' and $config[m_show_provider]=='1')) {
$val = ClassAndCountField($table_log, "provider",$reqdate,$period);
ProcessBarGraph($msgProviderSort,$val);
}
print("</div> ");
print("</td>");
print("</tr>");
print("</table>");
?>
<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>
<p> </p>
</body>
</html>
|