"Fossies" - the Fresh Open Source Software Archive

Member "betterawstats/includes/bawstats.config.inc" (18 Mar 2008, 4017 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) fasm source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <?php
    2  // $Id: bawstats.config.inc,v 1.4 2008/03/18 01:07:41 tokyoahead Exp $
    3 
    4 /**
    5  * BAWstats drupal module
    6  *
    7  * BAWstats is a drupal module written in php for integration of
    8  * the BetterAWstats presentation and processing of AWstats data into drupal.
    9  * Copyright (C) 2008  Andrew Gillies (anaru@equivocation.org)
   10  *
   11  * For more information about BetterAWstats see:
   12  * http://betterawstats.com/
   13  *
   14  * This program is free software; you can redistribute it and/or modify
   15  * it under the terms of the GNU General Public License as published by
   16  * the Free Software Foundation; either version 2 of the License, or, at
   17  * your option, any later version.
   18  *
   19  * This program is distributed in the hope that it will be useful, but
   20  * WITHOUT ANY WARRANTY; without even the implied warranty of
   21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   22  * General Public License for more details.
   23  *
   24  * You should have received a copy of the GNU General Public License
   25  * along with this program; if not, write to the Free Software
   26  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   27  *
   28  */
   29 
   30 $bawstats_path = drupal_get_path('module', 'bawstats');
   31 
   32 /**
   33  * beterawstats globals and libraries
   34  *
   35  */
   36 
   37 // global vars
   38 global $BAW_LOGTYPE, $BAW_CURR, $BAW_MES, $BAW_LIB, $BAW_CONF_DEF, $BAW_CONF_DIS_DEF, $BAW_D;
   39 global $BAW_CONF, $BAW_CONF_DIS, $BAW_DFILES, $BAW_SERVERS;
   40 
   41 $BAW_CONF = array();        // holds all the configuration info
   42 
   43 include_once($bawstats_path . '/config.php');
   44 $BAW_CONF['site_path'] = $bawstats_path;
   45 $BAW_CONF['max_percent'] = 'layout_percent';
   46 $BAW_CONF['max_bytes'] = 'layout_bytes';
   47 $BAW_CONF['online_config'] = false;
   48 $BAW_CONF['drupal_base'] = 'admin/reports/bawstats';
   49 
   50 // get configuration from drupal variables (not from the config.php) for key locations
   51 $BAW_CONF['path_data'] = variable_get('bawstats_data','');
   52 $BAW_CONF['path_lib'] = variable_get('bawstats_lib','');
   53 $BAW_CONF['path_lang'] = variable_get('bawstats_lang','');
   54 $BAW_CONF['icons_url'] = variable_get('bawstats_icon','/' . $bawstats_path . '/icon');
   55 
   56 // drupal map
   57 $BAW_CONF_DIS['domains']['map'] = true;
   58 
   59 $BAW_LOGTYPE = 'W';
   60 $BAW_D = array();
   61 $BAW_CURR = array();
   62 $BAW_CURR['thismonth'] = array('hits'=> 0);
   63 $BAW_MES = array();
   64 $BAW_DFILES = array(); // data files
   65 $BAW_SERVERS = array(); // this will be populates with the servers for the config
   66 
   67 if (!defined ('XHTML')) {
   68     if ($BAW_CONF['xhtml']) {
   69         define('XHTML', ' /');
   70     } else {
   71         define('XHTML', '');
   72     }
   73 }
   74 if (!defined ('BR')) {
   75     define('BR', '<br'.XHTML.'>');
   76 }
   77 
   78 // check we are configured...
   79 if ((strlen($BAW_CONF['path_data'])>0)&&(strlen($BAW_CONF['path_lib'])>0)&&(strlen($BAW_CONF['path_lang'])>0)) {
   80   include_once($bawstats_path . '/core/helpers.inc.php');
   81   include_once($bawstats_path . '/modules/render_htmlchart.inc.php');
   82   include_once($bawstats_path . '/modules/render_table.inc.php');
   83   include_once($bawstats_path . '/modules/render_jpgraph.inc.php');
   84   include_once($bawstats_path . '/modules/render_map.inc.php');
   85   include_once($bawstats_path . '/core/data.inc.php');
   86   include_once($bawstats_path . '/core/language.inc.php');
   87   baw_language();
   88   include_once($bawstats_path . '/core/display_helpers.php');
   89 
   90   if (!isset($BAW_MES['e'])) {
   91     $BAW_MES['e'] = 'utf-8';
   92   }
   93 
   94   //baw_check_config();
   95   include_once($bawstats_path . '/core/library.inc.php');
   96 
   97   include_once($bawstats_path . '/core/display.inc.php');
   98   include_once($bawstats_path . '/core/extras.inc.php');
   99 
  100   // add language-dependent library values
  101   $BAW_LIB['domains']['unknown'] = $BAW_MES[0];
  102   $BAW_LIB['domains']['ip'] = $BAW_MES[0];
  103   $BAW_LIB['os']['list']['Unknown'] = $BAW_MES[0];
  104   $BAW_LIB['browser']['names']['Unknown'] = $BAW_MES[0];
  105   $BAW_LIB['browser']['icons']['Unknown'] = 'unknown';
  106   include_once($bawstats_path . '/core/config_default.inc.php');
  107 }
  108 
  109 $BAW_CONF['site_url'] = '/admin/bawstats';
  110 
  111 // ensure the baw backend knows we are drupal
  112 $BAW_CONF['module'] = 'drupal';
  113 
  114 unset($bawstats_path);