Файл: top_reit/rustats.su/system/view/stat/hours.tpl
Строк: 19
<div class="h1">
<table
width="100%"cellspacing="1">
<tr>
<td
align="center" width="50%" style="border:1px solid
#9a9a9c">Часы</td>
<td align="center"
width="50%" style="border:1px solid
#9a9a9c">Хосты</td>
</tr></table><?
for($hours=0;$hours<24;$hours++)
{
$start=mktime($hours,
0, 0, date("m"), date("d"),
date("Y"));
$finish=mktime($hours+1, 0, 0,
date("m"), date("d"),
date("Y"));
$host=Core::count("SELECT
COUNT(*) FROM `ip` WHERE `time_last` BETWEEN '".$start."' AND
'".$finish."' AND
`id_site`='".abs(intval($_GET['get']))."'");
if(strlen($hours)
== 1)
{
$hours =
'0'.$hours;
}
if(strlen($hours + 1) ==
1)
{
$hour = '0'.($hours +
1);
}
else
{
$hour = $hour +
1;
}
if($hours<=date('H')){
?>
<table
width="100%"cellspacing="1">
<tr>
<td
align="center" width="50%" style="border:1px solid
#9a9a9c"><? echo $hours.':00 -
'.$hour.':00';?></td>
<td align="center"
width="50%" style="border:1px solid #9a9a9c"><?
echo
$host;?></td>
</tr>
</table>
<?
}}
echo
'</div>';
echo '<a
href=/stat/index/'.$_GET['get'].'><div
class="navig">Назад к
статистике</div></a>';
?>