"Fossies" - the Fresh Open Source Software Archive

Member "betterawstats/core/library.inc.php" (17 Mar 2008, 7560 Bytes) of package /linux/www/old/betterawstats-1.0.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 <?php
    2 /**
    3  * betterawstats - an alternative display for awstats data
    4  *
    5  * @author      Oliver Spiesshofer, support at betterawstats dot com
    6  * @copyright   2008 Oliver Spiesshofer
    7  * @version     1.0
    8  * @link        http://betterawstats.com
    9 
   10  * Based on the GPL AWStats Totals script by:
   11  * Jeroen de Jong <jeroen@telartis.nl>
   12  * copyright   2004-2006 Telartis
   13  * version 1.13 (http://www.telartis.nl/xcms/awstats)
   14  *
   15  * This program is free software; you can redistribute it and/or
   16  * modify it under the terms of the GNU General Public License
   17  * as published by the Free Software Foundation; either version 2
   18  * of the License, or (at your option) any later version.
   19  *
   20  * This program is distributed in the hope that it will be useful,
   21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   23  * GNU General Public License for more details.
   24  *
   25  * You should have received a copy of the GNU General Public License
   26  * along with this program; if not, write to the Free Software
   27  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   28  */
   29 
   30 /**
   31  * File contents:
   32  *
   33  * This file sets default/addon data for libraries and reads the aditional data
   34  * from the library files.
   35  */
   36 
   37 
   38 // this file can't be used on its own
   39 if (strpos ($_SERVER['PHP_SELF'], 'library.inc.php') !== false) {
   40     die ('This file can not be used on its own!');
   41 }
   42 
   43 $BAW_LIB['formats'] = array(
   44     // class img text format
   45     'layout_visitors' => array(
   46         'img' => 'vu.png',
   47         'txt' => 11,
   48         'frm' => 'baw_num_format(%s);',
   49         'max'=> 'layout_visits'),
   50     'layout_visits' => array(
   51         'img' => 'vv.png',
   52         'txt' => 10,
   53         'frm' => 'baw_num_format(%s);',
   54         'max'=> 'layout_visits'),
   55     'layout_pages' => array(
   56         'img' => 'vp.png',
   57         'txt' => 56,
   58         'frm' => 'baw_num_format(%s);',
   59         'max'=> 'layout_pages'),
   60     'layout_hits' => array(
   61         'img' => 'vh.png',
   62         'txt' => 57,
   63         'frm' => 'baw_num_format(%s);',
   64         'max'=> 'layout_hits'),
   65     'layout_bytes' => array(
   66         'img' => 'vk.png',
   67         'txt' => 75,
   68         'frm' => 'baw_byte_format(%s);',
   69         'max'=> 'layout_bytes'),
   70     'layout_percent' => array(
   71         'img' => '',
   72         'txt' => 15,
   73         'frm' => 'baw_percent_format(%s);',
   74         'max'=> ''),
   75     'layout_date' => array(
   76         'img' => '',
   77         'txt' => '',
   78         'frm' => 'baw_getdate_format(%s);',
   79         'max'=> ''),
   80     'layout_text' => array(
   81         'img' => '',
   82         'txt' => '',
   83         'frm' => false,
   84         'max'=> ''),
   85     'layout_ratio' => array(
   86         'img' => '',
   87         'txt' => '',
   88         'frm' => 'baw_num_format(%s,2);',
   89         'max'=> '')
   90 );
   91 
   92 // this is defined here to indicate the order of the array, otherwise the information is in the datafile
   93 $BAW_LIB['sessions'] = array(
   94     '0s-30s', '30s-2mn', '2mn-5mn', '5mn-15mn', '15mn-30mn', '30mn-1h', '1h+'
   95 );
   96 
   97 $BAW_LIB['os']['families'] = array(
   98     'win'  => array('win', '<b>Windows</b>',0),
   99     'mac'  => array('mac', '<b>Macintosh</b>',0),
  100     'linux'=> array('linux', '<b>Linux</b>',0),
  101     'bsd'  => array('bsd', '<b>BSD</b>',0)
  102 );
  103 
  104 $BAW_LIB['os']['codes'] = array('win', 'mac', 'linux', 'bsd');
  105 $BAW_LIB['os']['list'] = baw_get_library("/operating_systems.pm", 'OSHashLib');
  106 $BAW_LIB['domains'] = baw_get_library("/domains.pm", 'DomainsHashIDLib');
  107 $BAW_LIB['robots'] = baw_get_library("/robots.pm", 'RobotsHashIDLib');
  108 list (
  109     $BAW_LIB['worms']['names'],
  110     $BAW_LIB['worms']['targets']) = baw_get_library(
  111         "/worms.pm",
  112         array('WormsHashLib', 'WormsHashTarget')
  113 );
  114 list (
  115     $BAW_LIB['files']['types'],
  116     $BAW_LIB['files']['icons'],
  117     $BAW_LIB['files']['family']) = baw_get_library (
  118         "/mime.pm",
  119         array('MimeHashLib', 'MimeHashIcon', 'MimeHashFamily')
  120 );
  121 $BAW_LIB['browser']['familes'] = array('msie'=>1,'firefox'=>2,'netscape'=>3,'svn'=>4);
  122 list (
  123     $BAW_LIB['browser']['names'],
  124     $BAW_LIB['browser']['grabbers'],
  125     $BAW_LIB['browser']['icons']) = baw_get_library(
  126         "/browsers.pm",
  127         array('BrowsersHashIDLib','BrowsersHereAreGrabbers','BrowsersHashIcon')
  128 );
  129 $BAW_LIB['searchengines']['names']= baw_get_library("/search_engines.pm", 'SearchEnginesHashLib');
  130 $BAW_LIB['misc'] = array(
  131     // 'TotalMisc' => 0,
  132     // 'AddToFavourites' => 137,
  133     'JavascriptDisabled' => 168,
  134     'JavaEnabled' => 140,
  135     'DirectorSupport'=> 141,
  136     'FlashSupport' => 142,
  137     'RealPlayerSupport'=> 143,
  138     'QuickTimeSupport' => 144,
  139     'WindowsMediaPlayerSupport' => 145,
  140     'PDFSupport' => 146
  141 );
  142 $BAW_LIB['http_status'] = baw_get_library("/status_http.pm", 'httpcodelib');
  143 
  144 $BAW_LIB['item_groups'] = array(
  145     'time' => array(
  146         'title' => $BAW_MES['time'],
  147         'members' => array('overview', 'months', 'days', 'weekdays', 'hours')
  148     ),
  149     'userinfo' => array(
  150         'title' => $BAW_MES['user_information'],
  151         'members' => array('domains', 'visitors', 'os', 'osversions', 'browsers','browserversions', 'misc', 'screensizes')
  152     ),
  153     'actions' => array(
  154         'title' => $BAW_MES['user_actions'],
  155         'members' => array('logins', 'sessions', 'filetype', 'urls')
  156     ),
  157     'origin' => array(
  158         'title' => $BAW_MES['user_origin'],
  159         'members' => array('referers', 'referer_domains', 'se_referers','searchphrases', 'searchwords')
  160     ),
  161     'other' => array(
  162         'title' => $BAW_MES['other_access'],
  163         'members' => array('robots', 'worms', 'unknownos', 'unknownbrowser', 'hotlinks', 'hotlink_domains', 'errors', 'errors404')
  164     )
  165 );
  166 
  167 /*
  168   this is obsolete but kept here for ev. future usage
  169 
  170 $BAW_LIB['data']['full'] = array(
  171     'GENERAL' => array('Misc ID', 'Pages', 'Hits', 'Bandwidth'),
  172     'TIME' => array('Hour','Pages','Hits','Bandwidth','Not viewed Pages','Not viewed Hits','Not viewed Bandwidth'),
  173     'VISITOR' => array('Host','Pages','Hits','Bandwidth','Last visit date','[Start date of last visit]','[Last page of last visit]'),
  174     'DAY' => array('Date','Pages','Hits','Bandwidth','Visits'),
  175     'DOMAIN' => array('Domain','Pages','Hits','Bandwidth'),
  176     'LOGIN' => array('Login','Pages','Hits','Bandwidth','Last visit'),
  177     'ROBOT' => array('Robot ID','Hits','Bandwidth','Last visit','Hits on robots.txt'),
  178     'WORMS' => array('Worm ID','Hits','Bandwidth','Last visit'),
  179     'SESSION' => array('Session range','Number of visits'),
  180     'SIDER' => array('URL','Pages','Bandwidth','Entry','Exit'),
  181     'FILETYPES' => array('Files type','Hits','Bandwidth','Bandwidth without compression','Bandwidth after compression'),
  182     'OS' => array('OS ID','Hits'),
  183     'BROWSER' => array('Browser ID','Hits'),
  184     'SCREENSIZE' => array('Screen size','Hits'),
  185     'UNKNOWNREFERER' => array('Unknown referer OS','Last visit date'),
  186     'UNKNOWNREFERERBROWSER' => array('Unknown referer Browser','Last visit date'),
  187     'ORIGIN' => array('Origin','Pages','Hits '),
  188     'SEREFERRALS' => array('Search engine referers ID','Pages','Hits'),
  189     'PAGEREFS' => array('External page referers','Pages','Hits'),
  190     'SEARCHWORDS' => array('Search keyphrases','Number of search'),
  191     'KEYWORDS' => array('Search keywords','Number of search'),
  192     'MISC' => array('Misc ID','Pages','Hits','Bandwidth'),
  193     'ERRORS' => array('Errors','Hits','Bandwidth'),
  194     'CLUSTER' => array('Cluster ID','Pages','Hits','Bandwidth'),
  195     'SIDER_404' => array('URL with 404 errors','Hits','Last URL referer'),
  196     'EXTRA_1' => array('Extra key','Pages','Hits','Bandwidth','Last access')
  197 );
  198 */
  199 
  200 ?>