<?
 
// This is a example for phpWebStats - PHPNuke Abstratct for Stats Module
 
require_once ("class.web.stats.php") ;
 
 
$stats = new phpWebStats ("localhost", "db_name", "db_user", "db_pass") ;
 
 
$stats->initStats () ;
 
$stats->initDisplayStats ("Test Stats") ;
 
$stats->setFontTitleType ('arial', 12) ;
 
$stats->setFontType ('arial', 11) ;
 
$stats->setBgColor ('#e9e9e9') ;
 
$stats->setBarColor ('#cc0000') ;
 
 
switch ($module) {
 
    case 'stats':    
 
        $stats->Stats () ;
 
        break ;
 
    case 'yearStats':
 
        $stats->showMonthStats ($year) ;
 
        break ;
 
    case 'monthStats':
 
        $stats->showDailyStats ($year, $month) ;
 
        break;
 
    case 'dateStats':
 
        $stats->showHourlyStats ($year, $month, $date) ;
 
        break ;
 
    default:
 
        $stats->mainStats () ;
 
        break ;
 
}
 
$stats->close () ;
 
?>
 
 |