|
|
@ -102,14 +102,12 @@ |
|
|
|
|
|
|
|
$HOUR = 3600; |
|
|
|
$DAY = $HOUR * 24; |
|
|
|
$BIDAY = $DAY * 2; |
|
|
|
$TRIDAY = $DAY * 3; |
|
|
|
$WEEK = $DAY * 7; |
|
|
|
|
|
|
|
$stats = []; |
|
|
|
$hourly = []; |
|
|
|
$daily = []; |
|
|
|
$bidaily = []; |
|
|
|
$tridaily = []; |
|
|
|
$weekly = []; |
|
|
|
|
|
|
|
foreach (array_merge(... $config['boards']) as $uri) { |
|
|
|
$_board = getBoardInfo($uri); |
|
|
@ -122,8 +120,7 @@ |
|
|
|
|
|
|
|
$boardStat['hourly_ips'] = Categories::countUniqueIps($hourly, $HOUR, $_board); |
|
|
|
$boardStat['daily_ips'] = Categories::countUniqueIps($daily, $DAY, $_board); |
|
|
|
$boardStat['bidaily_ips'] = Categories::countUniqueIps($bidaily, $BIDAY, $_board); |
|
|
|
$boardStat['tridaily_ips'] = Categories::countUniqueIps($tridaily, $TRIDAY, $_board); |
|
|
|
$boardStat['weekly_ips'] = Categories::countUniqueIps($weekly, $WEEK, $_board); |
|
|
|
|
|
|
|
$pph_query = query( |
|
|
|
sprintf("SELECT COUNT(*) AS count FROM ``posts_%s`` WHERE time > %d", |
|
|
@ -138,8 +135,7 @@ |
|
|
|
|
|
|
|
$stats['hourly_ips'] = count($hourly); |
|
|
|
$stats['daily_ips'] = count($daily); |
|
|
|
$stats['bidaily_ips'] = count($bidaily); |
|
|
|
$stats['tridaily_ips'] = count($tridaily); |
|
|
|
$stats['weekly_ips'] = count($weekly); |
|
|
|
$stats['pph'] = array_sum(array_column($stats['boards'], 'pph')); |
|
|
|
|
|
|
|
return $stats; |
|
|
|