0, 'Windows' => 0, 'BSD' => 0 );
$ua = array( 'MSIE 7' => 0, 'MSIE 6' => 0, 'MSIE 5' => 0, 'Firefox' => 0, 'Opera' => 0, 'Konqueror' => 0, 'Safari' => 0 );
// Acquire the total
if( $r = $db->query( "SELECT COUNT(*) AS num FROM `" . $config->database[ 'prefix' ] . "browsers`" ) ) {
$r = mysql_fetch_array( $r );
$total = intval( $r[0] );
}
foreach( $os as $k => $v ) {
if( $r = $db->query( "SELECT COUNT(*) AS num FROM `" . $config->database[ 'prefix' ] . "browsers` WHERE agent LIKE '%" . $k . "%'" ) ) {
$r = mysql_fetch_array( $r );
$os[ $k ] = intval( $r[0] );
}
}
foreach( $ua as $k => $v ) {
if( $r = $db->query( "SELECT COUNT(*) AS num FROM `" . $config->database[ 'prefix' ] . "browsers` WHERE agent LIKE '%" . $k . "%'" ) ) {
$r = mysql_fetch_array( $r );
$ua[ $k ] = intval( $r[0] );
}
}
// Print the above statistics.
print( $total.'
' );
?>
% of users are using Linux
% of users are using Windows
% of users are using BSD
% of users are using Microsoft Internet Explorer
% of users are running Mozilla Firefox
% of users are using Opera
% of users are running Konqueror
% of users are running Safari