stats-fe.php
changeset 28 a7e537c0b549
parent 20 e2f6e3af9959
child 36 a7d884914a74
equal deleted inserted replaced
27:4a9469bada05 28:a7e537c0b549
    75 function stats_activity_percent($channel, $mins = 10, $base = NOW)
    75 function stats_activity_percent($channel, $mins = 10, $base = NOW)
    76 {
    76 {
    77   $channel = db_escape($channel);
    77   $channel = db_escape($channel);
    78   $time_min = $base - ( $mins * 60 );
    78   $time_min = $base - ( $mins * 60 );
    79   $time_max =& $base;
    79   $time_max =& $base;
       
    80   $total = 0;
    80   
    81   
    81   if ( $q = eb_mysql_query("SELECT nick FROM stats_messages WHERE channel = '$channel' AND time >= $time_min AND time <= $time_max;") )
    82   if ( $q = eb_mysql_query("SELECT nick FROM stats_messages WHERE channel = '$channel' AND time >= $time_min AND time <= $time_max;") )
    82   {
    83   {
    83     $userdata = array();
    84     $userdata = array();
    84     while ( $row = @mysql_fetch_assoc($q) )
    85     while ( $row = @mysql_fetch_assoc($q) )