PHP Classes

File: stats.php

Recommend this page to a friend!
  Classes of juan guevara   phpWeStats   stats.php   Download  
File: stats.php
Role: Example script
Content type: text/plain
Description: example for phpWebStats
Class: phpWeStats
PHPNuke module to extract and display statistics
Author: By
Last change:
Date: 18 years ago
Size: 783 bytes
 

Contents

Class file image Download
<?
// 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 () ;
?>