Stats
if ($axx > 8)
{
?>
Ip's des dernieres modifications / Ajouts (Admin)
read_stat("account");
read_stat("article");
read_stat("breves");
read_stat("edito");
read_stat("mail");
read_stat("visites");
?>
} ?>
Stats des derniers jours
function max_read($type)
{
$query = "SELECT MAX($type) FROM stats";
$result = mysql_query($query) or die(mysql_error());
if (mysql_num_rows($result) == 0) { return 0; }
else {
$row =mysql_fetch_array($result);
return $row[0];
}
}
$max_article = max_read("article");
$max_account = max_read("account");
$max_breves = max_read("breves");
$max_edito = max_read("edito");
$max_mail = max_read("mail");
$max_visites = max_read("visites");
$query = "SELECT * FROM stats ORDER BY annee,mois,jour LIMIT 10";
$result = mysql_query($query) or die(mysql_error());
echo "
\n";
while ($row = mysql_fetch_assoc($result))
{
echo "- ".$row["jour"]."/".$row["mois"]."/".$row["annee"]."
";
foreach (array("account","article","breves","edito","mail","visites") as $key)
{
$width = ceil($row[$key]/${"max_".$key}*300);
echo "
- $key:".$row[$key]."/".${"max_".$key}."
";
}
}
echo "
\n";
?>