--- /dev/null
+<?php
+
+/**
+ * AWStats PHP Wrapper Script
+ *
+ * In your AWStats.conf set the following:
+ * WrapperScript="awstats.php"
+ *
+ * @author Jeroen de Jong <jeroen@telartis.nl>
+ * @copyright 2004-2007 Telartis BV
+ * @version 1.1
+ *
+ * @link http://www.telartis.nl/xcms/awstats
+ *
+ * Changelog:
+ * 1.0 initial version
+ * 1.1 changed month param pattern
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * The location of the AWStats script.
+ */
+$AWStatsFile = '/usr/lib/cgi-bin/awstats.pl';
+
+
+function addparam($name, $pattern, $allways = false) {
+ $result = $allways ? ' -'.$name : '';
+ if (isset($_GET[$name])) {
+ if (preg_match($pattern, $_GET[$name])) {
+ $result .= ($allways ? '' : ' -'.$name).'='.$_GET[$name];
+ }
+ }
+ return $result;
+}
+
+
+$param = addparam('config', '/^[-\.a-z0-9]+$/i');
+if (!$param) die("config parameter not set!");
+
+$param .= addparam('output', '/^[a-z0-9]+$/', true);
+$param .= addparam('year', '/^\d{4}$/');
+$param .= addparam('month', '/(\d{1,2}|all)/');
+$param .= addparam('lang', '/^[a-z]{2}$/');
+
+$pattern = '/^[^;:,`| ]+$/';
+$param .= addparam('hostfilter', $pattern);
+$param .= addparam('hostfilterex', $pattern);
+$param .= addparam('urlfilter', $pattern);
+$param .= addparam('urlfilterex', $pattern);
+$param .= addparam('refererpagesfilter', $pattern);
+$param .= addparam('refererpagesfilterex', $pattern);
+$param .= addparam('filterrawlog', $pattern);
+
+
+passthru('perl '.$AWStatsFile.$param);
+
+?>
--- /dev/null
+<?php
+
+/**
+ * AWStats Totals is a simple php script to view the totals
+ * (Unique visitors, Number of visits, Pages, Hits, Bandwidth)
+ * for multiple sites per month with sort options.
+ *
+ * @author Jeroen de Jong <jeroen@telartis.nl>
+ * @copyright 2004-2009 Telartis BV
+ * @version 1.17
+ *
+ * @link http://www.telartis.nl/xcms/awstats
+ *
+ * Changelog:
+ * 1.0 initial version
+ * 1.1 use awstats language files to set your language
+ * 1.2 register_globals setting can be off
+ * 1.3 display yearly totals and last entry (Marco Gruber)
+ * 1.4 use english messages when no language files found
+ * 1.5 error_reporting setting can be E_ALL
+ * 1.6 fixed incorrect unique visitors in year view (ConteZero)
+ * 1.7 changed number and byte format
+ * 1.8 added not viewed traffic, changed layout, improved reading of AWStats database
+ * 1.9 define all variables (Michael Dorn)
+ * 1.10 added browser language detection (based on work by Andreas Diem)
+ * 1.11 fixed notice errors when no data file present (Marco Gruber)
+ * 1.12 recursive reading of awstats data directory
+ * 1.13 fixed trailing slashes problem with directories
+ * 1.14 fixed errors when some dirs or files were not found (Reported by Sam Evans)
+ * 1.15 added security checks for input parameters (Elliot Kendall)
+ * 1.16 fixed month parameter 'all' to show stats in awstats
+ * 1.17 fixed small problem with open_basedir (Fred Peeterman)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+/*******************************************************
+ * SETUP SECTION
+ *******************************************************/
+
+/**
+ * Set this value to the directory where AWStats
+ * saves its database and working files into.
+ */
+$DirData = '/var/lib/awstats';
+
+/**
+ * The URL of the AWStats script.
+ */
+$AWStatsURL = '/cgi-bin/awstats.pl';
+#$AWStatsURL = 'awstats.php';
+
+/**
+ * Set your language.
+ * Possible value:
+ * Albanian=al, Bosnian=ba, Bulgarian=bg, Catalan=ca,
+ * Chinese (Taiwan)=tw, Chinese (Simpliefied)=cn, Czech=cz, Danish=dk,
+ * Dutch=nl, English=en, Estonian=et, Euskara=eu, Finnish=fi,
+ * French=fr, Galician=gl, German=de, Greek=gr, Hebrew=he, Hungarian=hu,
+ * Icelandic=is, Indonesian=id, Italian=it, Japanese=jp, Korean=kr,
+ * Latvian=lv, Norwegian (Nynorsk)=nn, Norwegian (Bokmal)=nb, Polish=pl,
+ * Portuguese=pt, Portuguese (Brazilian)=br, Romanian=ro, Russian=ru,
+ * Serbian=sr, Slovak=sk, Spanish=es, Swedish=se, Turkish=tr, Ukrainian=ua,
+ * Welsh=wlk.
+ * First available language accepted by browser=auto
+ */
+$Lang = 'auto';
+
+/**
+ * Set the location of language files.
+ */
+$DirLang = '/usr/share/awstats/lang';
+
+/**
+ * How to display not viewed traffic
+ * Possible value: ignore, columns, sum
+ */
+$NotViewed = 'sum';
+
+/**
+ * How to sort.
+ * Possible value:
+ * config, unique, visits, pages, hits, bandwidth,
+ * not_viewed_pages, not_viewed_hits, not_viewed_bandwidth
+ */
+$sort_default = 'bandwidth';
+
+/**
+ * Set number format.
+ */
+$dec_point = '.';
+$thousands_sep = ' ';
+
+/**
+ * Config names to filter. Shows all if empty array.
+ */
+$FilterConfigs = array();
+
+/*
+To read website configs from database, do something like:
+$sql = 'SELECT config FROM users WHERE (user=...)';
+$rs = mysql_query($sql);
+if ($rs) while ($row = mysql_fetch_array($rs))
+ $FilterConfigs[] = $row['config'];
+*/
+
+/*******************************************************
+ * PROGRAM SECTION
+ *******************************************************/
+
+if (isset($_GET['sort'])) $sort = preg_replace('/[^_a-z]/', '', $_GET['sort']); else $sort = $sort_default;
+if (isset($_GET['year'])) $year = (int)$_GET['year']; else $year = date('Y');
+if (isset($_GET['month'])) $month = (int)$_GET['month']; else $month = date('n');
+if (!$month) $month = 'all';
+
+function get_config($file) {
+ $r = '';
+ if (preg_match('/awstats\d{6}\.(.+)\.txt/', $file, $match)) $r = $match[1];
+ return $r;
+}
+
+function read_history($file) {
+ $config = get_config($file);
+
+ $s = '';
+ $f = fopen($file, 'r');
+ while (!feof($f)) {
+ $line = fgets($f, 4096);
+ $s .= $line;
+ if (trim($line) == 'END_TIME') break;
+ }
+ fclose($f);
+
+ $visits_total = 0; $unique_total = 0; $pages_total = 0; $hits_total = 0; $bandwidth_total = 0;
+ $not_viewed_pages_total = 0; $not_viewed_hits_total = 0; $not_viewed_bandwidth_total = 0;
+
+ if (preg_match('/TotalVisits (\d+)/', $s, $match)) $visits_total = (int)$match[1];
+ if (preg_match('/TotalUnique (\d+)/', $s, $match)) $unique_total = (int)$match[1];
+
+ if (preg_match('/\nBEGIN_TIME \d+\n(.*)\nEND_TIME\n/s', $s, $match)) {
+ foreach (explode("\n", $match[1]) as $row) {
+ list($hour, $pages, $hits, $bandwidth,
+ $not_viewed_pages, $not_viewed_hits, $not_viewed_bandwidth) = explode(' ', $row);
+ $pages_total += $pages; $hits_total += $hits; $bandwidth_total += $bandwidth;
+ $not_viewed_pages_total += $not_viewed_pages;
+ $not_viewed_hits_total += $not_viewed_hits;
+ $not_viewed_bandwidth_total += $not_viewed_bandwidth;
+ }
+ }
+
+ return array('config'=>$config, 'visits'=>$visits_total, 'unique'=>$unique_total,
+ 'pages'=>$pages_total, 'hits'=>$hits_total, 'bandwidth'=>$bandwidth_total,
+ 'not_viewed_pages'=>$not_viewed_pages_total,
+ 'not_viewed_hits'=>$not_viewed_hits_total,
+ 'not_viewed_bandwidth'=>$not_viewed_bandwidth_total);
+}
+
+function parse_dir($dir) {
+ // add a trailing slash if it doesn't exist:
+ if (substr($dir, -1) != '/') $dir .= '/';
+ $files = array();
+ if ($dh = @opendir($dir)) {
+ while (($file = readdir($dh)) !== false) {
+ if (!preg_match('/^\./s', $file)) {
+ if (is_dir($dir.$file)) {
+ $newdir = $dir.$file.'/';
+ chdir($newdir);
+ $files = array_merge($files, parse_dir($newdir));
+ } else {
+ $files[] = $dir.$file;
+ }
+ }
+ }
+ chdir($dir);
+ }
+ return $files;
+}
+
+if (!is_dir($DirData)) die("Could not open directory $DirData");
+
+$dirfiles = parse_dir($DirData);
+
+$files = array();
+$config = array();
+if ($month == 'all') $pat = '\d{2}'; else $pat = substr('0'.$month, -2);
+$pat = '/awstats'.$pat.$year.'\.(.+)\.txt$/';
+foreach ($dirfiles as $file) if (preg_match($pat, $file, $match)) {
+ $config = $match[1];
+ if (!$FilterConfigs || in_array($config, $FilterConfigs)) {
+ $configs[] = $config;
+ $files[] = $file;
+ }
+}
+
+$visits_total = 0; $unique_total = 0; $pages_total = 0; $hits_total = 0; $bandwidth_total = 0;
+$not_viewed_pages_total = 0; $not_viewed_hits_total = 0; $not_viewed_bandwidth_total = 0;
+
+$rows = array();
+if ($files) {
+ array_multisort($configs, $files);
+ $row_prev = array();
+ for ($i = 0, $cnt = count($files); $i <= $cnt; $i++) {
+ $row = array();
+ if ($i < $cnt) {
+ $row = read_history($files[$i]);
+
+ if ($NotViewed == 'sum') {
+ $row['pages'] += $row['not_viewed_pages'];
+ $row['hits'] += $row['not_viewed_hits'];
+ $row['bandwidth'] += $row['not_viewed_bandwidth'];
+ }
+
+ $visits_total += $row['visits'];
+ $unique_total += $row['unique'];
+ $pages_total += $row['pages'];
+ $hits_total += $row['hits'];
+ $bandwidth_total += $row['bandwidth'];
+
+ if ($NotViewed == 'columns') {
+ $not_viewed_pages_total += $row['not_viewed_pages'];
+ $not_viewed_hits_total += $row['not_viewed_hits'];
+ $not_viewed_bandwidth_total += $row['not_viewed_bandwidth'];
+ }
+ }
+ if ( isset($row['config']) && isset($row_prev['config']) &&
+ ($row['config'] == $row_prev['config']) ) {
+
+ $row['visits'] += $row_prev['visits'];
+ $row['unique'] += $row_prev['unique'];
+ $row['pages'] += $row_prev['pages'];
+ $row['hits'] += $row_prev['hits'];
+ $row['bandwidth'] += $row_prev['bandwidth'];
+
+ if ($NotViewed == 'columns') {
+ $row['not_viewed_pages'] += $row_prev['not_viewed_pages'];
+ $row['not_viewed_hits'] += $row_prev['not_viewed_hits'];
+ $row['not_viewed_bandwidth'] += $row_prev['not_viewed_bandwidth'];
+ }
+
+ } elseif ($i > 0) $rows[] = $row_prev;
+ $row_prev = $row;
+ }
+}
+
+function multisort(&$array, $key) {
+ $cmp = create_function('$a, $b',
+ 'if ($a["'.$key.'"] == $b["'.$key.'"]) return 0;'.
+ 'return ($a["'.$key.'"] > $b["'.$key.'"]) ? -1 : 1;');
+ usort($array, $cmp);
+}
+
+if ($sort == 'config') sort($rows); else multisort($rows, $sort);
+
+function detect_language($DirLang) {
+ $Lang = '';
+ foreach (explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $Lang) {
+ $Lang = strtolower(trim(substr($Lang, 0, 2)));
+ if (is_dir("$DirLang/awstats-$Lang.txt")) break; else $Lang = '';
+ }
+ if (!$Lang) $Lang = 'en';
+ return $Lang;
+}
+
+function read_language_data($file) {
+ $r = array();
+ if (file_exists($file)) $lines = file($file);
+ if ($lines) foreach ($lines as $line)
+ if (preg_match('/^message(\d+)=(.*)$/', $line, $match))
+ $r[$match[1]] = $match[2];
+ return $r;
+}
+
+// remove trailing slash if there is one:
+if (substr($DirLang, -1) == '/') $DirLang = substr($DirLang, 0, strlen($DirLang) - 1);
+
+if ($Lang == 'auto') $Lang = detect_language($DirLang);
+
+$message = read_language_data("$DirLang/awstats-$Lang.txt");
+
+if (!$message) {
+ $message[7] = 'Statistics for';
+ $message[10] = 'Number of visits';
+ $message[11] = 'Unique visitors';
+ $message[56] = 'Pages';
+ $message[57] = 'Hits';
+ $message[60] = 'Jan';
+ $message[61] = 'Feb';
+ $message[62] = 'Mar';
+ $message[63] = 'Apr';
+ $message[64] = 'May';
+ $message[65] = 'Jun';
+ $message[66] = 'Jul';
+ $message[67] = 'Aug';
+ $message[68] = 'Sep';
+ $message[69] = 'Oct';
+ $message[70] = 'Nov';
+ $message[71] = 'Dec';
+ $message[75] = 'Bandwidth';
+ $message[102] = 'Total';
+ $message[115] = 'OK';
+ $message[133] = 'Reported period';
+ $message[160] = 'Viewed traffic';
+ $message[161] = 'Not viewed traffic';
+}
+
+function byte_format($number, $decimals = 2) {
+ global $dec_point, $thousands_sep;
+ // kilo, mega, giga, tera, peta, exa, zetta, yotta
+ $prefix_arr = array('','k','M','G','T','P','E','Z','Y');
+ $i = 0;
+ if ($number == 0) $result = 0; else {
+ $value = round($number, $decimals);
+ while ($value > 1024) { $value /= 1024; $i++; }
+ $result = number_format($value, $decimals, $dec_point, $thousands_sep);
+ }
+ $result .= ' '.$prefix_arr[$i].'B'; if (!$i) $result .= 'ytes';
+ return $result;
+}
+
+function num_format($number, $decimals = 0) {
+ global $dec_point, $thousands_sep;
+ return number_format($number, $decimals, $dec_point, $thousands_sep);
+}
+
+
+/*******************************************************
+ * HTML SECTION
+ *******************************************************/
+
+?>
+<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN>
+<html>
+<head>
+<title>AWStats Totals</title>
+<style type="text/css">
+body { font: 11px verdana,arial,helvetica,sans-serif; background-color: white }
+td { font: 11px verdana,arial,helvetica,sans-serif; text-align: center; color: black }
+.l { text-align: left }
+.b { background-color: #CCCCDD; padding: 2px; margin: 0 }
+.d { background-color: white }
+.f { font: 14px verdana,arial,helvetica }
+.border { border: #ECECEC 1px solid }
+a { text-decoration: none }
+a:hover { text-decoration: underline }
+a.h { color: black }
+</style>
+</head>
+<body>
+
+<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>">
+<table class="b" border="0" cellpadding="2" cellspacing="0" width="100%">
+<tr><td class="l">
+<table class="d" border="0" cellpadding="8" cellspacing="0" width="100%">
+<tr>
+<th><?php echo $message[133]; ?>:</th>
+<td class="l">
+<?php
+echo '<select class="f" name="month">'."\n";
+for ($i = 1; $i <= 12; $i++) {
+ echo '<option value="'.$i.'"'; if ($month == $i) echo ' selected'; echo '>'.$message[$i + 59]."\n";
+}
+echo '<option value="all"'; if ($month == 'all') echo ' selected'; echo '>-'."\n";
+echo '</select>'."\n";
+
+echo '<select class="f" name="year">'."\n";
+for ($curyear = date('Y'), $i = $curyear - 4; $i <= $curyear; $i++) {
+ echo '<option value="'.$i.'"'; if ($year == $i) echo ' selected'; echo '>'.$i."\n";
+}
+echo '</select>'."\n";
+?>
+<input type="submit" class="f" value="<?php echo $message[115]; ?>">
+</td></tr>
+</table>
+</td></tr>
+</table>
+</form>
+
+<table align="center">
+<?php
+if ($NotViewed == 'columns') {
+?>
+<tr>
+<td>
+<td class="border" colspan="5"><?php echo $message[160]; ?>
+<td class="border" colspan="3"><?php echo $message[161]; ?>
+<tr>
+<?php
+}
+$url = $_SERVER['SCRIPT_NAME']."?month=$month&year=$year&sort=";
+?>
+<td bgcolor="#ECECEC" class="l" nowrap> <a href="<?php echo $url; ?>config" class="h"><?php echo $message[7]; ?></a>
+<td width="80" bgcolor="#FFB055"><a href="<?php echo $url; ?>unique" class="h"><?php echo $message[11]; ?></a>
+<td width="80" bgcolor="#F8E880"><a href="<?php echo $url; ?>visits" class="h"><?php echo $message[10]; ?></a>
+<td width="80" bgcolor="#4477DD"><a href="<?php echo $url; ?>pages" class="h"><?php echo $message[56]; ?></a>
+<td width="80" bgcolor="#66F0FF"><a href="<?php echo $url; ?>hits" class="h"><?php echo $message[57]; ?></a>
+<td width="80" bgcolor="#2EA495"><a href="<?php echo $url; ?>bandwidth" class="h"><?php echo $message[75]; ?></a>
+<?php
+if ($NotViewed == 'columns') {
+?>
+<td width="80" bgcolor="#4477DD"><a href="<?php echo $url; ?>not_viewed_pages" class="h"><?php echo $message[56]; ?></a>
+<td width="80" bgcolor="#66F0FF"><a href="<?php echo $url; ?>not_viewed_hits" class="h"><?php echo $message[57]; ?></a>
+<td width="80" bgcolor="#2EA495"><a href="<?php echo $url; ?>not_viewed_bandwidth" class="h"><?php echo $message[75]; ?></a>
+<?php
+}
+foreach ($rows as $row) {
+ echo '<tr><td class="l"><a href="'.$AWStatsURL."?month=$month&year=$year&config=".
+ $row['config'].'">'.$row['config'].'</a><td>'.num_format($row['unique']).
+ '<td>'.num_format($row['visits']).'<td>'.num_format($row['pages']).
+ '<td>'.num_format($row['hits']).'<td>'.byte_format($row['bandwidth']);
+ if ($NotViewed == 'columns') echo '<td>'.num_format($row['not_viewed_pages']).
+ '<td>'.num_format($row['not_viewed_hits']).
+ '<td>'.byte_format($row['not_viewed_bandwidth']);
+ echo "\n";
+}
+echo '<tr><td class="l" bgcolor="#ECECEC"> Total<td bgcolor="#ECECEC">'.num_format($unique_total).
+ '<td bgcolor="#ECECEC">'.num_format($visits_total).'<td bgcolor="#ECECEC">'.num_format($pages_total).
+ '<td bgcolor="#ECECEC">'.num_format($hits_total).'<td bgcolor="#ECECEC">'.byte_format($bandwidth_total);
+if ($NotViewed == 'columns') echo '<td bgcolor="#ECECEC">'.num_format($not_viewed_pages_total).
+ '<td bgcolor="#ECECEC">'.num_format($not_viewed_hits_total).
+ '<td bgcolor="#ECECEC">'.byte_format($not_viewed_bandwidth_total);
+echo "\n";
+?>
+</table>
+
+<br><br><center><b>AWStats Totals 1.17</b> - <a
+href="http://www.telartis.nl/xcms/awstats">© 2004-2009 Telartis BV</a></center><br><br>
+
+</body>
+</html>
--- /dev/null
+; $Id $
+name = BAWstats
+description = Based on betterAWstats and the AWstats web statistics tools.
+version = "6.x-1.1-beta"
+core = 6.x
--- /dev/null
+<?php
+
+/**
+ * BAWstats drupal module
+ *
+ * BAWstats is a drupal module written in php for integration of
+ * the BetterAWstats presentation and processing of AWstats data into drupal.
+ * Copyright (C) 2008 Andrew Gillies (anaru@equivocation.org)
+ *
+ * For more information about BetterAWstats see:
+ * http://betterawstats.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or, at
+ * your option, any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+function bawstats_uninstall() {
+ variable_del('bawstats_data');
+ variable_del('bawstats_lib');
+ variable_del('bawstats_lang');
+ variable_del('bawstats_icon');
+ variable_del('bawstats_page_view');
+ variable_del('bawstats_groups');
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+ // $Id: bawstats.module,v 1.4 2008/03/16 14:45:35 tokyoahead Exp $\r
+\r
+/**\r
+ * BAWstats drupal module\r
+ *\r
+ * BAWstats is a drupal module written in php for integration of\r
+ * the BetterAWstats presentation and processing of AWstats data into drupal.\r
+ * Copyright (C) 2008 Andrew Gillies (anaru@equivocation.org)\r
+ *\r
+ * For more information about BetterAWstats see:\r
+ * http://betterawstats.com/\r
+ *\r
+ * This program is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 2 of the License, or, at\r
+ * your option, any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
+ * General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+/**\r
+ * Implementation of hook_help\r
+ */\r
+\r
+function bawstats_help($section) {\r
+ $output = '';\r
+ switch ($section) {\r
+ case 'admin/help#bawstats':\r
+ $output .= '<p>'. t('BAWstats is a drupal interface to "BetterAWstats" by Oliver Spiesshofer. If you run AWstats or have AWstats data, BAWstats can provide a drupal view of the statistics data. The data itself does not need to be in web accessible space, although it must be readable by php (i.e. within the <em>openbasedir</em> setting).') .'</p>';\r
+ $output .= '<p>'. t('By default this module only shows statistics for a single site. Which site this is, is <strong>not</strong> configurable within the module. This is done to prevent administrative users on one site viewing another sites data (the AWstats data directory can hold multiple site data). BAWstats tries to guess the AWstats site name from the drupal site name, but if the guess is wrong it can be set within the settings.php file using the <em>$conf[\'bawstats_defsite\']</em> variable. For example, <em>$conf[\'bawstats_defsite\'] = \'equivocation.org\';</em> will generate site statistics from the AWStats data files for the site equivocation.org.') .'</p>';\r
+ $output .= '<p>'. t('It is possible to view all the site statistics found in the AWstats data directory. By setting <em>$conf[\'bawstats_admin_access\'] = 1;</em> in the settings.php file, access to the statistics for <strong>all</strong> the sites available is given.') .'</p>';\r
+ $output .= '<p>'. t('As this module only provides a drupal interface into the non-drupal "Better AWstats" code, limited configuration is available through drupal. Fine configuration of the statistics views may be achieved by editing the Better AWstats <em>config.php</em> file.') .'</p>';\r
+ break;\r
+ case 'admin/settings/bawstats':\r
+ $output .= '<p>'. t('BAWstats is based on "BetterAWstats" by Oliver Spiesshofer. This module displays AWstats data within drupal. The location of the AWstats data and the location of auxiliary AWstats libraries can be configured below.') .'</p>';\r
+ $output .= '<p>'. t('Note, it may be considered important that the AWstats data and library locations reside outside of web file space. This would remove direct access to the data with the only access through AWstats itself (if it is running as a CGI) and/or through this drupal module.') .'</p>';\r
+ $output .= '<p>'. t('Once the AWstats locations are correctly configured, site statistics can be viewed under the admin reports') . ' (<a href="/admin/reports/bawstats">/admin/reports/bawstats</a>).</p>';\r
+\r
+ }\r
+ return $output;\r
+}\r
+\r
+/**\r
+ * Implementation of hook_perm().\r
+ */\r
+function bawstats_perm() {\r
+ return array('view site statistics','statistics admin');\r
+}\r
+\r
+/**\r
+ * Implementation of hook_init()\r
+ * This hook is run at the beginning of the page request. When this hook\r
+ * is called, all modules are already loaded in memory. Here used to\r
+ * setup CSS\r
+ */\r
+\r
+function bawstats_init() {\r
+ drupal_add_css(drupal_get_path('module', 'bawstats') .'/includes/bawstats.css');\r
+}\r
+\r
+/**\r
+ * Implementation of hook_menu().\r
+ */\r
+\r
+function bawstats_menu() {\r
+ $items = array();\r
+ $includes_path = drupal_get_path('module', 'bawstats') . '/includes';\r
+\r
+ $items['admin/settings/bawstats'] = array(\r
+ 'title' => 'BAW Statistics',\r
+ 'description' => 'Configure site statistics.',\r
+ 'page callback' => 'drupal_get_form',\r
+ 'page arguments' => array('bawstats_admin_settings'),\r
+ 'file' => 'bawstats.admin.inc',\r
+ 'file path' => $includes_path,\r
+ 'access arguments' => array('statistics admin'),\r
+ );\r
+\r
+ $items['admin/reports/bawstats'] = array(\r
+ 'title' => 'View Site Statistics',\r
+ 'description' => t('View AWStats web statistics.'),\r
+ 'page callback' => 'bawstats_view_theform',\r
+ 'page arguments' => array(),\r
+ 'file' => 'bawstats.stats.inc',\r
+ 'file path' => $includes_path,\r
+ 'weight' => 1,\r
+ 'access arguments' => array('view site statistics'),\r
+ );\r
+\r
+ $items['admin/reports/bawstats/all/%/%'] = array(\r
+ 'title' => 'View Site Statistics',\r
+ 'type' => MENU_CALLBACK,\r
+ 'page callback' => 'bawstats_view_theform',\r
+ 'page arguments' => array(4,5),\r
+ 'file' => 'bawstats.stats.inc',\r
+ 'file path' => $includes_path,\r
+ 'weight' => 1,\r
+ 'access arguments' => array('view site statistics'),\r
+ );\r
+\r
+ // create the sub group menues if requested\r
+ if (variable_get('bawstats_page_view',0)>0) {\r
+ $statgroups = variable_get('bawstats_groups',array());\r
+ if (count($statgroups)>0) {\r
+ $pri = 1;\r
+ foreach ($statgroups as $group => $group_details) {\r
+ if ($pri==1) {\r
+ $items['admin/reports/bawstats/'.$group.'/%/%'] = array(\r
+ 'title' => 'View Site Statistics',\r
+ 'type' => MENU_CALLBACK,\r
+ 'page callback' => 'bawstats_view_theform',\r
+ 'page arguments' => array(4,5,$group),\r
+ 'file' => 'bawstats.stats.inc',\r
+ 'file path' => $includes_path,\r
+ 'weight' => $pri,\r
+ 'access arguments' => array('view site statistics')\r
+ );\r
+ } else {\r
+ $items['admin/reports/bawstats/'.$group] = array(\r
+ 'title' => $group_details,\r
+ 'type' => MENU_NORMAL_ITEM,\r
+ 'page callback' => 'bawstats_set_section',\r
+ 'page arguments' => array($group),\r
+ 'file' => 'bawstats.stats.inc',\r
+ 'file path' => $includes_path,\r
+ 'weight' => $pri,\r
+ 'access arguments' => array('view site statistics')\r
+ );\r
+ $items['admin/reports/bawstats/'.$group.'/%/%'] = array(\r
+ 'title' => $group_details,\r
+ 'type' => MENU_CALLBACK,\r
+ 'page callback' => 'bawstats_view_theform',\r
+ 'page arguments' => array(4,5,$group),\r
+ 'file' => 'bawstats.stats.inc',\r
+ 'file path' => $includes_path,\r
+ 'weight' => $pri,\r
+ 'access arguments' => array('view site statistics')\r
+ );\r
+ }\r
+ $pri += 1;\r
+ }\r
+ }\r
+ }\r
+\r
+ // the "other" more specific things we don't have menus for!\r
+ $items['admin/reports/bawstats/details/%/%/%'] = array(\r
+ 'title' => $group_details,\r
+ 'type' => MENU_CALLBACK,\r
+ 'page callback' => 'bawstats_view_theform',\r
+ 'page arguments' => array(5,6,4),\r
+ 'file' => 'bawstats.stats.inc',\r
+ 'file path' => $includes_path,\r
+ 'weight' => $pri,\r
+ 'access arguments' => array('view site statistics')\r
+ );\r
+\r
+ return $items;\r
+}\r
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+ *\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+// this file can't be used on its own - do not change these 3 lines\r
+if (strpos ($_SERVER['PHP_SELF'], 'config.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+// ATTENTION: BetterAWstats has an online config editor that you can use\r
+// instead of editing this file here. The link is on the bottom of the menu!\r
+// To use it, set $BAW_CONF['online_config']= true; and make sure that the\r
+// file is writable by the server, AND protectthe BetterAWStats installation\r
+// by a .htaccess file!\r
+\r
+//*********************************************************/\r
+//* SITE SETTINGS\r
+//*********************************************************/\r
+ini_set("memory_limit","1G");\r
+set_time_limit(60*3);\r
+$BAW_MES['e'] = 'iso-8859-1';\r
+// NAME: Script URL\r
+// INFO: The url of BetterAWstats' directory, No trailing slash\r
+// DEFAULT: 'http://awstats.local'\r
+$BAW_CONF['site_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/betterawstats';\r
+\r
+// NAME: Script path\r
+// INFO: The path of BetterAWstats, No trailing slash\r
+// DEFAULT: '/path/to/betterawstats/'\r
+$BAW_CONF['site_path'] = $_SERVER['DOCUMENT_ROOT'].'/betterawstats';\r
+\r
+// NAME: Path to AWStats Data\r
+// INFO: Set this value to the directory where AWStats saves its database\r
+// files into. ATTENTION: If you read those files on windows but have\r
+// them created on linux or the other way round, make sure you transfer\r
+// them 'BINARY'. Otherwise they cannot be read properly. No trailing\r
+// slash\r
+// DEFAULT: '/path/to/betterawstats/awstats/data'\r
+$BAW_CONF['path_data'] = '/var/lib/awstats';\r
+\r
+// NAME: Path to AWStats Libraries\r
+// INFO: Set this value to the directory where AWStats saves its library\r
+// files into. No trailing slash\r
+// DEFAULT: '/path/to/betterawstats/awstats/lib'\r
+$BAW_CONF['path_lib'] = '/usr/share/awstats/lib';\r
+\r
+// NAME: Path to AWStats Language files\r
+// INFO: Set this value to the directory where AWStats saves its language\r
+// files into. No trailing slash\r
+// DEFAULT: '/path/to/betterawstats/awstats/lang'\r
+$BAW_CONF['path_lang'] = '/usr/share/awstats/lang';\r
+\r
+// NAME: URL to AWStats Icons\r
+// INFO: The url to the awstats icons, should include the whole http://...,\r
+// no trailing slash.\r
+// DEFAULT: 'http://awstats.local/awstats/icon'\r
+#$BAW_CONF['icons_url'] = $BAW_CONF['site_url'].'/icons';\r
+$BAW_CONF['icons_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/icon';\r
+\r
+// NAME: Web Configuration\r
+// INFO: Enable the online configuration editor? WARNING: Your config.php has\r
+// to be writable in order to enable this. This is a BAD idea to use\r
+// unless the folder is password-protected with a .htaccess file or\r
+// similar.\r
+// DEFAULT: true\r
+// POSSIBLE VALUES: true, false\r
+$BAW_CONF['online_config'] = false;\r
+\r
+// NAME: Change configuration password?\r
+// INFO: This password is needed to access the online configuration. It has\r
+// to be longer than 5 letters.\r
+// DEFAULT: ''\r
+$BAW_CONF['online_config_password'] = '';\r
+\r
+// NAME: Limit to server?\r
+// INFO: Set this to a simgle server that you want to limit or "false" to\r
+// show all. The server name should be the one used for awstats.\r
+// DEFAULT: 'show_all'\r
+// POSSIBLE VALUES: 'sitename.org', 'show_all'\r
+$BAW_CONF['limit_server'] = 'show_all';\r
+\r
+\r
+\r
+//*********************************************************/\r
+//* LAYOUT SETTINGS\r
+//*********************************************************/\r
+\r
+// NAME: Layout Type\r
+// INFO: Display page in vertical or horizontal layout?\r
+// DEFAULT: 'vertical'\r
+// POSSIBLE VALUES: 'vertical', 'horizontal'\r
+$BAW_CONF['layout_type'] = 'vertical';\r
+\r
+// NAME: Language\r
+// INFO: Set your language. Set to "auto" to autodetect from browser\r
+// DEFAULT: 'auto'\r
+// POSSIBLE VALUES: 'auto', 'al', 'ba', 'bg', 'ca', 'tw', 'cn', 'cz', 'dk', 'nl',\r
+// 'en', 'et', 'eu', 'fi', 'fr', 'gl', 'de', 'gr', 'he', 'hu',\r
+// 'is', 'id', 'it', 'jp', 'kr', 'lv', 'nn', 'nb', 'pl', 'pt',\r
+// 'br', 'ro', 'ru', 'sr', 'sk', 'es', 'se', 'tr', 'ua', 'wlk'\r
+$BAW_CONF['lang_setting'] = 'auto';\r
+\r
+// NAME: Decimal Point\r
+// INFO: Decimal Point Character (99.9)\r
+// DEFAULT: '.'\r
+$BAW_CONF['dec_point'] = '.';\r
+\r
+// NAME: Thousands separator\r
+// INFO: Thousand Digit separator (1'000)\r
+// DEFAULT: "'"\r
+$BAW_CONF['tho_point'] = "'";\r
+\r
+// NAME: Date format (2007-31-12)\r
+// INFO: How should a date look like? For formatting, please consult\r
+// http://php.net/manual/en/function.date.php\r
+// DEFAULT: 'Y-M-d'\r
+$BAW_CONF['date_format'] = 'Y-M-d';\r
+\r
+// NAME: Date & Time format (2007-31-12 23:59)\r
+// INFO: How should a date & time look like? For formatting,please consult\r
+// http://php.net/manual/en/function.date.php\r
+// DEFAULT: 'Y-M-d H:i'\r
+$BAW_CONF['date_time_format'] = 'Y-M-d - H:i';\r
+\r
+// NAME: Percentage decimals\r
+// INFO: How many decimals for percentage value? (99.9%)\r
+// DEFAULT: '1'\r
+$BAW_CONF['percent_decimals'] = '1';\r
+\r
+// NAME: Hide Empty data\r
+// INFO: Completely hide graphs with zero entries? (The menu will also be\r
+// hidden)\r
+// DEFAULT: true\r
+// POSSIBLE VALUES: true, false\r
+$BAW_CONF['hideempty'] = true;\r
+\r
+// NAME: Submit dropdowns on change\r
+// INFO: If enabled, the site/date dropdowns do not have an "OK"-button. The\r
+// page is refreshed as soon as you choose a new value. Not recommended\r
+// for large sites.\r
+// DEFAULT: true\r
+// POSSIBLE VALUES: true, false\r
+$BAW_CONF['auto_submit_form'] = true;\r
+\r
+\r
+\r
+//*********************************************************/\r
+//* TABLE SETTINGS\r
+//*********************************************************/\r
+\r
+// NAME: First day of the week\r
+// INFO: Should Sunday be the first day of the week or monday?\r
+// DEFAULT: '1'\r
+// POSSIBLE VALUES: '1', '2'\r
+$BAW_CONF['firstdayofweek'] = '1';\r
+\r
+// NAME: Field Length\r
+// INFO: What is the max. text length of table fields? (Applies only to\r
+// links)\r
+// DEFAULT: '65'\r
+$BAW_CONF['field_length'] = '50';\r
+\r
+// NAME: Max. Table Lines\r
+// INFO: What is the max. no. of lines a table can have? Set to "false" to\r
+// disable. If a table reaches this number of lines, The rest is\r
+// summarized into one line. This also applies to the "full list" view\r
+// of a table\r
+// DEFAULT: '10000'\r
+$BAW_CONF['maxlines'] = '10000';\r
+\r
+\r
+\r
+//*********************************************************/\r
+//* CHART SETTINGS\r
+//*********************************************************/\r
+\r
+// NAME: Max scale for Visitors\r
+// INFO: The maximum value of the chosen option will define the maximum\r
+// height of the Visitors bars in the chart\r
+// DEFAULT: 'layout_visits'\r
+// POSSIBLE VALUES: 'layout_visitos', 'layout_visits', 'layout_pages',\r
+// 'layout_hits', 'layout_bytes'\r
+$BAW_CONF['max_visitors'] = 'layout_visits';\r
+\r
+// NAME: Max scale for Visits\r
+// INFO: The maximum value of the chosen option will define the maximum\r
+// height of the Visits bars in the chart\r
+// DEFAULT: 'layout_visits'\r
+// POSSIBLE VALUES: 'layout_visits', 'layout_pages', 'layout_hits', 'layout_bytes'\r
+$BAW_CONF['max_visits'] = 'layout_visits';\r
+\r
+// NAME: Max scale for Pages\r
+// INFO: The maximum value of the chosen option will define the maximum\r
+// height of the Pages bars in the chart\r
+// DEFAULT: 'layout_pages'\r
+// POSSIBLE VALUES: 'layout_pages', 'layout_hits', 'layout_bytes'\r
+$BAW_CONF['max_pages'] = 'layout_pages';\r
+\r
+// NAME: Max scale for Hits\r
+// INFO: The maximum value of the chosen option will define the maximum\r
+// height of the Hits bars in the chart\r
+// DEFAULT: 'layout_hits'\r
+// POSSIBLE VALUES: 'layout_hits', 'layout_bytes'\r
+$BAW_CONF['max_hits'] = 'layout_hits';\r
+\r
+// NAME: Max no of chart rows\r
+// INFO: When displaying the charts with the full lists, How many items can\r
+// there be displayed? The rest will sum up into "Others". This is done\r
+// to prevent too wide charts\r
+// DEFAULT: '50'\r
+$BAW_CONF['max_chart_items'] = '30';\r
+\r
+// NAME: Chart Titles?\r
+// INFO: If enabled, it will show a title on top of each chart.\r
+// DEFAULT: true\r
+// POSSIBLE VALUES: true, false\r
+$BAW_CONF['chart_titles'] = false;\r
+\r
+\r
+\r
+//*********************************************************/\r
+//* JPGRAPH SETTINGS\r
+//*********************************************************/\r
+\r
+// NAME: Enable JPgraph?\r
+// INFO: To use JPGraph, you have to download it from\r
+// http://www.aditus.nu/jpgraph/jpdownload.php.\r
+// DEFAULT: true\r
+// POSSIBLE VALUES: true, false\r
+$BAW_CONF['use_jpgraph'] = false;\r
+\r
+// NAME: Path to JPGraph\r
+// INFO: Where is your JPGraph installation? (The folder where jpgraph.php is\r
+// in. No trailing slash)\r
+// DEFAULT: '/path/to/betterawstats/jpgraph/src'\r
+$BAW_CONF['jpgraph_path'] = '/home/www/izideal/share/jpgraph/src';\r
+\r
+\r
+\r
+//*********************************************************/\r
+//* ADVANCED SETTINGS\r
+//*********************************************************/\r
+\r
+// NAME: XHTML/ HTML\r
+// INFO: Do you want output in HTML or XHTML?\r
+// DEFAULT: true\r
+// POSSIBLE VALUES: true, false\r
+$BAW_CONF['xhtml'] = false;\r
+\r
+// NAME: Debug\r
+// INFO: Do you want to show debug-output (VERY detailed)?\r
+// DEFAULT: true\r
+// POSSIBLE VALUES: true, false\r
+$BAW_CONF['debug'] = false;\r
+\r
+// NAME: Parser Stats\r
+// INFO: Do you want to show log file parsing data below the stats summary?\r
+// DEFAULT: true\r
+// POSSIBLE VALUES: true, false\r
+$BAW_CONF['show_parser_stats'] = true;\r
+\r
+// NAME: Module settings\r
+// INFO: Are you using BetterAWstats as a module for another software?\r
+// (Currently only Drupal is supported)\r
+// DEFAULT: 'none'\r
+// POSSIBLE VALUES: 'none', 'drupal'\r
+$BAW_CONF['module'] = 'none';\r
+\r
+\r
+\r
+//*********************************************************/\r
+//* DISPLAY\r
+//*********************************************************/\r
+\r
+// NAME: Summary\r
+// INFO: General Overview of key figures and dates\r
+$BAW_CONF_DIS['overview'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '1', // Item Sequence\r
+);\r
+\r
+// NAME: Monthly history\r
+// INFO: Monthly data\r
+$BAW_CONF_DIS['months'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '2', // Item Sequence\r
+ 'top_x' => '24', // Show how many entries?\r
+ 'avg' => true, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'chart' => true, // Show HTML chart?\r
+ 'table' => true, // Show data table?\r
+);\r
+\r
+// NAME: Days of month\r
+// INFO: Daily data\r
+$BAW_CONF_DIS['days'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '3', // Item Sequence\r
+ 'avg' => true, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'chart' => true, // Show HTML chart?\r
+ 'table' => true, // Show data table?\r
+);\r
+\r
+// NAME: Days of week (Averages)\r
+// INFO: Weekdays\r
+$BAW_CONF_DIS['weekdays'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '4', // Item Sequence\r
+ 'avg' => true, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'chart' => true, // Show HTML chart?\r
+ 'table' => true, // Show data table?\r
+);\r
+\r
+// NAME: Hours (Averages)\r
+// INFO: Hours of the day\r
+$BAW_CONF_DIS['hours'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '5', // Item Sequence\r
+ 'avg' => true, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'chart' => true, // Show HTML chart?\r
+ 'table' => true, // Show data table?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '1'=Hours, '2'=Pages, '3'=Hits, '4'=Bandwidth\r
+ 'sort_dir' => SORT_ASC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Visitors domains/countries\r
+// INFO: Domains of visitors\r
+$BAW_CONF_DIS['domains'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '6', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'chart' => true, // Show HTML chart?\r
+ 'table' => true, // Show data table?\r
+ 'map' => true, // Show Map Image?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '0', // Sort for which column? Possible values are:\r
+ // 'key'=Visitors domains/countries, '0'=Pages, '1'=Hits, '2'=Bandwidth\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Hosts\r
+// INFO: IP addresses of visitors\r
+$BAW_CONF_DIS['visitors'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '7', // Item Sequence\r
+ 'avg' => true, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Hosts, '1'=Pages, '2'=Hits, '3'=Bandwidth, '4'=Ratio(Hits/Pages),\r
+ // '5'=Last visit\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+ 'assumebot' => '1', // Hits/pages minimum ratio to assume normal user?\r
+);\r
+\r
+// NAME: Authenticated users\r
+// INFO: Logins for username/password protected pages\r
+$BAW_CONF_DIS['logins'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '8', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '5', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // 'key'=Authenticated users, '0'=Pages, '1'=Hits, '2'=Bandwidth, '3'=Last\r
+ // visit\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Robots/Spiders visitors\r
+// INFO: Spiders, Robots of Search engines etc.\r
+$BAW_CONF_DIS['robots'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '9', // Item Sequence\r
+ 'avg' => true, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Robots/Spiders visitors, '1'=Hits, '2'=Hits (robots.txt),\r
+ // '3'=Bandwidth, '4'=Last visit\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Worms\r
+// INFO: Worms searching for security holes\r
+$BAW_CONF_DIS['worms'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '10', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '2', // Sort for which column? Possible values are:\r
+ // '0'=Worms, '1'=Sensitive targets, '2'=Hits, '3'=Bandwidth, '4'=Last visit\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Visits duration\r
+// INFO: How long have people been on the site?\r
+$BAW_CONF_DIS['sessions'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '11', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+);\r
+\r
+// NAME: File type\r
+// INFO: What filetypes are on the site\r
+$BAW_CONF_DIS['filetype'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '12', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'chart' => true, // Show HTML chart?\r
+ 'sort' => '0', // Sort for which column? Possible values are:\r
+ // 'key'=File type, '0'=Hits, '1'=Bandwidth, '2'=Compression on,\r
+ // '3'=Compression result\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Pages-URL\r
+// INFO: Pages on the site\r
+$BAW_CONF_DIS['urls'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '13', // Item Sequence\r
+ 'avg' => true, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Pages-URL, '1'=Viewed, '2'=Average size, '3'=Entry, '4'=Exit\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Files/paths\r
+// INFO: Files/paths on the site\r
+$BAW_CONF_DIS['paths'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '14', // Item Sequence\r
+ 'avg' => true, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Files/paths, '1'=Viewed\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Operating Systems\r
+// INFO: Operating system of users\r
+$BAW_CONF_DIS['os'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '15', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'chart' => true, // Show HTML chart?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '2', // Sort for which column? Possible values are:\r
+ // '1'=Operating Systems, '2'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Unknown OS (useragent field)\r
+// INFO: Unknown Operating system\r
+$BAW_CONF_DIS['unknownos'] = array(\r
+ 'show' => false, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '17', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '1'=User Agent, '2'=Last visit\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Operating Systems (+Versions)\r
+// INFO: Operating system of users including versions\r
+$BAW_CONF_DIS['osversions'] = array(\r
+ 'show' => false, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '16', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'chart' => true, // Show HTML chart?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '2', // Sort for which column? Possible values are:\r
+ // '1'=Operating Systems, '2'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Browsers\r
+// INFO: User Browser Type\r
+$BAW_CONF_DIS['browsers'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '18', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'chart' => true, // Show HTML chart?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '3', // Sort for which column? Possible values are:\r
+ // '1'=Browsers, '2'=Grabber, '3'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Browsers (+Versions)\r
+// INFO: User Browser Type (+Versions)\r
+$BAW_CONF_DIS['browserversions'] = array(\r
+ 'show' => false, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '19', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'chart' => false, // Show HTML chart?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '4', // Sort for which column? Possible values are:\r
+ // '2'=Browsers, '3'=Grabber, '4'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Unknown browsers (useragent field)\r
+// INFO: Unknown Browsers\r
+$BAW_CONF_DIS['unknownbrowser'] = array(\r
+ 'show' => false, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '20', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '1'=User Agent, '2'=Last visit\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Screen sizes\r
+// INFO: Screensizes of users\r
+$BAW_CONF_DIS['screensizes'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '21', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => false, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'chart' => true, // Show HTML chart?\r
+ 'top_x' => '5', // Show how many entries?\r
+ 'sort' => '2', // Sort for which column? Possible values are:\r
+ // '1'=Screen sizes, '2'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Referring search engines\r
+// INFO: Referrals from search engines\r
+$BAW_CONF_DIS['se_referers'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '22', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Referring search engines, '1'=Pages, '2'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+ 'favicon' => true, // Retrieve favicons for external URLs?\r
+);\r
+\r
+// NAME: Referring sites\r
+// INFO: Referrals from other sites\r
+$BAW_CONF_DIS['referers'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '23', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Referring sites, '1'=Pages, '2'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+ 'favicon' => false, // Retrieve favicons for external URLs?\r
+);\r
+\r
+// NAME: Referring sites by Domains\r
+// INFO: Referrals from other sites, grouped by 2-nd level domains\r
+$BAW_CONF_DIS['referer_domains'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '24', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Referring sites, '1'=Pages, '2'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+ 'favicon' => false, // Retrieve favicons for external URLs?\r
+ 'domain_lvls' => '3', // Shorten URL to how many domain levels? (-1 to disable)\r
+);\r
+\r
+// NAME: Hotlinks\r
+// INFO: Pages linking to images/data on your site\r
+$BAW_CONF_DIS['hotlinks'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '25', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Referring sites, '1'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+ 'favicon' => false, // Retrieve favicons for external URLs?\r
+);\r
+\r
+// NAME: Hotlinks by Domains\r
+// INFO: Domains linking to images/data on your site\r
+$BAW_CONF_DIS['hotlink_domains'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '26', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Referring sites, '1'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+ 'favicon' => false, // Retrieve favicons for external URLs?\r
+ 'domain_lvls' => '3', // Shorten URL to how many domain levels? (-1 to disable)\r
+);\r
+\r
+// NAME: Search Keyphrases\r
+// INFO: Search phrases\r
+$BAW_CONF_DIS['searchphrases'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '27', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=different keyphrases, '1'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Search Keywords\r
+// INFO: Search words\r
+$BAW_CONF_DIS['searchwords'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '28', // Item Sequence\r
+ 'avg' => false, // Show averages?\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=different keywords, '1'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Miscellaneous\r
+// INFO: User system features\r
+$BAW_CONF_DIS['misc'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '29', // Item Sequence\r
+ 'table' => true, // Show data table?\r
+);\r
+\r
+// NAME: HTTP Status codes\r
+// INFO: Acesses to pages that returned errors\r
+$BAW_CONF_DIS['errors'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '30', // Item Sequence\r
+ 'total' => true, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '2', // Sort for which column? Possible values are:\r
+ // '0'=HTTP Status codes, '2'=Hits, '3'=Average size\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Error Hits\r
+// INFO: Required but not found URLs (HTTP code 404)\r
+$BAW_CONF_DIS['errors404'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '31', // Item Sequence\r
+ 'table' => true, // Show data table?\r
+ 'total' => true, // Show total Sum?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Error Hits, '1'=Hits, '2'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+// NAME: Color depth\r
+// INFO: Screen colors of users\r
+$BAW_CONF_DIS['extra_1'] = array(\r
+ 'show' => true, // Show this Data?\r
+ 'collapse' => false, // Collapsed?\r
+ 'order' => '32', // Item Sequence\r
+ 'total' => false, // Show total Sum?\r
+ 'table' => true, // Show data table?\r
+ 'top_x' => '10', // Show how many entries?\r
+ 'sort' => '1', // Sort for which column? Possible values are:\r
+ // '0'=Color depth in bits, '1'=Hits\r
+ 'sort_dir' => SORT_DESC, // Sort direction? Possible values are:\r
+ // SORT_ASC=Ascending, SORT_DESC=Descending\r
+);\r
+\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+ *\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+\r
+/**\r
+ * File contents:\r
+ *\r
+ * This file contains only function related to the online config manager. It handles\r
+ * editing & saving the config as well as logging the admin in and out.\r
+ */\r
+\r
+// this file can't be used on its own\r
+if (strpos ($_SERVER['PHP_SELF'], 'config_default.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+/*\r
+* Saves the config settings to file\r
+*\r
+*/\r
+function baw_action_save_config() {\r
+ global $BAW_CONF, $BAW_CONF_DEF, $BAW_CONF_DIS_DEF, $BAW_CONF_DIS;\r
+ global $BAW_MES, $BAW_CONF_DIS_TYP, $BAW_FILE_HEADER;\r
+ @session_start();\r
+ if (!baw_check_user()) {\r
+ return baw_site_header() . baw_config_login_form();\r
+ };\r
+\r
+ if (isset($_POST['exit']) && ($_POST['exit'] == $BAW_MES['cfg_exit'])) {\r
+ return baw_display_index();\r
+ }\r
+ if (isset($_POST['logout']) && ($_POST['logout'] == $BAW_MES['cfg_logout'])) {\r
+ baw_logout();\r
+ return baw_display_index();\r
+ }\r
+ if (!$BAW_CONF['online_config']) {\r
+ return baw_raise_error('configdisabled');\r
+ }\r
+ $filename = $BAW_CONF['site_path'].'/config.php';\r
+ if (is_writable($filename)) {\r
+ // prepare config for writing\r
+ $str = "<?php\r\n";\r
+ $intro = $BAW_MES['config_intro'];\r
+ $str .= $BAW_FILE_HEADER;\r
+ $str .= wordwrap($intro, 75, "\r\n// ");\r
+\r
+ foreach ($BAW_CONF_DEF as $sect => $sectdata) {\r
+ $sect = strtoupper($sect);\r
+ $str .= "\r\n\r\n//*********************************************************/\r\n"\r
+ . "//* $sect\r\n"\r
+ . "//*********************************************************/\r\n\r\n";\r
+ foreach ($sectdata as $setting => $misc) {\r
+ if ($misc['type'] !== 'fixed') {\r
+ // set standard first\r
+ $allowed_values = '';\r
+ $val = $_POST[$setting];\r
+ $default = $misc['default'];\r
+ $val_str = "'$val'";\r
+ $default_str = "'$default'";\r
+ // now set the execptions\r
+ if ($val == 'true' or $val == 'false') {\r
+ $val_str = "$val";\r
+ if ($default == true) {\r
+ $default_str = 'true';\r
+ } else {\r
+ $default_str = 'false';\r
+ }\r
+ $allowed_values = "// POSSIBLE VALUES: true, false\r\n";\r
+ } else if ($val == "'"){\r
+ $val_str = '"\'"';\r
+ } else {\r
+ $val_str = "'$val'";\r
+ }\r
+ if ($default == "'"){\r
+ $default_str = '"\'"';\r
+ }\r
+\r
+ if ($setting == 'limit_server') { // dont print domain names into the config file\r
+ $allowed_values = "// POSSIBLE VALUES: 'sitename.org', 'show_all'\r\n";//\r
+ } else if ($misc['type'] == 'dropdown' && ($val !== 'true' && $val !== 'false')) {\r
+ $allowed_values = implode("', '", array_keys($misc['values']));\r
+ $allowed_values = wordwrap($allowed_values, 60, "\r\n// ");\r
+ $allowed_values = "// POSSIBLE VALUES: '$allowed_values'\r\n";\r
+ } else if ($misc['type'] == 'password') {\r
+ $val = $_POST[$setting];\r
+ if ($val[0] !== $val[1]) {\r
+ echo baw_raise_error('password_match');\r
+ exit;\r
+ } else if ($val[0] == '') { // password will not change if empty\r
+ $val_str = "'{$BAW_CONF['online_config_password']}'";\r
+ } else if (strlen($val[0]) < 5) { // password too short\r
+ echo baw_raise_error('password_short');\r
+ exit;\r
+ } else {\r
+ $val_str = "'{$val[0]}'";\r
+ }\r
+ }\r
+ $out_help = wordwrap(\r
+ strip_tags(html_entity_decode($misc['help'])),\r
+ 68\r
+ , "\r\n// "\r
+ );\r
+ $name = html_entity_decode($misc['name']);\r
+ $str .= "// {$BAW_MES['cfg_name']} $name\r\n"\r
+ . "// {$BAW_MES['cfg_info']} {$out_help}\r\n"\r
+ . "// {$BAW_MES['cfg_def']} $default_str\r\n"\r
+ . $allowed_values\r
+ . "\$BAW_CONF['$setting'] = $val_str;\r\n\r\n";\r
+ }\r
+ }\r
+ }\r
+ $str .= "\r\n\r\n//*********************************************************/\r\n"\r
+ . "//* {$BAW_MES['cfg_display']}\r\n"\r
+ . "//*********************************************************/\r\n\r\n";\r
+\r
+ foreach ($BAW_CONF_DIS_DEF as $setting => $misc) {\r
+ $val_arr = $_POST[$setting];\r
+ $name = html_entity_decode($misc['name']);\r
+ $help = html_entity_decode($misc['help']);\r
+ $str .= "// {$BAW_MES['cfg_name']} {$name}\r\n"\r
+ . "// {$BAW_MES['cfg_info']} {$help}\r\n";\r
+ $this_conf = $BAW_CONF_DIS[$setting];\r
+ $substr ='';\r
+ foreach ($this_conf as $name => $oldval) {\r
+ $type = $BAW_CONF_DIS_TYP[$name][1];\r
+ $desc = $BAW_CONF_DIS_TYP[$name][0];\r
+ $val = $val_arr[$name];\r
+ if ($type == 'string') {\r
+ $val = "'$val'";\r
+ } else if ($type == 'sorting1') {\r
+ $desc2 = $BAW_MES['cfg_possible_values'] ."\r\n // ";\r
+ foreach ($misc['sorting'] as $key => $value) {\r
+ $desc2 .= "'$key'=$value, ";\r
+ }\r
+ $desc2 = substr($desc2, 0, -2);\r
+ $desc2 = wordwrap($desc2, 75, "\r\n // ");\r
+ $desc .= $desc2;\r
+ $val = "'$val'";\r
+ } else if ($type == 'sorting2') {\r
+ $desc .= $BAW_MES['cfg_possible_values'] . "\r\n"\r
+ . " // " . $BAW_MES['cfg_type_sort_dir_opts'];\r
+ } else {\r
+ $val = "$val";\r
+ }\r
+ $desc = strip_tags(html_entity_decode($desc));\r
+ $substr .= " '$name' => $val, // $desc\r\n";\r
+ }\r
+ $str .= "\$BAW_CONF_DIS['$setting'] = array(\r\n$substr);\r\n\r\n";\r
+ }\r
+ $str .= "\r\n?>";\r
+ if (!$handle = fopen($filename, 'w+')) {\r
+ return baw_raise_error('configread');\r
+ }\r
+ if (fwrite($handle, $str) === FALSE) {\r
+ return baw_raise_error('configwrite');\r
+ }\r
+\r
+ $out = $BAW_MES['cfg_saved'];\r
+ $out = baw_site_header() . "<div class=\"errorbox\"><h1>BetterAWstats</h1>$out</div></body></html>";\r
+ fclose($handle);\r
+ } else {\r
+ $out = baw_site_header() . baw_raise_error('configwrite');\r
+ }\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Shows the login form\r
+*\r
+*/\r
+function baw_config_login_form(){\r
+ global $BAW_MES, $BAW_CONF;\r
+ $out = "<form class=\"login_form\" action=\"{$BAW_CONF['site_url']}/index.php\" method=\"post\">\n"\r
+ ."<p>"\r
+ . $BAW_MES['require_password'] . "<br" . XHTML . ">". "<br" . XHTML . ">"\r
+ . "<input type=\"password\" name=\"password\" value=\"\" size=\"20\"" . XHTML . "> "\r
+ . "<input type=\"hidden\" name=\"action\" value=\"do_login\"" . XHTML . "> "\r
+ . "<input type=\"submit\" name=\"submit\" value=\"Ok\"" . XHTML . ">\n"\r
+ . "<input type=\"submit\" name=\"exit\" value=\"{$BAW_MES['cfg_exit']}\"" . XHTML . ">\n"\r
+ ."</p>"\r
+ . "</form>";\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Checks the password and logs the user in if OK\r
+*\r
+*/\r
+function baw_action_do_login() {\r
+ global $BAW_CONF, $BAW_MES;\r
+ if (isset($_POST['exit']) && ($_POST['exit'] == $BAW_MES['cfg_exit'])) {\r
+ return baw_display_index();\r
+ }\r
+ if (isset($_POST['password'])) {\r
+ if ($_POST['password'] == $BAW_CONF['online_config_password']) {\r
+ session_start();\r
+ $_SESSION['loggedin'] = true;\r
+ $_SESSION['password'] = MD5($_POST['password']);\r
+ $out = baw_action_config_editor();\r
+ } else {\r
+ $out = baw_site_header()\r
+ . baw_raise_error('password_incorrect')\r
+ . baw_config_login_form();\r
+ }\r
+ } else {\r
+ $out = baw_site_header()\r
+ . baw_config_login_form();\r
+ }\r
+ echo $out;\r
+}\r
+\r
+/*\r
+* Check if the user is logged in and if the password has changed\r
+*\r
+*/\r
+function baw_check_user() {\r
+ global $BAW_CONF;\r
+ if (isset($_SESSION['loggedin']) &&\r
+ $_SESSION['loggedin'] == true &&\r
+ isset ($_SESSION['password']) &&\r
+ strlen($BAW_CONF['online_config_password']) > 5 &&\r
+ $_SESSION['password'] == MD5($BAW_CONF['online_config_password'])) {\r
+ return true;\r
+ }\r
+ if (strlen($BAW_CONF['online_config_password']) <= 5) {\r
+ echo "The password has to be longer than 5 letters!";\r
+ }\r
+ return false;\r
+}\r
+\r
+/*\r
+* This logs the user out and displays the index.\r
+*\r
+*/\r
+function baw_action_do_logout() {\r
+ baw_logout();\r
+ echo baw_display_index();\r
+}\r
+\r
+/*\r
+* This logs the user out physically.\r
+*\r
+*/\r
+function baw_logout() {\r
+ @session_start();\r
+ $_SESSION = array();\r
+ if (isset($_COOKIE[session_name()])) {\r
+ setcookie(session_name(), '', time()-42000, '/');\r
+ }\r
+ @session_destroy();\r
+}\r
+\r
+/*\r
+* Displays the config editor.\r
+*\r
+*/\r
+function baw_action_config_editor() {\r
+ global $BAW_CONF, $BAW_CONF_DEF, $BAW_CONF_DIS_DEF, $BAW_CONF_DIS;\r
+ global $BAW_MES, $BAW_CONF_DIS_TYP, $BAW_DFILES;\r
+ if (!$BAW_CONF['online_config']) {\r
+ return baw_raise_error('configdisabled');\r
+ }\r
+ @session_start();\r
+ if(!baw_check_user()) {\r
+ return baw_site_header() . baw_config_login_form();\r
+ };\r
+ $top = baw_site_header();\r
+ $top .= "\n<form action=\"{$BAW_CONF['site_url']}/index.php\" method=\"post\">\n"\r
+ . " <div class=\"clearfix\">\n"\r
+ . " <input type=\"hidden\" name=\"action\" value=\"save_config\"" . XHTML . ">\n";\r
+ $submit = " <div class=\"conf_button_active\">\n <input type=\"submit\" name=\"submit\" value=\"{$BAW_MES['cfg_save']}\"" . XHTML . ">\n"\r
+ . " <input type=\"reset\" name=\"reset\" value=\"{$BAW_MES['cfg_reset']}\"" . XHTML . ">\n"\r
+ . " <input type=\"submit\" name=\"exit\" value=\"{$BAW_MES['cfg_exit']}\"" . XHTML . ">\n"\r
+ . " <input type=\"submit\" name=\"logout\" value=\"{$BAW_MES['cfg_logout']}\"" . XHTML . ">\n"\r
+ . " </div>\n";\r
+ $i = 0;\r
+ $out = '';\r
+ $section_count = count($BAW_CONF_DEF) + 1;\r
+ foreach ($BAW_CONF_DEF as $section => $set_arr) {\r
+ $out .= "<!-- CONF SECTION $i -->\n\n";\r
+ if ($i >0) {\r
+ $top .= " <div class=\"conf_button_inactive\" id=\"button_1_$i\" onclick=\"toggleBox($i, 1, $section_count, 'conf');\">$section</div>\n";\r
+ $out .= " <div class=\"conf_section_inactive\" id=\"box_1_$i\">\n";\r
+ } else {\r
+ $top .= " <div class=\"conf_button_active\" id=\"button_1_$i\" onclick=\"toggleBox($i, 1, $section_count, 'conf');\">$section</div>\n";\r
+ $out .= " <div class=\"conf_section_active\" id=\"box_1_$i\">\n";\r
+ }\r
+ foreach ($set_arr as $cfgname => $cfgdata) {\r
+ $default = $cfgdata['default'];\r
+ if (isset($BAW_CONF[$cfgname])) {\r
+ $val = $BAW_CONF[$cfgname];\r
+ } else {\r
+ $val = $BAW_CONF_DEF[$section][$cfgname]['default'];\r
+ }\r
+ if ($cfgdata['type'] == 'fixed') {\r
+ $input = $val;\r
+ } else if ($cfgdata['type'] == 'string') {\r
+ $input = "<input type=\"text\" name=\"$cfgname\" value=\"$val\" size=\"40\"" . XHTML . ">";\r
+ } else if ($cfgdata['type'] == 'password') {\r
+ $input = "<input type=\"password\" name=\"{$cfgname}[]\" value=\"\" size=\"40\"" . XHTML . "><br" . XHTML . ">"\r
+ . $BAW_MES['confirm_password']\r
+ . "<input type=\"password\" name=\"{$cfgname}[]\" value=\"\" size=\"40\"" . XHTML . ">";\r
+ } else if ($cfgdata['type'] == 'dropdown') {\r
+ $input = baw_generic_dropdown($cfgname, $cfgdata['values'],$val);\r
+ $default = $cfgdata['values'][$cfgdata['default']];\r
+ } else if ($cfgdata['type'] == 'server_select') {\r
+ $input = baw_generic_dropdown($cfgname, $servers_arr, $BAW_DFILES['cfg_server_drop']);\r
+ }\r
+ $out .= " <div class=\"conf_setting\"><h3>{$cfgdata['name']}</h3>\n"\r
+ . $cfgdata['help'] . "<br " . XHTML . ">"\r
+ . "$cfgname = $input"\r
+ . "<br " . XHTML . ">(Default: \"<span class=\"default\">$default</span>\")\n"\r
+ . " </div>\n";\r
+ }\r
+ $out .= " </div>\n";\r
+ $i++;\r
+\r
+ }\r
+ $top .= " <div class=\"conf_button_inactive\" id=\"button_1_$i\" onclick=\"toggleBox($i, 1, $section_count, 'conf');\">{$BAW_MES['cfg_display2']}</div>\n";\r
+ $out .= "<!-- CONF SECTION $i -->\n\n";\r
+ $out .= " <div class=\"conf_section_inactive\" id=\"box_1_$i\">\n";\r
+ $BAW_CONF_DIS = baw_array_sorting($BAW_CONF_DIS, 'order', SORT_ASC);\r
+ foreach ($BAW_CONF_DIS as $cfgname => $cfgdata) {\r
+ $input = '';\r
+ $default = '';\r
+ $name = $BAW_CONF_DIS_DEF[$cfgname]['name'];\r
+ $help = $BAW_CONF_DIS_DEF[$cfgname]['help'];\r
+\r
+ foreach ($BAW_CONF_DIS_TYP as $setname => $setdata) {\r
+ if (isset($cfgdata[$setname])) {\r
+ $val = $BAW_CONF_DIS[$cfgname][$setname];\r
+ if ($setdata[1] == 'bool') {\r
+ if ($val == true) {\r
+ $selyes = ' checked="checked"';\r
+ $selno = "";\r
+ } else {\r
+ $selno = ' checked="checked"';\r
+ $selyes = "";\r
+ }\r
+ $input .= "<fieldset><legend>{$setdata[0]}</legend>\n"\r
+ ."{$BAW_MES[112]} <input type=\"radio\" name=\"".$cfgname."[".$setname."]\" value=\"true\"$selyes" . XHTML . "> "\r
+ . "{$BAW_MES[113]} <input type=\"radio\" name=\"".$cfgname."[".$setname."]\" value=\"false\"$selno" . XHTML . "> "\r
+ . "</fieldset>\n";\r
+ } else if ($setdata[1] == 'string') {\r
+ $input .= "<fieldset><legend>{$setdata[0]}</legend>\n"\r
+ ."<input type=\"text\" name=\"".$cfgname."[".$setname."]\" value=\"$val\" size=\"5\"" . XHTML . ">"\r
+ . "</fieldset>\n";\r
+ } else if ($setdata[1] == 'sorting1') {\r
+ $sort_arr = $BAW_CONF_DIS_DEF[$cfgname]['sorting'];\r
+ $input .= "<fieldset><legend>{$setdata[0]}</legend>\n"\r
+ . baw_generic_dropdown($cfgname."[".$setname."]", $sort_arr,$val)\r
+ . "</fieldset>\n";\r
+ } else if ($setdata[1] == 'sorting2') {\r
+ if ($val == 4) {\r
+ $selyes = ' checked="checked"';\r
+ $selno = '';\r
+ } else {\r
+ $selno = ' checked="checked"';\r
+ $selyes = '';\r
+ }\r
+ $input .= "<fieldset><legend>{$setdata[0]}</legend>\n"\r
+ ."{$BAW_MES['cfg_asc']} <input type=\"radio\" name=\"".$cfgname."[".$setname."]\" value=\"SORT_ASC\"$selyes" . XHTML . "> "\r
+ . "{$BAW_MES['cfg_desc']} <input type=\"radio\" name=\"".$cfgname."[".$setname."]\" value=\"SORT_DESC\"$selno" . XHTML . "> "\r
+ . "</fieldset>\n";\r
+ }\r
+ }\r
+ }\r
+ $out .= "<div class=\"conf_setting\"><h3>$name</h3>\n"\r
+ . $help . "<br " . XHTML . ">"\r
+ . "<div class=\"clearfix\">$input</div>"\r
+ . $default\r
+ . "</div>\n";\r
+ }\r
+\r
+ $out .= "</div>\n"\r
+ . "</form>"\r
+ . baw_site_footer();\r
+ return $top . "$submit </div>\n". $out;\r
+}\r
+\r
+$BAW_FILE_HEADER = "/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+ *\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+// this file can't be used on its own - do not change these 3 lines\r
+if (strpos (\$_SERVER['PHP_SELF'], 'config.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+";\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+ *\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+// this file can't be used on its own\r
+if (strpos ($_SERVER['PHP_SELF'], 'config_default.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+$BAW_CONF_DEF = array(\r
+ $BAW_MES['cfg_site_settings'] => array (\r
+ 'site_url' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_script_url'],\r
+ 'default' => 'http://awstats.local',\r
+ 'help' => $BAW_MES['cfg_script_url_hlp'],\r
+ ),\r
+ 'site_path' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_script_path'],\r
+ 'default' => '/path/to/betterawstats/',\r
+ 'help' => $BAW_MES['cfg_script_path_hlp'],\r
+ ),\r
+ 'path_data' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_path_to_aws_data'],\r
+ 'default' => '/path/to/betterawstats/awstats/data',\r
+ 'help' => $BAW_MES['cfg_path_to_aws_data_hlp']\r
+ ),\r
+ 'path_lib' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_path_to_aws_lib'],\r
+ 'default' => '/path/to/betterawstats/awstats/lib',\r
+ 'help' => $BAW_MES['cfg_path_to_aws_lib_hlp']\r
+ ),\r
+ 'path_lang' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_path_to_aws_lang'],\r
+ 'default' => '/path/to/betterawstats/awstats/lang',\r
+ 'help' => $BAW_MES['cfg_path_to_aws_lang_hlp'],\r
+ ),\r
+ 'icons_url' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_aws_icons_url'],\r
+ 'default' => "http://awstats.local/awstats/icon",\r
+ 'help' => $BAW_MES['cfg_aws_icons_url_hlp'],\r
+ ),\r
+ 'online_config' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_web_config'],\r
+ 'default' => 'false',\r
+ 'help' => $BAW_MES['cfg_web_config_hlp'],\r
+ 'values' => array(\r
+ 'true' => $BAW_MES['cfg_enable'],\r
+ 'false' => $BAW_MES['cfg_disable']\r
+ )\r
+ ),\r
+ 'online_config_password'=> array (\r
+ 'type' => 'password',\r
+ 'name' => $BAW_MES['cfg_web_config_pw'],\r
+ 'default' => '',\r
+ 'help' => $BAW_MES['cfg_web_config_pw_hlp'],\r
+ ),\r
+ 'limit_server' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_limit_server'],\r
+ 'default' => 'show_all',\r
+ 'help' => $BAW_MES['cfg_limit_server_hlp'],\r
+ 'values' => $BAW_SERVERS,\r
+ ),\r
+ ),\r
+ $BAW_MES['cfg_layout_settings'] => array (\r
+ 'layout_type'=> array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_layout_type'],\r
+ 'default' => 'vertical',\r
+ 'help' => $BAW_MES['cfg_layout_type_hlp'],\r
+ 'values' => array(\r
+ 'vertical' => $BAW_MES['cfg_vertical'],\r
+ 'horizontal' => $BAW_MES['cfg_horizontal']\r
+ )\r
+ ),\r
+ 'lang_setting' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_language'],\r
+ 'default' => "auto",\r
+ 'help' => $BAW_MES['cfg_language_hlp'],\r
+ 'values' => array(\r
+ 'auto'=>'Automatic',\r
+ 'al'=>'Albanian','ba'=>'Bosnian','bg'=>'Bulgarian','ca'=>'Catalan',\r
+ 'tw'=>'Chinese (Taiwan)','cn'=>'Chinese (Simplified)','cz'=>'Czech',\r
+ 'dk'=>'Danish','nl'=>'Dutch','en'=>'English','et'=>'Estonian',\r
+ 'eu'=>'Euskara','fi'=>'Finnish','fr'=>'Francais','gl'=>'Galician',\r
+ 'de'=>'Deutsch','gr'=>'Greek','he'=>'Hebrew','hu'=>'Hungarian',\r
+ 'is'=>'Icelandic','id'=>'Indonesian','it'=>'Italiano','jp'=>'Japanese',\r
+ 'kr'=>'Korean','lv'=>'Latvian','nn'=>'Norwegian (Nynorsk)',\r
+ 'nb'=>'Norwegian (Bokmal)','pl'=>'Polish','pt'=>'Portuguese',\r
+ 'br'=>'Portuguese (Brazilian)','ro'=>'Romanian','ru'=>'Russian',\r
+ 'sr'=>'Serbian','sk'=>'Slovak','es'=>'Spanish','se'=>'Swedish',\r
+ 'tr'=>'Turkish','ua'=>'Ukrainian','wlk'=>'Welsh'\r
+ )\r
+ ),\r
+ 'dec_point' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_decimalpoint'],\r
+ 'default' => ".",\r
+ 'help' => $BAW_MES['cfg_decimalpoint_hlp']\r
+ ),\r
+ 'tho_point' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_thous_sep'],\r
+ 'default' => "'",\r
+ 'help' => $BAW_MES['cfg_thous_sep_hlp']\r
+ ),\r
+ 'date_format' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_date_form'],\r
+ 'default' => "Y-M-d",\r
+ 'help' => $BAW_MES['cfg_date_form_hlp'],\r
+ ),\r
+ 'date_time_format' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_date_time_form'],\r
+ 'default' => "Y-M-d H:i",\r
+ 'help' => $BAW_MES['cfg_date_time_form_hlp']\r
+ ),\r
+ 'percent_decimals' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_percent_dec'],\r
+ 'default' => 1,\r
+ 'help' => $BAW_MES['cfg_percent_dec_hlp'],\r
+ ),\r
+ 'hideempty' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_hide_empty'],\r
+ 'default' => 'true',\r
+ 'help' => $BAW_MES['cfg_hide_empty_hlp'],\r
+ 'values' => array(\r
+ 'true' => $BAW_MES['cfg_hide'],\r
+ 'false' => $BAW_MES['cfg_show']\r
+ )\r
+ ),\r
+ 'auto_submit_form' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_auto_submit_form'],\r
+ 'default' => 'true',\r
+ 'help' => $BAW_MES['cfg_auto_submit_form_hlp'],\r
+ 'values' => array(\r
+ 'true' => $BAW_MES['cfg_enable'],\r
+ 'false' => $BAW_MES['cfg_disable']\r
+ )\r
+ ),\r
+ ),\r
+ $BAW_MES['cfg_table_settings'] => array(\r
+ 'firstdayofweek' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_firstweekday'],\r
+ 'default' => 1,\r
+ 'help' => $BAW_MES['cfg_firstweekday_hlp'],\r
+ 'values' => array(\r
+ 1 => $BAW_MES['monday'],\r
+ 2 => $BAW_MES['sunday']\r
+ )\r
+ ),\r
+ 'field_length' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_field_length'],\r
+ 'default' => 65,\r
+ 'help' => $BAW_MES['cfg_field_length_hlp'],\r
+ ),\r
+ 'maxlines' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_max_lines'],\r
+ 'default' => 10000,\r
+ 'help' => $BAW_MES['cfg_max_lines_hlp'],\r
+ ),\r
+ ),\r
+ $BAW_MES['cfg_chart_settings'] => array(\r
+ 'max_visitors' => array(\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_max_scale_visitors'],\r
+ 'default' => "layout_visits",\r
+ 'help' => $BAW_MES['cfg_max_scale_visitors_hlp'],\r
+ 'values' => array(\r
+ 'layout_visitos' => $BAW_MES[18],\r
+ 'layout_visits' => $BAW_MES['visits'],\r
+ 'layout_pages' => $BAW_MES[56],\r
+ 'layout_hits' => $BAW_MES[57],\r
+ 'layout_bytes' => $BAW_MES[75],\r
+ )\r
+ ),\r
+ 'max_visits' => array(\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_max_scale_visits'],\r
+ 'default' => "layout_visits",\r
+ 'help' => $BAW_MES['cfg_max_scale_visits_hlp'],\r
+ 'values' => array(\r
+ 'layout_visits' => $BAW_MES['visits'],\r
+ 'layout_pages' => $BAW_MES[56],\r
+ 'layout_hits' => $BAW_MES[57],\r
+ 'layout_bytes' => $BAW_MES[75],\r
+ )\r
+ ),\r
+ 'max_pages' => array(\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_max_scale_pages'],\r
+ 'default' => "layout_pages",\r
+ 'help' => $BAW_MES['cfg_max_scale_pages_hlp'],\r
+ 'values' => array(\r
+ 'layout_pages' => $BAW_MES[56],\r
+ 'layout_hits' => $BAW_MES[57],\r
+ 'layout_bytes' => $BAW_MES[75],\r
+ )\r
+ ),\r
+ 'max_hits' => array(\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_max_scale_hits'],\r
+ 'default' => "layout_hits",\r
+ 'help' => $BAW_MES['cfg_max_scale_hits_hlp'],\r
+ 'values' => array(\r
+ 'layout_hits' => $BAW_MES[57],\r
+ 'layout_bytes' => $BAW_MES[75],\r
+ )\r
+ ),\r
+ 'max_chart_items' => array(\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_max_chart_items'],\r
+ 'default' => "50",\r
+ 'help' => $BAW_MES['cfg_max_chart_items_hlp'],\r
+ ),\r
+ 'chart_titles' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_chart_titles'],\r
+ 'default' => 'false',\r
+ 'help' => $BAW_MES['cfg_chart_titles_hlp'],\r
+ 'values' => array(\r
+ 'true' => $BAW_MES['cfg_enable'],\r
+ 'false' => $BAW_MES['cfg_disable']\r
+ ),\r
+ ),\r
+ ),\r
+ $BAW_MES['cfg_jpgraph_settings'] => array(\r
+ 'use_jpgraph' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_jpgraph_enable'],\r
+ 'default' => 'false',\r
+ 'help' => $BAW_MES['cfg_jpgraph_enable_hlp'],\r
+ 'values' => array(\r
+ 'true' => $BAW_MES['cfg_enable'],\r
+ 'false' => $BAW_MES['cfg_disable']\r
+ )\r
+ ),\r
+ 'jpgraph_path' => array (\r
+ 'type' => 'string',\r
+ 'name' => $BAW_MES['cfg_jpgraph_path'],\r
+ 'default' => '/path/to/betterawstats/jpgraph/src',\r
+ 'help' => $BAW_MES['cfg_jpgraph_path_hlp'],\r
+ ),\r
+ ),\r
+ $BAW_MES['cfg_advanced_settings'] => array (\r
+ 'version' => array (\r
+ 'type' => 'fixed',\r
+ 'name' => $BAW_MES['cfg_version'],\r
+ 'default' => "1.0",\r
+ 'help' => $BAW_MES['cfg_version_hlp'],\r
+ ),\r
+ 'xhtml' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_xhtml'],\r
+ 'default' => 'false',\r
+ 'help' => $BAW_MES['cfg_xhtml_hlp'],\r
+ 'values' => array(\r
+ 'false' => 'HTML',\r
+ 'true' => 'XHTML'\r
+ )\r
+ ),\r
+ 'debug' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_debug'],\r
+ 'default' => 'false',\r
+ 'help' => $BAW_MES['cfg_debug_hlp'],\r
+ 'values' => array(\r
+ 'true' => $BAW_MES['cfg_show'],\r
+ 'false' => $BAW_MES['cfg_hide']\r
+ )\r
+ ),\r
+ 'show_parser_stats' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_parser'],\r
+ 'default' => 'false',\r
+ 'help' => $BAW_MES['cfg_parser_hlp'],\r
+ 'values' => array(\r
+ 'true' => $BAW_MES['cfg_show'],\r
+ 'false' => $BAW_MES['cfg_hide']\r
+ )\r
+ ),\r
+ 'module' => array (\r
+ 'type' => 'dropdown',\r
+ 'name' => $BAW_MES['cfg_module'],\r
+ 'default' => 'none',\r
+ 'help' => $BAW_MES['cfg_module_hlp'],\r
+ 'values' => array('none'=>$BAW_MES['cfg_disable'], 'drupal'=>'Drupal')\r
+ )\r
+ )\r
+);\r
+\r
+$BAW_CONF_DIS_TYP = array(\r
+ 'order' => array($BAW_MES['cfg_type_order'], 'string'),\r
+ 'show' => array($BAW_MES['cfg_type_show'], 'bool'),\r
+ 'collapse' => array($BAW_MES['cfg_type_collapse'], 'bool'),\r
+ 'table' => array($BAW_MES['cfg_type_table'], 'bool'),\r
+ 'sort' => array($BAW_MES['cfg_type_sort'], 'sorting1'),\r
+ 'sort_dir' => array($BAW_MES['cfg_type_sort_dir'], 'sorting2'),\r
+ 'chart' => array($BAW_MES['cfg_type_chart'], 'bool'),\r
+ 'map' => array($BAW_MES['cfg_type_map'], 'bool'),\r
+ 'avg' => array($BAW_MES['cfg_type_avg'], 'bool'),\r
+ 'total' => array($BAW_MES['cfg_type_total'], 'bool'),\r
+ 'top_x' => array($BAW_MES['cfg_type_top_x'], 'string'),\r
+ 'assumebot' => array($BAW_MES['cfg_type_assumebot'], 'string'),\r
+ 'favicon' => array($BAW_MES['cfg_type_favicon'], 'bool'),\r
+ 'domain_lvls' => array($BAW_MES['cfg_type_domain_lvls'], 'string')\r
+);\r
+\r
+$BAW_CONF_DIS_DEF = array (\r
+ 'overview' => array (\r
+ 'help' => $BAW_MES['cfg_dis_overview'],\r
+ 'name' => $BAW_MES[128],\r
+ ),\r
+ 'months' => array (\r
+ 'help' => $BAW_MES['cfg_dis_months'],\r
+ 'name' => $BAW_MES[162],\r
+ /* 'sorting' => array(\r
+ 0 => $BAW_MES[5],\r
+ 1 => $BAW_MES[11],\r
+ 2 => $BAW_MES[10],\r
+ 3 => $BAW_MES[56],\r
+ 4 => $BAW_MES[57],\r
+ 5 => $BAW_MES[75]\r
+ )*/\r
+ ),\r
+ 'days' => array (\r
+ 'help' => $BAW_MES['cfg_dis_days'],\r
+ 'name' => $BAW_MES[138],\r
+ /* 'sorting' => array(\r
+ 0 => $BAW_MES[4],\r
+ 1 => $BAW_MES[10],\r
+ 2 => $BAW_MES[56],\r
+ 3 => $BAW_MES[57],\r
+ 4 => $BAW_MES[75]\r
+ )*/\r
+ ),\r
+ 'weekdays' => array (\r
+ 'help' => $BAW_MES['cfg_dis_weekdays'],\r
+ 'name' => $BAW_MES['weekday_averages'],\r
+ /* 'sorting' => array(\r
+ 0 => $BAW_MES[4],\r
+ 1 => $BAW_MES[10],\r
+ 2 => $BAW_MES[56],\r
+ 3 => $BAW_MES[57],\r
+ 4 => $BAW_MES[75]\r
+ )*/\r
+ ),\r
+ 'hours' => array (\r
+ 'help' => $BAW_MES['cfg_dis_hours'],\r
+ 'name' => $BAW_MES['hours_averages'],\r
+ 'sorting' => array(\r
+ 1 => $BAW_MES[20],\r
+ 2 => $BAW_MES[56],\r
+ 3 => $BAW_MES[57],\r
+ 4 => $BAW_MES[75]\r
+ )\r
+ ),\r
+ 'domains' => array (\r
+ 'help' => $BAW_MES['cfg_dis_domains'],\r
+ 'name' => $BAW_MES[25],\r
+ 'sorting' => array(\r
+ 'key' => $BAW_MES[25],\r
+ 0 => $BAW_MES[56],\r
+ 1 => $BAW_MES[57],\r
+ 2 => $BAW_MES[75]\r
+ )\r
+ ),\r
+ 'visitors' => array (\r
+ 'help' => $BAW_MES['cfg_dis_visitors'],\r
+ 'name' => $BAW_MES[81],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[81],\r
+ // 1 => $BAW_MES[114],\r
+ 1 => $BAW_MES[56],\r
+ 2 => $BAW_MES[57],\r
+ 3 => $BAW_MES[75],\r
+ 4 => $BAW_MES['ratio_pages_hits'],\r
+ 5 => $BAW_MES[9]\r
+ ),\r
+ 'assumebot' => '1.0'\r
+ ),\r
+ 'logins' => array (\r
+ 'help' => $BAW_MES['cfg_dis_logins'],\r
+ 'name' => $BAW_MES[94],\r
+ 'sorting' => array(\r
+ 'key' => $BAW_MES[94],\r
+ 0 => $BAW_MES[56],\r
+ 1 => $BAW_MES[57],\r
+ 2 => $BAW_MES[75],\r
+ 3 => $BAW_MES[9]\r
+ )\r
+ ),\r
+ 'robots' => array (\r
+ 'help' => $BAW_MES['cfg_dis_robots'],\r
+ 'name' => $BAW_MES[53],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[53],\r
+ 1 => $BAW_MES[57],\r
+ 2 => $BAW_MES[57]. " (robots.txt)",\r
+ 3 => $BAW_MES[75],\r
+ 4 => $BAW_MES[9]\r
+ )\r
+ ),\r
+ 'worms' => array (\r
+ 'help' => $BAW_MES['cfg_dis_worms'],\r
+ 'name' => $BAW_MES[163],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[163],\r
+ 1 => $BAW_MES[167],\r
+ 2 => $BAW_MES[57],\r
+ 3 => $BAW_MES[75],\r
+ 4 => $BAW_MES[9]\r
+ )\r
+ ),\r
+ 'sessions' => array (\r
+ 'help' => $BAW_MES['cfg_dis_sessions'],\r
+ 'name' => $BAW_MES[117],\r
+ ),\r
+ 'filetype' => array (\r
+ 'help' => $BAW_MES['cfg_dis_filetype'],\r
+ 'name' => $BAW_MES[73],\r
+ 'sorting' => array(\r
+ 'key' => $BAW_MES[73],\r
+ 0 => $BAW_MES[57],\r
+ 1 => $BAW_MES[75],\r
+ 2 => $BAW_MES[100],\r
+ 3 => $BAW_MES[101]\r
+ )\r
+ ),\r
+ 'urls' => array (\r
+ 'help' => $BAW_MES['cfg_dis_urls'],\r
+ 'name' => $BAW_MES[19],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[19],\r
+ 1 => $BAW_MES[29],\r
+ 2 => $BAW_MES[106],\r
+ 3 => $BAW_MES[104],\r
+ 4 => $BAW_MES[116]\r
+ )\r
+ ),\r
+ 'paths' => array (\r
+ 'help' => $BAW_MES['cfg_dis_paths_hlp'],\r
+ 'name' => $BAW_MES['cfg_dis_paths'],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES['files_paths'],\r
+ 1 => $BAW_MES[29]\r
+ )\r
+ ),\r
+ 'os' => array (\r
+ 'help' => $BAW_MES['cfg_dis_os'],\r
+ 'name' => $BAW_MES[59],\r
+ 'sorting' => array(\r
+ 1 => $BAW_MES[59],\r
+ 2 => $BAW_MES[57]\r
+ ),\r
+ 'hasversions' => 'osversions',\r
+ 'hasunknown' => 'unknownos'\r
+ ),\r
+ 'unknownos' => array (\r
+ 'help' => $BAW_MES['cfg_dis_unknownos'],\r
+ 'name' => $BAW_MES[46],\r
+ 'sorting' => array(\r
+ 1 => $BAW_MES['user_agent'],\r
+ 2 => $BAW_MES[9]\r
+ )\r
+ ),\r
+ 'osversions' => array (\r
+ 'help' => $BAW_MES['cfg_dis_osversions'],\r
+ 'name' => $BAW_MES['os_versions'],\r
+ 'sorting' => array(\r
+ 1 => $BAW_MES[59],\r
+ 2 => $BAW_MES[57]\r
+ )\r
+ ),\r
+ 'browsers' => array (\r
+ 'help' => $BAW_MES['cfg_dis_browsers'],\r
+ 'name' => $BAW_MES[21],\r
+ 'sorting' => array(\r
+ 1 => $BAW_MES[21],\r
+ 2 => $BAW_MES[111],\r
+ 3 => $BAW_MES[57]\r
+ ),\r
+ 'hasversions' => 'browserversions',\r
+ 'hasunknown' => 'unknownbrowser'\r
+ ),\r
+ 'browserversions' => array (\r
+ 'help' => $BAW_MES['cfg_dis_browserversions'],\r
+ 'name' => $BAW_MES['browser_versions'],\r
+ 'sorting' => array(\r
+ 2 => $BAW_MES[21],\r
+ 3 => $BAW_MES[111],\r
+ 4 => $BAW_MES[57]\r
+ ),\r
+ ),\r
+ 'unknownbrowser' => array (\r
+ 'help' => $BAW_MES['cfg_dis_unknownbrowser'],\r
+ 'name' => $BAW_MES[50],\r
+ 'sorting' => array(\r
+ 1 => $BAW_MES['cfg_dis_unknownbrowser_agent'],\r
+ 2 => $BAW_MES[9]\r
+ )\r
+ ),\r
+ 'screensizes' => array (\r
+ 'help' => $BAW_MES['cfg_dis_screensizes'],\r
+ 'name' => $BAW_MES[135],\r
+ 'sorting' => array(\r
+ 1 => $BAW_MES[135],\r
+ 2 => $BAW_MES[57],\r
+ )\r
+ ),\r
+ 'se_referers' => array (\r
+ 'help' => $BAW_MES['cfg_dis_se_referers'],\r
+ 'name' => $BAW_MES[126],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[126],\r
+ 1 => $BAW_MES[56],\r
+ 2 => $BAW_MES[57]\r
+ ),\r
+ ),\r
+ 'referers' => array (\r
+ 'help' => $BAW_MES['cfg_dis_referers'],\r
+ 'name' => $BAW_MES[127],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[127],\r
+ 1 => $BAW_MES[56],\r
+ 2 => $BAW_MES[57]\r
+ ),\r
+ 'hasdetail' => 'referer_domains'\r
+ ),\r
+ 'referer_domains' => array (\r
+ 'help' => $BAW_MES['cfg_dis_referer_domains'],\r
+ 'name' => sprintf($BAW_MES['by_domains'], $BAW_MES[127]),\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[127],\r
+ 1 => $BAW_MES[56],\r
+ 2 => $BAW_MES[57]\r
+ ),\r
+ 'hascompact' => 'referers'\r
+ ),\r
+ 'hotlinks' => array (\r
+ 'help' => $BAW_MES['cfg_dis_hotlinks'],\r
+ 'name' => $BAW_MES['referer_hotlinks'],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[127],\r
+ // 1 => $BAW_MES[56],\r
+ 1 => $BAW_MES[57]\r
+ ),\r
+ 'hasdetail' => 'hotlink_domains'\r
+ ),\r
+ 'hotlink_domains' => array (\r
+ 'help' => $BAW_MES['cfg_dis_hotlink_domains'],\r
+ 'name' => $BAW_MES['hl_by_domains '],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[127],\r
+ // 1 => $BAW_MES[56],\r
+ 1 => $BAW_MES[57]\r
+ ),\r
+ 'hascompact' => 'hotlinks'\r
+ ),\r
+ 'searchphrases' => array (\r
+ 'help' => $BAW_MES['cfg_dis_searchphrases'],\r
+ 'name' => $BAW_MES[120],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[103],\r
+ 1 => $BAW_MES[57]\r
+ )\r
+ ),\r
+ 'searchwords' => array (\r
+ 'help' => $BAW_MES['cfg_dis_searchwords'],\r
+ 'name' => $BAW_MES[121],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[13],\r
+ 1 => $BAW_MES[57]\r
+ )\r
+ ),\r
+ 'misc' => array (\r
+ 'help' => $BAW_MES['cfg_dis_misc'],\r
+ 'name' => $BAW_MES[139],\r
+ ),\r
+ 'errors' => array (\r
+ 'help' => $BAW_MES['cfg_dis_errors'],\r
+ 'name' => $BAW_MES[32],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[32],\r
+ 2 => $BAW_MES[57],\r
+ 3 => $BAW_MES[106]\r
+ )\r
+ ),\r
+ 'errors404' => array (\r
+ 'help' => $BAW_MES[47],\r
+ 'name' => $BAW_MES[49],\r
+ 'sorting' => array(\r
+ 0 => $BAW_MES[49],\r
+ 1 => $BAW_MES[57],\r
+ 2 => $BAW_MES[57]\r
+ )\r
+ ),\r
+);\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats, an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place','Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+/**\r
+ * File contents:\r
+ *\r
+ * This file contains functions that read data from files process it and store it\r
+ * in an array. This concerns library-data as well as stats-data. Language files\r
+ * are NOT processed here.\r
+ */\r
+\r
+\r
+// this file can't be used on its own\r
+if (strpos ($_SERVER['PHP_SELF'], 'data.inc.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+/**\r
+* Data function: read the data directories this function is called by\r
+* baw_match_files() and itself recursively\r
+*\r
+* @param str $dir directory\r
+* @return arr ALL files found in that directory\r
+*\r
+*/\r
+function baw_parse_dir($dir = false) {\r
+ global $BAW_CONF;\r
+ if ($dir == false) {\r
+ $dir = $BAW_CONF['path_data'];\r
+ }\r
+ if (!file_exists($dir)) {\r
+ echo baw_raise_error('datafilesdir', array($dir));\r
+ return array();\r
+ }\r
+ // add trailing slash if not exists\r
+ if (substr($dir, -1) != '/') {\r
+ $dir .= '/';\r
+ }\r
+ baw_debug('dbg_start_parse_dir', $dir);\r
+ $files = array();\r
+ if ($dh = @opendir($dir)) {\r
+ while (($file = readdir($dh)) !== false) {\r
+ if (!preg_match('/^\./s', $file)) {\r
+ if (is_dir($dir.$file)) {\r
+ $newdir = $dir.$file.'/';\r
+ $files = array_merge($files, baw_parse_dir($newdir));\r
+ baw_debug('dbg_found_dir', $dir);\r
+ } else {\r
+ $files[] = $dir.$file;\r
+ baw_debug('dbg_found_file', $file);\r
+ }\r
+ }\r
+ }\r
+ closedir($dh);\r
+ }\r
+ baw_debug('dbg_finished_parse_dir', $dir);\r
+ return $files;\r
+}\r
+\r
+/*\r
+* Data function: find all files that contain the data for the current month and\r
+* 12 month before now to write a rolling month data chart. This function is called\r
+* by index.php\r
+*\r
+* fills the gl. arrays: $BAW_CURR['years'], $BAW_CURR['months'], $BAW_DFILES\r
+*\r
+*/\r
+function baw_match_files() {\r
+ global $BAW_CURR, $BAW_CONF, $BAW_CONF_DIS, $BAW_MES, $BAW_DFILES, $BAW_SERVERS;\r
+ // read all the files in the directory\r
+ $dirfiles = baw_parse_dir();\r
+ $pat_others = '/awstats(\d{6})\.((.+))\.txt$/';\r
+ // go through all files and find matching ones\r
+ $year_array = array();\r
+ $month_array = array();\r
+ foreach ($dirfiles as $file) {\r
+ $filename = explode("/", $file);\r
+ $filename = $filename[count($filename)-1];\r
+ if (preg_match($pat_others, $file, $match)) {\r
+ $month = substr($filename, 7, 2);\r
+ $year = substr($filename, 9, 4);\r
+ $year_array[$year] = $year;\r
+ $month_array[$month] = $BAW_MES[$month + 59];\r
+ // future feature where the admin can tell which sites to read/ exclude\r
+ // if (!$BAW_CONF['filter_configs'] || in_array($site, $BAW_CONF['filter_configs'])) {\r
+ $site = $match[2];\r
+ $BAW_DFILES[$site][$year.$month] = array(\r
+ 'file' => $file,\r
+ 'map' => null\r
+ );\r
+ // add the sites to another array since we need that for the config editor\r
+ $BAW_SERVERS[$site] = $site;\r
+ baw_debug("site found for month $month and year $year: $file, SITE: {$site}");\r
+ }\r
+ }\r
+ if (count($year_array)>0) {\r
+ $year_array = array_unique($year_array);\r
+ ksort($year_array);\r
+ }\r
+ if (count($month_array)>0) {\r
+ ksort($month_array);\r
+ $month_array = array_unique($month_array);\r
+ }\r
+ $BAW_CURR['years'] = $year_array;\r
+ $BAW_CURR['months'] = $month_array;\r
+ // since we added sites with each file, remove duplicates\r
+ ksort($BAW_DFILES);\r
+ ksort($BAW_SERVERS);\r
+ $BAW_SERVERS = array('show_all' => $BAW_MES['cfg_show_all']) + $BAW_SERVERS;\r
+ if (!isset($BAW_CURR['site_name'])) {\r
+ $BAW_CURR['site_name'] = key($BAW_DFILES); // we dont have a selected, take first in line\r
+ reset($BAW_DFILES);\r
+ }\r
+}\r
+\r
+/*\r
+* Data function: calculate the month-data by summing up days and retrieving\r
+* single-value data. This function is called by different display-functions\r
+*\r
+* @param arr $t TIME data array of the current file\r
+* @param arr $g GENERAL data array of the current file\r
+* @return arr summed dataset for processing\r
+*\r
+*/\r
+function baw_calc_monthdata($t, $g) {\r
+ baw_debug("Calculating Month-data");\r
+ $pages = 0;\r
+ $hits = 0;\r
+ $bandwidth = 0;\r
+ $not_viewed_pages = 0;\r
+ $not_viewed_hits = 0;\r
+ $not_viewed_bandwidth = 0;\r
+ $num_t = count($t);\r
+ for ($i=0; $i<$num_t; $i++) {\r
+ $pages += $t[$i][0];\r
+ $hits += $t[$i][1];\r
+ $bandwidth += $t[$i][2];\r
+ $not_viewed_pages += $t[$i][3];\r
+ $not_viewed_hits += $t[$i][4];\r
+ $not_viewed_bandwidth += $t[$i][5];\r
+ }\r
+ $result = array(\r
+ $g['TotalUnique'][0],\r
+ $g['TotalVisits'][0],\r
+ $pages,\r
+ $hits,\r
+ $bandwidth,\r
+ $not_viewed_pages,\r
+ $not_viewed_hits,\r
+ $not_viewed_bandwidth\r
+ );\r
+ return $result;\r
+}\r
+\r
+/*\r
+* Data Function: read data from awstats library files (perl format)\r
+* Opens a file, reads the contents and does corrections and makes PHP out of PERL\r
+* This function is called by the file library.inc.php\r
+*\r
+* @param str $file path to the library file\r
+* @param str $data the name of the array in the file\r
+* @return arr summed dataset for processing\r
+*\r
+*/\r
+function baw_get_library($file, $data) {\r
+ global $BAW_CONF, $BAW_LOGTYPE;\r
+ $file = $BAW_CONF['path_lib'] . $file;\r
+ baw_debug("Trying to read library data ($data) from file: $file");\r
+ if (!file_exists($file)) {\r
+ echo baw_raise_error('libraryfiles', array($file));\r
+ exit;\r
+ }\r
+ // read the whole file in one go\r
+ $file_text = file_get_contents($file);\r
+ // these are to attempt to convert the perl data file to PHP\r
+\r
+ $search = array(\r
+ "\$LogType eq 'S'",\r
+ "= ", // remove spaces between = and (\r
+ "@",\r
+ "%",\r
+ "'=>'",\r
+ "=(",\r
+ "=\n(",\r
+ "=\r(",\r
+ "=\r\n(",\r
+ ",,",\r
+ ' target="_blank"',\r
+ ' [new window]',\r
+ '<a href="',\r
+ '&',\r
+ '/" Searc',\r
+ );\r
+ $replace = array(\r
+ "\$LogType = 'S'",\r
+ "=",\r
+ "$",\r
+ "$",\r
+ "', '",\r
+ "= array(",\r
+ "= array(",\r
+ "= array(",\r
+ "= array(",\r
+ ",",\r
+ " ",\r
+ " ",\r
+ '<a class="ext_link" href="',\r
+ '&',\r
+ '/" title="Searc'\r
+ );\r
+ $file_text = str_replace($search, $replace, $file_text);\r
+\r
+ $check = eval($file_text);\r
+ // check if we have an error with the conversion\r
+ if ($check === false) {\r
+ echo baw_raise_error('libraryeval', array($file, $data));\r
+ }\r
+ if (is_array($data)) {\r
+ $a = 0;\r
+ foreach($data as $arr_name) {\r
+ $countpairs = count($$arr_name);\r
+ $parr = $$arr_name;\r
+ for ($i=0; $i<$countpairs; $i=$i+2) {\r
+ $new_arr[$a][$parr[$i]] = $parr[$i+1];\r
+ }\r
+ $a++;\r
+ }\r
+ } else {\r
+ $countpairs = count($$data);\r
+ $parr = $$data;\r
+ for ($i=0; $i<$countpairs; $i=$i+2) {\r
+ $new_arr[$parr[$i]] = $parr[$i+1];\r
+ }\r
+ }\r
+ return $new_arr;\r
+}\r
+\r
+/*\r
+* Data Function: read data from awstats data file. Identifies the file to read,\r
+* locates the data-map, reads the data. This function is called by every single\r
+* display-function on need for data. Some data might be read twice or more.\r
+*\r
+* @param str $site which site do we read\r
+* @param str $data_type the name of the data-type to read\r
+* @param str $date YYYYMM, date of datafile\r
+* @return arr data from file as assoc. array\r
+*\r
+*/\r
+function baw_data($site, $data_type, $date) {\r
+ global $BAW_CONF, $BAW_LIB, $BAW_CURR, $BAW_DFILES;\r
+ $MAP = array();\r
+ baw_debug("reading $site datafile, type $data_type from $date");\r
+ // we have to remove the linebreaks otherwise they end up in the data\r
+ $brs_arr = array("\n", "\r");\r
+ $brr_arr = array("", "");\r
+ $dataset = array();\r
+ // reduce the dataset to the necessary data\r
+ if (!isset($BAW_DFILES[$site][$date])) {\r
+ return false;\r
+ } else {\r
+ $dataset[$date] = $BAW_DFILES[$site][$date];\r
+ }\r
+\r
+ // iterate each data file\r
+ $file = $dataset[$date]['file'];\r
+ $f = fopen($file, 'r');\r
+ $map = $dataset[$date]['map'];\r
+ baw_debug("reading site $site datafile, date $date, file $file");\r
+\r
+ // read the map if required\r
+ if ($map == null) {\r
+ baw_read_filemap($f, $site, $date);\r
+ if (!isset($BAW_DFILES[$site][$date]['map'][$data_type])) {\r
+ return false;\r
+ } else {\r
+ $offset = $BAW_DFILES[$site][$date]['map'][$data_type];\r
+ }\r
+ } else if (isset($map[$data_type])) {\r
+ $offset = $map[$data_type];\r
+ baw_debug("data map present, reading data $data_type from offset $offset");\r
+ } else {\r
+ baw_debug("data map present, type $data_type not existant in map!");\r
+ return false;\r
+ }\r
+ $filedata = array();\r
+\r
+ fseek($f , $offset, SEEK_SET);\r
+ $check = 1;\r
+ while ($check !== 0) {\r
+ baw_debug("reading aditional line to find data...");\r
+ $firstline = fgets($f, 20000);\r
+ $check = strpos($firstline,"BEGIN_$data_type");\r
+ }\r
+\r
+ if ($check !== 0) {\r
+ $err_data = array($file, $firstline);\r
+ echo baw_raise_error('datafile', $err_data);\r
+ exit;\r
+ }\r
+ $index = explode(' ', $firstline);\r
+ $lines_count = $index[1];\r
+ baw_debug("Data $data_type found at offset ". ftell($f) . " instead of $offset (" . (ftell($f) - $offset) . " diff), is $lines_count lines long, reading now:");\r
+ for ($i=0; $i<$lines_count;$i++) {\r
+ baw_debug("reading Line $data_type $i");\r
+ $str = fgets($f, 20000);\r
+ if (substr($str,0,4) == 'END_') { // this is a security check since sometimes we are off\r
+ continue;\r
+ }\r
+ // remove linebreaks from string\r
+ $str = str_replace($brs_arr,$brr_arr, $str);\r
+ $line_arr = explode(' ', $str);\r
+ // shift first element as array name\r
+ $first_element = array_shift($line_arr);\r
+ // check if one dataset has occurred twice and would\r
+ // overwrite another. SIDER and PAGEREF had this issue for sure.\r
+ if (!isset($filedata[$first_element])) {\r
+ $filedata[$first_element] = $line_arr;\r
+ } else {\r
+ foreach ($line_arr as $no => $line_item) {\r
+ if (is_numeric($line_item)) {\r
+ // this could cause trouble in case this was a date, percentage etc.\r
+ $filedata[$first_element][$no] += $line_item;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ fclose($f);\r
+ baw_debug("data read, file closed");\r
+ return $filedata;\r
+}\r
+\r
+/*\r
+* Data Function: read the filemap at the begginning of a data file. This function\r
+* is called only by baw_data if the data was not read before.\r
+*\r
+* @param obj &$f file-handler to read\r
+* @param str $site the concerned site\r
+* @param str $date YYYYMM, date of datafile\r
+* adds the data to gl. array $BAW_DFILES\r
+*\r
+*/\r
+function baw_read_filemap(&$f, $site, $date) {\r
+ global $BAW_DFILES;\r
+ // $f = fopen($file, 'r');\r
+ $str ='';\r
+ $check = 1;\r
+ // read this file until we hit the offsets\r
+ while ($check !== 0) {\r
+ $str = fgets($f, 20000);\r
+ // check for XML Data\r
+ if (strstr($str, '<xml') !== false) { // we have XML\r
+ echo baw_raise_error('xmldata');\r
+ exit;\r
+ }\r
+ $check = strpos($str, 'BEGIN_MAP');\r
+ }\r
+ $check = explode(' ', $str);\r
+ $lines_count = $check[1]; // line length of the map\r
+ baw_debug("found data map for file, has $lines_count lines");\r
+ // now read x more lines\r
+ for ($i=0; $i<$lines_count;$i++) { // read the complete offset map\r
+ $str = fgets($f, 512);\r
+ // split the info in string - byte offset\r
+ $check = explode(' ', $str);\r
+ $type = substr($check[0], 4);\r
+ $offset = $check[1];\r
+ if ($offset > 1) {\r
+ baw_debug("data type $type, starts at offset $offset");\r
+ $BAW_DFILES[$site][$date]['map'][$type] = $offset;\r
+ } else {\r
+ echo baw_raise_error('datafileindex', $err_data);\r
+ exit;\r
+ }\r
+ }\r
+ baw_debug("map read");\r
+}\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+/**\r
+ * File contents:\r
+ *\r
+ * This file contains one function for each displayed section. The functions\r
+ * call the data from the datafile, process & sort it and output the charts/tables\r
+ * according to the settings in config.php\r
+ */\r
+\r
+\r
+// this file can't be used on its own\r
+if (strpos ($_SERVER['PHP_SELF'], 'display.inc.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+function baw_display_overview($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF;\r
+ $m = $BAW_MES;\r
+ $m_name = $m[59+$BAW_CURR['month']];\r
+\r
+ if ($g = baw_data($BAW_CURR['site_name'], 'GENERAL', $BAW_CURR['yearmonth'])) {\r
+ // we assumethat time exists when general exist\r
+ $t = baw_data($BAW_CURR['site_name'], 'TIME', $BAW_CURR['yearmonth']);\r
+\r
+ $o = baw_calc_monthdata($t,$g);\r
+ $l = $g['LastUpdate'];\r
+ $time = baw_time_format($l[0]);\r
+ $BAW_CURR['thismonth']['hits'] = $o[1];\r
+ $out = "<table class=\"datatable\">\n"\r
+ . " <tr>\n <td><b>{$m[133]}</b></td><td colspan=\"5\">$m_name {$BAW_CURR['year']}</td>\n </tr>\n"\r
+ . " <tr class=\"layout_index\">\n <td><b>{$m[8]}</b></td><td colspan=\"5\">".baw_time_format($g['FirstTime'][0])."</td>\n </tr>\n"\r
+ . " <tr class=\"layout_index\">\n <td><b>{$m[9]}</b></td><td colspan=\"5\">".baw_time_format($g['LastTime'][0])."</td>\n </tr>\n"\r
+ . " <tr>\n <td> </td>\n"\r
+ ." <th class=\"layout_visitors\">{$m[11]}</th>\n"\r
+ ." <th class=\"layout_visits\">{$m[10]}</th>\n"\r
+ ." <th class=\"layout_pages\">{$m[56]}</th>\n"\r
+ ." <th class=\"layout_hits\">{$m[57]}</th>\n"\r
+ ." <th class=\"layout_bytes\">{$m[75]}</th>\n </tr>\n"\r
+\r
+ . " <tr style=\"white-space:nowrap;\">\n <td>{$m[160]} *</td>\n"\r
+ ." <td><b>".baw_num_format($o[0])."</b>".BR." </td>\n"\r
+ ." <td><b>".baw_num_format($o[1])."</b>".BR."(".@baw_num_format($o[1] / $o[0],2)." {$m[52]})</td>\n"\r
+ ." <td><b>".baw_num_format($o[2])."</b>".BR."(".@baw_num_format($o[2] / $o[1],2)." {$m[27]}/{$m[12]})</td>\n"\r
+ ." <td><b>".baw_num_format($o[3])."</b>".BR."(".@baw_num_format($o[3] / $o[1],2)." {$m[57]}/{$m[12]})</td>\n"\r
+ ." <td><b>".baw_byte_format($o[4])."</b>".BR."(".@baw_byte_format($o[4] / $o[1],2)."/{$m[12]})</td>\n </tr>\n"\r
+ . " <tr>\n <td>{$m[161]} *</td>\n"\r
+ ." <td colspan=\"2\"> </td>\n"\r
+ ." <td><b>".baw_num_format($o[5])."</b></td>\n"\r
+ ." <td><b>".baw_num_format($o[6])."</b></td>\n"\r
+ ." <td><b>".baw_byte_format($o[7])."</b></td></tr>\n"\r
+ . " <tr>\n <td colspan=\"6\">* {$m[159]}</td>\n </tr>\n";\r
+ if ($BAW_CONF['show_parser_stats']) {\r
+ $out .= " <tr>\n <td colspan=\"6\"><b>{$m['data_file_stats']}</b></td>\n </tr>\n"\r
+ . " <tr>\n"\r
+ ." <td>{$m[35]}:".BR."$time</td>\n"\r
+ ." <td>{$m['parsed_records']}".BR . baw_num_format($l[1]) . "</td>\n"\r
+ ." <td>{$m['old_records']}".BR . baw_num_format($l[2]) . "</td>\n"\r
+ ." <td>{$m['new_records']}".BR . baw_num_format($l[3]) . "</td>\n"\r
+ ." <td>{$m['corrupted']}".BR . baw_num_format($l[4]) . "</td>\n"\r
+ ." <td>{$m['dropped']}".BR . baw_num_format($l[5]) . "</td>\n </tr>\n";\r
+ }\r
+ $out .= "</table>\n\n";\r
+ } else {\r
+ $out = "$m_name-{$BAW_CURR['year']} has no data";\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_months($set) {\r
+ global $BAW_MES, $BAW_CONF, $BAW_CURR, $BAW_DFILES;\r
+ $format = array(\r
+ 0 => array ('format' => 'layout_text', 'title'=> $BAW_MES[5], 'colspan'=>'2'), // first cell in first line\r
+ 1 => array ('format' => 'layout_text'), // first cell in first line\r
+ 2 => array ('format' => 'layout_visitors', 'title'=> $BAW_MES[11]),\r
+ 3 => array ('format' => 'layout_visits', 'title'=> $BAW_MES[10]),\r
+ 4 => array ('format' => 'layout_pages', 'title'=> $BAW_MES[56]),\r
+ 5 => array ('format' => 'layout_hits', 'title'=> $BAW_MES[57]),\r
+ 6 => array ('format' => 'layout_bytes', 'title'=> $BAW_MES[75])\r
+ );\r
+ $allsites = false;\r
+ if ($BAW_CURR['site_name'] !== 'all_months') {\r
+ $sites = array($BAW_CURR['site_name']);\r
+ } else {\r
+ $sites = array_keys($BAW_DFILES);\r
+ $allsites = true;\r
+ }\r
+\r
+ $out = '';\r
+ // for each month, get the four data sets\r
+ $frm_arr = array('layout_visitors', 'layout_visits', 'layout_pages', 'layout_hits', 'layout_bytes');\r
+ foreach ($sites as $site) {\r
+ $data_format = array();\r
+ $x = 0;\r
+ $val = array();\r
+ $monthback = $set['top_x'] - 1;\r
+ $chart = array();\r
+ $val_chart = array();\r
+ $lastyear = 0;\r
+ for ($i=$monthback; $i>=0; $i--){\r
+ // get the month & Year x month ago\r
+ $tyear = date("Y", mktime(0, 0, 0, $BAW_CURR['month']-$i, 1, $BAW_CURR['year']));\r
+ $tmonth = date("m", mktime(0, 0, 0, $BAW_CURR['month']-$i, 1, $BAW_CURR['year']));\r
+ // get the data for that month\r
+ if (isset($BAW_DFILES[$site][$tyear .$tmonth])) {\r
+ $g = baw_data($site, 'GENERAL', $tyear . $tmonth);\r
+ $t = baw_data($site, 'TIME', $tyear . $tmonth);\r
+ $data = baw_calc_monthdata($t, $g);\r
+ $x++;\r
+ $month_text = $tmonth + 59;\r
+ $class = '';\r
+ $date = date("Ym", mktime(0,0,0,$tmonth,1,$tyear));\r
+ $today = date("Ym");\r
+ if ($date == $today) {\r
+ $class = "currentday";\r
+ }\r
+ for ($j=0; $j<5; $j++) {\r
+ $chart["{$BAW_MES[$month_text]}|$tyear"][] = array('data' => "$data[$j]", 'class' => "$class", 'format' => $frm_arr[$j]);\r
+ }\r
+ $class .= baw_even($tyear, ' evenyear', ' oddyear');\r
+\r
+ $val[$tmonth.$tyear] = array(\r
+ $tyear,\r
+ $BAW_MES[$month_text],\r
+ $data[0],\r
+ $data[1],\r
+ $data[2],\r
+ $data[3],\r
+ $data[4],\r
+ );\r
+ if ($class !== '') {\r
+ $data_format[$tmonth.$tyear] = $class;\r
+ }\r
+ }\r
+ }\r
+ if ($set['chart']) {\r
+ if ($allsites) {\r
+ // make a link to the actual statistics from the overview\r
+ $full_url = "{$BAW_CONF['site_url']}/index.php?site=$site&month={$BAW_CURR['month']}&year={$BAW_CURR['year']}";\r
+ $out .= "<h3 id=\"site_$site\"><a href=\"$full_url\">$site</a></h3>";\r
+ }\r
+ $out .= baw_render_htmlchart($val, $format, $set['avg'], -$set['top_x'], $data_format);\r
+ }\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $val, $format, $set['avg'], $set['total'], false, $data_format);\r
+ }\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_days($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_DFILES;\r
+ $sum = array(0,0,0,0,0); // summ all overall data\r
+ // this 3 lines is only for collecting data for weekdays\r
+ $wdsum_arr = array(); // summ all weekday data\r
+ $wdcount_arr = array(0,0,0,0,0,0,0); // count the number of sat, sun etc\r
+ $wdavg_arr = array(); // values of avg\r
+ $daysoflastmonth = 30;\r
+\r
+ // assemble date\r
+ $daysofmonth = date("t", strtotime("{$BAW_CURR['year']}{$BAW_CURR['month']}01000000"));\r
+ //$thisyear = date("Y", strtotime("-1 month"));\r
+ //$lastyear = date("Y", strtotime("-1 month -1 year"));\r
+ $current_month = date('m');\r
+ $current_day = date('d');\r
+ $daydiff = 0;\r
+ $data_format = array();\r
+ // find how may days we have to go back\r
+ if ($BAW_CURR['month'] == $current_month) { // if we have the current month, get some data from the last month\r
+ $daydiff = abs($current_day - $daysofmonth); // calculate how many days are missing\r
+ }\r
+\r
+ $format = array(\r
+ 0 => array ('format'=> 'layout_text', 'title' => $BAW_MES[4], 'colspan'=>3),\r
+ 1 => array ('format'=> 'layout_text'),\r
+ 2 => array ('format'=> 'layout_text'),\r
+ 3 => array ('format'=> 'layout_visits', 'title' => $BAW_MES[10]),\r
+ 4 => array ('format'=> 'layout_pages', 'title' => $BAW_MES[56]),\r
+ 5 => array ('format'=> 'layout_hits', 'title' => $BAW_MES[57]),\r
+ 6 => array ('format'=> 'layout_bytes', 'title' => $BAW_MES[75])\r
+ );\r
+ // check if we do all sites or just one\r
+ $allsites = false;\r
+ if ($BAW_CURR['site_name'] !== 'all_days') {\r
+ $sites = array($BAW_CURR['site_name']);\r
+ } else {\r
+ $sites = array_keys($BAW_DFILES);\r
+ $allsites = true;\r
+ }\r
+ $out = '';\r
+ // iterate all sites, normally only one\r
+ foreach ($sites as $site) {\r
+ // we have to add the days of the previous month\r
+ // this has to be inside the loop so we get the variables again for next site\r
+ if ($daydiff > 0) {\r
+ if ($BAW_CURR['month'] !== '01') {\r
+ $prevyear = $BAW_CURR['year'];\r
+ $prevmonth = sprintf('%02d', $BAW_CURR['month']-1); // date('m', strtotime("-1 month"));\r
+ $daysoflastmonth = date("t", strtotime("{$BAW_CURR['year']}{$prevmonth}01000000"));\r
+ } else {\r
+ $prevyear = $BAW_CURR['year'] - 1;\r
+ $prevmonth = '12';\r
+ }\r
+ }\r
+ $val = array();\r
+ // get the data for this site if available\r
+ if ($val = baw_data($site, 'DAY', $BAW_CURR['yearmonth'])) {\r
+ // in case we need last months data, get it too\r
+ if ($daydiff > 0) {\r
+ if ($prevdate_data = baw_data($site, 'DAY', $prevyear . $prevmonth)) {\r
+ $date_cut = $prevyear . $prevmonth . $prevmonth = sprintf('%02d', $daysoflastmonth - $daydiff);\r
+ $val_prev = baw_cut_date_array($prevdate_data, $date_cut);\r
+ $val = $val_prev + $val;\r
+ }\r
+ }\r
+ $newval = array();\r
+ $lastmonth = 0;\r
+ for ($j=0; $j<$daysofmonth; $j++) {\r
+ $class = '';\r
+ // foreach ($val as $date => $data) {\r
+ $date = date("Ymd", mktime(0,0,0,$BAW_CURR['month'],1+ $j - $daydiff,$BAW_CURR['year']));\r
+ $month = date("m", mktime(0,0,0,$BAW_CURR['month'],1+ $j - $daydiff,$BAW_CURR['year']));\r
+ $today = date("Ymd");\r
+ if ($date == $today) {\r
+ $class = "currentday";\r
+ }\r
+ if (!isset($val[$date])) {\r
+ $val[$date] = array(0,0,0,0,0);\r
+ }\r
+ $data = $val[$date];\r
+ $xdate = $date . "000000";\r
+ $tstamp = strtotime($xdate);\r
+ $wday = date("w", $tstamp);\r
+\r
+ if ($wday == 0 or $wday == 6) {\r
+ $class = "$class weekend";\r
+ $class = trim($class);\r
+ }\r
+ // these lines is only for collecting data for weekdays\r
+ $wdcount_arr[$wday]++; // count no of one weekday for avg division\r
+ for ($i=0; $i<=3; $i++) { // iterate data types\r
+ if (!isset($wdsum_arr[$wday][$i])) {\r
+ $wdsum_arr[$wday][$i] = 0;\r
+ }\r
+ $wdsum_arr[$wday][$i] += $data[$i];\r
+ }\r
+\r
+ if (!isset($from)) {\r
+ $from = $xdate;\r
+ }\r
+ $BAW_CURR['wdays']['count'] = $wdcount_arr;\r
+ $BAW_CURR['wdays']['avg'] = $wdsum_arr;\r
+ $BAW_CURR['wdays']['from'] = $from;\r
+ $BAW_CURR['wdays']['to'] = $xdate;\r
+ if (($j !== $daysofmonth)) {\r
+ $newval[$xdate] = array(\r
+ date("Y", strtotime($xdate)),\r
+ date("M", strtotime($xdate)),\r
+ date("d", strtotime($xdate)),\r
+ $data[3],\r
+ $data[0],\r
+ $data[1],\r
+ $data[2]\r
+ );\r
+ }\r
+\r
+ $class .= baw_even($month, ' evenmonth', ' oddmonth');\r
+ if ($class !== '') {\r
+ $data_format[$xdate] = $class;\r
+ }\r
+ }\r
+ if ($set['chart']) {\r
+ if ($allsites) {\r
+ // make a link to the actual statistics from the overview\r
+ $full_url = "{$BAW_CONF['site_url']}/index.php?site=$site&month={$BAW_CURR['month']}&year={$BAW_CURR['year']}";\r
+ $out .= "<h3 id=\"site_$site\"><a href=\"$full_url\">$site</a></h3>";\r
+ // $html .= baw_display_updatestats($site);\r
+ }\r
+ $out .= baw_render_htmlchart($newval, $format, $set['avg'], false, $data_format);\r
+ }\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], false, $data_format);\r
+ }\r
+ }\r
+ }\r
+ return $out;\r
+}\r
+\r
+// get all the averages of one weekday each\r
+function baw_display_weekdays($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF;\r
+\r
+ if (isset($BAW_CURR['wdays']['count'])) {\r
+ $format = array(\r
+ 0 => array ('title' => $BAW_MES[4], 'format' => 'layout_text'),\r
+ 1 => array ('percent' => true, 'title' => $BAW_MES[10], 'format' => 'layout_visits'),\r
+ 2 => array ('title' => $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 3 => array ('title' => $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 4 => array ('title' => $BAW_MES[75], 'format' => 'layout_bytes')\r
+ );\r
+ $newval = array();\r
+ $data_format = array();\r
+ $wdcount_arr = $BAW_CURR['wdays']['count'];\r
+ $wdsum_arr = $BAW_CURR['wdays']['avg'];\r
+ for ($w=0; $w<7; $w++) {\r
+ // switch for Mo or Su start\r
+ $x = $w;\r
+ if ($BAW_CONF['firstdayofweek'] == 1) {\r
+ $x = $w + 1;\r
+ if ($x == 7) {\r
+ $x = 0;\r
+ }\r
+ }\r
+ $class = '';\r
+ if ($x == 0 or $x == 6) {\r
+ $class = "weekend";\r
+ }\r
+ if ($wdcount_arr[$x] == 0) {\r
+ $wdcount_arr[$x] = 1;\r
+ }\r
+ for ($i=0; $i<=3; $i++) {\r
+ $wavg[$x][$i] = '1';\r
+ if (!isset($wdsum_arr[$x][$i])) {\r
+ $wdsum_arr[$x][$i] = 0;\r
+ }\r
+ $wavg[$x][$i] = $wdsum_arr[$x][$i] / $wdcount_arr[$x];\r
+ }\r
+ $newval[84+$x] = array(\r
+ $BAW_MES[84+$x],\r
+ $wavg[$x][3],\r
+ $wavg[$x][0],\r
+ $wavg[$x][1],\r
+ $wavg[$x][2]\r
+ );\r
+ if ($class !== '') {\r
+ $data_format[84+$x] = $class;\r
+ }\r
+ }\r
+ $out = '';\r
+ if ($set['chart']) {\r
+ $out .= baw_render_htmlchart($newval, $format, $set['avg'], false, $data_format);\r
+ }\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], false, $data_format);\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_hours($set) {\r
+ // we have to calculate the average of each hour depending on how many days have\r
+ // data at all in this month\r
+ // half days will create slightly inaccuarate data.\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF;\r
+ $chart = array();\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[20], 'format' => 'layout_text', 'colspan'=> 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 3 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 4 => array ('title'=> $BAW_MES[75], 'format' => 'layout_bytes')\r
+ );\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], "TIME", $BAW_CURR['yearmonth'])) {\r
+ $days = baw_data($BAW_CURR['site_name'], "DAY", $BAW_CURR['yearmonth']);\r
+ $count_days = count($days);\r
+ if (!$count_days) return; # NB\r
+ foreach ($val as $hour => $data) {\r
+ $ihour = $hour + 1;\r
+ if ($ihour >= 13) {\r
+ $ihour = ($hour - 11);\r
+ }\r
+ $avgdata = array();\r
+ $icon = baw_create_image($BAW_CONF['icons_url'] . "/clock/hr$ihour.png" , array("alt"=>$hour, "title"=>$hour));\r
+ $avgdata[0] = $data[0] / $count_days;\r
+ $avgdata[1] = $data[1] / $count_days;\r
+ $avgdata[2] = $data[2] / $count_days;\r
+ $lhour = sprintf('%02d',$hour);\r
+ $newval_table[$hour] = array(\r
+ $icon,\r
+ "$lhour:00 - $lhour:59",\r
+ $avgdata[0],\r
+ $avgdata[1],\r
+ $avgdata[2],\r
+ );\r
+ $newval_chart[$hour] = array(\r
+ $icon,\r
+ $hour,\r
+ $avgdata[0],\r
+ $avgdata[1],\r
+ $avgdata[2],\r
+ );\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+\r
+ $out = '';\r
+ if ($set['chart']) {\r
+ $newval_chart = baw_array_sorting($newval_chart, $set['sort'], $set['sort_dir']);\r
+ $out .= baw_render_htmlchart($newval_chart, $format, $set['avg'], false);\r
+ }\r
+ if ($set['table']) {\r
+ $newval_table = baw_array_sorting($newval_table, $set['sort'], $set['sort_dir']);\r
+ $out .= baw_render_table($set['name'], $newval_table, $format, $set['avg'], $set['total']);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_domains($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $chart = array();\r
+ $format_table = array(\r
+ 0 => array ('title'=> $BAW_MES[25] , 'format' => 'layout_text','colspan' => 3),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('format' => 'layout_text'),\r
+ 3 => array ('percent' => true, 'title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 4 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 5 => array ('title'=> $BAW_MES[75], 'format' => 'layout_bytes')\r
+ );\r
+ $format_chart = array(\r
+ 0 => array ('title'=> $BAW_MES[25] , 'format' => 'layout_text','colspan' => 3),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 3 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 4 => array ('title'=> $BAW_MES[75], 'format' => 'layout_bytes')\r
+ );\r
+ // $format_jp = array($BAW_MES[56], $BAW_MES[57], $BAW_MES[75]);\r
+ $newval = array();\r
+ // $jpval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], "DOMAIN", $BAW_CURR['yearmonth'])) {\r
+ $val = baw_array_sorting($val, $set['sort'], $set['sort_dir']);\r
+ foreach ($val as $domain => $data) {\r
+ if (isset($BAW_LIB['domains'][$domain])) {\r
+ $file = $domain;\r
+ $desc = $BAW_LIB['domains'][$domain];\r
+ } else {\r
+ $file = 'unknown';\r
+ $desc = $file;\r
+ }\r
+ $icon = baw_create_image($BAW_CONF['icons_url'] . "/flags/$file.png" , array("alt" => $domain, "title" => $domain));\r
+ $newval_table[$domain] = array(\r
+ $icon,\r
+ $desc,\r
+ $domain,\r
+ $data[0],\r
+ $data[1],\r
+ $data[2]\r
+ );\r
+ $newval_chart[$domain] = array(\r
+ $icon,\r
+ $domain,\r
+ $data[0],\r
+ $data[1],\r
+ $data[2]\r
+ );\r
+ $out = '';\r
+\r
+ if ($set['chart']) {\r
+ $out .= baw_render_htmlchart($newval_chart, $format_chart, $set['avg'], $set['top_x']);\r
+ }\r
+ if ($set['map']) {\r
+ $out .= baw_render_map($newval_table, $set['top_x']);\r
+ }\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval_table, $format_table, $set['avg'], $set['total'], $set['top_x']);\r
+ }\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_visitors($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_CONF_DIS;\r
+ $format = array( // first line\r
+ 0 => array ('title'=> $BAW_MES[81], 'format' => 'layout_text'),\r
+ 1 => array ('percent' => true, 'title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 2 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 3 => array ('title'=> $BAW_MES[75], 'format' => 'layout_bytes'),\r
+ 4 => array ('title'=> $BAW_MES['ratio_pages_hits'], 'format' => 'layout_ratio', 'ratio' => '2/1'),\r
+ 5 => array ('title'=> $BAW_MES[9], 'format' => 'layout_date'),\r
+ );\r
+ $h_data = array(0,0,0,'latest_date'=> 0);\r
+ $s_data = array(0,0,0,'latest_date'=> 0);\r
+ $i = 0;\r
+ $hashotlinks = false;\r
+ $hasbots = false;\r
+ if ($val = baw_data($BAW_CURR['site_name'], "VISITOR", $BAW_CURR['yearmonth'])) {\r
+ baw_debug("data loaded");\r
+ foreach ($val as $dns => $data) {\r
+ // $infolink = baw_create_link("?", "javascript:neww('$dns','{$dns}XXX')");\r
+ // $line[] = array ('data'=> $infolink, 'class' => "aligncenter", 'format' => 'layout_index');\r
+ //if (!$set['hidebots'] or $data[1] !== $data[2]) {\r
+ $ratio = 0;\r
+ if ($data[0] > 0) {\r
+ $ratio = $data[1] / $data[0];\r
+ }\r
+ // hotlinks & Bots\r
+ if ($data[3] =='') {\r
+ $data[3] = 0;\r
+ }\r
+ // $data[3] = settype($data[3], 'int');\r
+ if ($data[0] == 0 && $data[1] !== 0) {\r
+ $h_data['latest_date'] = max($data[3], $h_data['latest_date']);\r
+ $h_data[0] += $data[0];\r
+ $h_data[1] += $data[1];\r
+ $h_data[2] += $data[2];\r
+ $hashotlinks = true;\r
+ } else if ($ratio <= $BAW_CONF_DIS['visitors']['assumebot']) {\r
+ $s_data['latest_date'] = max($data[3], $s_data['latest_date']);\r
+ $s_data[0] += $data[0];\r
+ $s_data[1] += $data[1];\r
+ $s_data[2] += $data[2];\r
+ $hasbots = true;\r
+ } else {\r
+ $val[$i] = array(\r
+ $dns,\r
+ $data[0],\r
+ $data[1],\r
+ $data[2],\r
+ baw_num_format($ratio, 2),\r
+ $data[3]\r
+ );\r
+ }\r
+ // try extra to regain the memory here since this is the largest function\r
+ $val[$dns] = NULL;\r
+ unset($val[$dns]);\r
+ $i++;\r
+ }\r
+ if ($hasbots) {\r
+ $val['script'] = array(\r
+ $BAW_MES['assumedscript'],\r
+ $s_data[0],\r
+ $s_data[1],\r
+ $s_data[2],\r
+ $s_data[1] / $s_data[0],\r
+ $s_data['latest_date']\r
+ );\r
+ }\r
+ if ($hashotlinks) {\r
+ $val['hotlinks'] = array(\r
+ $BAW_MES['hotlinks_proxies'],\r
+ $h_data[0],\r
+ $h_data[1],\r
+ $h_data[2],\r
+ 0,\r
+ $h_data['latest_date']\r
+ );\r
+ }\r
+\r
+ $val = baw_array_sorting($val, $set['sort'], $set['sort_dir']);\r
+ baw_debug("data sorted");\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $val, $format, $set['avg'], $set['total'], $set['top_x']);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_logins($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[94], 'format' => 'layout_text'),\r
+ 1 => array ('percent' => true, 'title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 2 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 3 => array ('title'=> $BAW_MES[75], 'format' => 'layout_bytes'),\r
+ 4 => array ('title'=> $BAW_MES[9], 'format' => 'layout_date'),\r
+ );\r
+\r
+ $val = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], "LOGIN", $BAW_CURR['yearmonth'])) {\r
+ $val = baw_array_sorting($val, $set['sort'], $set['sort_dir']);\r
+ foreach ($val as $id => $data) {\r
+ $val[$id] = array(\r
+ $id,\r
+ $data[0],\r
+ $data[1],\r
+ $data[2],\r
+ $data[3]\r
+ );\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $val, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_robots($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[53], 'format' => 'layout_text'),\r
+ 1 => array ('percent' => false, 'title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 2 => array ('title'=> $BAW_MES[57] . " (robots.txt)", 'format' => 'layout_hits'),\r
+ 3 => array ('title'=> $BAW_MES[75], 'format' => 'layout_bytes'),\r
+ 4 => array ('title'=> $BAW_MES[9], 'format' => 'layout_date'),\r
+ );\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], "ROBOT", $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $robot => $data) {\r
+ if (isset($BAW_LIB['robots'][$robot])) {\r
+ $robot_txt = $BAW_LIB['robots'][$robot];\r
+ } else {\r
+ $robot_txt = $robot;\r
+ }\r
+ $val[$robot] = array(\r
+ $robot_txt,\r
+ $data[0]-$data[3],\r
+ $data[3],\r
+ $data[1],\r
+ $data[2],\r
+ );\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $val = baw_array_sorting($val, $set['sort'], $set['sort_dir']);\r
+ $out .= baw_render_table($set['name'], $val, $format, $set['avg'], $set['total'], $set['top_x']);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_worms($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[163], 'format' => 'layout_text'),\r
+ 1 => array ('title'=> $BAW_MES[167], 'format' => 'layout_text'),\r
+ 2 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 3 => array ('title'=> $BAW_MES[75], 'format' => 'layout_bytes'),\r
+ 4 => array ('title'=> $BAW_MES[9], 'format' => 'layout_date'),\r
+ );\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], "WORMS", $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $worm => $data) {\r
+ $val[$worm] = array(\r
+ $BAW_LIB['worms']['names'][$worm],\r
+ $BAW_LIB['worms']['targets'][$worm],\r
+ $data[0],\r
+ $data[1],\r
+ $data[2]\r
+ );\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $val = baw_array_sorting($val, $set['sort'], $set['sort_dir']);\r
+ $out .= baw_render_table($set['name'], $val, $format, $set['avg'], $set['total'], $set['top_x']);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_sessions($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[117], 'format' => 'layout_text'),\r
+ 1 => array ('percent' => true, 'title'=> $BAW_MES[10], 'format' => 'layout_visits')\r
+ );\r
+\r
+ $newval = array();\r
+ $sum = 0; // sum for "unknown"\r
+ if ($val = baw_data($BAW_CURR['site_name'], "SESSION", $BAW_CURR['yearmonth'])) {\r
+ foreach ($BAW_LIB['sessions'] as $timespan) {\r
+ $newval[$timespan] = array($timespan, 0);\r
+ if (isset($val[$timespan][0])) {\r
+ $newval[$timespan][1] = $val[$timespan][0];\r
+ $sum += $val[$timespan][0];\r
+ }\r
+ }\r
+ $unknown = $BAW_CURR['thismonth']['hits'] - $sum;\r
+ $newval['Unknown'] = array('Unknown', $unknown);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ // $newval = baw_array_sorting($newval, 1, SORT_DESC);\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_filetype($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format_table = array(\r
+ 0 => array ('title'=> $BAW_MES[73], 'format' => 'layout_text', 'colspan' => 3),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('format' => 'layout_text'),\r
+ 3 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 4 => array ('percent' => true, 'title'=> $BAW_MES[75], 'format' => 'layout_bytes'),\r
+ 5 => array ('title'=> $BAW_MES[100], 'format' => 'layout_bytes'),\r
+ 6 => array ('title'=> $BAW_MES[101], 'format' => 'layout_bytes'),\r
+ 7 => array ('title'=> $BAW_MES[99], 'format' => 'layout_bytes'),\r
+ );\r
+ $format_chart = array(\r
+ 0 => array ('title'=> $BAW_MES[73], 'format' => 'layout_text', 'colspan' => 3),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 3 => array ('percent' => true, 'title'=> $BAW_MES[75], 'format' => 'layout_bytes'),\r
+ );\r
+\r
+ $newval_table = array();\r
+ $newval_chart = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], "FILETYPES", $BAW_CURR['yearmonth'])) {\r
+ // Files type - Hits - Bandwidth - Bandwidth without compression - Bandwidth after compression\r
+ $val = baw_array_sorting($val, $set['sort'], $set['sort_dir']);\r
+ foreach ($val as $type => $data) {\r
+ $icon = '';\r
+ if (isset($BAW_LIB['files']['icons'][$type])) {\r
+ $iconname = $BAW_LIB['files']['icons'][$type];\r
+ $icon = baw_create_image($BAW_CONF['icons_url'] . "/mime/$iconname.png" , array("alt" => $iconname, "title" => $iconname));\r
+ }\r
+ if ($type == 'Unknown') {\r
+ $type_text = "?";\r
+ $desc = $type;\r
+ } else {\r
+ $type_text = $type;\r
+ $desc = @$BAW_LIB['files']['types'][$BAW_LIB['files']['family'][$type]];\r
+ }\r
+ $newval_table[$type] = array(\r
+ $icon,\r
+ $type_text,\r
+ $desc,\r
+ $data[0],\r
+ $data[1],\r
+ $data[2],\r
+ $data[3],\r
+ $data[2] - $data[3]\r
+ );\r
+ $newval_chart[$type] = array(\r
+ $icon,\r
+ $type_text,\r
+ $data[0],\r
+ $data[1],\r
+ );\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+\r
+ // $chart = baw_array_sorting($chart, $set['sort'], $set['sort_dir']);\r
+ // $pieval = baw_array_sorting($pieval, 1, $set['sort_dir']);\r
+ $out = '';\r
+ if ($set['chart']) {\r
+ $out .= baw_render_htmlchart($newval_chart, $format_chart, $set['avg'], $set['top_x']);\r
+ }\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval_table, $format_table, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_urls($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[19], 'format' => 'layout_text'),\r
+ 1 => array ('title'=> $BAW_MES[29], 'format' => 'layout_pages'),\r
+ 2 => array ('title'=> $BAW_MES[106], 'format' => 'layout_bytes'),\r
+ 3 => array ('title'=> $BAW_MES[104], 'format' => 'layout_hits'),\r
+ 4 => array ('title'=> $BAW_MES[116], 'format' => 'layout_hits')\r
+ );\r
+ $val = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], "SIDER", $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $url => $data) {\r
+ $link = baw_create_link($url, "http://{$BAW_CURR['site_name']}$url", array(), true);\r
+ // URL - Pages - Bandwidth - Entry - Exit\r
+ $val[$url] = array(\r
+ $link,\r
+ $data[0],\r
+ $data[1]/$data[0], // average size per page instead of sum\r
+ $data[2],\r
+ $data[3]\r
+ );\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $val = baw_array_sorting($val, $set['sort'], $set['sort_dir']);\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $val, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_paths($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES['files_paths'], 'format' => 'layout_text'),\r
+ 1 => array ('title'=> $BAW_MES[29], 'format' => 'layout_pages'),\r
+ );\r
+ $val = array();\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], "SIDER", $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $url => $data) {\r
+ $full_url = "http://{$BAW_CURR['site_name']}$url";\r
+ $url_array = parse_url($full_url);\r
+ $link_url = "http://{$BAW_CURR['site_name']}" . $url_array['path'];\r
+ $link = baw_create_link($url_array['path'], $link_url, array(), true);\r
+ if (!isset($newval[$url_array['path']])) {\r
+ $newval[$url_array['path']] = array(\r
+ 0 => $link,\r
+ 1 => $data[0]\r
+ );\r
+ } else {\r
+ $newval[$url_array['path']][1] += $data[0];\r
+ }\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_os($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format_table = array(\r
+ 0 => array ('title'=> $BAW_MES[59], 'format' => 'layout_text', 'colspan' => 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $format_chart = array(\r
+ 0 => array ('title'=> $BAW_MES[59], 'format' => 'layout_text'),\r
+ 1 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $newval_table = array();\r
+ $newval_chart = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'OS', $BAW_CURR['yearmonth'])) {\r
+ $newval_table = $BAW_LIB['os']['families']; // create an array where the main are already\r
+ if ($BAW_CONF['module'] == 'drupal') {\r
+ $url = "/{$BAW_CONF['drupal_base']}/details/unknownos/{$BAW_CURR['month']}/{$BAW_CURR['year']}";\r
+ } else {\r
+ $url = "{$BAW_CONF['site_url']}/index.php?site={$BAW_CURR['site_name']}&month={$BAW_CURR['month']}&year={$BAW_CURR['year']}&action=get_fulltable&what=unknownos";\r
+ }\r
+ // iterate all the data\r
+ foreach ($val as $os => $data) {\r
+ $isnew = true; // this os has not been added to newval yet (not families)\r
+ // iterate all the std. OS types and add the date to the curret one if matches\r
+ foreach ($BAW_LIB['os']['codes'] as $code) {\r
+ if (stristr($os, $code) !== false) {\r
+ $newval_table[$code][2] += $data[0]; // found it, add stats\r
+ $iconid = $code;\r
+ $isnew = false; // we have the stats now\r
+ }\r
+ }\r
+ if ($isnew) { // this is an additional, non-family os\r
+ $iconid = $os;\r
+ $os_link = $BAW_LIB['os']['list'][$os];\r
+ $newval_table[$os] = array('', $os_link, $data[0]);\r
+ }\r
+ if ($os == 'Unknown') {\r
+ $newval_table[$os][1] = baw_create_link($BAW_MES[0], $url);\r
+ }\r
+ $icon = baw_create_image(\r
+ $BAW_CONF['icons_url'] . "/os/" . str_replace('/', '',\r
+ strtolower($iconid)) . '.png',\r
+ array('title' => strip_tags($newval_table[$iconid][1]))\r
+ );\r
+ $newval_table[$iconid][0] = $icon;\r
+ }\r
+ $newval_table = baw_array_sorting($newval_table, $set['sort'], $set['sort_dir']);\r
+ // clean out data with 0 hits\r
+ foreach ($newval_table as $id => $data) {\r
+ if ($data[2] == 0) {\r
+ unset ($newval_table[$id]);\r
+ } else { // copy valid points into chart array\r
+ $newval_chart[$id] = array(\r
+ $data[0],\r
+ $data[2]\r
+ );\r
+ }\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+\r
+ $out = '';\r
+ if ($set['chart']) {\r
+ $out .= baw_render_htmlchart($newval_chart, $format_chart, $set['avg'], $set['top_x']);\r
+ }\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval_table, $format_table, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_osversions($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format_table = array(\r
+ 0 => array ('title'=> $BAW_MES[59], 'format' => 'layout_text', 'colspan' => 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $format_chart = array(\r
+ 0 => array ('title'=> $BAW_MES[59], 'format' => 'layout_text'),\r
+ 1 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'OS', $BAW_CURR['yearmonth'])) {\r
+ if ($BAW_CONF['module'] == 'drupal') {\r
+ $url = "/{$BAW_CONF['drupal_base']}/details/unknownos/{$BAW_CURR['month']}/{$BAW_CURR['year']}";\r
+ } else {\r
+ $url = "{$BAW_CONF['site_url']}/index.php?site={$BAW_CURR['site_name']}&month={$BAW_CURR['month']}&year={$BAW_CURR['year']}&action=get_fulltable&what=unknownos";\r
+ }\r
+ $newval_table = array();\r
+ foreach ($val as $os => $data) {\r
+ $iconid = $os;\r
+ $os_link = $BAW_LIB['os']['list'][$os];\r
+ $icon = baw_create_image(\r
+ $BAW_CONF['icons_url'] . "/os/" . str_replace('/', '',\r
+ strtolower($iconid)) . '.png',\r
+ array('title' => strip_tags($os_link))\r
+ );\r
+ $newval_table[$os] = array($icon, $os_link, $data[0]);\r
+ if ($os == 'Unknown') {\r
+ $newval_table[$os][1] = baw_create_link($BAW_MES[0], $url);\r
+ }\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $newval_table = baw_array_sorting($newval_table, 2, $set['sort_dir']);\r
+ $out = '';\r
+ if ($set['chart']) {\r
+ $newval_chart = array();\r
+ foreach ($newval_table as $os => $data) {\r
+ $newval_chart[$os] = array($data[0], $data[2]);\r
+ }\r
+ $out .= baw_render_htmlchart($newval_chart, $format_chart, $set['avg'], $set['top_x']);\r
+ }\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval_table, $format_table, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_unknownos($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[46], 'format' => 'layout_text'),\r
+ 1 => array ('percent' => false, 'title'=> $BAW_MES[9], 'format' => 'layout_date')\r
+ );\r
+ $val = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'UNKNOWNREFERER', $BAW_CURR['yearmonth'])) {\r
+ $newval = array();\r
+ foreach ($val as $os_ver => $data) {\r
+ $os_ver = strip_tags($os_ver);\r
+ $newval[] = array($os_ver, $data[0]);\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_browsers($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format_table = array(\r
+ 0 => array ('title'=> $BAW_MES[21], 'format' => 'layout_text', 'colspan' => 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('title'=> $BAW_MES[111], 'format' => 'layout_text'),\r
+ 3 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $format_chart = array(\r
+ 0 => array ('title'=> $BAW_MES[21], 'format' => 'layout_text',),\r
+ 1 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $search = array(\r
+ '\\s',\r
+ '\\-'\r
+ );\r
+ $replace = array(\r
+ "_",\r
+ "-"\r
+ );\r
+ $newval_table = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'BROWSER', $BAW_CURR['yearmonth'])) {\r
+ $lib = $BAW_LIB['browser']['names'];\r
+ if ($BAW_CONF['module'] == 'drupal') {\r
+ $url = "/{$BAW_CONF['drupal_base']}/details/unknownbrowser/{$BAW_CURR['month']}/{$BAW_CURR['year']}";\r
+ } else {\r
+ $url = "{$BAW_CONF['site_url']}/index.php?site={$BAW_CURR['site_name']}&month={$BAW_CURR['month']}&year={$BAW_CURR['year']}&action=get_fulltable&what=unknownbrowser";\r
+ }\r
+ // iterate all browsers in the library\r
+ foreach ($lib as $browser => $description) {\r
+ // get the icon\r
+ $icon = '';\r
+ if (isset($BAW_LIB['browser']['icons'][$browser])) {\r
+ $icon = $BAW_LIB['browser']['icons'][$browser];\r
+ $icon = str_replace($search, $replace, $icon);\r
+ $icon = baw_create_image(\r
+ $BAW_CONF['icons_url'] . "/browser/$icon.png",\r
+ array('title' => strip_tags($description))\r
+ );\r
+ } else {\r
+ // we have to create an icon since the chart is indexed by the icon\r
+ // html. they have to be different each.\r
+ $icon = baw_create_image(\r
+ $BAW_CONF['site_url'] . "/icons/empty.png",\r
+ array('title' => strip_tags($description))\r
+ );\r
+ }\r
+ // grabber ?\r
+ $grabber = $BAW_MES[113];\r
+ if (isset($BAW_LIB['browser']['grabbers'][$browser])) {\r
+ $grabber = $BAW_MES[112];\r
+ }\r
+ // create table line for this browser since we dont need versions\r
+ $newval_table[$browser] = array($icon, $description, $grabber, 0);\r
+ if ($browser == 'Unknown') {\r
+ $newval_table[$browser][1] = baw_create_link($BAW_MES[0], $url);\r
+ $newval_table[$browser][2] = '?';\r
+ }\r
+ // summ all occurences of this browser\r
+ foreach ($val as $browser_ver => $hits) {\r
+ // only add if hits and if the browser matches\r
+ if (($hits > 0) and stristr($browser_ver, $browser) !== false) {\r
+ @$newval_table[$browser][3] += $hits[0];\r
+ }\r
+ }\r
+ // kill zero-value browsers\r
+ if ($newval_table[$browser][3] == 0) {\r
+ unset($newval_table[$browser]);\r
+ }\r
+ }\r
+ $newval_table = baw_array_sorting($newval_table, $set['sort'], $set['sort_dir']);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+\r
+ $out = '';\r
+ if ($set['chart']) {\r
+ foreach ($newval_table as $browser => $data) {\r
+ $newval_chart[$browser] = array($data[0], $data[3]);\r
+ }\r
+ $out .= baw_render_htmlchart($newval_chart, $format_chart, $set['avg'], $set['top_x']);\r
+ }\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval_table, $format_table, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_browserversions($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format_table = array(\r
+ 0 => array ('title'=> $BAW_MES['browser_versions'], 'format' => 'layout_text', 'colspan' => 3),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('format' => 'layout_text'),\r
+ 3 => array ('title'=> $BAW_MES[111], 'format' => 'layout_text'),\r
+ 4 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $format_chart = array(\r
+ 0 => array ('title'=> $BAW_MES['browser_versions'], 'format' => 'layout_text'),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $search = array(\r
+ '\\s',\r
+ '\\-'\r
+ );\r
+ $replace = array(\r
+ "_",\r
+ "-"\r
+ );\r
+ $newval_table = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'BROWSER', $BAW_CURR['yearmonth'])) {\r
+ if ($BAW_CONF['module'] == 'drupal') {\r
+ $url = "/{$BAW_CONF['drupal_base']}/details/unknownbrowser/{$BAW_CURR['month']}/{$BAW_CURR['year']}";\r
+ } else {\r
+ $url = "{$BAW_CONF['site_url']}/index.php?site={$BAW_CURR['site_name']}&month={$BAW_CURR['month']}&year={$BAW_CURR['year']}&action=get_fulltable&what=unknownbrowser";\r
+ }\r
+ $lib = $BAW_LIB['browser']['names'];\r
+ // iterate all browsers in the library\r
+ foreach ($val as $browser_ver => $hits) {\r
+ // separate text from numbers/points\r
+ preg_match('/([a-zA-Z\W]+)((.?([0-9]))*)/', $browser_ver, $matches);\r
+ $browser = $matches[1];\r
+ $version = $matches[2];\r
+\r
+ $icon = '';\r
+ $grabber = $BAW_MES[113];\r
+ if (isset($BAW_LIB['browser']['names'][$browser])) {\r
+ $description = $lib[$browser];\r
+ if (isset($BAW_LIB['browser']['icons'][$browser])) {\r
+ $icon = $BAW_LIB['browser']['icons'][$browser];\r
+ $icon = str_replace($search, $replace, $icon);\r
+ $icon = baw_create_image(\r
+ $BAW_CONF['icons_url'] . "/browser/$icon.png",\r
+ array('title' => strip_tags($description) . " " . $version)\r
+ );\r
+ } else {\r
+ $icon = baw_create_image(\r
+ $BAW_CONF['site_url'] . "/icons/empty.png",\r
+ array('title' => strip_tags($description) . " " . $version)\r
+ );\r
+ }\r
+ } else {\r
+ $description = $browser_ver;\r
+ $grabber = '?';\r
+ }\r
+ // grabber ?\r
+ if (isset($BAW_LIB['browser']['grabbers'][$browser])) {\r
+ $grabber = $BAW_MES[112];\r
+ }\r
+ @$newval_table[$browser_ver] = array($icon, $description , $version, $grabber, $hits[0]);\r
+ if ($browser == 'Unknown') {\r
+ $newval_table[$browser][1] = baw_create_link($BAW_MES[0], $url);\r
+ $newval_table[$browser][2] = '?';\r
+ }\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $newval_table = baw_array_sorting($newval_table, $set['sort'], $set['sort_dir']);\r
+ $out = '';\r
+ if ($set['chart']) {\r
+ $newval_chart = array();\r
+ foreach ($newval_table as $browser => $data) {\r
+ $newval_chart[$browser] = array($data[0], $data[2], $data[4]);\r
+ }\r
+ $out .= baw_render_htmlchart($newval_chart, $format_chart, $set['avg'], $set['top_x']);\r
+ }\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval_table, $format_table, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_unknownbrowser($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[50], 'format' => 'layout_text'),\r
+ 1 => array ('percent' => false, 'title'=> $BAW_MES[9], 'format' => 'layout_date')\r
+ );\r
+ $val = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'UNKNOWNREFERERBROWSER', $BAW_CURR['yearmonth'])) {\r
+ $newval = array();\r
+ foreach ($val as $browser_ver => $data) {\r
+ $browser_ver = strip_tags($browser_ver);\r
+ $newval[] = array($browser_ver, $data[0]);\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_screensizes($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[135], 'format' => 'layout_text', 'colspan' => 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $format_chart = array(\r
+ 0 => array ('title'=> $BAW_MES[135], 'format' => 'layout_text'),\r
+ 1 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $val = array();\r
+ $newval = array();\r
+ $url = $BAW_CONF['site_url'] . "/icons/screen.png";\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'SCREENSIZE', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $size => $data) {\r
+ $size_arr = explode("x", $size);\r
+ $sizex = $size_arr[0] / 80;\r
+ $sizey = $size_arr[1] / 80;\r
+ $img_arr = array(\r
+ 'height'=> $sizey,\r
+ 'width' => $sizex,\r
+ 'title' => $size,\r
+ 'class' => 'screensize'\r
+ );\r
+ $newval[$size] = array(\r
+ baw_create_image($url, $img_arr),\r
+ $size,\r
+ $data[0],\r
+ );\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ $out = '';\r
+ if ($set['chart']) {\r
+ $newval_chart = array();\r
+ foreach ($newval as $size => $data) {\r
+ $newval_chart[$size] = array($data[0], $data[2]);\r
+ }\r
+ $out .= baw_render_htmlchart($newval_chart, $format_chart, $set['avg'], $set['top_x']);\r
+ }\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_se_referers($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ if ($set['favicon']) {\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[126], 'format' => 'layout_text', 'colspan' => 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 3 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $set['sort']++;\r
+ } else {\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[126], 'format' => 'layout_text'),\r
+ 1 => array ('percent' => true, 'title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ }\r
+ $val = array();\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'SEREFERRALS', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $id => $data) {\r
+ $sename = @$BAW_LIB['searchengines']['names'][$id];\r
+ if ($set['favicon']) {\r
+ $image = baw_get_favicon($sename);\r
+ $newval[$id] = array(\r
+ $image,\r
+ $sename,\r
+ $data[0],\r
+ $data[1]\r
+ );\r
+ } else {\r
+ $newval[$id] = array(\r
+ $sename,\r
+ $data[0],\r
+ $data[1]\r
+ );\r
+ }\r
+\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_referers($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ if ($set['favicon']) {\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[127], 'format' => 'layout_text', 'colspan' => 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 3 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $set['sort']++;\r
+ } else {\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[127], 'format' => 'layout_text'),\r
+ 1 => array ('title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ }\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'PAGEREFS', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $id => $data) {\r
+ if ($data[0] > 0) {\r
+ $link = baw_create_link($id, $id, array(), true, true);\r
+ if ($set['favicon']) {\r
+ $image = baw_get_favicon($id);\r
+ $newval[$id] = array($image,$link,$data[0],$data[1]);\r
+\r
+ } else {\r
+ $newval[$id] = array($link,$data[0],$data[1]);\r
+ }\r
+ }\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_referer_domains($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB, $BAW_CONF_DIS;\r
+ if ($set['favicon']) {\r
+ $format = array(\r
+ 0 => array ('title'=> sprintf($BAW_MES['by_domains'], $BAW_MES[127]) , 'format' => 'layout_text', 'colspan' => 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 3 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $set['sort']++;\r
+ } else {\r
+ $format = array(\r
+ 0 => array ('title'=> sprintf($BAW_MES['by_domains'], $BAW_MES[127]) , 'format' => 'layout_text'),\r
+ 1 => array ('title'=> $BAW_MES[56], 'format' => 'layout_pages'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ }\r
+ $newval = array();\r
+ $length = $BAW_CONF_DIS['referer_domains']['domain_lvls'];\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'PAGEREFS', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $id => $data) {\r
+ if ($data[0] > 0) {\r
+ $tld = @parse_url($id);\r
+ // we create & flip the array\r
+ if ($length !== -1) {\r
+ $domain_array = explode(".", $tld['host']);\r
+ // we add the x number of elements to the new array\r
+ if (!is_numeric(implode("",$domain_array))) {\r
+\r
+ $domain_array = array_slice($domain_array, -$length);\r
+ }\r
+ $domain = implode(".", $domain_array);\r
+ } else {\r
+ $domain = $tld['host'];\r
+ }\r
+ $tld = $tld['scheme'] ."://". $domain;\r
+ // $tld = str_replace("http://www.", "http://", $tld);\r
+ if ($set['favicon']) {\r
+ if (!isset($newval[$tld])) {\r
+ $image = baw_get_favicon($tld);\r
+ $link = baw_create_link($tld, $tld);\r
+ $newval[$tld] = array($image, $link, $data[0],$data[1]);\r
+ } else {\r
+ $newval[$tld][2] += $data[0];\r
+ $newval[$tld][3] += $data[1];\r
+ }\r
+ } else {\r
+ if (!isset($newval[$tld])) {\r
+ $link = baw_create_link($tld, $tld);\r
+ $newval[$tld] = array($link, $data[0],$data[1]);\r
+ } else {\r
+ $newval[$tld][1] += $data[0];\r
+ $newval[$tld][2] += $data[1];\r
+ }\r
+ }\r
+ }\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+\r
+function baw_display_hotlinks($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ if ($set['favicon']) {\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES['referer_hotlinks'], 'format' => 'layout_text', 'colspan' => 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $set['sort']++;\r
+ } else {\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES['referer_hotlinks'], 'format' => 'layout_text'),\r
+ 1 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ }\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'PAGEREFS', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $id => $data) {\r
+ if ($data[0] == 0) {\r
+ $link = baw_create_link($id, $id, array(), true);\r
+ if ($set['favicon']) {\r
+ $image = baw_get_favicon($id);\r
+ $newval[$id] = array($image, $link, $data[1]);\r
+ } else {\r
+ $newval[$id] = array($link, $data[1]);\r
+ }\r
+ }\r
+ }\r
+ if ($BAW_CONF['hideempty'] && count($newval) == 0 ) {\r
+ return '';\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_hotlink_domains($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB, $BAW_CONF_DIS;\r
+ if ($set['favicon']) {\r
+ $format = array(\r
+ 0 => array ('title'=> sprintf($BAW_MES['hl_by_domains '], $BAW_MES[127]), 'format' => 'layout_text', 'colspan' => 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $set['sort']++;\r
+ } else {\r
+ $format = array(\r
+ 0 => array ('title'=> sprintf($BAW_MES['hl_by_domains '], $BAW_MES[127]), 'format' => 'layout_text'),\r
+ 1 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ }\r
+ $length = $BAW_CONF_DIS['hotlink_domains']['domain_lvls'];\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'PAGEREFS', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $id => $data) {\r
+ if ($data[0] == 0) {\r
+ $tld = @parse_url($id);\r
+ if ($length !== -1) {\r
+ $domain_array = explode(".", $tld['host']);\r
+ // we add the x number of elements to the new array\r
+ if (!is_numeric(implode("",$domain_array))) {\r
+\r
+ $domain_array = array_slice($domain_array, -$length);\r
+ }\r
+ $domain = implode(".", $domain_array);\r
+ } else {\r
+ $domain = $tld['host'];\r
+ }\r
+ $tld = $tld['scheme'] ."://". $domain;\r
+ if ($set['favicon']) {\r
+ if (!isset($newval[$tld])) {\r
+ $link = baw_create_link($tld, $tld);\r
+ $image = baw_get_favicon($tld);\r
+ $newval[$tld] = array($image, $link, $data[1]);\r
+ } else {\r
+ // $newval[$tld][1] += $data[1];\r
+ $newval[$tld][2] += $data[1];\r
+ }\r
+ } else {\r
+ if (!isset($newval[$tld])) {\r
+ $link = baw_create_link($tld, $tld);\r
+ $newval[$tld] = array($link, $data[1]);\r
+ } else {\r
+ // $newval[$tld][1] += $data[1];\r
+ $newval[$tld][1] += $data[1];\r
+ }\r
+ }\r
+ }\r
+ }\r
+ // check again since none of the domains might be hotlinking\r
+ if ($BAW_CONF['hideempty'] && count($newval) == 0 ) {\r
+ return '';\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+\r
+function baw_display_searchphrases($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[103], 'format' => 'layout_text'),\r
+ 1 => array ('percent'=> true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $val = array();\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'SEARCHWORDS', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $id => $data) {\r
+ $newval[$id] = array(\r
+ urldecode($id),\r
+ $data[0]\r
+ );\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_searchwords($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[13], 'format' => 'layout_text'),\r
+ 1 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $val = array();\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'KEYWORDS', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $id => $data) {\r
+ $newval[$id] = array(\r
+ urldecode($id),\r
+ $data[0],\r
+ );\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, $set['avg'], $set['total'], $set['top_x'], false);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_misc($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[139], 'format' => 'layout_text'),\r
+ 1 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 2 => array ('title'=> $BAW_MES[15], 'format' => 'layout_percent')\r
+ );\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'MISC', $BAW_CURR['yearmonth'])) {\r
+ foreach ($BAW_LIB['misc'] as $type => $msg) {\r
+ @$percent = $val[$type][1] / ($val['TotalMisc'][1] / 100);\r
+ $newval[$type] = array($BAW_MES[$msg], @$val[$type][1], $percent);\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_errors($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[32], 'format' => 'layout_text', 'colspan'=> 2),\r
+ 1 => array ('format' => 'layout_text'),\r
+ 2 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 3 => array ('title'=> $BAW_MES[106], 'format' => 'layout_bytes')\r
+ );\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'ERRORS', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $type => $data) {\r
+ $ntype = $type;\r
+ if ($type == '404') {\r
+ if ($BAW_CONF['module'] == 'drupal') {\r
+ $ntype = baw_create_link('404', "/{$BAW_CONF['drupal_base']}/details/errors404/{$BAW_CURR['month']}/{$BAW_CURR['year']}");\r
+ } else {\r
+ $ntype = baw_create_link('404', "{$BAW_CONF['site_url']}/index.php?site={$BAW_CURR['site_name']}&month={$BAW_CURR['month']}&year={$BAW_CURR['year']}&action=get_fulltable&what=errors404");\r
+ }\r
+ }\r
+ $newval[$type] = array(\r
+ $ntype, $BAW_LIB['http_status'][$type], $data[0], $data[1]\r
+ );\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format);\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_errors404($set) {\r
+ global $BAW_MES, $BAW_CURR, $BAW_CONF, $BAW_LIB;\r
+ $format = array(\r
+ 0 => array ('title'=> $BAW_MES[49], 'format' => 'layout_text'),\r
+ 1 => array ('title'=> $BAW_MES[57], 'format' => 'layout_hits'),\r
+ 2 => array ('title'=> $BAW_MES[127], 'format' => 'layout_text')\r
+ );\r
+ $newval = array();\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'SIDER_404', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $type => $data) {\r
+ $newval[$type] = array(\r
+ baw_create_link($type, "http://{$BAW_CURR['site_name']}", array(), true),\r
+ $data[0],\r
+ baw_create_link($data[1],$data[1], array(), true)\r
+ );\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, false, $set['total'], $set['top_x']);\r
+ }\r
+ return $out;\r
+}\r
+/*\r
+\r
+ From0 6240 13402\r
+From1 3 11 // unknown\r
+From2 5471 8003 // search engine\r
+From3 1956 3723 // external page\r
+From4 10544 208546 // bookmarks/direct\r
+From5 0 0 // newsgroups\r
+\r
+*/\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+/**\r
+ * File contents:\r
+ *\r
+ * This file contains various functions which generate output to the browser.\r
+ * Mainly it contains the index-function that builds the whole site. Other functions\r
+ * create menus, links, images etc.\r
+ */\r
+\r
+// this file can't be used on its own\r
+if (strpos ($_SERVER['PHP_SELF'], 'display_helpers.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+/*\r
+* Display Helper Function: run the menus and render the whole page\r
+* called by index.php and baw_action_get_fulltable() as well as config manager\r
+*\r
+* @param arr $settings the 'set'-array from the config for a display section\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_display_index($settings = array()) {\r
+ global $BAW_CONF, $BAW_CONF_DIS, $BAW_CONF_DIS_DEF, $BAW_MES, $BAW_LIB;\r
+ global $BAW_DFILES, $BAW_CURR, $BAW_D;\r
+\r
+ // this comes second since site_name is unknown otherwise\r
+ echo baw_site_header($BAW_CURR['site_name']);\r
+ $content = baw_top_menu_bar()\r
+ . "<div class=\"contentbox\">\n";\r
+ $tmp = array(); // temp array where we record which section has data to show/hide menu options\r
+\r
+ // sort the charts according to order in config\r
+ $BAW_CONF_DIS = baw_array_sorting($BAW_CONF_DIS, 'order', SORT_ASC);\r
+ // ---------- CONTENT BOX --------------------------------------------------\r
+ // this should be removed once we move to beta.\r
+\r
+ if ($BAW_CURR['site_name'] == 'all_months') {\r
+ $settings['section'] = "months";\r
+ $section = $settings['section'];\r
+ $function = "baw_display_$section";\r
+ $temp_conf = $BAW_CONF_DIS[$section];\r
+ $temp_conf['chart'] = true;\r
+ $temp_conf['table'] = false;\r
+ $temp_conf['name'] = $BAW_CONF_DIS_DEF[$section]['name'];\r
+ baw_debug("Printing Stats for: " . $BAW_CONF_DIS_DEF[$section]['name']);\r
+ $content .= $function($temp_conf);\r
+ } else if ($BAW_CURR['site_name'] == 'all_days') {\r
+ $settings['section'] = "days";\r
+ $section = $settings['section'];\r
+ $function = "baw_display_$section";\r
+ $temp_conf = $BAW_CONF_DIS[$section];\r
+ $temp_conf['chart'] = true;\r
+ $temp_conf['table'] = false;\r
+ $temp_conf['name'] = $BAW_CONF_DIS_DEF[$section]['name'];\r
+ baw_debug("Printing Stats for: " . $BAW_CONF_DIS_DEF[$section]['name']);\r
+ $content .= $function($temp_conf);\r
+ } else if (isset($settings['section'])) {\r
+ $section = $settings['section'];\r
+ $function = "baw_display_$section";\r
+ $temp_conf = $BAW_CONF_DIS[$section];\r
+ $temp_conf['top_x'] = $BAW_CONF['maxlines'];\r
+ $temp_conf['name'] = $BAW_CONF_DIS_DEF[$section]['name'];\r
+ baw_debug("Printing Stats for: " . $BAW_CONF_DIS_DEF[$section]['name']);\r
+ $content .= baw_section_header($section, $temp_conf['name'], false, 'menu_section')\r
+ . $function($temp_conf)\r
+ . baw_section_footer();\r
+ } else {\r
+ $content .= "\n<!-- CONTENT START ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ if ($BAW_CONF['layout_type'] == 'horizontal') {\r
+ foreach ($BAW_LIB['item_groups'] as $group => $group_details) {\r
+ $group_items = $group_details['members'];\r
+ $menubuttons = "<div class=\"clearfix\">";\r
+ $stats_section = '';\r
+ $item_id = 0;\r
+ $count_members = count($group_details['members']);\r
+ foreach ($group_details['members'] as $item) {\r
+ $sect_data = $BAW_CONF_DIS[$item];\r
+ $sect_data['name'] = $item;\r
+ $function = "baw_display_$item";\r
+ if (function_exists($function)) {\r
+ baw_debug("Printing Stats for: $function");\r
+ $stats_html = $function($sect_data);\r
+ if ($sect_data['show'] == true &&\r
+ (strlen($stats_html)> 1 || !$BAW_CONF['hideempty'])) {\r
+ $stats_section .= "\n<!-- ITEM {$BAW_CONF_DIS_DEF[$item]['name']} START ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ $button_title = $BAW_CONF_DIS_DEF[$item]['name'];\r
+ if ($item_id == 0) {\r
+ $button_class = "menu_button_active";\r
+ } else {\r
+ $button_class = "menu_button_inactive";\r
+ }\r
+ $menubuttons .= "<div class=\"$button_class\" id=\"button_{$group}_$item_id\" onClick=\"toggleBox($item_id, '$group', $count_members, 'menu');\">$button_title</div>\n";\r
+ if ($item == 'weekdays' && !isset($BAW_CURR['wdays']['count'])) {\r
+ $setarr = array('collapse' => false, 'chart' => false,'table' => false);\r
+ baw_display_weekdays($setarr);\r
+ }\r
+ $title = $BAW_CONF_DIS_DEF[$item]['name'];\r
+ $collapse = $sect_data['collapse'];\r
+ $name = "{$group}_$item_id";\r
+ $collapse = false;\r
+ if ($item_id == 0) {\r
+ $class = 'menu_section_active';\r
+ } else {\r
+ $class = 'menu_section_inactive';\r
+ }\r
+ $stats_section .= baw_section_header($name, $title, $collapse, $class)\r
+ . $stats_html\r
+ . baw_section_footer();\r
+ $tmp[$item] = true;\r
+ $stats_section .= "\n<!-- ITEM $item END ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ $item_id++;\r
+ } else {\r
+ $tmp[$item] = false;\r
+ }\r
+ }\r
+ }\r
+ if (strlen($stats_section) > 1) {\r
+ $content .= "\n<!-- GROUP $group START ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ $content .= baw_section_header($group, $group_details['title'], false, 'group_title');\r
+ $menubuttons .= "</div>";\r
+ $content .= $menubuttons . "\n$stats_section\n";\r
+ $content .= baw_section_footer();\r
+ $content .= "\n<!-- GROUP $group END ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ $tmp[$group] = true;\r
+ } else {\r
+ $tmp[$group] = false;\r
+ }\r
+ }\r
+ } else {\r
+ foreach ($BAW_CONF_DIS as $section => $sect_data) {\r
+ $stats_html = '';\r
+ $content .= "\n<!-- ITEM $section START ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ $title = $BAW_CONF_DIS_DEF[$section]['name'];\r
+ $collapse = $sect_data['collapse'];\r
+ $name = $section;\r
+ $sect_data['name'] = $section;\r
+ $function = "baw_display_$section";\r
+ if ($sect_data['show'] == true && function_exists($function)) {\r
+ baw_debug("Printing Stats for: baw_display_$section");\r
+ $stats_html = $function($sect_data);\r
+ if (strlen($stats_html)> 1) {\r
+ $content .= baw_section_header($name, $title, $collapse, 'menu_section')\r
+ . $stats_html\r
+ . baw_section_footer();\r
+ $tmp[$section] = true;\r
+ } else {\r
+ $tmp[$section] = false;\r
+ }\r
+ }\r
+ $content .= "\n<!-- ITEM $section END ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ }\r
+ }\r
+ $content .= "\n<!-- CONTENT END ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ }\r
+\r
+ $content .= "</div>";\r
+ baw_debug("Starting to build menu");\r
+ // ---- MENU BOX -----------------------------------------------------------\r
+ $menubox = "\n\n<!-- MENU START ++++++++++++++++++++++++++++++++++++++ -->\n"\r
+ . "<div class=\"menubox\">\n"\r
+ . baw_sites_dropdown();\r
+ $qstrng = '';\r
+ if (strlen($_SERVER['QUERY_STRING']) > 0) {\r
+ $qstrng = '?' .$_SERVER['QUERY_STRING'];\r
+ }\r
+ $url = "{$BAW_CONF['site_url']}/index.php$qstrng";\r
+ $menubox .= " <ul class=\"menu\" >\n"\r
+ . " <li class=\"menu_even\">\n"\r
+ . " "\r
+ . baw_create_link($BAW_MES[77], "$url#", array('class' => 'leftlink')) . "\n "\r
+ . " </li>\n";\r
+ $c = 1; // top link was '0'\r
+ if ($BAW_CURR['site_name'] == 'all_months' or $BAW_CURR['site_name'] == 'all_days') {\r
+ $sites = array_keys($BAW_DFILES);\r
+ foreach ($sites as $site) {\r
+ $class = baw_even($c, 'menu_even', 'menu_odd');\r
+ $menubox .= " <li class=\"$class\">\n"\r
+ . " " . baw_create_link($site, "$url#site_$site") . "\n"\r
+ . " </li>\n";\r
+ $c++;\r
+ }\r
+ } else {\r
+ if ($BAW_CONF['layout_type'] == 'horizontal') {\r
+ foreach ($BAW_LIB['item_groups'] as $group => $group_details) {\r
+ if ($tmp[$group]) {\r
+ $class = baw_even($c, 'menu_even', 'menu_odd');\r
+ $name = $group_details['title'];\r
+ $menubox .= " <li class=\"$class\">\n"\r
+ . " " . baw_create_link($name, "$url#h2_$group") . "\n"\r
+ . " </li>\n";\r
+ $c++;\r
+ }\r
+ }\r
+ } else if (isset($settings['section'])) {\r
+ // we are doing a full list\r
+ $url = str_replace('&action=get_fulltable&what='. $settings['section'], '', $url);\r
+ $menubox .= " <li class=\"menu_odd\">\n"\r
+ . baw_create_link($BAW_MES['back'], $url) . "\n"\r
+ . " </li>\n";\r
+ } else {\r
+ $count_sections = count($BAW_CONF_DIS);\r
+ foreach ($BAW_CONF_DIS as $section => $sect_data) {\r
+ if ($sect_data['show'] &&\r
+ ($tmp[$section] || !$BAW_CONF['hideempty'])) {\r
+ $class = baw_even($c, 'menu_even', 'menu_odd');\r
+ $name = $BAW_CONF_DIS_DEF[$section]['name'];\r
+ $menubox .= " <li class=\"$class\">\n"\r
+ . " " . baw_create_link($name, "$url#h2_$section", array('class' => 'leftlink')) . "\n"\r
+ . baw_display_list_icons ($section, array('info'), false) . "\n"\r
+ . " </li>\n";\r
+ $c++;\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ $menubox .= " </ul>\n";\r
+ $menubox_end = "\n</div>\n<!-- MENU END - SITE/DATE MENU START ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ baw_debug("Menu finished");\r
+ $finaltime = baw_ptime();\r
+ $out = $menubox\r
+ . baw_display_version("<br" . XHTML . "> in $finaltime, max menory: " . baw_byte_format(memory_get_peak_usage(true)))\r
+ . $menubox_end . $content\r
+ . baw_site_footer();\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: display the menu bar on the top of the page\r
+* called by baw_display_index\r
+*\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_top_menu_bar() {\r
+ global $BAW_MES, $BAW_CONF_DEF, $BAW_CONF, $BAW_CURR;\r
+ // sites / dates dropdown\r
+ $n1 = $n2 = '';\r
+ if ($BAW_CONF['auto_submit_form' ]) {\r
+ $n1 = "<noscript><div>\n";\r
+ $n2 = "</div></noscript>\n";\r
+ }\r
+ $out = "\n<ul class=\"top_menu_bar\">\n"\r
+ . " <li>\n"\r
+ . " <form action=\"{$_SERVER['SCRIPT_NAME']}\" method=\"get\">\n"\r
+ . " <div>\n"\r
+ . " <input type=\"hidden\" name=\"site\" value=\"{$BAW_CURR['site_name']}\"" . XHTML . ">\n"\r
+ . baw_date_dropdown();\r
+ if (isset($_GET['action'])) {\r
+ $out .= " <input type=\"hidden\" name=\"action\" value=\"{$_GET['action']}\"" . XHTML . ">\n";\r
+ }\r
+ if (isset($_GET['what'])) {\r
+ $out .= " <input type=\"hidden\" name=\"what\" value=\"{$_GET['what']}\"" . XHTML . ">\n";\r
+ }\r
+ $out .= " $n1<input type=\"submit\" value=\"{$BAW_MES[115]}\"" . XHTML . ">$n2\n"\r
+ . " </div>\n"\r
+ . " </form>\n";\r
+\r
+ $out .= " </li>\n";\r
+\r
+ $out .= " <li class=\"link\">\n"\r
+ . baw_create_link(\r
+ $BAW_MES['get_help'],\r
+ 'http://betterawstats.com/forum/',\r
+ array('class'=>'rightlink')\r
+ ). "\n";\r
+ $out .= " </li>\n";\r
+\r
+ $out .= " <li class=\"link\">\n"\r
+ . baw_create_link(\r
+ $BAW_MES['version_check'],\r
+ "http://betterawstats.com/main/index.php?lang=eng&action=versioncheck&version="\r
+ . $BAW_CONF_DEF[$BAW_MES['cfg_advanced_settings']]['version']['default']\r
+ ) . "\n";\r
+ $out .= "</li>\n";\r
+\r
+ $out .= " <li class=\"link\">";\r
+ if ($BAW_CONF['online_config'] && (baw_is_writable($BAW_CONF['site_path'] . '/config.php'))) {\r
+ $out .= baw_create_link(\r
+ $BAW_MES['config_editor'],\r
+ "{$BAW_CONF['site_url']}/index.php?action=config_editor"\r
+ ) . "\n";\r
+ } else if ($BAW_CONF['online_config']) {\r
+ $out .= $BAW_MES['config_not_writable']. "\n";\r
+ }\r
+ $out .= " </li>\n";\r
+\r
+ @session_start();\r
+ if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {\r
+ $out .= " <li class=\"link\">";\r
+ if ($BAW_CONF['online_config'] && (baw_is_writable($BAW_CONF['site_path'] . '/config.php'))) {\r
+ $out .= baw_create_link(\r
+ $BAW_MES['cfg_logout'],\r
+ "{$BAW_CONF['site_url']}/index.php?action=do_logout"\r
+ ) . "\n";\r
+ }\r
+ $out .= " </li>\n";\r
+ }\r
+\r
+ $out .= "</ul>\n\n";\r
+\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: display a text including the version and other info\r
+* called by baw_display_index\r
+*\r
+* @param str $text text to be included in the message\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_display_version($text = '') {\r
+ global $BAW_CONF_DEF, $BAW_MES;\r
+\r
+ $link = baw_create_link('BetterAWstats', 'http://betterawstats.com');\r
+ $out = " <div class=\"version\">\n "\r
+ . sprintf($BAW_MES['created_by'], $link)\r
+ . " {$BAW_CONF_DEF[$BAW_MES['cfg_advanced_settings']]['version']['default']}\n"\r
+ . " $text\n"\r
+ . " </div>";\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: display links for left-hand menu block\r
+* called by baw_display_index\r
+*\r
+* @param str $section which section is it? (for link)\r
+* @param str $text text to use as alt of icon or instead of icon\r
+* @param bol $useicon shall we display the icon?\r
+* @param bol $getonlyone shall we get only one or all three?\r
+* @param bol $btn if true, we use alternative image with button layout\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_display_list_icons ($section, $exclude, $btn) {\r
+ global $BAW_CONF_DIS, $BAW_CONF_DIS_DEF, $BAW_CONF, $BAW_MES, $BAW_CURR, $BAW_MES;\r
+\r
+ if ($btn) {\r
+ $btn_str = '_btn';\r
+ } else {\r
+ $btn_str = '';\r
+ }\r
+ $links_arr = array(\r
+ 'info' => array(\r
+ 'check' => @$BAW_MES["hlp_$section"],\r
+ 'image' => $BAW_CONF['site_url'] . "/icons/help.png",\r
+ 'msg' => htmlentities(@$BAW_MES["hlp_$section"]),\r
+ 'what' => 'span',\r
+ ),\r
+ 'full_list' => array(\r
+ 'check' => @$BAW_CONF_DIS[$section]['top_x'],\r
+ 'image' => $BAW_CONF['site_url'] ."/icons/fulllist{$btn_str}.png",\r
+ 'msg' => $BAW_MES[80],\r
+ 'what' => $section,\r
+ ),\r
+ 'versions' => array(\r
+ 'check' => @$BAW_CONF_DIS_DEF[$section]['hasversions'],\r
+ 'image' => $BAW_CONF['site_url'] ."/icons/versions{$btn_str}.png",\r
+ 'msg' => $BAW_MES['version_info'],\r
+ 'what' => @$BAW_CONF_DIS_DEF[$section]['hasversions'],\r
+ ),\r
+ 'unknown' => array(\r
+ 'check' => @$BAW_CONF_DIS_DEF[$section]['hasunknown'],\r
+ 'image' => $BAW_CONF['site_url'] ."/icons/unknown{$btn_str}.png",\r
+ 'msg' => $BAW_MES['unknown_list'],\r
+ 'what' => @$BAW_CONF_DIS_DEF[$section]['hasunknown'],\r
+ ),\r
+ );\r
+\r
+ $out = '';\r
+ $i = 1;\r
+ foreach ($links_arr as $link => $settings) {\r
+ if ((!in_array($link, $exclude)) && isset($settings['check'])) {\r
+ $icon = baw_create_image($settings['image'], array('title'=> $settings['msg'],'alt'=> $settings['msg'])) . " ";\r
+ $class = "icon_indent_$i"; // we indent more for each icon\r
+ if ($link == 'info') { // we have a hover-text\r
+ $out .= " <span class=\"section_help $class\">$icon<span>{$settings['msg']}</span></span>\n";\r
+ $i++;\r
+ } else { // we have a link\r
+ $out .= " "\r
+ . baw_display_list_link($icon, $settings['msg'], $settings['what'], $class)\r
+ . "\n";\r
+ $i++;\r
+ }\r
+ }\r
+ }\r
+ return $out;\r
+}\r
+\r
+function baw_display_list_link($text, $title, $section, $class) {\r
+ global $BAW_CONF, $BAW_CURR;\r
+ $out = '';\r
+ if ($BAW_CONF['module'] == 'drupal') {\r
+ $url = "/{$BAW_CONF['drupal_base']}/details/$section/{$BAW_CURR['month']}/{$BAW_CURR['year']}";\r
+ } else {\r
+ $url = "{$BAW_CONF['site_url']}/index.php?site={$BAW_CURR['site_name']}&month={$BAW_CURR['month']}&year={$BAW_CURR['year']}"\r
+ . "&action=get_fulltable&what=$section";\r
+ }\r
+ $out .= baw_create_link($text, $url, array('title'=>$title, 'class'=>$class), false, false);\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: display only and the full table of one section\r
+* called by index.php\r
+*\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_action_get_fulltable() {\r
+ global $BAW_CONF;\r
+ $settings = array();\r
+ $out = '';\r
+ if (isset($_GET['what'])) {\r
+ $what = $_GET['what'];\r
+ $settings['section'] = $what;\r
+ } else {\r
+ $out = baw_display_index();\r
+ }\r
+ if (isset($_GET['sort'])) {\r
+ $sort = $_GET['sort'];\r
+ $settings['sort'] = $sort;\r
+ };\r
+ $out .= baw_display_index($settings);\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create a HTML link from parameters\r
+*\r
+* @param str $content the text to be linked\r
+* @param str $url the url to link to\r
+* @param arr $attr var attributes to include in the links\r
+* @param bol $codehtml do we use htmlspecialchars() on the content?\r
+* @param bol $shorten do we shorten the content according to config?\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_create_link ($content, $url, $attr=array(), $codehtml = false, $shorten = true) {\r
+ global $BAW_CONF;\r
+ if ($url == '-') {\r
+ return $url;\r
+ }\r
+ $attr_str = '';\r
+ if (strlen($content) > $BAW_CONF['field_length'] && $shorten) {\r
+ $content = substr($content, 0, $BAW_CONF['field_length']-3) . "...";\r
+ }\r
+ $url = htmlspecialchars($url);\r
+ if ($codehtml) {\r
+ $content = htmlspecialchars($content);\r
+ }\r
+ if (!isset($attr['title'])) {\r
+ $attr['title'] = $content;\r
+ }\r
+ $check = strpos($url, $BAW_CONF['site_url']);\r
+ if ($check !== 0) {\r
+ if (isset($attr['class'])) {\r
+ $attr['class'] .= " ext_link";\r
+ } else {\r
+ $attr['class'] = "ext_link";\r
+ }\r
+ }\r
+ foreach ($attr as $key => $value) {\r
+ $attr_str .= " $key=\"$value\"";\r
+ }\r
+ $out = "<a$attr_str href=\"$url\">$content</a>";\r
+\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create a HTML image from parameters\r
+*\r
+* @param str $url the url of the image to link to\r
+* @param arr $attr var attributes to include in the links\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_create_image($url, $attr=array()) {\r
+ global $BAW_CONF;\r
+\r
+ $hasalt = false;\r
+ $attr_str = '';\r
+ if (!isset($attr['alt'])) {\r
+ $attr['alt'] = ' ';\r
+ }\r
+ foreach ($attr as $key => $value) {\r
+ $attr_str .= " $key=\"$value\"";\r
+ }\r
+ if ($BAW_CONF['module'] !== 'drupal') {\r
+ if (strpos($url, 'http://') !== 0 && strpos($url, 'https://') !== 0) {\r
+ $url = $BAW_CONF['icons_url'] . $url;\r
+ }\r
+ }\r
+ $out = "<img src=\"$url\"$attr_str" . XHTML . ">";\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create the HTML for a favicon of a given URL\r
+* Parses the URL, retrieves the domain and links to the favicon\r
+*\r
+* @param str $url the url of the image to link to\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_get_favicon($url) {\r
+ if ($url !== strip_tags($url)) { // we have a HTML link\r
+ $pattern = '/<a .* href=\"(.*)\"/';\r
+ $image = '';\r
+ preg_match($pattern, $url, $match);\r
+ if (isset($match[1])) {\r
+ $url = $match[1];\r
+ } else {\r
+ return '';\r
+ }\r
+ }\r
+ $image = '';\r
+ $code = '';\r
+ $url_arr = @parse_url($url);\r
+ if (isset($url_arr['scheme']) && isset($url_arr['host'])) {\r
+ $image = baw_create_image(\r
+ $url_arr['scheme'] . "://". $url_arr['host']. '/favicon.ico',\r
+ array('height' => 16, 'width'=> 16)\r
+ );\r
+ }\r
+ return $image . $code;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create the HTML of the site header\r
+* switches between HTML/XHTML, displays title, charset etc.\r
+*\r
+* @param str $title title of the page to be used\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_site_header($title = '') {\r
+ global $BAW_CONF_DEF, $BAW_CONF, $BAW_MES;\r
+ if ($BAW_CONF['xhtml']) {\r
+ $out = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";\r
+ $root_dec = " xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"";\r
+ } else {\r
+ $out = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n";\r
+ $root_dec = '';\r
+ }\r
+ $out .= "<html$root_dec>\n"\r
+ ." <head>\n"\r
+ ." <title>$title Better AWstats v. {$BAW_CONF_DEF[$BAW_MES['cfg_advanced_settings']]['version']['default']}</title>\n"\r
+ ." <meta http-equiv=\"Content-Type\" content=\"text/html;charset={$BAW_MES['e']}\"" . XHTML . ">\n"\r
+ ." <link rel=\"stylesheet\" type=\"text/css\" href=\"{$BAW_CONF['site_url']}/style.css\"" . XHTML . ">\n"\r
+ ." <link rel=\"stylesheet\" type=\"text/css\" href=\"{$BAW_CONF['site_url']}/{$BAW_CONF['layout_type']}.css\"" . XHTML . ">\n"\r
+ ." </head>\n"\r
+ ." <body>\n"\r
+ ." <script type=\"text/javascript\" src=\"{$BAW_CONF['site_url']}/scripts.js\"></script>\n";\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create the HTML of the site footer\r
+*\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_site_footer() {\r
+ $out ="</body></html>";\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create the HTML of the section header\r
+*\r
+* @param str $name name of the section for the HTML ID\r
+* @param str $title title to be displayed\r
+* @param bol $collapse is it collapsed or not?\r
+* @param str $class which CSS class do we use?\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_section_header($name, $title, $collapse, $class = 'menu_section') {\r
+ global $BAW_CONF;\r
+ $buttons = baw_show_expand_collapse($name, $collapse). "\n"\r
+ . baw_display_list_icons($name, array(), true);\r
+ if ($collapse) {\r
+ $show = " style=\"display:none\"";\r
+ } else {\r
+ $show = "";\r
+ }\r
+ $out = "<h2 class=\"$class\" id=\"h2_$name\">\n $title\n $buttons\n</h2>\n"\r
+ . "<div class=\"$class\" id=\"box_$name\"$show>\n";\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create the HTML of the expand/collapse button\r
+*\r
+* @param str $name name of the section for JS to identify it\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_show_expand_collapse($name, $collapse) {\r
+ global $BAW_CONF, $BAW_MES;\r
+\r
+ $url = $BAW_CONF['site_url'] . "/icons/expand.gif";\r
+ $arr_show = array(\r
+ 'class' => "showhidebutton",\r
+ 'onclick' => "showElement('{$name}');",\r
+ 'title' => $BAW_MES['show'],\r
+ 'id' => "button_show_{$name}",\r
+ );\r
+ $arr_hide = array(\r
+ 'class' => "showhidebutton",\r
+ 'onclick' => "hideElement('{$name}');",\r
+ 'id' => "button_hide_{$name}",\r
+ 'title' => $BAW_MES['hide'],\r
+ );\r
+ if ($collapse) {\r
+ $arr_hide += array('style' => "display:none");\r
+ } else {\r
+ $arr_show += array('style' => "display:none");\r
+ }\r
+ $url = $BAW_CONF['site_url'] . "/icons/expand.gif";\r
+ $out = baw_create_image($url, $arr_show);\r
+ $url = $BAW_CONF['site_url'] . "/icons/collapse.gif";\r
+ $out .= baw_create_image($url, $arr_hide);\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create the HTML of footer of a section\r
+*\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_section_footer() {\r
+ $out = "</div>\n";\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create a generic dropdown for HTML forms\r
+*\r
+* @param str $name name of the dropdown for the form identification\r
+* @param arr $list associative array of items to list (ID => NAME)\r
+* @param str $selected entry which should be preselected\r
+* @param str $attr any strng attribute that is added to the <select>\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_generic_dropdown($name, $list, $selected='', $attr='') {\r
+ global $BAW_CONF;\r
+ $js = '';\r
+ if ($BAW_CONF['auto_submit_form' ]) {\r
+ $js = " onchange=\"this.form.submit()\"";\r
+ }\r
+ $out = "<select $attr name=\"$name\"$js>\n";\r
+ foreach ($list as $key => $value) {\r
+ if (is_bool($selected)) {\r
+ if ($selected) {\r
+ $selected = 'true';\r
+ } else {\r
+ $selected = 'false';\r
+ }\r
+ }\r
+ if ($key == $selected) {\r
+ $sel = ' selected="selected"';\r
+ } else {\r
+ $sel = '';\r
+ }\r
+ $out .= " <option value=\"$key\"$sel>$value</option>\n";\r
+ }\r
+ $out .= "</select>\n";\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create a year/date dropdown from the current list of\r
+* available datafile dates\r
+*\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_date_dropdown() {\r
+ global $BAW_CURR;\r
+ $out = '';\r
+ $out .= baw_generic_dropdown('month', $BAW_CURR['months'], $BAW_CURR['month']);\r
+ $out .= baw_generic_dropdown('year', $BAW_CURR['years'], $BAW_CURR['year']);\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Display Helper Function: create a dropdown of all sites available from the\r
+* datafiles\r
+*\r
+* @param str $selected preselected item if available\r
+* @param str $fld_name field name of <select>\r
+*\r
+* @return str HTML\r
+*\r
+*/\r
+function baw_sites_dropdown() {\r
+ global $BAW_CURR, $BAW_MES, $BAW_DFILES, $BAW_CONF;;\r
+ $sites_temp = $BAW_DFILES;\r
+ $n1 = $n2 = $js = '';\r
+ if ($BAW_CONF['auto_submit_form' ]) {\r
+ $n1 = "<noscript><div>";\r
+ $n2 = "</div></noscript>";\r
+ $js = " onchange=\"this.form.submit()\"";\r
+ }\r
+ $out = '';\r
+ if (count($BAW_DFILES) > 1 && $BAW_CONF['limit_server'] == 'show_all') {\r
+ $out .= " <form action=\"{$_SERVER['SCRIPT_NAME']}\" method=\"get\">\n"\r
+ . " <div class=\"headline\">"; // the div is needed for validation\r
+ } else {\r
+ $out = " <div class=\"headline\">";\r
+ if ($BAW_CONF['limit_server'] == 'show_all' && count($BAW_DFILES) !== 1) {\r
+ $out .= "<span>".$BAW_CONF['limit_server']."</span>";\r
+ } else {\r
+ $singlesite = key($BAW_DFILES);\r
+ $out .= "<span>".$singlesite."</span>";\r
+ }\r
+ $out .= "</div>\n";\r
+ return $out;\r
+ }\r
+ $sites_temp += array(\r
+ 'all_months' => $BAW_MES['all_months'],\r
+ 'all_days' => $BAW_MES['all_days']\r
+ );\r
+ $out .="\n<select name=\"site\"$js>\n";\r
+ foreach ($sites_temp as $site => $filedata) {\r
+ $sel = '';\r
+ if ($BAW_CURR['site_name'] == $site) {\r
+ $sel = ' selected="selected"';\r
+ }\r
+ $site_txt = $site;\r
+ if ($site == 'all_months' || $site == 'all_days') {\r
+ $site_txt = $BAW_MES[$site];\r
+ }\r
+ $out .= " <option value=\"$site\"$sel>$site_txt</option>\n";\r
+ }\r
+ $out .= "</select>\n"\r
+ . "$n1<input type=\"submit\" value=\"{$BAW_MES[115]}\"" . XHTML . ">$n2\n"\r
+ . "<input type=\"hidden\" name=\"month\" value=\"{$BAW_CURR['month']}\"" . XHTML . ">\n"\r
+ . "<input type=\"hidden\" name=\"year\" value=\"{$BAW_CURR['year']}\"" . XHTML . ">\n";\r
+ if (isset($_GET['action'])) {\r
+ $out .= " <input type=\"hidden\" name=\"action\" value=\"{$_GET['action']}\"" . XHTML . ">\n";\r
+ }\r
+ if (isset($_GET['what'])) {\r
+ $out .= " <input type=\"hidden\" name=\"what\" value=\"{$_GET['what']}\"" . XHTML . ">\n";\r
+ }\r
+ $out .= "</div>\n"\r
+ . "</form>\n";\r
+ return $out;\r
+}\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+// DO NOT EDIT THESE 3 LINES\r
+if (strpos ($_SERVER['PHP_SELF'], 'extras.inc.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+// EDIT BELOW HERE\r
+// Please make sure to read /docs/install.txt to see all places where you have to\r
+// edit items to see your extras\r
+// In order to add new sections of extras to the site, please make copies of the\r
+// section below. change all occurences of extra_1 to extra_2 etc and all EXTRA_1\r
+// to EXTRA_2 etc. Also change the texts as indicated.\r
+\r
+// copy section starts below here\r
+function baw_display_extra_1($set) { // <- change extra_1 to extra_2, 3, 4 etc\r
+ global $BAW_MES, $BAW_CURR, $BAW_D, $BAW_CONF, $BAW_LIB, $BAW_CONF_DIS_DEF;\r
+ $format = array( // change the 'Screen colors' to other titles below here\r
+ 0 => array ('title'=> 'Screen colors', 'format' => 'layout_text'),\r
+ 1 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')\r
+ );\r
+ $newval = array(); // change the two following lines from EXTRA_1 to EXTRA_2, 3, 4 etc\r
+ if ($val = baw_data($BAW_CURR['site_name'], 'EXTRA_1', $BAW_CURR['yearmonth'])) {\r
+ foreach ($val as $type => $data) {\r
+ $newval[$type] = array($type, $data[1]) ;\r
+ }\r
+ } else if ($BAW_CONF['hideempty']){\r
+ return '';\r
+ }\r
+ $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);\r
+ $out = '';\r
+ if ($set['table']) {\r
+ $out .= baw_render_table($set['name'], $newval, $format, false, $set['total'], $set['top_x']);\r
+ }\r
+ return $out;\r
+}\r
+// copy section ends above here\r
+\r
+// insert copies here\r
+\r
+// Please make sure to read /docs/install.txt to see all places where you have to\r
+// edit items to see your extras\r
+// to add more extras-sections, please copy the following section as often as\r
+// you need and edit the extras_1 to extras_2 etc. Also change the text to\r
+// the desired descriptions.\r
+\r
+// copy section start below here\r
+$BAW_CONF_DIS_DEF['extra_1'] = array ( // please make sure this is unique\r
+ 'help' => 'Screen colors of users', // help for config\r
+ 'name' => "Color depth", // display name\r
+ 'sorting' => array( // what fields can it be sorted by?\r
+ 0 => 'Color depth in bits',\r
+ 1 => $BAW_MES[57]\r
+ )\r
+);\r
+// copy section end above here\r
+\r
+ // insert copies here\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+/**\r
+ * File contents:\r
+ *\r
+ * This file contains functions that are used to make checks, format data and do\r
+ * other side-functions.\r
+ */\r
+\r
+// this file can't be used on its own\r
+if (strpos ($_SERVER['PHP_SELF'], 'helpers.inc.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+/*\r
+* Helper Function: executes a function that is stored in the $BAW_LIB['formats']\r
+* called by final output functions in /modules/\r
+*\r
+* @param str $function_str string of format 'baw_num_format(%s);'\r
+* @param str $var data to be filled in\r
+* @return result of the function\r
+*\r
+*/\r
+function exec_function($function_str=false, $var=false) {\r
+ // check if function exists\r
+ $out = $var;\r
+ if ($function_str && $var !== false) {\r
+ $txt = explode('(',$function_str);\r
+ $func_name = $txt[0];\r
+ if (function_exists($func_name)) {\r
+ $out = eval("return " . sprintf($function_str, $var));\r
+ } else {\r
+ $out = "error finding function $func_name ($function_str, $var)";\r
+ }\r
+ }\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Helper Function: check for various cfg settings to find if they are correct or not\r
+* called by index.php\r
+*\r
+*/\r
+function baw_check_config() {\r
+ global $BAW_CONF, $BAW_MES;\r
+\r
+ // lets check a non-std file, config.php might exist elsewhere\r
+ $path = $BAW_CONF['site_path'] . "/modules/render_table.inc.php";\r
+ if (!file_exists($path)) {\r
+ // lets get an error-free error message\r
+ $BAW_MES[58] = '';\r
+ $BAW_MES['e'] = 'UTF-8';\r
+ include_once('./language/lang_en.inc.php');\r
+ $check = substr($_SERVER["SCRIPT_FILENAME"], 0, -10);\r
+ echo baw_raise_error('site_path', array($BAW_CONF['site_path'], $check));\r
+ exit;\r
+ }\r
+\r
+ /* this does not work if the folder is protected with htaccess\r
+ since the fopen is not authenticated.\r
+ $url = $BAW_CONF['site_url']. '/modules/render_table.inc.php';\r
+ if (!@fopen($url, "r")) {\r
+ include_once('./language/lang_en.inc.php');\r
+ $check = 'http://' . $_SERVER["SERVER_NAME"] . substr($_SERVER["PHP_SELF"], 0, -10);\r
+ echo baw_raise_error('site_url', array($BAW_CONF['site_url'], $check));\r
+ exit;\r
+ }\r
+\r
+ $url = $BAW_CONF['icons_url']. '/os/linux.png';\r
+ if (!@fopen($url, "r")) {\r
+ echo baw_raise_error('iconpath', array($BAW_CONF['icons_url']));\r
+ exit;\r
+ }\r
+ */\r
+}\r
+\r
+/*\r
+* Helper Function: debug output with time stamp and memory meter;\r
+* called by all functions\r
+*\r
+* @param str $msg_code the message to be shown either directly or from\r
+* language file\r
+* @param str $data data to be filled in\r
+* @param bol $always show always or only when debug more is set?\r
+* @return debug message\r
+*\r
+*/\r
+function baw_debug($msg_code, $data = false, $always = false) {\r
+ global $BAW_CONF, $BAW_MES;\r
+ $out = '';\r
+ if ($BAW_CONF['debug'] || $always) {\r
+ if (isset($BAW_MES[$msg_code])) {\r
+ if ($data) {\r
+ $out .= sprintf($BAW_MES[$msg_code], $data);\r
+ } else {\r
+ $out = $BAW_MES[$msg_code];\r
+ }\r
+ } else {\r
+ $out = $msg_code;\r
+ }\r
+ $memory = baw_byte_format(memory_get_usage(),4);\r
+ $time = baw_ptime();\r
+ echo "<div style=\"text-align:right\">$out | Memory used: $memory | Time: $time</div>\n";\r
+ }\r
+}\r
+\r
+/*\r
+* Helper Function: returns the time between the start of the script until now\r
+* called by baw_debug() and baw_display_index()\r
+*\r
+* @return time in seconds\r
+*\r
+*/\r
+function baw_ptime() {\r
+ $now = baw_mtime();\r
+ $overall = $now - START_TIME;\r
+ $time_str = baw_num_format($overall, 3). " sec";\r
+ return $time_str;\r
+}\r
+\r
+/*\r
+* Helper Function: sets the current time to START_TIME for calculation\r
+* of time spent for script execution.\r
+* called by index.php, baw_ptime()\r
+*\r
+*/\r
+function baw_mtime() {\r
+ $arr = explode(" ", microtime());\r
+ $out = $arr[0] + $arr[1];\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Helper Function: format numeber of bytes\r
+*\r
+* @param int $number number of bytes (1024-base)\r
+* @param int $decimals number of decimals to display\r
+* @return formatted according to config\r
+*\r
+*/\r
+function baw_byte_format($number, $decimals = 2) {\r
+ global $BAW_CONF;\r
+ // kilo, mega, giga, tera, peta, exa, zetta, yotta\r
+ $prefix_arr = array('','k','M','G','T','P','E','Z','Y');\r
+ $i = 0;\r
+ $value = round($number, $decimals);\r
+ while ($value > 1024) {\r
+ $value /= 1024;\r
+ $i++;\r
+ }\r
+ $result = baw_num_format($value, $decimals);\r
+ $result .= ' '.$prefix_arr[$i].'B';\r
+ return $result;\r
+}\r
+\r
+/*\r
+* Helper Function: format numbers according to config\r
+*\r
+* @param int $number number\r
+* @param int $decimals number of decimals to display\r
+* @return formatted according to config\r
+*\r
+*/\r
+function baw_num_format($number, $decimals = 0) {\r
+ global $BAW_CONF;\r
+ if ($number == 0 || empty($number) || !isset($number)) {\r
+ $result = '0';\r
+ } else {\r
+ $result = number_format($number, $decimals, $BAW_CONF['dec_point'], $BAW_CONF['tho_point']);\r
+ }\r
+ return $result;\r
+}\r
+\r
+/*\r
+* Helper Function: format dates according to config\r
+*\r
+* @param int $str date in the format YYYYMMDDHHMMSS\r
+* @return formatted date according to config\r
+*\r
+*/\r
+function baw_getdate_format($str) {\r
+ global $BAW_CONF;\r
+ $out = date($BAW_CONF['date_format'], strtotime($str));\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Helper Function: format time according to config\r
+*\r
+* @param int $str date in the format YYYYMMDDHHMMSS\r
+* @return formatted time only according to config\r
+*\r
+*/\r
+function baw_time_format($str) {\r
+ global $BAW_CONF, $BAW_MES;\r
+ if ($str == 0) {\r
+ return $BAW_MES[0];\r
+ }\r
+ $out = date($BAW_CONF['date_time_format'], strtotime(sprintf("%.0f",$str)));\r
+ return $out;\r
+}\r
+\r
+/*\r
+* Helper Function: deliver output according to odd/even numbers\r
+*\r
+* @param int $num number to check if odd/even\r
+* @param str $even string to be returned in case $num is even\r
+* @param str $odd string to be returned in case $num is odd\r
+* @return $odd or $even\r
+*\r
+*/\r
+function baw_even($num, $even, $odd) {\r
+ if ($num%2 == 0) {\r
+ return $even;\r
+ } else {\r
+ return $odd;\r
+ }\r
+}\r
+\r
+/*\r
+* Helper Function: format a number as a percentage\r
+*\r
+* @param int $num number to format\r
+* @return str formatted number\r
+*\r
+*/\r
+function baw_percent_format($number) {\r
+ global $BAW_CONF;\r
+ $result = baw_num_format($number, $BAW_CONF['percent_decimals']) . " %";\r
+ return $result;\r
+}\r
+\r
+/*\r
+* Helper Function: Slice an array but keep numeric keys\r
+* called only by baw_display_days()\r
+*\r
+* @param arr $array array to be sliced\r
+* @param int $day $day from where to slice\r
+* @return arr sliced array\r
+*\r
+*/\r
+function baw_cut_date_array($array, $day) {\r
+ $output_array = array();\r
+ foreach ($array as $key => $value) {\r
+ if ($key > $day) {\r
+ $output_array[$key] = $value;\r
+ }\r
+ }\r
+ return $output_array;\r
+}\r
+\r
+/*\r
+* Helper Function: sort a multi-dimensional array by key or index\r
+* called by almost all functions in display.inc.php. For performance reasons,\r
+* the key is the preferred method.\r
+*\r
+* @param arr $data array to be sorted\r
+* @param str $column column to be the sorting reference\r
+* @param con $order SORT_DESC or SORT_ASC\r
+* @return arr sorted array\r
+*\r
+*/\r
+function baw_array_sorting($data, $column, $order = SORT_DESC) {\r
+ if (count($data) ==0) {\r
+ return $data;\r
+ } else if ($column == 'key') {\r
+ baw_debug("sorting array by key");\r
+ if ($order == SORT_DESC) {\r
+ krsort($data);\r
+ } else {\r
+ ksort($data);\r
+ }\r
+ } else {\r
+ baw_debug("creating sorting array using column $column $order");\r
+ foreach ($data as $description => $numbers) {\r
+ $sort_col[$description] = @$numbers[$column];\r
+ }\r
+ baw_debug("sorting array by column $column $order");\r
+ array_multisort($sort_col, $order, $data);\r
+ }\r
+ baw_debug("array sorted");\r
+ return $data;\r
+}\r
+\r
+/*\r
+* Helper Function: raise an error for custom events\r
+*\r
+* @param str $type index for error message\r
+* @param str $data error-specific data to fill into the message\r
+* @return str error message\r
+*\r
+*/\r
+function baw_raise_error($type, $data = array()) {\r
+ global $BAW_MES, $BAW_CONF;\r
+\r
+ $cd = count($data);\r
+ if ($cd == 0) {\r
+ $out = $BAW_MES[$type];\r
+ } else if ($cd == 1) {\r
+ $out = sprintf($BAW_MES[$type], $data[0]);\r
+ } else if ($cd == 2) {\r
+ $out = sprintf($BAW_MES[$type], $data[0], $data[1]);\r
+ } else if ($cd == 3) {\r
+ $out = sprintf($BAW_MES[$type], $data[0], $data[1], $data[2]);\r
+ }\r
+ // this is here in case the error comes so early that display helpers was not included yet.\r
+ if ($BAW_CONF['module'] == 'drupal') {\r
+ drupal_set_message(t('The Betterawstats engine generated the error below. If it is a configuration error concerning AWStats locations (i.e. the AWstats data directory, library directory, or language direction), these must be set using the') . ' <a href="skins/default/admin/settings/bawstats">' . t('BAW Statistics') . '</a> ' . t('administration pages.'),'error');\r
+ drupal_set_message($out,'warning');\r
+ } else {\r
+ include_once('display_helpers.php');\r
+ $out = baw_site_header() . "<div class=\"errorbox\"><h1>{$BAW_MES['baw_error']}</h1>$out</div></body></html>";\r
+ return $out;\r
+ }\r
+}\r
+\r
+/*\r
+* Helper Function: check if a file is writable\r
+* called by itself and other occasions where config links are displayed\r
+*\r
+* @param str $path path to the file\r
+* @return bol true if writable, otherwise false\r
+*\r
+*/\r
+function baw_is_writable($path) {\r
+ //will work in despite of Windows ACLs bug\r
+ //NOTE: use a trailing slash for folders!!!\r
+ //see http://bugs.php.net/bug.php?id=27609\r
+ //see http://bugs.php.net/bug.php?id=30931\r
+ baw_debug('dbg_test_writable', $path);\r
+ if ($path{strlen($path)-1}=='/') {// recursively return a temporary file path\r
+ return baw_is_writable($path.uniqid(mt_rand()).'.tmp');\r
+ } else if (is_dir($path)) {\r
+ return baw_is_writable($path.'/'.uniqid(mt_rand()).'.tmp');\r
+ }\r
+ // check tmp file for read/write capabilities\r
+ $rm = file_exists($path);\r
+ $f = @fopen($path, 'a');\r
+ if ($f===false) {\r
+ @fclose($f);\r
+ baw_debug('dbg_test_writable_false', $path);\r
+ return false;\r
+ }\r
+ if (!$rm) {\r
+ unlink($path);\r
+ }\r
+ fclose($f);\r
+ baw_debug('dbg_test_writable_true', $path);\r
+ return true;\r
+}\r
+\r
+/*\r
+* Helper Function: debug helper that gives var_dump as a return instead of a screendump\r
+*\r
+* @param misc $var variable to be dumped\r
+* @return str formatted, dumped variable contents\r
+*\r
+*/\r
+function baw_var_dump($var) {\r
+ ob_start();\r
+ var_dump($var);\r
+ $dump = ob_get_contents();\r
+ ob_end_clean();\r
+ return "<pre>$dump</pre>";\r
+}\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+/**\r
+ * File contents:\r
+ *\r
+ * This file coordinates the complete language-file processing.\r
+ */\r
+\r
+\r
+// this is the main function that should coordinate reading all language ressources\r
+function baw_language() {\r
+// find out what our language is\r
+baw_detect_language();\r
+// include the AWSTATS language file\r
+baw_set_language();\r
+// include the BAW language file\r
+baw_select_internal_language();\r
+// read the AWSTATS tooltips\r
+// baw_get_tooltips();\r
+\r
+}\r
+\r
+function baw_set_language() {\r
+ global $BAW_CONF, $BAW_MES;\r
+\r
+ $path = $BAW_CONF['path_lang']."/awstats-{$BAW_CONF['lang']}.txt";\r
+ if (!file_exists($path)) {\r
+ // lets get an error-free error message\r
+ $BAW_MES[58] = '';\r
+ $BAW_MES['e'] = 'UTF-8';\r
+ include_once($BAW_CONF['site_path'].'/language/lang_en.inc.php');\r
+ echo baw_raise_error('languagefile', array($path));\r
+ exit;\r
+ } else {\r
+ $alternative = $BAW_CONF['path_lang']."/awstats-en.txt";\r
+ baw_read_lng_data($path, $alternative);\r
+ }\r
+}\r
+\r
+// this is detecting the required language if not set to auto by config.\r
+// this is called only by baw_set_language()\r
+function baw_detect_language() {\r
+ global $BAW_CONF;\r
+ $lang = '';\r
+ if ($BAW_CONF['lang_setting'] == 'auto') {\r
+ baw_debug('dbg_detect_language');\r
+ $acc_lang = explode(',', @$_SERVER['HTTP_ACCEPT_LANGUAGE']);\r
+ foreach ($acc_lang as $lang) {\r
+ $lang = strtolower(substr($lang, 0, 2));\r
+ if (file_exists($BAW_CONF['path_lang'] . "/awstats-$lang.txt")) {\r
+ break;\r
+ } else {\r
+ $lang = '';\r
+ }\r
+ }\r
+ if (!$lang) {\r
+ $lang = 'en';\r
+ }\r
+ } else {\r
+ $lang = $BAW_CONF['lang_setting'];\r
+ }\r
+ $BAW_CONF['lang'] = $lang;\r
+ baw_debug('dbg_detected_language', $lang);\r
+}\r
+\r
+// we assume that awstats has more translations than betterawstats\r
+// so we check if the one selected is available, otherwise include\r
+/// english.\r
+function baw_select_internal_language() {\r
+ global $BAW_CONF;\r
+ $lang = $BAW_CONF['lang'];\r
+ $path = "{$BAW_CONF['site_path']}/language/lang_$lang.inc.php";\r
+ if (file_exists($path)) {\r
+ include_once($path);\r
+ } else {\r
+ $path = "{$BAW_CONF['site_path']}/language/lang_en.inc.php";\r
+ include_once($path);\r
+ }\r
+}\r
+\r
+// this function gets the file and returns the array\r
+// that is then added to the language file.\r
+function baw_read_lng_data($file, $alternative) {\r
+ global $BAW_MES;\r
+ $r = array();\r
+ baw_debug("reading language data: $file");\r
+ $lines = file($file);\r
+ $encode_str = false;\r
+ foreach ($lines as $line) {\r
+ if (substr($line, 0, 7) == 'message') {\r
+ $match = explode('=', $line);\r
+ $match[0] = substr($match[0], 7);\r
+ $r[$match[0]] = trim($match[1]);\r
+ } else if (substr($line, 0, 8) == 'PageCode') {\r
+ $encode_str = substr($line, 9);\r
+ $r['e'] = $encode_str;\r
+ }\r
+ }\r
+ // check that we have the whole file\r
+ if (count($r) < 173) {\r
+ baw_debug(\r
+ "The language file is incomplete, only " . count($r)\r
+ . "entries. Filling the rest with english"\r
+ );\r
+ $lines = file($alternative);\r
+ foreach ($lines as $line) {\r
+ if (substr($line, 0, 7) == 'message') {\r
+ $match = explode('=', $line);\r
+ $match[0] = substr($match[0], 7);\r
+ if (!isset($r[$match[0]])) {\r
+ $r[$match[0]] = trim($match[1]);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ baw_debug("finished reading language data");\r
+ $BAW_MES += $r;\r
+}\r
+\r
+function baw_get_tooltips() {\r
+ global $BAW_CONF, $BAW_MES;\r
+ $path = $BAW_CONF['path_lang']."/tooltips_w/awstats-tt-{$BAW_CONF['lang']}.txt";\r
+ if (!file_exists($path)) {\r
+ echo baw_raise_error('languagefile', array($path));\r
+ $file_text = array();\r
+ } else {\r
+ $file_text = file_get_contents($path);\r
+ }\r
+ $search = array(\r
+ "\n",\r
+ "\r",\r
+ "</div>",\r
+ "<br />"\r
+ );\r
+ $replace = array(\r
+ "",\r
+ "",\r
+ "",\r
+ ""\r
+ );\r
+ $file_text = str_replace($search, $replace,$file_text);\r
+ $file_text = explode('<div class="CTooltip" ', $file_text);\r
+ array_shift($file_text);\r
+ $pattern = '/id=\"tt(\d{1,3})\">(.*)/';\r
+ foreach ($file_text as $line) {\r
+ preg_match($pattern, $line, $match);\r
+ $BAW_MES['tooltip'][$match[1]] = "<span>{$match[2]}</span>";\r
+ }\r
+}\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+/**\r
+ * File contents:\r
+ *\r
+ * This file sets default/addon data for libraries and reads the aditional data\r
+ * from the library files.\r
+ */\r
+\r
+\r
+// this file can't be used on its own\r
+if (strpos ($_SERVER['PHP_SELF'], 'library.inc.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+$BAW_LIB['formats'] = array(\r
+ // class img text format\r
+ 'layout_visitors' => array(\r
+ 'img' => 'vu.png',\r
+ 'txt' => 11,\r
+ 'frm' => 'baw_num_format(%s);',\r
+ 'max'=> 'layout_visits'),\r
+ 'layout_visits' => array(\r
+ 'img' => 'vv.png',\r
+ 'txt' => 10,\r
+ 'frm' => 'baw_num_format(%s);',\r
+ 'max'=> 'layout_visits'),\r
+ 'layout_pages' => array(\r
+ 'img' => 'vp.png',\r
+ 'txt' => 56,\r
+ 'frm' => 'baw_num_format(%s);',\r
+ 'max'=> 'layout_pages'),\r
+ 'layout_hits' => array(\r
+ 'img' => 'vh.png',\r
+ 'txt' => 57,\r
+ 'frm' => 'baw_num_format(%s);',\r
+ 'max'=> 'layout_hits'),\r
+ 'layout_bytes' => array(\r
+ 'img' => 'vk.png',\r
+ 'txt' => 75,\r
+ 'frm' => 'baw_byte_format(%s);',\r
+ 'max'=> 'layout_bytes'),\r
+ 'layout_percent' => array(\r
+ 'img' => '',\r
+ 'txt' => 15,\r
+ 'frm' => 'baw_percent_format(%s);',\r
+ 'max'=> ''),\r
+ 'layout_date' => array(\r
+ 'img' => '',\r
+ 'txt' => '',\r
+ 'frm' => 'baw_getdate_format(%s);',\r
+ 'max'=> ''),\r
+ 'layout_text' => array(\r
+ 'img' => '',\r
+ 'txt' => '',\r
+ 'frm' => false,\r
+ 'max'=> ''),\r
+ 'layout_ratio' => array(\r
+ 'img' => '',\r
+ 'txt' => '',\r
+ 'frm' => 'baw_num_format(%s,2);',\r
+ 'max'=> '')\r
+);\r
+\r
+// this is defined here to indicate the order of the array, otherwise the information is in the datafile\r
+$BAW_LIB['sessions'] = array(\r
+ '0s-30s', '30s-2mn', '2mn-5mn', '5mn-15mn', '15mn-30mn', '30mn-1h', '1h+'\r
+);\r
+\r
+$BAW_LIB['os']['families'] = array(\r
+ 'win' => array('win', '<b>Windows</b>',0),\r
+ 'mac' => array('mac', '<b>Macintosh</b>',0),\r
+ 'linux'=> array('linux', '<b>Linux</b>',0),\r
+ 'bsd' => array('bsd', '<b>BSD</b>',0)\r
+);\r
+\r
+$BAW_LIB['os']['codes'] = array('win', 'mac', 'linux', 'bsd');\r
+$BAW_LIB['os']['list'] = baw_get_library("/operating_systems.pm", 'OSHashLib');\r
+$BAW_LIB['domains'] = baw_get_library("/domains.pm", 'DomainsHashIDLib');\r
+$BAW_LIB['robots'] = baw_get_library("/robots.pm", 'RobotsHashIDLib');\r
+list (\r
+ $BAW_LIB['worms']['names'],\r
+ $BAW_LIB['worms']['targets']) = baw_get_library(\r
+ "/worms.pm",\r
+ array('WormsHashLib', 'WormsHashTarget')\r
+);\r
+list (\r
+ $BAW_LIB['files']['types'],\r
+ $BAW_LIB['files']['icons'],\r
+ $BAW_LIB['files']['family']) = baw_get_library (\r
+ "/mime.pm",\r
+ array('MimeHashLib', 'MimeHashIcon', 'MimeHashFamily')\r
+);\r
+$BAW_LIB['browser']['familes'] = array('msie'=>1,'firefox'=>2,'netscape'=>3,'svn'=>4);\r
+list (\r
+ $BAW_LIB['browser']['names'],\r
+ $BAW_LIB['browser']['grabbers'],\r
+ $BAW_LIB['browser']['icons']) = baw_get_library(\r
+ "/browsers.pm",\r
+ array('BrowsersHashIDLib','BrowsersHereAreGrabbers','BrowsersHashIcon')\r
+);\r
+$BAW_LIB['searchengines']['names']= baw_get_library("/search_engines.pm", 'SearchEnginesHashLib');\r
+$BAW_LIB['misc'] = array(\r
+ // 'TotalMisc' => 0,\r
+ // 'AddToFavourites' => 137,\r
+ 'JavascriptDisabled' => 168,\r
+ 'JavaEnabled' => 140,\r
+ 'DirectorSupport'=> 141,\r
+ 'FlashSupport' => 142,\r
+ 'RealPlayerSupport'=> 143,\r
+ 'QuickTimeSupport' => 144,\r
+ 'WindowsMediaPlayerSupport' => 145,\r
+ 'PDFSupport' => 146\r
+);\r
+$BAW_LIB['http_status'] = baw_get_library("/status_http.pm", 'httpcodelib');\r
+\r
+$BAW_LIB['item_groups'] = array(\r
+ 'time' => array(\r
+ 'title' => $BAW_MES['time'],\r
+ 'members' => array('overview', 'months', 'days', 'weekdays', 'hours')\r
+ ),\r
+ 'userinfo' => array(\r
+ 'title' => $BAW_MES['user_information'],\r
+ 'members' => array('domains', 'visitors', 'os', 'osversions', 'browsers','browserversions', 'misc', 'screensizes')\r
+ ),\r
+ 'actions' => array(\r
+ 'title' => $BAW_MES['user_actions'],\r
+ 'members' => array('logins', 'sessions', 'filetype', 'urls')\r
+ ),\r
+ 'origin' => array(\r
+ 'title' => $BAW_MES['user_origin'],\r
+ 'members' => array('referers', 'referer_domains', 'se_referers','searchphrases', 'searchwords')\r
+ ),\r
+ 'other' => array(\r
+ 'title' => $BAW_MES['other_access'],\r
+ 'members' => array('robots', 'worms', 'unknownos', 'unknownbrowser', 'hotlinks', 'hotlink_domains', 'errors', 'errors404')\r
+ )\r
+);\r
+\r
+/*\r
+ this is obsolete but kept here for ev. future usage\r
+\r
+$BAW_LIB['data']['full'] = array(\r
+ 'GENERAL' => array('Misc ID', 'Pages', 'Hits', 'Bandwidth'),\r
+ 'TIME' => array('Hour','Pages','Hits','Bandwidth','Not viewed Pages','Not viewed Hits','Not viewed Bandwidth'),\r
+ 'VISITOR' => array('Host','Pages','Hits','Bandwidth','Last visit date','[Start date of last visit]','[Last page of last visit]'),\r
+ 'DAY' => array('Date','Pages','Hits','Bandwidth','Visits'),\r
+ 'DOMAIN' => array('Domain','Pages','Hits','Bandwidth'),\r
+ 'LOGIN' => array('Login','Pages','Hits','Bandwidth','Last visit'),\r
+ 'ROBOT' => array('Robot ID','Hits','Bandwidth','Last visit','Hits on robots.txt'),\r
+ 'WORMS' => array('Worm ID','Hits','Bandwidth','Last visit'),\r
+ 'SESSION' => array('Session range','Number of visits'),\r
+ 'SIDER' => array('URL','Pages','Bandwidth','Entry','Exit'),\r
+ 'FILETYPES' => array('Files type','Hits','Bandwidth','Bandwidth without compression','Bandwidth after compression'),\r
+ 'OS' => array('OS ID','Hits'),\r
+ 'BROWSER' => array('Browser ID','Hits'),\r
+ 'SCREENSIZE' => array('Screen size','Hits'),\r
+ 'UNKNOWNREFERER' => array('Unknown referer OS','Last visit date'),\r
+ 'UNKNOWNREFERERBROWSER' => array('Unknown referer Browser','Last visit date'),\r
+ 'ORIGIN' => array('Origin','Pages','Hits '),\r
+ 'SEREFERRALS' => array('Search engine referers ID','Pages','Hits'),\r
+ 'PAGEREFS' => array('External page referers','Pages','Hits'),\r
+ 'SEARCHWORDS' => array('Search keyphrases','Number of search'),\r
+ 'KEYWORDS' => array('Search keywords','Number of search'),\r
+ 'MISC' => array('Misc ID','Pages','Hits','Bandwidth'),\r
+ 'ERRORS' => array('Errors','Hits','Bandwidth'),\r
+ 'CLUSTER' => array('Cluster ID','Pages','Hits','Bandwidth'),\r
+ 'SIDER_404' => array('URL with 404 errors','Hits','Last URL referer'),\r
+ 'EXTRA_1' => array('Extra key','Pages','Hits','Bandwidth','Last access')\r
+);\r
+*/\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+Please see the FAQ here:\r
+\r
+http://betterawstats.com/forum/viewforum.php?f=6
\ No newline at end of file
--- /dev/null
+ GNU GENERAL PUBLIC LICENSE\r
+ Version 2, June 1991\r
+\r
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+ Preamble\r
+\r
+ The licenses for most software are designed to take away your \r
+freedom to share and change it. By contrast, the GNU General Public\r
+License is intended to guarantee your freedom to share and change free\r
+software--to make sure the software is free for all its users. This\r
+General Public License applies to most of the Free Software\r
+Foundation's software and to any other program whose authors commit to\r
+using it. (Some other Free Software Foundation software is covered by\r
+the GNU Library General Public License instead.) You can apply it to\r
+your programs, too.\r
+\r
+ When we speak of free software, we are referring to freedom, not\r
+price. Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+ To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if you\r
+distribute copies of the software, or if you modify it.\r
+\r
+ For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must give the recipients all the rights that\r
+you have. You must make sure that they, too, receive or can get the\r
+source code. And you must show them these terms so they know their\r
+rights.\r
+\r
+ We protect your rights with two steps: (1) copyright the software, and\r
+(2) offer you this license which gives you legal permission to copy,\r
+distribute and/or modify the software.\r
+\r
+ Also, for each author's protection and ours, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+software. If the software is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original, so\r
+that any problems introduced by others will not reflect on the original\r
+authors' reputations.\r
+\r
+ Finally, any free program is threatened constantly by software\r
+patents. We wish to avoid the danger that redistributors of a free\r
+program will individually obtain patent licenses, in effect making the\r
+program proprietary. To prevent this, we have made it clear that any\r
+patent must be licensed for everyone's free use or not licensed at all.\r
+\r
+ The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\f\r
+ GNU GENERAL PUBLIC LICENSE\r
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+ 0. This License applies to any program or other work which contains\r
+a notice placed by the copyright holder saying it may be distributed\r
+under the terms of this General Public License. The "Program", below,\r
+refers to any such program or work, and a "work based on the Program"\r
+means either the Program or any derivative work under copyright law:\r
+that is to say, a work containing the Program or a portion of it,\r
+either verbatim or with modifications and/or translated into another\r
+language. (Hereinafter, translation is included without limitation in\r
+the term "modification".) Each licensee is addressed as "you".\r
+\r
+Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope. The act of\r
+running the Program is not restricted, and the output from the Program\r
+is covered only if its contents constitute a work based on the\r
+Program (independent of having been made by running the Program).\r
+Whether that is true depends on what the Program does.\r
+\r
+ 1. You may copy and distribute verbatim copies of the Program's\r
+source code as you receive it, in any medium, provided that you\r
+conspicuously and appropriately publish on each copy an appropriate\r
+copyright notice and disclaimer of warranty; keep intact all the\r
+notices that refer to this License and to the absence of any warranty;\r
+and give any other recipients of the Program a copy of this License\r
+along with the Program.\r
+\r
+You may charge a fee for the physical act of transferring a copy, and\r
+you may at your option offer warranty protection in exchange for a fee.\r
+\r
+ 2. You may modify your copy or copies of the Program or any portion\r
+of it, thus forming a work based on the Program, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+ a) You must cause the modified files to carry prominent notices\r
+ stating that you changed the files and the date of any change.\r
+\r
+ b) You must cause any work that you distribute or publish, that in\r
+ whole or in part contains or is derived from the Program or any\r
+ part thereof, to be licensed as a whole at no charge to all third\r
+ parties under the terms of this License.\r
+\r
+ c) If the modified program normally reads commands interactively\r
+ when run, you must cause it, when started running for such\r
+ interactive use in the most ordinary way, to print or display an\r
+ announcement including an appropriate copyright notice and a\r
+ notice that there is no warranty (or else, saying that you provide\r
+ a warranty) and that users may redistribute the program under\r
+ these conditions, and telling the user how to view a copy of this\r
+ License. (Exception: if the Program itself is interactive but\r
+ does not normally print such an announcement, your work based on\r
+ the Program is not required to print an announcement.)\r
+\f\r
+These requirements apply to the modified work as a whole. If\r
+identifiable sections of that work are not derived from the Program,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works. But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Program, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Program.\r
+\r
+In addition, mere aggregation of another work not based on the Program\r
+with the Program (or with a work based on the Program) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+ 3. You may copy and distribute the Program (or a work based on it,\r
+under Section 2) in object code or executable form under the terms of\r
+Sections 1 and 2 above provided that you also do one of the following:\r
+\r
+ a) Accompany it with the complete corresponding machine-readable\r
+ source code, which must be distributed under the terms of Sections\r
+ 1 and 2 above on a medium customarily used for software interchange; or,\r
+\r
+ b) Accompany it with a written offer, valid for at least three\r
+ years, to give any third party, for a charge no more than your\r
+ cost of physically performing source distribution, a complete\r
+ machine-readable copy of the corresponding source code, to be\r
+ distributed under the terms of Sections 1 and 2 above on a medium\r
+ customarily used for software interchange; or,\r
+\r
+ c) Accompany it with the information you received as to the offer\r
+ to distribute corresponding source code. (This alternative is\r
+ allowed only for noncommercial distribution and only if you\r
+ received the program in object code or executable form with such\r
+ an offer, in accord with Subsection b above.)\r
+\r
+The source code for a work means the preferred form of the work for\r
+making modifications to it. For an executable work, complete source\r
+code means all the source code for all modules it contains, plus any\r
+associated interface definition files, plus the scripts used to\r
+control compilation and installation of the executable. However, as a\r
+special exception, the source code distributed need not include\r
+anything that is normally distributed (in either source or binary\r
+form) with the major components (compiler, kernel, and so on) of the\r
+operating system on which the executable runs, unless that component\r
+itself accompanies the executable.\r
+\r
+If distribution of executable or object code is made by offering\r
+access to copy from a designated place, then offering equivalent\r
+access to copy the source code from the same place counts as\r
+distribution of the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\f\r
+ 4. You may not copy, modify, sublicense, or distribute the Program\r
+except as expressly provided under this License. Any attempt\r
+otherwise to copy, modify, sublicense or distribute the Program is\r
+void, and will automatically terminate your rights under this License.\r
+However, parties who have received copies, or rights, from you under\r
+this License will not have their licenses terminated so long as such\r
+parties remain in full compliance.\r
+\r
+ 5. You are not required to accept this License, since you have not\r
+signed it. However, nothing else grants you permission to modify or\r
+distribute the Program or its derivative works. These actions are\r
+prohibited by law if you do not accept this License. Therefore, by\r
+modifying or distributing the Program (or any work based on the\r
+Program), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Program or works based on it.\r
+\r
+ 6. Each time you redistribute the Program (or any work based on the\r
+Program), the recipient automatically receives a license from the\r
+original licensor to copy, distribute or modify the Program subject to\r
+these terms and conditions. You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\r
+ 7. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License. If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Program at all. For example, if a patent\r
+license would not permit royalty-free redistribution of the Program by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Program.\r
+\r
+If any portion of this section is held invalid or unenforceable under\r
+any particular circumstance, the balance of the section is intended to\r
+apply and the section as a whole is intended to apply in other\r
+circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system, which is\r
+implemented by public license practices. Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\f\r
+ 8. If the distribution and/or use of the Program is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Program under this License\r
+may add an explicit geographical distribution limitation excluding\r
+those countries, so that distribution is permitted only in or among\r
+countries not thus excluded. In such case, this License incorporates\r
+the limitation as if written in the body of this License.\r
+\r
+ 9. The Free Software Foundation may publish revised and/or new versions\r
+of the General Public License from time to time. Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number. If the Program\r
+specifies a version number of this License which applies to it and "any\r
+later version", you have the option of following the terms and conditions\r
+either of that version or of any later version published by the Free\r
+Software Foundation. If the Program does not specify a version number of\r
+this License, you may choose any version ever published by the Free Software\r
+Foundation.\r
+\r
+ 10. If you wish to incorporate parts of the Program into other free\r
+programs whose distribution conditions are different, write to the author\r
+to ask for permission. For software which is copyrighted by the Free\r
+Software Foundation, write to the Free Software Foundation; we sometimes\r
+make exceptions for this. Our decision will be guided by the two goals\r
+of preserving the free status of all derivatives of our free software and\r
+of promoting the sharing and reuse of software generally.\r
+\r
+ NO WARRANTY\r
+\r
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\r
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\r
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\r
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
+REPAIR OR CORRECTION.\r
+\r
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
+POSSIBILITY OF SUCH DAMAGES.\r
+\r
+ END OF TERMS AND CONDITIONS\r
+\f\r
+ How to Apply These Terms to Your New Programs\r
+\r
+ If you develop a new program, and you want it to be of the greatest\r
+possible use to the public, the best way to achieve this is to make it\r
+free software which everyone can redistribute and change under these terms.\r
+\r
+ To do so, attach the following notices to the program. It is safest\r
+to attach them to the start of each source file to most effectively\r
+convey the exclusion of warranty; and each file should have at least\r
+the "copyright" line and a pointer to where the full notice is found.\r
+\r
+ <one line to give the program's name and a brief idea of what it does.>\r
+ Copyright (C) 19yy <name of author>\r
+\r
+ This program is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ This program is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with this program; if not, write to the Free Software\r
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+If the program is interactive, make it output a short notice like this\r
+when it starts in an interactive mode:\r
+\r
+ Gnomovision version 69, Copyright (C) 19yy name of author\r
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r
+ This is free software, and you are welcome to redistribute it\r
+ under certain conditions; type `show c' for details.\r
+\r
+The hypothetical commands `show w' and `show c' should show the appropriate\r
+parts of the General Public License. Of course, the commands you use may\r
+be called something other than `show w' and `show c'; they could even be\r
+mouse-clicks or menu items--whatever suits your program.\r
+\r
+You should also get your employer (if you work as a programmer) or your\r
+school, if any, to sign a "copyright disclaimer" for the program, if\r
+necessary. Here is a sample; alter the names:\r
+\r
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program\r
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.\r
+\r
+ <signature of Ty Coon>, 1 April 1989\r
+ Ty Coon, President of Vice\r
+\r
+This General Public License does not permit incorporating your program into\r
+proprietary programs. If your program is a subroutine library, you may\r
+consider it more useful to permit linking proprietary applications with the\r
+library. If this is what you want to do, use the GNU Library General\r
+Public License instead of this License.\r
+\r
--- /dev/null
+== 1.0 final==\r
+- reduced memory load for HOSTS\r
+- unknonwn browsers/os & Versions default to display=off\r
+- improved design\r
+- improved code for table creation (-30%)\r
+- added missing TLDs to worldmap\r
+- added HTML charts also for full list\r
+- added password-protection of config editor\r
+- added new config options to prevent oversized charts\r
+- added rowspan for tables\r
+- added favicon for refering sites\r
+- added chart titles\r
+- added charts for screen sizes\r
+- fixed Authenticated users\r
+- fixed OS chart\r
+- fixed Hotlinks\r
+- fixed Averages\r
+- fixed HTML codes in config file help\r
+- fixed sorting for keys\r
+- fixed URL-encoding of searchphrases/words\r
+- fixed strange int(0) == string error for HTTP error tables\r
+- fixed URL of 404 Errors table\r
+\r
+== 1.0 Beta ==\r
+- added countries map to Visitors Domains data\r
+- added new config option to exclude empty data from averages\r
+- added check for config options\r
+- added extras-addon help\r
+- added ratio display for visitors\r
+- added XHTML STRICT validation to HTML Strict\r
+- added HMTL charts for browsers, Os (incl Versions)\r
+- added 'Average' option for all HTML charts\r
+- added 'Others' in HTML charts\r
+- added German language file\r
+- added Dutch language file (thanks Edwin de Ruijter)\r
+- added files/paths statistics\r
+- added screen size visuals to screen size stats\r
+- added sections to config options\r
+- revamped CSS\r
+- revamped data formatting scheme to allow custom formats\r
+- fixed word wrap for config descriptions\r
+- fixed hide menu entries for empty data\r
+- fixed text-shorting of non-linked text if full text cannot be shown\r
+- fixed html tags from unknown OS & Browsers\r
+- fixed online config link/error only if enabled\r
+- fixed undefined variables\r
+- fixed bug where not all sites were listed when selecting an early year\r
+- Fixed HTML Validation in several places\r
+- fixed windows config file writable test\r
+- fixed path for error messages\r
+- fixed last day of the month missing while showing previous months\r
+- fixed linking of non-existing referes in 404 error stats\r
+- fixed omitted duplicate referer and error entries (thanks Edwin de Ruijter)\r
+- fixed icons for unknown domains\r
+- fixed max_lines config setting\r
+- fixed foreign language encoding\r
+- fixed bots detection for visitors & allow finetuning\r
+- fixed quotes for string-type config settings\r
+- fixed width of HTML chart bars calculation\r
+- fixed external links for browser versions\r
+- Fixed day display for half-filled months\r
+\r
+== 0.12 Alpha ==\r
+- fixed last month daily data if current has no hits\r
+- fixed menu sorting for vertical layout\r
+- different format for external links\r
+- interlinked unknown browsers & OS with respective table\r
+- fixed slashes in OS icons\r
+- renamed all functions & globals to baw_* to make sure they work when\r
+ betterawstats is included into other projects\r
+- fixed highlighting of current month/day\r
+- applied var fixes (thanks Andrew Gillies)\r
+- added config option for inclusion in other projects\r
+- improved datelist-creation\r
+\r
+== 0.11 Alpha ==\r
+- added unknown browsers stats\r
+- added unknown OS stats\r
+- introduced additional horizontal layout\r
+- improved overall layout & html readablity\r
+- combined www.-subdomains for domain referrers\r
+- added possible values remark for options to config file\r
+- allowing choice of maximum value setting in chart through config file\r
+- inversed $CONF['online_config']\r
+- fixed 'Unknown' OS icon\r
+- fixed number format for stats report\r
+- fixed date-fields for Sum, Avg & 'Others'\r
+- preventing direct call of backend files\r
+- page & menu title now include stats name\r
+- months & years dropdown now only show available values\r
+- Display Configurator link only if file writable\r
+- fixed time display for PHP 4.x Versions\r
+- fixed day stats for PHP 4.x Versions\r
+\r
+== 0.10 Alpha ==\r
+- new 'hide empty data' config feature\r
+- new 'All (Daily)' Data\r
+- improved browser processing\r
+- new log-parsing stats\r
+- added browser version\r
+- added OS versions\r
+- added rowcount for "Others"\r
+- fixed error in parsing robots.pm for latest awstats build (thanks J. Hill)\r
+- fixed non-existing filetype icons\r
+- fixed error in icons for https:// (thanks J. Hill)\r
+- fixed column spanning for "Others"\r
+- fixed logins date format\r
+- fixed visit duration data table\r
+\r
+== 0.9 Alpha ==\r
+- fixed ascending/descending sort storage in config editor\r
+- Split Referrers and Hotlinks into two stats\r
+- Added Domain-only referres and Hotlinks\r
+- Moved "Full List"-link in sections to the "Other"-field\r
+- fixed html validation\r
+- fixed unix/dos mix of datafiles\r
+- implemented "all sites" statistics\r
+- menu shortened\r
+- various fixes\r
+\r
+== 0.8 Alpha ==\r
+- Top_x value for screensizes\r
+- Rewrote table creation to allow better control through a config system\r
+- Added Miscellaneous\r
+- Added HTTP Codes\r
+- Added Color Depth\r
+- Split days & weekdays in two different functions\r
+- introduced default config file for gui config editor\r
+- split display files from display helpers\r
+- config variable reconstruction\r
+- Build config editor\r
+- validate HTML strict\r
+- Added menu\r
+- Added full lists\r
+- Table row counter for all tables\r
+\r
+== 0.7 Alpha ==\r
+- re-introduced css classes for chart legends\r
+- allow monday as first day of the week\r
+- automated percent formatting\r
+- added OS table\r
+- renamed all global variables to pattern $VAR\r
+- fixed problems with data where extras-plugin was not used (thanks J.P van Oyen)\r
+- fixed an function-naming conflict with PHP 5.x (thanks J.P van Oyen)\r
+- fixed & Optimized data library reading code\r
+- removed 'All' Month option since its not enabled yet\r
+- rearranged function calls\r
+- added Browser table\r
+- added screen sizes table\r
+- added referers table\r
+- added search engine referers table\r
+- use "others" only when > 0\r
+- introduced sorting option for screensizes\r
+- moved percentage calculation to tablecreation\r
+- introduced expand/collapse buttons for each section\r
+- replaced title-div with h2 semantics\r
+- added PHP4-compatible array_slice function (thanks Jonathan Tiez)\r
+\r
+== 0.6 Alpha ==\r
+- Added alt & title attributes to domain & hour icons\r
+- Added visitors table\r
+- Created Error-handler and error message array\r
+- reformed data-structure to prevent missing cells for 0-value days\r
+- prevented missing months/days in charts & tables if no data available\r
+- improved error messages, text & layout\r
+- introduced array-sorting and enabled top_x parameter\r
+- added login-users\r
+- added robots table\r
+- added tooltips\r
+- moved javascript into seperate file\r
+- Improved Library files reading in case there are several arrays in one file\r
+- added session time\r
+- added site urls\r
+- added file types\r
+- added worms\r
+\r
+== 0.5 Alpha ==\r
+- Increased Data rading speed ca. 60 times by using the file index instead of preg\r
+- Added Hourly stats\r
+- Added Domain stats\r
+- created library file for data\r
+- improved message file parsing\r
+- wrote function to parse library data from awstats\r
+\r
+=== 0.4 Alpha ===\r
+- Introduced table creation function to modularize code\r
+\r
+=== 0.3 Alpha ===\r
+- Monthly chart year spans over months\r
+- section header html fixes\r
+- charts format improved\r
+- implemented strict html layout/css\r
+- sitefooter has its own function now\r
+- Weekend Coloring for daily data\r
+- fixed daily data column order\r
+- fixed column header text\r
+- weekday data in average values, chart & table\r
+\r
+=== 0.2 Alpha ===\r
+- Added year-colored background for monthly data\r
+- Added complete daily stats\r
+- corrected switched hits/bandwidth data indaily charts\r
+- Improved layout CSS, removed tables\r
+\r
+=== 0.1 Alpha ===\r
+Initial version\r
+- Summary\r
+- full monthly stats\r
+- Daily stats charts
\ No newline at end of file
--- /dev/null
+CONTENTS OF THIS FILE\r
+---------------------\r
+\r
+ * Requirements\r
+ * Installation\r
+ * Configuration\r
+ * Customising which statistics to display\r
+\r
+REQUIREMENTS\r
+------------\r
+\r
+BAWstats (betterAWstats as a Drupal module) requires Drupal 6 (from\r
+beta 1 on) and betterAWstats (beta 1). No other Drupal modules are\r
+required.\r
+\r
+A working AWstats system is needed with access to the AWstats data,\r
+however, AWstats does not have to be operating as a CGI.\r
+\r
+Administration privileges within Drupal are required to install the\r
+module. For viewing statistics from multiple sites (in addition to the\r
+default installed site) the ability to edit the Drupal site's\r
+settings.php file is required.\r
+\r
+\r
+INSTALLATION\r
+------------\r
+\r
+1. You can obtain the latest code for betterAWstats either from\r
+tokyoahead.com or from the Drupal module repository.\r
+\r
+2. Unzip (or Untar) the betterAWstats source under the chosen module\r
+directory (e.g. sites/all/modules or under the modules directory of a\r
+specific site).\r
+\r
+3. As betterAWstats is designed as a stand alone CGI there are two\r
+main requirements for converting it into a safe Drupal only module.\r
+\r
+* Firstly, rename the directory from "betterawstats" to "bawstats"\r
+(the Drupal module name).\r
+\r
+* Secondly, remove or set permissions to unreadable the index.php file\r
+that is the main CGI component of betterAWstats. This prevents the\r
+CGI component being run when you are using the code as a Drupal model.\r
+The BAWstats module itself does not need this file.\r
+\r
+4. At this point the module should appear in the Drupal admin modules\r
+page (the Drupal path /admin/build/modules). It can be activated in\r
+the usual Drupal way.\r
+\r
+\r
+CONFIGURATION\r
+-------------\r
+\r
+Before the BAWstats Drupal module can access the AWstats data, the\r
+locations of the key AWstats directories must be configured. Once the\r
+BAWstats module is installed, it can be configured within the Drupal\r
+administration pages (Drupal path /admin/settings/bawstats).\r
+\r
+The module will not work without the correct locations of the four\r
+required AWstats paths:\r
+\r
+* AWstats data directory\r
+ The directory containing the core AWstats data. Within the AWstats\r
+configuration it is the directory specified by the "DirData"\r
+parameter. The data must be accessible by php.\r
+\r
+* AWstats library directory\r
+ In the top level of a default AWstats install, this is the directory\r
+wwwroot/cgi-bin/lib. It's contents must be accessible by php.\r
+\r
+* AWstats language directory\r
+ In the top level of a default AWstats install, this is the directory\r
+wwwroot/cgi-bin/lang. Again it must be accessible by php.\r
+\r
+* AWstats icon directory\r
+ In the top level of a default AWstats install, this is the directory\r
+wwwroot/icon. IMPORTANT: This must be copied into the bawstats module\r
+directory - e.g. copy the "icon" directory and all its contents into\r
+the bawstats module directory. NOTE, the "icon" directory is not the\r
+same as the betterAWstats "icons" directory.\r
+This is needed as the icons are referenced as URLs within the Drupal\r
+tree. The default value for this configuration option assumes the\r
+icon directory has been copied.\r
+\r
+Once configured correctly, betterAWstats statistics can be viewed in the\r
+Drupal admin location admin/bawstats.\r
+\r
+\r
+CUSTOMISING WHICH STATISTICS TO DISPLAY\r
+---------------------------------------\r
+\r
+AWstats can be configured to collect and store statistics for multiple\r
+sites in it's data directory.\r
+\r
+For privacy reasons, the BAWstats module will present and display\r
+statistics only for the domain name of the site it is running in Drupal\r
+under. For example, if the BAWstats module is running on the Drupal\r
+website http://www.example.com the module will look for AWstats data\r
+files for "example.com" (AWstats drops the "www" by default).\r
+\r
+If this is incorrect, for example, you wish the BAWstats module\r
+running on site http://www.example.com to display some other AWstats\r
+statistics (say, stats for another site, http://www.myexample.com),\r
+the default can be overridden by editing the Drupal settings.php file\r
+belonging to the www.example.com site. In the settings.php file, the\r
+$conf['bawstats_defsite'] variable can be set to the site from which\r
+to collect and display AWstats statistics. For example:\r
+\r
+$conf['bawstats_defsite'] = 'myexample.com';\r
+\r
+would configure the bawstats module to look for and display AWstats\r
+data for the domain myexample.com.\r
+\r
+The reason this is not made configurable with the other configuration\r
+settings above (i.e. via the Drupal admin pages) is that it may be\r
+deemed inappropriate that site administrators for one site can configure\r
+BAWstats to look at statistics for other sites.\r
+\r
+One of the nice features of betterAWstats is its ability to show\r
+statistics from multiple sites. This is available in the Drupal\r
+module, again, by editing the settings.php of the Drupal site for\r
+which you want bawstats to have this ability. Adding the following to\r
+a settings.php file will allow bawstats to view ALL statistics\r
+available in the AWstats data directory:\r
+\r
+$conf['bawstats_admin_access'] = 1;\r
+\r
+\r
+OTHER CUSTOMISATION\r
+-------------------\r
+\r
+Other configurations to the display of data can be made by directly\r
+editing the betterAWstats config.php.\r
+\r
+\r
+NOTICE\r
+-------\r
+\r
+This module uses one non-drupal CGI to render the world map of domain locations.\r
+No data is revealed from this CGI (as it simply builds the map image from the\r
+data it is given), but if this causes concern, it can be disabled by removing\r
+access to the file modules/render_map.inc.php\r
--- /dev/null
+REQUIREMENTS:\r
+\r
+- awstats and generated datafiles from awstats.\r
+- PHP 5.2 or above\r
+- a Webserver that can process PHP files (Apache, IIS etc)\r
+- 1MB space\r
+- A recent browser version that can properly render CSS, such as Opera 9, Firefox 2, IE 7 etc.\r
+- 1024x786 screen or larger\r
+\r
+INSTALL PROCEDURE BETTERAWSTATS:\r
+\r
+1. Extract the files into any web-accessible directory, preserving the directory structure.\r
+2. Edit the file config.php. Specially the paths to the awstats files have to be correct\r
+3. Open index.php in your browser and you should see the results.\r
+4. Under Linux, in order to use the online config editor, please make your config.php \r
+ file writable by apache:\r
+ chown apache:apache ./config.php\r
+ chmod 664 ./config.php\r
+ and set $BAW_CONF['online_config'] to true.\r
+ If your BetterAWStats installation is not protected by password, you have to make the \r
+ config.php file unwritable after you changed the settings and disable $BAW_CONF['online_config']\r
+\r
+IMPORTANT NOTES:\r
+\r
+It is STRONGLY recommended to password-protect the folder where BetterAWStats is installed\r
+SPECIALLY when using the online config editor. You can use .htaccess files for example.\r
+\r
+DAILY USE:\r
+\r
+- update your statistics as usual with awstats\r
+- Open BetterAwstats to see the statistics\r
+\r
+HOW TO ADD ADITIONAL EXTRA SECTIONS:\r
+\r
+Awstats allows to add aditional extra sections with custom stats. In order to create those,\r
+1. Please edit the file /core/extras.inc.php. Take a look at section EXTRAS_1 and copy the whole function again into the file, changing the function to show the data desired.\r
+2. Below that, please copy the $BAW_CONF_DIS_DEF section and edit the fariables according to point 1.\r
+3. Copy the respective section also in config.php and adjust the values accordingly.
\ No newline at end of file
--- /dev/null
+h2.group_title {\r
+ border: 2px solid #BBBBBB;\r
+}\r
+.group_header h2 {\r
+ background-color:#DDDDDD;\r
+ font-size:12px;\r
+ font-weight:bold;\r
+ text-align:center;\r
+ margin-top:2px;\r
+}\r
+.menu_button_inactive {\r
+ border-top:2px solid #BBBBBB;\r
+ border-left:2px solid #BBBBBB;\r
+ border-right:2px solid #BBBBBB;\r
+ padding:4px;\r
+ margin-right:3px;\r
+ margin-top:2px;\r
+ float:left;\r
+ background-color: #DDDDDD;\r
+ white-space:nowrap;\r
+ cursor:pointer;\r
+}\r
+.menu_button_active {\r
+ border-top:2px solid #BBBBBB;\r
+ border-left:2px solid #BBBBBB;\r
+ border-right:2px solid #BBBBBB;\r
+ border-bottom:2px solid #FFFFFF;\r
+ padding:4px;\r
+ margin-right:3px;\r
+ margin-top:2px;\r
+ margin-bottom:-2px;\r
+ float:left;\r
+ background-color: #FFFFFF;\r
+ white-space:nowrap;\r
+ cursor:pointer;\r
+}\r
+.menu_section_inactive {\r
+ text-align: center;\r
+ border: 3px solid #dddddd;\r
+ padding:10px;\r
+ display:none;\r
+}\r
+.menu_section_active{\r
+ text-align: center;\r
+ border: 2px solid #BBBBBB;\r
+ padding:10px;\r
+}\r
+h2.menu_section_active {\r
+ display:none;\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+ // $Id: bawstats.admin.inc,v 1.4 2008/03/18 01:07:41 tokyoahead Exp $\r
+\r
+/**\r
+ * BAWstats drupal module\r
+ *\r
+ * BAWstats is a drupal module written in php for integration of\r
+ * the BetterAWstats presentation and processing of AWstats data into drupal.\r
+ * Copyright (C) 2008 Andrew Gillies (anaru@equivocation.org)\r
+ *\r
+ * For more information about BetterAWstats see:\r
+ * http://betterawstats.com/\r
+ *\r
+ * This program is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 2 of the License, or, at\r
+ * your option, any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
+ * General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+include(drupal_get_path('module', 'bawstats') . '/includes/bawstats.config.inc');\r
+\r
+/**\r
+ * Menu callback; presents the bawstats admin settings page.\r
+ */\r
+\r
+function bawstats_admin_settings() {\r
+ global $BAW_CONF,$BAW_LIB;\r
+ $form = array();\r
+\r
+ // build the form for the settings\r
+\r
+ $form['bawstats_config'] = array(\r
+ '#type' => 'fieldset',\r
+ '#title' => t('AWstats configuration'),\r
+ '#collapsible' => TRUE,\r
+ '#collapsed' => FALSE,\r
+ '#weight' => -1\r
+ );\r
+ $form['bawstats_config']['bawstats_data'] = array(\r
+ '#type' => 'textfield',\r
+ '#size' => 40,\r
+ '#maxlength' => 80,\r
+ '#title' => t('AWstats data directory'),\r
+ '#default_value' => variable_get('bawstats_data',''),\r
+ '#description' => t('Set this value to the directory where AWStats saves its database files into. No trailing slash.'),\r
+ '#weight' => -3\r
+ );\r
+ $form['bawstats_config']['bawstats_lib'] = array(\r
+ '#type' => 'textfield',\r
+ '#title' => t('AWstats library directory'),\r
+ '#size' => 40,\r
+ '#maxlength' => 80,\r
+ '#default_value' => variable_get('bawstats_lib',''),\r
+ '#description' => t('Set this value to the directory where the AWStats library files are located (the "lib" directory under the AWstats tree). No trailing slash.'),\r
+ '#weight' => -2\r
+ );\r
+ $form['bawstats_config']['bawstats_lang'] = array(\r
+ '#type' => 'textfield',\r
+ '#title' => t('AWstats language directory'),\r
+ '#size' => 40,\r
+ '#maxlength' => 80,\r
+ '#default_value' => variable_get('bawstats_lang',''),\r
+ '#description' => t('Set this value to the directory where the AWStats language files are located (the "lang" directory under the AWstats tree). No trailing slash.'),\r
+ '#weight' => -1\r
+ );\r
+ $bawstats_path = drupal_get_path('module', 'bawstats');\r
+ $form['bawstats_config']['bawstats_icon'] = array(\r
+ '#type' => 'textfield',\r
+ '#title' => t('AWstats icon directory'),\r
+ '#size' => 40,\r
+ '#maxlength' => 80,\r
+ '#default_value' => variable_get('bawstats_icon','/' . $bawstats_path . '/icon'),\r
+ '#description' => t('Set this value to the URL where AWStats icons can be obtained. Note, as this is used for icon URLs, this must be in web file space. The default is to copy the icons to a directory called "icon" in the toplevel of the BAWstats module directory') . ' (' . $bawstats_path . '/icon).',\r
+ '#weight' => 0\r
+ );\r
+ $form['bawstats_settings'] = array(\r
+ '#type' => 'fieldset',\r
+ '#title' => t('BAWstats general settings'),\r
+ '#collapsible' => TRUE,\r
+ '#collapsed' => TRUE,\r
+ '#weight' => 0\r
+ );\r
+ $form['bawstats_settings']['bawstats_page_view'] = array(\r
+ '#type' => 'checkbox',\r
+ '#title' => t('Split page view'),\r
+ '#default_value' => variable_get('bawstats_page_view',0),\r
+ '#description' => t('By default statistics for a single month are displayed on a single large page. Selecting this option splits the page into multiple sub-views.'),\r
+ '#weight' => 1\r
+ );\r
+ // turn off display controle if we are not yet configured\r
+ //if ($configured==0) $form['bawstats_settings']['bawstats_page_view']['#disabled']=TRUE;\r
+\r
+ $form['buttons']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration') );\r
+ $form['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset to defaults') );\r
+\r
+ if (!empty($_POST) && form_get_errors()) {\r
+ drupal_set_message(t('The settings have not been saved because of the errors.'), 'error');\r
+ }\r
+\r
+ $form['#submit'][] = 'bawstats_admin_settings_submit';\r
+ $form['#theme'] = 'system_settings_form';\r
+\r
+ return $form;\r
+}\r
+\r
+function _bawstats_remove_slash($path) {\r
+ if (substr($path,strlen($path)-1,1)=='/') return substr($path,0,strlen($path)-1);\r
+ return $path;\r
+}\r
+\r
+function bawstats_admin_settings_validate($form, &$form_state) {\r
+ global $BAW_CONF,$BAW_LIB,$BAW_CONF_DIS_DEF;\r
+ $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';\r
+\r
+ if ($op!=t('Reset to defaults')) {\r
+ // check the key paths\r
+\r
+ $settingOK = TRUE;\r
+ $data_dir = _bawstats_remove_slash($form_state['values']['bawstats_data']);\r
+\r
+ if (is_dir($data_dir)) {\r
+ if (!is_readable($data_dir)) {\r
+ form_set_error('bawstats_data', t('AWstats data directory "') . $data_dir . t('" is not accessible.'));\r
+ $settingOK = FALSE;\r
+ }\r
+ } else {\r
+ form_set_error('bawstats_data', t('AWstats data location "') . $data_dir . t('" is not a directory.'));\r
+ $settingOK = FALSE;\r
+ }\r
+\r
+ if (!$settingOK) variable_del('bawstats_data'); // this is evil doing this in validate, but ensures clean fall-over\r
+\r
+ $settingOK = TRUE;\r
+ $lib_dir = _bawstats_remove_slash($form_state['values']['bawstats_lib']);\r
+\r
+ if (is_dir($lib_dir)) {\r
+ if (is_readable($lib_dir)) {\r
+ // directory is there and readable, so check it contains the AWstats lib stuff\r
+ if (!is_readable($lib_dir.'/domains.pm')) {\r
+ form_set_error('bawstats_lib', t('AWstats library directory "') . $lib_dir . t('" does not contain the necessary library files?'));\r
+ $settingOK = FALSE;\r
+ }\r
+ } else {\r
+ form_set_error('bawstats_lib', t('AWstats library directory "') . $lib_dir . t('" is not accessible.'));\r
+ $settingOK = FALSE;\r
+ }\r
+ } else {\r
+ form_set_error('bawstats_lib', t('AWstats library location "') . $lib_dir . t('" is not a directory.'));\r
+ $settingOK = FALSE;\r
+ }\r
+\r
+ if (!$settingOK) variable_del('bawstats_lib'); // this is evil doing this in validate, but ensures clean fall-over\r
+\r
+ $settingOK = TRUE;\r
+ $lang_dir = _bawstats_remove_slash($form_state['values']['bawstats_lang']);\r
+\r
+ if (is_dir($lang_dir)) {\r
+ if (is_readable($lang_dir)) {\r
+ // directory is there and readable, so check it contains the AWstats lib stuff\r
+ if (!is_readable($lang_dir.'/awstats-en.txt')) {\r
+ form_set_error('bawstats_lang', t('AWstats library directory "') . $lang_dir . t('" does not contain the necessary language files?'));\r
+ $settingOK = FALSE;\r
+ }\r
+ } else {\r
+ form_set_error('bawstats_lang', t('AWstats language directory "') . $lang_dir . t('" is not accessible.'));\r
+ $settingOK = false;\r
+ }\r
+ } else {\r
+ form_set_error('bawstats_lang', t('AWstats language location "') . $lang_dir . t('" is not a directory.'));\r
+ $settingOK = FALSE;\r
+ }\r
+\r
+ if (!$settingOK) variable_del('bawstats_lang'); // this is evil doing this in validate, but ensures clean fall-over\r
+ }\r
+}\r
+\r
+\r
+function bawstats_admin_settings_submit($form, &$form_state) {\r
+ global $BAW_CONF,$BAW_LIB,$BAW_CONF_DIS_DEF;\r
+ $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';\r
+\r
+ // Exclude unnecessary elements.\r
+ unset($form_state['values']['submit'], $form_state['values']['reset'], $form_state['values']['form_id'], $form_state['values']['op'], $form_state['values']['form_token']);\r
+\r
+ foreach ($form_state['values'] as $key => $value) {\r
+ if ($op == t('Reset to defaults')) {\r
+ variable_del($key);\r
+ }\r
+ else {\r
+ if (is_array($value) && isset($form_state['values']['array_filter'])) {\r
+ $value = array_keys(array_filter($value));\r
+ }\r
+ // Test the key is correct:\r
+\r
+ if ($key == 'bawstats_data') {\r
+ // assume validation has taken care of testing for directory/readable\r
+ $value = _bawstats_remove_slash($value);\r
+ // do some further checking\r
+ $count = count(glob($value . "/*.txt"));\r
+ if ($count==0) drupal_set_message(t('Warning, the AWstats data directory "') . $value . t('" does not contain any text data files'),'warning');\r
+ }\r
+\r
+ if ($key == 'bawstats_lib') {\r
+ // assume validation has taken care of testing for directory/readable\r
+ $value = _bawstats_remove_slash($value);\r
+ }\r
+\r
+ if ($key == 'bawstats_lang') {\r
+ // assume validation has taken care of testing for directory/readable\r
+ $value = _bawstats_remove_slash($value);\r
+ }\r
+\r
+ if ($key == 'bawstats_icon') {\r
+ // assume validation has taken care of testing for directory/readable\r
+ $value = _bawstats_remove_slash($value);\r
+ $testvalue = substr($value,1);\r
+ // do some further checking\r
+ if (is_dir($testvalue)) {\r
+ if (is_readable($testvalue)) {\r
+ // directory is there and readable, so check it contains the AWstats lib stuff\r
+ if (!is_readable($testvalue.'/browser')) {\r
+ drupal_set_message(t('Warning, the AWstats icon path "') . $value . t('" does not appear to contain icon directories.'),'warning');\r
+ }\r
+ } else {\r
+ drupal_set_message(t('Warning, the AWstats icon path "') . $value . t('" is not accessible.'),'warning');\r
+ }\r
+ } else {\r
+ drupal_set_message(t('Warning, the AWstats icon path "') . $value . t('" is not a directory.'),'warning');\r
+ }\r
+ }\r
+\r
+ // set the actual variable\r
+ variable_set($key, $value);\r
+ }\r
+ }\r
+\r
+ if ($op == t('Reset to defaults')) {\r
+ drupal_set_message(t('The configuration options have been reset to their default values.'));\r
+ }\r
+ else {\r
+ drupal_set_message(t('The configuration options have been saved.'));\r
+ }\r
+\r
+ // can only get this if configured\r
+ if ((strlen($BAW_CONF['path_data'])>0)&&(strlen($BAW_CONF['path_lib'])>0)&&(strlen($BAW_CONF['path_lang'])>0)) {\r
+ // create the stat groups var in case they are wanted post configuration!\r
+ $statgroups = array();\r
+ foreach ($BAW_LIB['item_groups'] as $group => $group_details) {\r
+ $statgroups[check_plain($group)] = check_plain($group_details['title']);\r
+ }\r
+ variable_set('bawstats_groups',$statgroups);\r
+\r
+ // similarly with the stat sections\r
+ $statsections = array();\r
+ foreach ($BAW_CONF_DIS_DEF as $key => $value) {\r
+ $statgroups[] = $key;\r
+ }\r
+ variable_set('bawstats_sections',$statsections);\r
+ }\r
+\r
+ menu_rebuild();\r
+}\r
--- /dev/null
+<?php\r
+ // $Id: bawstats.config.inc,v 1.4 2008/03/18 01:07:41 tokyoahead Exp $\r
+\r
+/**\r
+ * BAWstats drupal module\r
+ *\r
+ * BAWstats is a drupal module written in php for integration of\r
+ * the BetterAWstats presentation and processing of AWstats data into drupal.\r
+ * Copyright (C) 2008 Andrew Gillies (anaru@equivocation.org)\r
+ *\r
+ * For more information about BetterAWstats see:\r
+ * http://betterawstats.com/\r
+ *\r
+ * This program is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 2 of the License, or, at\r
+ * your option, any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
+ * General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+$bawstats_path = drupal_get_path('module', 'bawstats');\r
+\r
+/**\r
+ * beterawstats globals and libraries\r
+ *\r
+ */\r
+\r
+// global vars\r
+global $BAW_LOGTYPE, $BAW_CURR, $BAW_MES, $BAW_LIB, $BAW_CONF_DEF, $BAW_CONF_DIS_DEF, $BAW_D;\r
+global $BAW_CONF, $BAW_CONF_DIS, $BAW_DFILES, $BAW_SERVERS;\r
+\r
+$BAW_CONF = array(); // holds all the configuration info\r
+\r
+include_once($bawstats_path . '/config.php');\r
+$BAW_CONF['site_path'] = $bawstats_path;\r
+$BAW_CONF['max_percent'] = 'layout_percent';\r
+$BAW_CONF['max_bytes'] = 'layout_bytes';\r
+$BAW_CONF['online_config'] = false;\r
+$BAW_CONF['drupal_base'] = 'admin/reports/bawstats';\r
+\r
+// get configuration from drupal variables (not from the config.php) for key locations\r
+$BAW_CONF['path_data'] = variable_get('bawstats_data','');\r
+$BAW_CONF['path_lib'] = variable_get('bawstats_lib','');\r
+$BAW_CONF['path_lang'] = variable_get('bawstats_lang','');\r
+$BAW_CONF['icons_url'] = variable_get('bawstats_icon','/' . $bawstats_path . '/icon');\r
+\r
+// drupal map\r
+$BAW_CONF_DIS['domains']['map'] = true;\r
+\r
+$BAW_LOGTYPE = 'W';\r
+$BAW_D = array();\r
+$BAW_CURR = array();\r
+$BAW_CURR['thismonth'] = array('hits'=> 0);\r
+$BAW_MES = array();\r
+$BAW_DFILES = array(); // data files\r
+$BAW_SERVERS = array(); // this will be populates with the servers for the config\r
+\r
+if (!defined ('XHTML')) {\r
+ if ($BAW_CONF['xhtml']) {\r
+ define('XHTML', ' /');\r
+ } else {\r
+ define('XHTML', '');\r
+ }\r
+}\r
+if (!defined ('BR')) {\r
+ define('BR', '<br'.XHTML.'>');\r
+}\r
+\r
+// check we are configured...\r
+if ((strlen($BAW_CONF['path_data'])>0)&&(strlen($BAW_CONF['path_lib'])>0)&&(strlen($BAW_CONF['path_lang'])>0)) {\r
+ include_once($bawstats_path . '/core/helpers.inc.php');\r
+ include_once($bawstats_path . '/modules/render_htmlchart.inc.php');\r
+ include_once($bawstats_path . '/modules/render_table.inc.php');\r
+ include_once($bawstats_path . '/modules/render_jpgraph.inc.php');\r
+ include_once($bawstats_path . '/modules/render_map.inc.php');\r
+ include_once($bawstats_path . '/core/data.inc.php');\r
+ include_once($bawstats_path . '/core/language.inc.php');\r
+ baw_language();\r
+ include_once($bawstats_path . '/core/display_helpers.php');\r
+\r
+ if (!isset($BAW_MES['e'])) {\r
+ $BAW_MES['e'] = 'utf-8';\r
+ }\r
+\r
+ //baw_check_config();\r
+ include_once($bawstats_path . '/core/library.inc.php');\r
+\r
+ include_once($bawstats_path . '/core/display.inc.php');\r
+ include_once($bawstats_path . '/core/extras.inc.php');\r
+\r
+ // add language-dependent library values\r
+ $BAW_LIB['domains']['unknown'] = $BAW_MES[0];\r
+ $BAW_LIB['domains']['ip'] = $BAW_MES[0];\r
+ $BAW_LIB['os']['list']['Unknown'] = $BAW_MES[0];\r
+ $BAW_LIB['browser']['names']['Unknown'] = $BAW_MES[0];\r
+ $BAW_LIB['browser']['icons']['Unknown'] = 'unknown';\r
+ include_once($bawstats_path . '/core/config_default.inc.php');\r
+}\r
+\r
+$BAW_CONF['site_url'] = '/admin/bawstats';\r
+\r
+// ensure the baw backend knows we are drupal\r
+$BAW_CONF['module'] = 'drupal';\r
+\r
+unset($bawstats_path);\r
--- /dev/null
+
+.baw-content table {
+ font-size: 0.9em;
+ margin: 0px auto;
+ border-collapse: separate;
+}
+.baw-content td, th {
+ padding-left:2px;
+ padding-right:2px;
+ padding-bottom:1px;
+ padding-top:1px;
+}
+.baw-content th {
+ padding: 0 5px 0 5px;
+ text-align:center;
+}
+.baw-content tbody {
+ border:0px;
+}
+.baw-content tbody th {
+ border:0px;
+}
+.baw-content img {
+ margin: 0px;
+ padding: 0px;
+ border:0px;
+}
+.baw-content .chartcell {
+ padding:2px;
+ vertical-align:bottom;
+ white-space: nowrap;
+ text-align:center;
+}
+.baw-content .charttable {
+ margin-bottom: 10px;
+ margin-top:8px;
+ white-space: nowrap;
+}
+.baw-content .datatable {
+ background-color:#eeeeee;
+}
+.baw-content .datatable tr{
+ background-color:#ffffff;
+}
+.baw-content .chartlegend {
+ background-color:#eeeeee;
+ font-size: 0.9em;
+ border: none;
+}
+.baw-content div.aws_data{
+ text-align: center;
+ border: 1px solid #dddddd;
+ margin-bottom: 15px;
+ padding:5px;
+}
+.baw-content .aligncenter {
+ text-align:center;
+}
+.baw-content .alignright {
+ text-align:right;
+}
+.baw-content .alignleft {
+ text-align:left;
+}
+
+.baw-content .others {
+ color:grey;
+}
+
+.baw-content th.layout_text {
+ background-color: #ECECEC;
+}
+.baw-content th.layout_visitors{
+ background-color: #FFAA66;
+}
+.baw-content th.layout_visits {
+ background-color: #F4F090;
+}
+.baw-content th.layout_pages {
+ background-color: #4477DD;
+}
+.baw-content th.layout_hits {
+ background-color: #66DDEE;
+}
+.baw-content th.layout_percent {
+ background-color: #ECECEC;
+}
+.baw-content th.layout_bytes {
+ background-color: #2EA495;
+}
+.baw-content td.layout_text {
+ text-align:left;
+}
+.baw-content tr.layout_avg td,
+.baw-content tr.layout_sum td{
+ background-color: #CCCCCC;
+}
+.baw-content td.layout_bytes ,
+.baw-content td.layout_hits ,
+.baw-content td.layout_pages ,
+.baw-content td.layout_visits ,
+.baw-content td.layout_visitors ,
+.baw-content td.layout_percent {
+ text-align:right;
+}
+.baw-content .currentday{
+ font-weight:bold;
+}
+.baw-content tr.weekend,
+.baw-content td.weekend {
+ background-color:#DDDDCC;
+}
+
+.baw-content .conf_setting{
+ clear:both;
+ border:1px solid grey;
+ padding: 2px;
+ margin: 2px;
+}
+.baw-content .default {
+ color:blue;
+}
+.baw-content .small {
+ font-size:0.9em;
+ font-weight:normal;
+}
+.baw-content .percent_button {
+ width:9px;
+ text-align:center;
+ border:grey 1px solid;
+ position:absolute;
+ bottom:0px;
+ right:-8px;
+ font-size:0.9em;
+}
+
+.baw-content .header_wrap {
+ position:relative;
+}
+
+.baw-map {
+ text-align: center;
+}
--- /dev/null
+<?php\r
+ // $Id: bawstats.stats.inc,v 1.5 2008/03/18 01:07:41 tokyoahead Exp $\r
+\r
+/**\r
+ * BAWstats drupal module\r
+ *\r
+ * BAWstats is a drupal module written in php for integration of\r
+ * the BetterAWstats presentation and processing of AWstats data into drupal.\r
+ * Copyright (C) 2008 Andrew Gillies (anaru@equivocation.org)\r
+ *\r
+ * For more information about BetterAWstats see:\r
+ * http://betterawstats.com/\r
+ *\r
+ * This program is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 2 of the License, or, at\r
+ * your option, any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
+ * General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+include(drupal_get_path('module', 'bawstats') . '/includes/bawstats.config.inc');\r
+\r
+/**\r
+ * Form for the bawstats\r
+ */\r
+\r
+function bawstats_view_selection() {\r
+ global $BAW_CURR,$BAW_CONF,$BAW_DFILES;\r
+ $site_OK = True;\r
+ $date_OK = True;\r
+\r
+ $site_access = variable_get('bawstats_admin_access', 0);\r
+\r
+ // check we are configured...\r
+ if ((strlen($BAW_CONF['path_data'])>0)&&(strlen($BAW_CONF['path_lib'])>0)&&(strlen($BAW_CONF['path_lang'])>0)) {\r
+\r
+ // recall the site we are looking at from the SESSION\r
+ if (isset($_SESSION['bawstats'])) {\r
+ $BAW_CURR['site_name'] = $_SESSION['bawstats']['site_name'];\r
+ } else {\r
+ // its not set in the session, so set it here to the default (and record it in the session for the future)\r
+ $oursite = $_SERVER['HTTP_HOST'];\r
+ if (strpos(strtolower($oursite),"www.")===0) $oursite = substr($oursite,4); // remove www. if any\r
+ // this can be overriden only in the settings.php file using conf\r
+ $BAW_CURR['site_name'] = variable_get('bawstats_defsite',$oursite);\r
+ $_SESSION['bawstats']['site_name'] = $BAW_CURR['site_name'];\r
+ }\r
+\r
+ // record what was requested before checks so we can make a nice message\r
+ $rec_year = $BAW_CURR['year'];\r
+ $rec_month = $BAW_CURR['month'];\r
+\r
+ // sanity check on date data:\r
+ if ((!is_numeric($BAW_CURR['month']))||(intval($BAW_CURR['month'])<1)||(intval($BAW_CURR['month'])>12)) {\r
+ $site_OK = False;\r
+ $date_OK = False;\r
+ // drupal_set_message(t('Invalid month %name.', array('%name' => $BAW_CURR['month'])));\r
+ $BAW_CURR['month'] = '01';\r
+ }\r
+ $curyear = date('Y');\r
+ if ((!is_numeric($BAW_CURR['year']))||(intval($BAW_CURR['year'])>intval($curyear))) {\r
+ $site_OK = False;\r
+ $date_OK = False;\r
+ //drupal_set_message(t('Invalid year %name.', array('%name' => $BAW_CURR['year'])));\r
+ $BAW_CURR['year'] = $curyear;\r
+ }\r
+\r
+ // $BAW_CURR['monthyear'] = $BAW_CURR['month'].$BAW_CURR['year'];\r
+ $BAW_CURR['yearmonth'] = $BAW_CURR['year'].$BAW_CURR['month'];\r
+\r
+ // set key request variables in the session for use in the, only if sane!\r
+ if ($site_OK) {\r
+ $_SESSION['bawstats']['month'] = $BAW_CURR['month'];\r
+ $_SESSION['bawstats']['year'] = $BAW_CURR['year'];\r
+ }\r
+\r
+ baw_match_files();\r
+\r
+ // some simple validation\r
+ if (count($BAW_DFILES)>0) {\r
+\r
+ // build a 'stats selection' form\r
+ $form['bawstats'] = array(\r
+ '#type' => 'fieldset',\r
+ '#title' => t('Statistics selection'),\r
+ '#prefix' => '<div class="container-inline">',\r
+ '#suffix' => '</div>'\r
+ );\r
+\r
+ // check year is in list of options:\r
+\r
+ // FIX, this doesn't work - range of years is nolonger filled, as baw_match_files doesn't do it!\r
+ if (!isset($BAW_CURR['years'][$BAW_CURR['year']])) {\r
+ $site_OK = False;\r
+ drupal_set_message(t('No data for year %name.', array('%name' => $BAW_CURR['year'])));\r
+ $BAW_CURR['year'] = $curyear;\r
+ // re-read data for current year, so that the forms are correctly built\r
+ // need new function! baw_read_data();\r
+ }\r
+\r
+ $options = bawstats_sites_dropdown();\r
+\r
+ // make sure stats exist for this site\r
+ if ((!isset($options[$BAW_CURR['site_name']])) &&\r
+ (!(($BAW_CURR['site_name']=='all_days')||($BAW_CURR['site_name']=='all_months')))) $site_OK = False;\r
+\r
+ // only admin has the option of sites\r
+ if ($site_access>0) {\r
+ if (count($options) == 1 ) {\r
+ $BAW_CURR['site_name'] = $options[0];\r
+ }\r
+ $form['bawstats']['site'] = array(\r
+ '#type' => 'select',\r
+ '#options' => $options,\r
+ '#default_value' => $BAW_CURR['site_name']\r
+ );\r
+ }\r
+\r
+ $options = bawstats_months_dropdown();\r
+\r
+ $form['bawstats']['month'] = array(\r
+ '#type' => 'select',\r
+ '#options' => $options,\r
+ '#default_value' => $BAW_CURR['months'][$BAW_CURR['month']]\r
+ );\r
+\r
+ $form['bawstats']['year'] = array(\r
+ '#type' => 'select',\r
+ '#options' => $BAW_CURR['years'],\r
+ '#default_value' => $BAW_CURR['year']\r
+ );\r
+\r
+ $form['bawstats']['submit'] = array(\r
+ '#type' => 'submit',\r
+ '#value' => t('View')\r
+ );\r
+ } else $site_OK = False;\r
+\r
+ if ($site_OK) {\r
+ $form['bawstats_results'] = array(\r
+ '#value' => bawstats_display()\r
+ );\r
+ } else {\r
+ if ($date_OK) {\r
+ $form['bawstats_results'] = array(\r
+ '#value' => "No statistics found for site <em>" . $BAW_CURR['site_name'] . "</em> " . $rec_month . "/" . $rec_year\r
+ );\r
+ } else {\r
+ $form['bawstats_results'] = array(\r
+ '#value' => "No statistics found for site <em>" . $BAW_CURR['site_name'] . "</em> "\r
+ );\r
+ }\r
+\r
+ }\r
+ } else {\r
+ $form['bawstats_results'] = array(\r
+ '#value' => 'No statistics found. Please check the <a href="settings/bawstats">configuration</a> of the AWstats data, library and language locations.'\r
+ );\r
+ }\r
+\r
+ return $form;\r
+}\r
+\r
+function bawstats_view_theform($month='-1',$year='-1',$section='') {\r
+ global $BAW_CURR, $BAW_CONF_DIS_DEF, $BAW_CONF, $BAW_LIB;\r
+\r
+ // get configuration from drupal variables\r
+ $BAW_CONF['path_data'] = variable_get('bawstats_data','');\r
+ $BAW_CONF['path_lib'] = variable_get('bawstats_lib','');\r
+ $BAW_CONF['path_lang'] = variable_get('bawstats_lang','');\r
+\r
+ if (is_numeric($year) && is_numeric($month)) {\r
+ if (intval($month)>=0) {\r
+ //bawstats_view_selection will check validity of month\r
+ $BAW_CURR['month'] = $month;\r
+ } else {\r
+ $BAW_CURR['month'] = date('m');\r
+ }\r
+\r
+ if (intval($year)>=0) {\r
+ //bawstats_view_selection will check validity of year\r
+ $BAW_CURR['year'] = $year;\r
+ } else {\r
+ $BAW_CURR['year'] = date('Y');\r
+ }\r
+ }\r
+\r
+ if (strlen($section)>1) {\r
+ // validate sections (ignore all that are not recognised from the default configuration)\r
+ $found = False;\r
+ // NOTE, must ensure group and section names are different!\r
+ // first, is it a group?\r
+ foreach ($BAW_LIB['item_groups'] as $group => $group_details) {\r
+ if ($section==check_plain($group)) {\r
+ $found = True;\r
+ break;\r
+ }\r
+ }\r
+ if ($found) $BAW_CURR['drupal_group'] = $section;\r
+ else {\r
+ // second, is it a section\r
+ foreach ($BAW_CONF_DIS_DEF as $key => $value) {\r
+ if ($section==$key) {\r
+ $found = True;\r
+ break;\r
+ }\r
+ }\r
+ if ($found) $BAW_CURR['drupal_section'] = $section;\r
+ }\r
+ }\r
+ return drupal_get_form('bawstats_view_selection');\r
+}\r
+\r
+/**\r
+ * set the desired viewing section using the current view\r
+ */\r
+\r
+function bawstats_set_section($section='') {\r
+ global $BAW_CONF;\r
+\r
+ $month = '0';\r
+ $year = '0';\r
+\r
+ if (isset($_SESSION['bawstats'])) {\r
+ if (isset($_SESSION['bawstats']['month'])) $month = $_SESSION['bawstats']['month'];\r
+ if (isset($_SESSION['bawstats']['year'])) $year = $_SESSION['bawstats']['year'];\r
+ }\r
+\r
+ if ((strlen($section)>1)&&(intval($month)>0)&&(intval($year)>0)) drupal_goto($BAW_CONF['drupal_base'] . '/' . $section . '/' . $month . '/' . $year);\r
+ else drupal_goto('admin/bawstats');\r
+}\r
+\r
+/**\r
+ * perform the chosen display settings\r
+ */\r
+\r
+function bawstats_view_selection_submit($form, &$form_state) {\r
+ global $BAW_CURR, $BAW_MES, $BAW_LIB, $BAW_CONF;\r
+\r
+ $site_access = variable_get('bawstats_admin_access', 0);\r
+\r
+ $form_values = $form_state['values'];\r
+\r
+ if (isset($form_values['year'])) {\r
+ $year = $form_values['year'];\r
+ } else {\r
+ $year = date('Y');\r
+ }\r
+\r
+ if (isset($form_values['month'])) {\r
+ $month = array_search($form_values['month'],$BAW_CURR['months']);\r
+ } else {\r
+ $month = date('m');\r
+ }\r
+\r
+ if ($site_access>0) {\r
+ // ensure we are allowed to change sites\r
+ if (isset($form_values['site'])) {\r
+ // alter the session site record\r
+ $_SESSION['bawstats']['site_name'] = $form_values['site'];\r
+ }\r
+ }\r
+\r
+ if (variable_get('bawstats_page_view',0)==0) $redirect = $BAW_CONF['drupal_base'] . '/all/' . $month . '/' . $year;\r
+ else {\r
+ $statgroups = variable_get('bawstats_groups',array());\r
+ $keys = array_keys($statgroups);\r
+ $redirect = $BAW_CONF['drupal_base'] . '/' . $keys[0] . '/' . $month . '/' . $year;\r
+ }\r
+ $form_state['redirect'] = $redirect;\r
+}\r
+\r
+/**\r
+ * mirror function to betterawstats baw_sites_dropdown() [core/display_helpers.php]\r
+ */\r
+\r
+function bawstats_sites_dropdown() {\r
+ global $BAW_CURR,$BAW_DFILES, $BAW_MES;\r
+ $sites = array();\r
+\r
+ $detected = array_keys($BAW_DFILES);\r
+ $site_access = variable_get('bawstats_admin_access', 0);\r
+\r
+ if (count($detected)>0) {\r
+ foreach ($detected as $site) {\r
+ $sites[$site] = $site;\r
+ }\r
+ if ($site_access>0) {\r
+ # add the "all" options\r
+ $sites['all_months'] = $BAW_MES['all_months'];\r
+ $sites['all_days'] = $BAW_MES['all_days'];\r
+ }\r
+ } // else there is a problem - no sites data!\r
+\r
+ return $sites;\r
+}\r
+\r
+/**\r
+ * mirror function to betterawstats baw_date_dropdown()\r
+ */\r
+\r
+function bawstats_months_dropdown() {\r
+ global $BAW_CURR, $BAW_MES;\r
+\r
+ $months = array();\r
+\r
+ foreach ($BAW_CURR['months'] as $month) {\r
+ $months[$month] = $month;\r
+ }\r
+ return $months;\r
+}\r
+\r
+/**\r
+ * perform the display, main calls to the betterawstats library\r
+ *\r
+ */\r
+\r
+function bawstats_display() {\r
+ global $BAW_CURR, $BAW_LIB;\r
+\r
+ $out = "<div class=\"contentbox\">\n";\r
+\r
+ if (@$BAW_CURR['site_name'] == 'all_months') {\r
+ $settings['section'] = "months";\r
+ $out .= baw_display_drupal($settings);\r
+ } else if (@$BAW_CURR['site_name'] == 'all_days') {\r
+ $settings['section'] = "days";\r
+ $out .= baw_display_drupal($settings);\r
+ } else if (@strlen($BAW_CURR['drupal_section'])>1) {\r
+ $settings['section'] = $BAW_CURR['drupal_section'];\r
+ $out .= baw_display_drupal($settings);\r
+ } else {\r
+ if (variable_get('bawstats_page_view',0)>0) { // sub-pages\r
+ if (@strlen($BAW_CURR['drupal_group'])>1) {\r
+ $settings['group'] = $BAW_CURR['drupal_group'];\r
+ } else {\r
+ // as we are in multi-page view, produce the first entry only\r
+ $groupkeys = array_keys($BAW_LIB['item_groups']);\r
+ $settings['group'] = $groupkeys[0];\r
+ }\r
+ $out .= baw_display_drupal($settings);\r
+ } else $out .= baw_display_drupal();\r
+ }\r
+\r
+ $out .= "</div>\n";\r
+\r
+ return $out;\r
+}\r
+\r
+/**\r
+ * mirror function to, and based on, betterawstats baw_display_index()\r
+ */\r
+\r
+function baw_display_drupal($settings = array()) {\r
+ global $BAW_CONF, $BAW_CONF_DIS, $BAW_CONF_DIS_DEF, $BAW_D, $BAW_MES, $BAW_CURR, $BAW_LIB, $BAW_DFILES;\r
+\r
+ // sort the charts according to order in config\r
+ $BAW_CONF_DIS = baw_array_sorting($BAW_CONF_DIS, 'order', SORT_ASC);\r
+\r
+ // ---------- CONTENT BOX --------------------------------------------------\r
+ // create the main content\r
+ $content = "<div class=\"baw-content\">\n";\r
+ $nodata = 0;\r
+\r
+ if (isset($settings['section'])) {\r
+ $section = $settings['section'];\r
+ $function = "baw_display_$section";\r
+ $temp_conf = $BAW_CONF_DIS[$section];\r
+ $temp_conf['top_x'] = false;\r
+ $temp_conf['chart'] = false;\r
+ $temp_conf['table'] = true;\r
+ if (($section == 'months') || ($section == 'days')){\r
+ $temp_conf['chart'] = true;\r
+ $temp_conf['table'] = false;\r
+ } else {\r
+ $temp_conf['chart'] = false;\r
+ $temp_conf['table'] = true;\r
+ }\r
+ $temp_conf['name'] = $BAW_CONF_DIS_DEF[$section]['name'];\r
+ if (function_exists($function)) {\r
+ $stats_html .= $function($temp_conf);\r
+ if ((strlen($stats_html)> 1) || (!$BAW_CONF['hideempty'])) {\r
+ $content .= $stats_html;\r
+ $nodata += 1;\r
+ }\r
+ }\r
+ if ($nodata==0) {\r
+ $content .= 'No data found for site <em>'.$BAW_CURR['site_name'].'</em> during '.$BAW_CURR['month'].'/'.$BAW_CURR['year'];\r
+ }\r
+ } else {\r
+ $singlegroup = false;\r
+ if (isset($settings['group'])) {\r
+ $showonly = $settings['group'];\r
+ $singlegroup = true;\r
+ } else $showonly = '';\r
+ $content .= "\n<!-- CONTENT START ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ foreach ($BAW_LIB['item_groups'] as $group => $group_details) {\r
+ if (($showonly==$group)||($showonly=='')) {\r
+ $group_items = $group_details['members'];\r
+ $has_overview = in_array('overview',$group_items);\r
+ if ($singlegroup&&(!$has_overview)) {\r
+ // pretend to display the overview, as it sets some BAW_CURR variables that may be needed\r
+ // by other groups (namely, session)\r
+ $sect_data = $BAW_CONF_DIS['overview'];\r
+ $sect_data['name'] = 'overview';\r
+ $junk = baw_display_overview($sect_data);\r
+ }\r
+ $menubuttons = '';\r
+ $stats_section = '';\r
+ $item_id = 0;\r
+ $count_members = count($group_details['members']);\r
+ $content .= "\n<!-- GROUP $group START ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+\r
+ foreach ($group_details['members'] as $item) {\r
+ $sect_data = $BAW_CONF_DIS[$item];\r
+ $sect_data['name'] = $item;\r
+ //if ($item == 'weekdays' && !isset($BAW_CURR['wdays']['count'])) {\r
+ // $setarr = array('collapse' => false, 'chart' => false,'table' => false);\r
+ // baw_display_weekdays($setarr);\r
+ //}\r
+ $class = 'aws_data';\r
+ $function = "baw_display_$item";\r
+ $title = $BAW_CONF_DIS_DEF[$item]['name'];\r
+ if (($sect_data['show'] == true)&&(function_exists($function))) {\r
+ $stats_html = $function($sect_data);\r
+ if ((strlen($stats_html)> 1) || (!$BAW_CONF['hideempty'])) {\r
+ $stats_section .= "\n<!-- ITEM {$title} START from function {$item}++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ $collapse = false;\r
+ $name = "{$group}_$item_id";\r
+ $stats_section .= "<h3 class=\"$class\" id=\"h2_$name\">$title</h3>\n"\r
+ . "<div class=\"$class\" id=\"box_$name\"$show>\n"\r
+ . $stats_html\r
+ . "</div>";\r
+ $stats_section .= "\n<!-- ITEM $title END ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ }\r
+ }\r
+ $item_id++;\r
+ }\r
+ if ((strlen($stats_section)> 1) || (!$BAW_CONF['hideempty'])) {\r
+ $content .= '<h2>' . $group_details['title'] . '</h2>';\r
+ $content .= $stats_section;\r
+ $nodata +=1;\r
+ }\r
+ $content .= "\n<!-- GROUP $group END ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ }\r
+ }\r
+ $content .= "\n<!-- CONTENT END ++++++++++++++++++++++++++++++++++++++ -->\n";\r
+ if ($nodata==0) {\r
+ $content .= 'No data found for site <em>'.$BAW_CURR['site_name'].'</em> during '.$BAW_CURR['month'].'/'.$BAW_CURR['year'];\r
+ }\r
+ }\r
+ $content .= "</div>";\r
+ return $content;\r
+ // return filter_xss($content, array('a', 'em', 'strong', 'cite', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'table', 'td', 'tr', 'th', 'div', 'img', 'br', 'h1', 'h2', 'h3'));\r
+}\r
--- /dev/null
+<?php
+/**
+ * betterawstats - an alternative display for awstats data
+ *
+ * @author Oliver Spiesshofer, support at betterawstats dot com
+ * @copyright 2008 Oliver Spiesshofer
+ * @version 1.0
+ * @link http://betterawstats.com
+ * Based on the GPL AWStats Totals script by:
+ * Jeroen de Jong <jeroen@telartis.nl>
+ * copyright 2004-2006 Telartis
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * File contents:
+ *
+ * This file is the central gateway for all other files. It includes all required
+ * files and handles in/output from GET /POST as well as preparation of default values
+ */
+
+// var declaration
+$BAW_LOGTYPE = 'W'; // fix to weblog only for now, no email / FTP
+$BAW_CURR = array(); // holds all global values of the current session
+$BAW_CURR['thismonth'] = array('hits'=> 0);
+$BAW_CONF['max_percent'] = 'layout_percent';
+$BAW_CONF['max_bytes'] = 'layout_bytes';
+$BAW_D = array();
+$BAW_MES = array();
+$BAW_DFILES = array(); // data files
+$tmp = null; // Temp variable for all kinds of things
+
+include_once('./config.php');
+
+if ($BAW_CONF['debug']) {
+ error_reporting(E_ALL);
+ // ini_set('memory_limit','25M');
+}
+
+if (!defined ('XHTML')) {
+ if ($BAW_CONF['xhtml']) {
+ define('XHTML', ' /');
+ } else {
+ define('XHTML', '');
+ }
+}
+if (!defined ('BR')) {
+ define('BR', '<br'.XHTML.'>');
+}
+include_once('./core/helpers.inc.php');
+// define when the script was started
+if (!defined ('START_TIME')) {
+ define('START_TIME', baw_mtime());
+}
+if ($BAW_CONF['online_config'] && baw_is_writable($BAW_CONF['site_path'] . '/config.php')) {
+ include_once('./core/config.inc.php');
+}
+// start time calculation and save the first one for reference
+
+include_once('./modules/render_htmlchart.inc.php');
+include_once('./modules/render_table.inc.php');
+include_once('./modules/render_jpgraph.inc.php');
+include_once('./modules/render_map.inc.php');
+include_once('./core/data.inc.php');
+include_once('./core/language.inc.php');
+baw_language(); // this has to be b/f library & b/f baw_match_files()
+// find all the data, populate $BAW_DFILES
+$BAW_SERVERS = array(); // this will be populates with the servers for the config
+// editor. Since we need that in the config_default.inc.php, we need it even if online config is off
+
+
+include_once('./core/display_helpers.php');
+baw_match_files(); // we read all files here so we have the array for config and normal
+
+if (!isset($BAW_MES['e'])) {
+ $BAW_MES['e'] = 'utf-8';
+}
+
+baw_check_config();
+include_once('./core/library.inc.php');
+
+include_once('./core/display.inc.php');
+include_once('./core/config_default.inc.php');
+include_once('./core/extras.inc.php');
+
+
+// get input from forms
+// it is questionable if this needs to be slashed or filtered since we dont write any data
+if (isset($_GET['year'])) {
+ $BAW_CURR['year'] = $_GET['year'];
+} else {
+ $BAW_CURR['year'] = date('Y');
+}
+if (isset($_GET['month'])) {
+ $BAW_CURR['month'] = $_GET['month'];
+} else {
+ $BAW_CURR['month'] = date('m');
+}
+$BAW_CURR['day'] = date('d');
+$BAW_CURR['yearmonth'] = $BAW_CURR['year'] . $BAW_CURR['month'];
+if (isset($_GET['site'])) {
+ $BAW_CURR['site_name'] = $_GET['site'];
+}
+
+
+// add language-dependent library values
+$BAW_LIB['domains']['unknown'] = $BAW_MES[0];
+$BAW_LIB['domains']['ip'] = $BAW_MES[0];
+$BAW_LIB['os']['list']['Unknown'] = $BAW_MES[0];
+$BAW_LIB['browser']['names']['Unknown'] = $BAW_MES[0];
+$BAW_LIB['browser']['icons']['Unknown'] = 'unknown';
+
+if (isset($_REQUEST['action'])) { // used by poll and config editor
+ $action = 'baw_action_' . $_REQUEST['action'];
+ $out = $action();
+} else if (@$BAW_CURR['site_name'] == 'all_months') {
+ $settings['section'] = "months";
+ $out = baw_display_index($settings);
+} else if (@$BAW_CURR['site_name'] == 'all_days') {
+ $settings['section'] = "days";
+ $out = baw_display_index($settings);
+} else {
+ $out = baw_display_index();
+}
+
+echo $out;
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+// since we are merging this here with the message file from AWSTATS, we have to\r
+// add these internal messages to the ones from AWSTATS. Please remember NOT to\r
+// use any numeric indexes since they are used by AWSTATS.\r
+\r
+global $BAW_MES;\r
+$BAW_MES += array(\r
+\r
+ // display.inc.php\r
+ 'data_file_stats' => 'Data File Update Stats:',\r
+ 'parsed_records' => 'Verarb. Einträge:',\r
+ 'old_records' => 'Alte Einträge:',\r
+ 'new_records' => 'Neue Einträge:',\r
+ 'corrupted' => 'Ungültig:',\r
+ 'dropped' => 'Übersprungen:',\r
+ 'ratio_pages_hits' => 'Ratio'.BR.'(Zugriffe/Seiten)',\r
+ 'files_paths' => 'Dateien/Verzeichnisse',\r
+ 'user_agent' => 'User Agent',\r
+ 'size' => 'Grösse',\r
+ 'by_domains' => '%s pro Domäne',\r
+ 'visits' => 'Besuche',\r
+ 'averages' => ' (Averages)',\r
+ 'assumedscript' => 'Vermutlich Roboter/Spider',\r
+ 'weekday_averages' => $BAW_MES[91] . ' (Durschn.)',\r
+ 'hours_averages' => $BAW_MES[20] . ' (Durschn.)',\r
+ 'os_versions' => "{$BAW_MES[59]} (+{$BAW_MES[58]})",\r
+ 'browser_versions' => "{$BAW_MES[21]} (+{$BAW_MES[58]})",\r
+ 'referer_hotlinks' => 'Hotlinks',\r
+ 'hl_by_domains ' => "Hotlinks pro Domäne",\r
+ 'hotlinks_proxies' => 'Hotlinks/Proxies',\r
+\r
+ // baw_raise_error\r
+ 'baw_error' => 'BetterAWstats Fehler',\r
+ 'datafile' =>\r
+ "Daten-Datei ist fehlerhaft, Daten konnten nicht gelesen werden: %s;<br>'%s' sollte BEGIN_... sein.".BR\r
+ . "Bitte lesen sie die FAQ (/docs/FAQ.txt)",\r
+ 'datafileindex' =>\r
+ "Daten-Datei ist fehlerhaft, Daten-Index konnte nicht gelesen werden: %s;<br>'%s' sollte BEGIN_... sein.".BR\r
+ . "Bitte lesen sie die FAQ (/docs/FAQ.txt)",\r
+ 'datafilesdir' =>\r
+ "Die Daten-Dateien konnten nicht gefunden werden: %s".BR\r
+ . "Bitte überprüfen Sie die config.php. Der Wert von \$BAW_CONF['path_data'] muss "\r
+ . "auf das Verzeichnis der AWStats-Daten zeigen, "\r
+ . "typischerweise /cgi-bin/awstats/data. Bitte stellen Sie auch sicher "\r
+ . "dass PHP diesen Ordner lesen kann.",\r
+ 'languagefile' =>\r
+ "Die Sprach-Dateien konnten nicht gefunden werden: %s".BR\r
+ . "Bitte überprüfen Sie die config.php. Der Wert von \$BAW_CONF['path_lang'] muss "\r
+ . "auf das Verzeichnis der AWStats-Sprach-Dateien zeigen, "\r
+ . "typischerweise /cgi-bin/awstats/lang. Bitte stellen Sie auch sicher "\r
+ . "dass PHP diesen Ordner lesen kann.",\r
+ 'libraryfiles' =>\r
+ "Die Library-Dateien konnten nicht gefunden werden: %s".BR\r
+ . "Bitte überprüfen Sie die config.php. Der Wert von \$BAW_CONF['path_lib'] muss "\r
+ . "auf das Verzeichnis der AWStats-Library-Dateien zeigen, "\r
+ . "typischerweise /cgi-bin/awstats/lib. Bitte stellen Sie auch sicher "\r
+ . "dass PHP diesen Ordner lesen kann.",\r
+ 'configwrite' =>\r
+ "Die Konfigurations-Datei ist nicht überschreibbar. Bitte stellen Sie sicher,"\r
+ . "dass PHP diese Datei überscreiben kann oder bearbeiten Sie diese Datei mit"\r
+ . "einem geeigneten Editor anstelle das Online-Formular zu verwenden.",\r
+ 'configread' =>\r
+ "Die Konfigurations-datei konnte nicht zum lesen geöffnet werden.",\r
+ 'configdisabled' =>\r
+ "Das Online-Konfigurations-Formular wurde blockiert. Um es zu verwenden, "\r
+ ."setzen Sie bitte \$BAW_CONF['online_config'] = true in der config.php",\r
+ 'libraryeval' =>\r
+ "Es gab einen Fehler beim Lesen der awstats library datei %s um die Variable"\r
+ . "%s zu erhalten. Bitte verwenden Sie den Debug-Modus und wenden Sie sich an "\r
+ . "den Support.",\r
+ 'jpgraph_path' =>\r
+ "Die JPGraph-Dateien konnten nicht unter %s gefunden werden. Bitte schalten"\r
+ . "Sie entweder JPGraph ab oder installieren Sie die Dateien richtig.",\r
+ 'gd2notavailable' =>\r
+ "Die PHP GD2-Graphik-Bibliothek konnte nicht gefunden werden. Bitte installieren Sie diese."\r
+ . "oder schalten Sie die Karten-funktion ab. Weitere info zu GD2 unter http://php.net/manual/en/ref.image.php",\r
+ 'mapnotavailable' =>\r
+ "Die Graphik zur erstellung der Karte (%s) konnte nicht gefunden werden. "\r
+ . "Bitte stellen Sie sicher dass sie BetterAWStats richtig installiert haben"\r
+ . "und dass alle Dateien von PHP lesbar sind.",\r
+ 'iconpath' =>\r
+ "The AWSTATS icons could not be found in this location: %s".BR\r
+ . "Please check your config.php. The value of \$BAW_CONF['icons_url'] has "\r
+ . "to point to the URL where awstats stores its library files "\r
+ . "(typically somewhere http://awstats.local/awstats/icon).",\r
+ 'site_path' =>\r
+ "The path to awstats is set incorrectly to the folder: %s".BR\r
+ . "Please check your config.php. The value of \$BAW_CONF['site_path'] has "\r
+ . "to point to the directory where BetterAWStats is installed"\r
+ . "(typically somewhere /home/user/public_html/baw).".BR\r
+ . "It seems your script is installed under '%s'.",\r
+ 'site_url' =>\r
+ 'The URL to BetterAWStats is set incorretly in your config.php. It is currently '\r
+ . 'set to %s, but it this is incorrect. It seems the URL could be %s instead.',\r
+ 'password_match' =>\r
+ 'The passwords you have entered do not match. Please go back and try again.',\r
+ 'password_change' =>\r
+ 'You are trying to use the default password. Please go back change to a '\r
+ . 'different password',\r
+ 'password_short' =>\r
+ 'Your password has to have a minimum of 6 characters. Please go back and'\r
+ . 'choose a longer password.',\r
+ 'xmldata' =>\r
+ 'Your AWStats data files are stored in XML format. Unfortunately, BetterAWSTats '\r
+ . 'does not support XML data yet. Please store your datafiles in plain text.',\r
+\r
+ // $BAW_LIB['item_groups']\r
+ 'time' => 'Zeit',\r
+ 'user_information' => 'Besucher-Information',\r
+ 'user_actions' => 'Besucher-Handlungen',\r
+ 'user_origin' => 'Besucher-Herkunft',\r
+ 'other_access' => 'Andere Zugriffe',\r
+\r
+ // debug messages\r
+ 'dbg_detect_language' => "Versuche Sprache zu erkennen.",\r
+ 'dbg_detected_language' => "Erkannte Sprache: %s",\r
+ 'dbg_test_writable' => "überprüfe ob %s schreibbar ist.",\r
+ 'dbg_test_writable_false' => "NICHT schreibbar: %s",\r
+ 'dbg_test_writable_true' => 'IST schreibbar: %s',\r
+ 'dbg_found_dir' => 'Verzichnis gefunden: %s',\r
+ 'dbg_found_file' => 'Datei gefunden: %s',\r
+ 'dbg_finished_parse_dir' => "Verzeichnis lesen beendet: %s",\r
+ 'dbg_start_parse_dir' => "Verszeichnis lesen startet: %s",\r
+\r
+ // config_default.inc.php\r
+ 'cfg_enable' => 'Einschalten',\r
+ 'cfg_disable' => 'Ausschalten',\r
+ 'cfg_show_all' => 'Alle zeigen',\r
+ 'monday' => 'Montag',\r
+ 'sunday' => 'Sonntag',\r
+ 'cfg_hide' => 'Verstecken',\r
+ 'cfg_show' => 'Zeigen',\r
+ 'cfg_site_settings' => 'Site Einstellungen',\r
+ 'cfg_path_to_aws_data' => 'Pfad zu AWStats Daten',\r
+ 'cfg_path_to_aws_data_hlp' => "Dieser Pfad muss auf die von AWSTATS "\r
+ . "generierten Daten zeigen. ACHTUNG: Wenn diese Daten von einem Windows-"\r
+ . "System auf ein Linux-System übertragen werden (oder umgekehrt), ist es "\r
+ . "wichtig, diese als BINÄR-Daten zu übertragen. Ansonsten können sie nicht "\r
+ . "gelesen werden. Kein '/' am Ende.",\r
+ 'cfg_path_to_aws_lib' => 'Pfad zu den AWStats Libraries',\r
+ 'cfg_path_to_aws_lib_hlp' => "Dieser Pfad muss auf den Ordner zeigen, in dem "\r
+ . "AWSTATS die Library-Dateien speichert. Kein '/' am Ende.",\r
+ 'cfg_path_to_aws_lang' => 'Pfad zu den AWStats Sprachdateien',\r
+ 'cfg_path_to_aws_lang_hlp' => "Dieser Pfad muss auf den Ordner zeigen, in dem "\r
+ . "AWSTATS die Sprachdateien speichert. Kein '/' am Ende.",\r
+ 'cfg_script_url' => 'Programm-URL',\r
+ 'cfg_script_url_hlp' => "Die URL zu BetterAWStats. Kein '/' am Ende.",\r
+ 'cfg_script_path' => 'Programm-Pfad',\r
+ 'cfg_script_path_hlp' => "Der Pfad zu BetterAWstats. Kein '/' am Ende.",\r
+ 'cfg_aws_icons_url' => 'AWStats Icons URL',\r
+ 'cfg_aws_icons_url_hlp' => 'Die URL zu den AWStats Icons. Inclusive http://... '\r
+ . "Kein '/' am Ende.",\r
+ 'cfg_web_config' => 'Web Konfiguration',\r
+ 'cfg_web_config_hlp' => 'Wollen Sie das Web-Frontend zur Konfiguration verwenden? '\r
+ . 'ACHTUNG: hierfür muss die config.php beschreibbar sein. Dies ist generell '\r
+ . 'ein SICHERHEITSRISIKO wenn die BetterAWStats-installation nicht '\r
+ . 'durch ein .htaccess-file o.ä. passwortgeschützt ist.',\r
+ 'cfg_web_config_pw' => 'Ändere Konfigurations-Password?',\r
+ 'cfg_web_config_pw_hlp' => 'Dieses Passwort wid gebraucht um die online-'\r
+ . 'Konfiguration zu benutzen. Es muss länger als 5 Buchstaben sein.',\r
+ 'cfg_limit_server' => 'Nur einen Server verwenden?',\r
+ 'cfg_limit_server_hlp' => 'Setzen Sie dieses gleich einem Servernamen oder '\r
+ . '"false" um alle zu zeigen. Der Servername sollte der gleiche sein wie in AWStats.',\r
+ 'cfg_layout_settings' => 'Layout Einstellungen',\r
+ 'cfg_layout_type' => 'Layout Typ',\r
+ 'cfg_layout_type_hlp' => 'Sollen die einzelnen Statistiken horizontal oder vertikal angeordnet werden?',\r
+ 'cfg_vertical' => 'Vertikal',\r
+ 'cfg_horizontal' => 'Horizontal',\r
+ 'cfg_language' => 'Sprache',\r
+ 'cfg_language_hlp' => "Gewünschte Interface-sprache auswählen. 'Auto' für automatisches erkennen.",\r
+ 'cfg_firstweekday' => 'Erster Tag der Woche',\r
+ 'cfg_firstweekday_hlp' => 'Sollte Montag oder Sonntag als erster Tag der Woche angezeigt werden?',\r
+ 'cfg_decimalpoint' => 'Dezimal-Trennzeichen',\r
+ 'cfg_decimalpoint_hlp' => "Welches Zeichen soll als Dezimal-zeichen verwendet werden (99.9)?",\r
+ 'cfg_thous_sep' => 'Tausender-Trennzeichen',\r
+ 'cfg_thous_sep_hlp' => "Welches Zeichen soll als Tausender-Trennzeichen verwendet werden (1'0000)?",\r
+ 'cfg_date_form' => 'Datums-Format (2007-31-12)',\r
+ 'cfg_date_form_hlp' => 'Wie soll das Datum aussehen? Für Hilfe bitte unter '\r
+ . 'http://php.net/manual/de/function.date.php nachsehen.',\r
+ 'cfg_date_time_form' => 'Datums & Zeit Format (2007-31-12 23:59)',\r
+ 'cfg_date_time_form_hlp' => 'Wie soll Datum mit Zeit dargestellt werden? Für Hilfe bitte unter '\r
+ . 'http://php.net/manual/de/function.date.php nachsehen.',\r
+ 'cfg_percent_dec' => 'Prozent-Dezimalstellen',\r
+ 'cfg_percent_dec_hlp' => "Wieviele dezimalstellen sollen Prozentwerte haben? (99.9%)",\r
+ 'cfg_field_length' => 'Link-länge',\r
+ 'cfg_field_length_hlp' => 'Wieviele Zeichen soll ein Tabllenfeld maximal lang sein?'\r
+ . "(Betrifft nur Links)",\r
+ 'cfg_max_lines' => 'Max. Anzahl von Zeilen einer Tabelle',\r
+ 'cfg_max_lines_hlp' => 'Wievele Zeilen darf eine Tabelle max. lang sein? '\r
+ . 'Auf "false" setzen um ohne limit zu arbeiten. Wenn die max. Anzahl erreicht ist, '\r
+ . 'wird der rest der tabelle in einer Zeile zusammengefasst. Das gilt auch fuer die'\r
+ . '"Gesamte Liste"-Ansicht einer Tabelle.',\r
+ 'cfg_hide_empty' => 'Verstecke leere Statistiken',\r
+ 'cfg_hide_empty_hlp' => 'Sollen Statistiken mit Null Zeilen versteckt werden? '\r
+ . '(Inklusive des Menu-Eintrags)',\r
+ 'cfg_auto_submit_form' => 'Dropdowns nach Änderung ausführen',\r
+ 'cfg_auto_submit_form_hlp' => 'Wenn aktiviert haben die Site/datums-dropdowns '\r
+ . 'keinen "OK"-Button. Die Seite wird neu angezeigt sobald sie einen neuen '\r
+ . 'Wert auswählen. Nicht empfohlen für grosse Sites.',\r
+ 'cfg_chart_settings' => 'Chart Einstellungen',\r
+ 'cfg_max_scale_visitors' => 'Massstab Besucher',\r
+ 'cfg_max_scale_visitors_hlp' => 'Der höchste wert des gewählten Datentyps '\r
+ . 'bestimmt den Massstab für die Besucher-Balken im Chart. ',\r
+ 'cfg_max_scale_visits' => 'Massstab Besuche',\r
+ 'cfg_max_scale_visits_hlp' => 'Der höchste wert des gewählten Datentyps '\r
+ . 'bestimmt den Massstab für die Besuche-Balken im Chart. ',\r
+ 'cfg_max_scale_pages' => 'Massstab Seiten',\r
+ 'cfg_max_scale_pages_hlp' => 'Der höchste wert des gewählten Datentyps '\r
+ . 'bestimmt den Massstab für die Seiten-Balken im Chart. ',\r
+ 'cfg_max_scale_hits' => 'Massstab Zugriffe',\r
+ 'cfg_max_scale_hits_hlp' => 'Der höchste wert des gewählten Datentyps '\r
+ . 'bestimmt den Massstab für die Zugriffs-Balken im Chart. ',\r
+ 'cfg_max_chart_items' => 'Max Anz. Chart-Reihen',\r
+ 'cfg_max_chart_items_hlp' => 'Wenn Charts mit kompletten Listen angezeigt werden, '\r
+ . 'wieviele Reihen sollen angezeigt sein? Der Rest wird in "'.$BAW_MES[2].'" summiert. '\r
+ . 'Dies hilft, überbreite Charts zu vermeiden.',\r
+ 'cfg_chart_titles' => 'Chart Titel?',\r
+ 'cfg_chart_titles_hlp' => 'Sollen Titel über den Charts angzeigt werden?',\r
+ 'cfg_jpgraph_settings' => 'JPGraph Einstellungen',\r
+ 'cfg_jpgraph_enable' => 'JPgraph verwenden?',\r
+ 'cfg_jpgraph_enable_hlp' => 'Um JPGraph zu verwenden, muss es von'\r
+ . 'http://www.aditus.nu/jpgraph/jpdownload.php heruntergeladne werden',\r
+ 'cfg_jpgraph_path' => 'Pfad zu JPGraph',\r
+ 'cfg_jpgraph_path_hlp' => 'Wo ist JPGraph installiert? (Der Ordner '\r
+ . "in dem sich jpgraph.php befindet. Kein '/' am Ende.",\r
+ 'cfg_table_settings' => 'Tabellen Einstellungen',\r
+ 'cfg_advanced_settings' => 'Fortgeschrittene Einstellungen',\r
+ 'cfg_version' => 'Version',\r
+ 'cfg_version_hlp' => 'Version des Programms',\r
+ 'cfg_xhtml' => 'XHTML/ HTML',\r
+ 'cfg_xhtml_hlp' => 'Soll HTML oder XHTML angezeigt werden?',\r
+ 'cfg_debug' => 'Problemsuche',\r
+ 'cfg_debug_hlp' => 'Sollen Status-meldungen zur Fehlersuche engezeigt werden (SEHR detailiert)?',\r
+ 'cfg_parser' => 'Daten-Verarbeitungs-Statistiken',\r
+ 'cfg_parser_hlp' => 'Wollen Sie eine Zusammenfassung der Logfile-auswertung anzeigen?',\r
+ 'cfg_module' => 'Modul-Einstellungen',\r
+ 'cfg_module_hlp' => 'Wird BetterAWStats als Modul innerhalb einer anderen Anwendung verwendet? '\r
+ . '(Derzeit nur Drupal)',\r
+ 'cfg_type_order' => 'Sortierung',\r
+ 'cfg_type_show' => 'Daten anzeigen?',\r
+ 'cfg_type_collapse' => 'Minimiert?',\r
+ 'cfg_type_table' => 'Tabelle anzeigen?',\r
+ 'cfg_type_sort' => 'Sortieren nach...?',\r
+ 'cfg_possible_values'=> ' Mögliche Werte sind:',\r
+ 'cfg_type_sort_dir' => 'Sortier-richtung?',\r
+ 'cfg_type_sort_dir_opts' => 'SORT_ASC=Aufsteigend, SORT_DESC=Absteigend',\r
+ 'cfg_type_chart' => 'HTML Chart anzeigen?',\r
+ 'cfg_type_map' => 'Landkarte anzeigen?',\r
+ 'cfg_type_avg' => 'Durchnitt anzeigen?',\r
+ 'cfg_type_total' => 'Summe anzeigen?',\r
+ 'cfg_type_top_x' => 'Anzahl Zeilen?',\r
+ 'cfg_type_assumebot' => 'Verstecke Besucher wenn Zugriffe = Seiten?',\r
+ 'cfg_type_showmonths' => 'Wieviele Monate?',\r
+ 'cfg_type_favicon' => 'Favicons für externe URLs anzeigen?',\r
+ 'cfg_type_domain_lvls' => 'URLs auf wieviele Domain level kürzen? (-1 = nicht kürzen)',\r
+ 'cfg_dis_overview' => 'Übersicht Daten und Zahlen',\r
+ 'cfg_dis_months' => 'Monatsdaten',\r
+ 'cfg_dis_days' => 'Tagesdaten',\r
+ 'cfg_dis_weekdays' => 'Wochentage',\r
+ 'cfg_dis_hours' => 'Stunden',\r
+ 'cfg_dis_domains' => 'Besucher-Domains',\r
+ 'cfg_dis_visitors' => 'Besucher IP-Addressen',\r
+ 'cfg_dis_logins' => 'Login-Usernamen',\r
+ 'cfg_dis_robots' => 'Suchmaschinen, Spiders, Robots etc.',\r
+ 'cfg_dis_worms' => 'Würmer',\r
+ 'cfg_dis_sessions' => 'Wie lange waren besucher auf der Seite',\r
+ 'cfg_dis_filetype' => 'Auf welche Datei-Typen wurde zugegriffen',\r
+ 'cfg_dis_urls' => 'Seiten auf dem Server',\r
+ 'cfg_dis_paths_hlp' => 'Daten/Pfade auf dem Server',\r
+ 'cfg_dis_paths' => 'Daten/Pfade',\r
+ 'cfg_dis_os' => 'Betriebssysteme der Benutzer',\r
+ 'cfg_dis_unknownos' => 'Unbekannte Betriebssysteme',\r
+ 'cfg_dis_osversions' => 'Betriebssystem inkl. Versionen',\r
+ 'cfg_dis_browsers' => 'Browser-Typen',\r
+ 'cfg_dis_browserversions' => "Browser-Typen (+{$BAW_MES[58]})",\r
+ 'cfg_dis_unknownbrowser' => 'Unbekannte Browser',\r
+ 'cfg_dis_unknownbrowser_agent' => 'User Agent',\r
+ 'cfg_dis_screensizes' => 'Bildschirmgrössen',\r
+ 'cfg_dis_se_referers' => 'Eingehende Links von Suchergebnissen',\r
+ 'cfg_dis_referers' => 'Eingehende Links von anderen Seiten',\r
+ 'cfg_dis_referer_domains' => 'Eingehende Links, nach zweit-Level Domain sortiert',\r
+ 'cfg_dis_hotlinks' => 'Externe Seiten, welche direkt auf Bilder/Daten linken',\r
+ 'cfg_dis_hotlink_domains' => 'Domains externer Seiten, welche direkt auf Bilder/Daten linken',\r
+ 'cfg_dis_searchphrases' => 'Suchausdrücke',\r
+ 'cfg_dis_searchwords' => 'Suchwörter',\r
+ 'cfg_dis_misc' => 'Details der Besucher-Systeme',\r
+ 'cfg_dis_errors' => 'Fehler-Meldungen von aufgerufenen Seiten',\r
+\r
+ // display_helpers\r
+ 'config_not_writable' => 'Konfigurationsfile ist nicht schreibbar!',\r
+ 'config_editor' => 'Konfigurations-Interface',\r
+ 'created_by' => 'erstellt von %s',\r
+ 'config_intro' => "// ACHTUNG:\r\n// BetterAWstats hat ein online Konfigurations-Interface "\r
+ . "mit dem Sie die einstellungen mit dem Browser ändern können. Der "\r
+ . "Link dazu befindet sich unten im Menu! Um diesen zu verwenden, muss "\r
+ . "\$BAW_CONF['online_config']= true; gestellt werden, und diese Datei "\r
+ . "muss für den Server beschreibbar sein.",\r
+ 'cfg_name' => 'NAME: ',\r
+ 'cfg_info' => 'INFO: ',\r
+ 'cfg_def' => 'STANDART:',\r
+ 'cfg_display' => 'ANZEIGE',\r
+ 'cfg_display2' => 'Statistik Anzeige',\r
+ 'cfg_logout' => 'Ausloggen',\r
+ 'confirm_password' => 'Password bestätigen: ',\r
+ 'cfg_saved' => "Die Konfiguration wurde gespeichert. Weiter zu den "\r
+ . "<a href=\"{$BAW_CONF['site_url']}/\">Statistiken</a> oder zurück zum "\r
+ . "<a href=\"{$BAW_CONF['site_url']}/index.php?action=config_editor\">"\r
+ . "Konfigurations-Interface</a>.",\r
+ 'cfg_save' => 'Alles Speichern',\r
+ 'cfg_reset' => 'Zurücksetzen',\r
+ 'cfg_exit' => 'Ende',\r
+ 'cfg_asc'=> 'Ausfteigend',\r
+ 'cfg_desc' => 'Absteigend',\r
+ 'show' => 'Anzeigen',\r
+ 'hide' => 'Verstecken',\r
+ 'all_months' => 'Alle (Monatlich)',\r
+ 'all_days' => 'Alle (Täglich)',\r
+ 'get_help' => 'Hilfe',\r
+ 'back' => 'Zurück',\r
+ 'version_check' => 'Suche nach Updates',\r
+ 'version_info' => 'Versions-Daten',\r
+ 'unknown_list' => 'Unbekannte Daten',\r
+\r
+ // config.inc.php\r
+ 'require_password' => 'Please enter the password and press OK.',\r
+ 'password_incorrect' => 'The password is incorrect. Please try again',\r
+\r
+ // reder_table\r
+ 'table_max_hits_exceed' => '(Über dem max_hits config Limit von %s)',\r
+ 'records'=> '%s records', // new\r
+\r
+ // section help\r
+ 'hlp_overview' => 'Dieser Abschnitt zeigt generelle Daten des aktuell ausgewählten '\r
+ . 'Monats. Diese Daten schliessen leider nicht exakt alle zugriffe durch '\r
+ . 'Hotlinks, Roboter und Hacker-scripts etc. aus. Wenn man '\r
+ . "\$BAW_CONF['show_parser_stats'] == true setzt, sieht man hier zusätzliche "\r
+ . 'Daten zum logfile Update wie zum Beispiel Parsed records, Old records, New records, '\r
+ . 'Corrupted und Dropped lines.',\r
+ 'hlp_months' => 'Dieser Abschnitt zeigt die Monatlichen Daten. Wie weit diese '\r
+ . 'für vergangene Monate angezeigt werden, lässt sich in der Konfiguration einstellen.',\r
+ 'hlp_days' => 'Dieser Abschnitt zeigt die täglichen Daten des aktuell ausgewählten Monats. '\r
+ . 'Wenn der gewählte Monat noch nicht zu Ende ist, sieht man hier die Daten des letzten Monats, '\r
+ . 'für die gleiche Anzahl von Tagen wie in diesem Monat noch Daten fehlen.',\r
+ 'hlp_weekdays' => 'Dieser Abschnitt zeigt Durschnittswerte für jeden Wochentag. '\r
+ .'Da jeder Monat eine andere Anzahl jedes Wochentags hat, erzeugt eine einfache Summe dieser '\r
+ . 'Daten, so wie es AWStats darstellt, eine Verzerrung der Daten. Darum stellt '\r
+ . 'BetterAWStats die Durschnitte dar.',\r
+ 'hlp_hours' => 'Dieser Abschnitt zeigt die Durschnittswerte für jede Stunde des Tages. '\r
+ .'Wenn der aktuell gewählte Monat noch nicht zu Ende ist, verzerrt eine Summe der Zugriffe '\r
+ . 'So wie es von AWStats dargestellt wird, die Daten. Darum zeigt BetterAWStats die '\r
+ . 'Durschnitte.',\r
+ 'hlp_domains' => 'Dieser Abschnitt zeigt die Zugriffe pro Land (sofern bekannt). '\r
+ . 'Die Landkarte summiert die Domains mil, edu, gov and arpa zur "us"-Domain dazu.',\r
+ 'hlp_visitors' => 'Dieser Abschnitt zeigt die Daten pro User-IP Addresse. '\r
+ . 'Da praktisch alle Webseiten aus mehreren Dateien bestehen (Bilder, CSS-file etc), '\r
+ . 'sind zugriffe mit einem sehr tiefen "Zugriff pro Seiten"-Verhältnis höchstwahrscheinlich'\r
+ . 'von Robotern, Scripten oder anderen Programmen aber nicht von normalen Benutzern '\r
+ . 'erzeugt. Diese Zugriffe sind hier unter "Vermuteten Scripts & Bots zusammengefasst. '\r
+ . 'Um das Verhältnis "Zugriff pro Seiten" welches eine Script definiert zu ändern, '\r
+ . 'justieret man den Wert von $BAW_CONF_DIS[\'visitors\'][\'assumebot\'] in der Konfiguration.'\r
+ . 'Ähnlich sind Zugriffe ohne Seitenaufrufe von Proxies or '\r
+ . 'Hotlinks. Diese sind unter "Hotlinks/Proxies" summiert.' ,\r
+ 'hlp_logins' => 'Dieser Abschnitt zeigt die Passwort-geschützten zugriffe pro Username. Ein Username'\r
+ . 'mit nur einem Zugriff stellt höchstwahrscheinlich einen Zugriffsversuch ohne Passwort dar.',\r
+ 'hlp_referer_domains' => 'This section takes the data from "Referring sites" '\r
+ . 'and sums it up by domain. AWStats does not show this information. '\r
+ . 'If a referer has a link to your site on each of its '\r
+ . 'pages, the overall number of referred visitors might be high, but the '\r
+ . 'referrer might still not show up in the top 10 of the "Refering Sites". '\r
+ . 'This is why BetterAWStats shows the domain sum so you can judge the true '\r
+ . 'value of a refering site.',\r
+ 'hlp_hotlinks' => 'This section shows the referrers from other sites where files '\r
+ . 'such as graphics where requested but no pages. This indicates that the '\r
+ . 'referring site is hotlinking to your site (using your bandwidth, storage '\r
+ . 'and image) while giving its own users the impression the data was hosted '\r
+ . 'at the referring site. This data is separated from the "Referring sites" '\r
+ . 'Statistics by BetterAWStats. AWStats does not make this difference.',\r
+ 'hlp_hotlink_domains' => 'This section shows the referrers from other sites where files '\r
+ . 'such as graphics where requested but no pages. This indicates that the '\r
+ . 'referring site is hotlinking to your site (using your bandwidth, storage '\r
+ . 'and image) while giving its own users the impression the data was hosted '\r
+ . 'at the referring site. This data is separated from the "Referring sites" '\r
+ . 'Statistics by BetterAWStats. AWStats does not make this difference. '\r
+ . 'In addition, BetterAWStats sums in this section the data by domain to make the hits by '\r
+ . 'domain more visible since one domain might hotlink the same data from '\r
+ . 'multiple URLs.',\r
+);\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+// since we are merging this here with the message file from AWSTATS, we have to\r
+// add these internal messages to the ones from AWSTATS. Please remember NOT to\r
+// use any numeric indexes since they are used by AWSTATS.\r
+\r
+global $BAW_MES;\r
+$BAW_MES += array(\r
+\r
+ // display.inc.php\r
+ 'data_file_stats' => 'Data File Update Stats:',\r
+ 'parsed_records' => 'Parsed records:',\r
+ 'old_records' => 'Old records:',\r
+ 'new_records' => 'New records:',\r
+ 'corrupted' => 'Corrupted:',\r
+ 'dropped' => 'Dropped:',\r
+ 'ratio_pages_hits' => 'Ratio'.BR.'(Hits/Pages)',\r
+ 'files_paths' => 'Files/paths',\r
+ 'user_agent' => 'User Agent',\r
+ 'size' => 'Size',\r
+ 'by_domains' => '%s by Domains',\r
+ 'visits' => 'Visits',\r
+ 'averages' => ' (Averages)',\r
+ 'assumedscript' => 'Assumed Robots/Spiders',\r
+ 'weekday_averages' => $BAW_MES[91] . ' (Averages)',\r
+ 'hours_averages' => $BAW_MES[20] . ' (Averages)',\r
+ 'os_versions' => "{$BAW_MES[59]} (+{$BAW_MES[58]})",\r
+ 'browser_versions' => "{$BAW_MES[21]} (+{$BAW_MES[58]})",\r
+ 'referer_hotlinks' => 'Hotlinks',\r
+ 'hl_by_domains ' => "Hotlinks by Domains",\r
+ 'hotlinks_proxies' => 'Hotlinks/Proxies',\r
+\r
+ // baw_raise_error\r
+ 'baw_error' => 'BetterAWstats Error',\r
+ 'datafile' =>\r
+ "Datafile is corrupt, data could not be read: %s;".BR."'%s' should be BEGIN_...".BR\r
+ . "Please read the FAQ (/doc/FAQ.txt)",\r
+ 'datafileindex' =>\r
+ "Datafile is corrupt, data-index could not be read: %s;".BR."'%s' should be BEGIN_...".BR\r
+ . "Please read the FAQ (/doc/FAQ.txt)",\r
+ 'datafilesdir' =>\r
+ "The Data files could not be found in this location: %s".BR\r
+ . "Please check your config.php. The value of \$BAW_CONF['path_data'] has "\r
+ . "to point to the directory where awstats stores its data files "\r
+ . "(typically somewhere /cgi-bin/awstats/data). Please also make sure "\r
+ . "that php has read-permissions on that folder.",\r
+ 'languagefile' =>\r
+ "The language file could not be found in this location: %s".BR\r
+ . "Please check your config.php. The value of \$BAW_CONF['path_lang'] has "\r
+ . "to point to the directory where awstats stores its language files "\r
+ . "(typically somewhere /cgi-bin/awstats/lang). Please also make sure "\r
+ . "that php has read-permissions on that folder.",\r
+ 'libraryfiles' =>\r
+ "The library files could not be found in this location: %s".BR\r
+ . "Please check your config.php. The value of \$BAW_CONF['path_lib'] has "\r
+ . "to point to the directory where awstats stores its library files "\r
+ . "(typically somewhere /cgi-bin/awstats/lib). Please also make sure "\r
+ . "that php has read-permissions on that folder.",\r
+ 'configwrite' =>\r
+ "The configuration file is not writable. Please make sure that the script "\r
+ . "can write to the file or simply edit the file directly on the server "\r
+ . "instead of using the configuration Editor.",\r
+ 'configread' =>\r
+ "The config file could not be opened for read/write access",\r
+ 'configdisabled' =>\r
+ "The online configurator has been disabled. Please set "\r
+ . "\$BAW_CONF['online_config'] = true in your config.php",\r
+ 'libraryeval' =>\r
+ "There was an error parsing the awstats library file %s that is used to "\r
+ . "parse the variable %s. Please switch on debugging in config.php and "\r
+ . "post the PHP errors displayed to the support forum so the problem can be fixed.",\r
+ 'jpgraph_path' =>\r
+ "The files for jpgraph could not be found at %s. Either disable the feature in "\r
+ . "config.php or correct the path to the files.",\r
+ 'gd2notavailable' =>\r
+ "The PHP graphics library GD2 is not available. Please disable the map function or install GD2."\r
+ . "You can get more info at http://php.net/manual/en/ref.image.php",\r
+ 'mapnotavailable' =>\r
+ "The graphics to create the Map (%s) is not available. Please make sure that "\r
+ . "you have all the files from the setup and that they are readable by "\r
+ . "the server.",\r
+ 'iconpath' =>\r
+ "The AWSTATS icons could not be found in this location: %s".BR\r
+ . "Please check your config.php. The value of \$BAW_CONF['icons_url'] has "\r
+ . "to point to the URL where awstats stores its library files "\r
+ . "(typically somewhere http://awstats.local/awstats/icon).",\r
+ 'site_path' =>\r
+ "The path to awstats is set incorrectly to the folder: %s".BR\r
+ . "Please check your config.php. The value of \$BAW_CONF['site_path'] has "\r
+ . "to point to the directory where BetterAWStats is installed"\r
+ . "(typically somewhere /home/user/public_html/baw).".BR\r
+ . "It seems your script is installed under '%s'.",\r
+ 'site_url' =>\r
+ 'The URL to BetterAWStats is set incorretly in your config.php. It is currently '\r
+ . 'set to %s, but it this is incorrect. It seems the URL could be %s instead.',\r
+ 'password_match' =>\r
+ 'The passwords you have entered do not match. Please go back and try again.',\r
+ 'password_change' =>\r
+ 'You are trying to use the default password. Please go back change to a '\r
+ . 'different password',\r
+ 'password_short' =>\r
+ 'Your password has to have a minimum of 6 characters. Please go back and'\r
+ . 'choose a longer password.',\r
+ 'xmldata' =>\r
+ 'Your AWStats data files are stored in XML format. Unfortunately, BetterAWSTats '\r
+ . 'does not support XML data yet. Please store your datafiles in plain text.',\r
+\r
+ // $BAW_LIB['item_groups']\r
+ 'time' => 'Time',\r
+ 'user_information' => 'User Information',\r
+ 'user_actions' => 'User Actions',\r
+ 'user_origin' => 'User Origin',\r
+ 'other_access' => 'Other Access',\r
+\r
+ // debug messages\r
+ 'dbg_detect_language' => "trying to detect language",\r
+ 'dbg_detected_language' => "Detected language %s",\r
+ 'dbg_test_writable' => "Checking if %s is writable",\r
+ 'dbg_test_writable_false' => "IS NOT writable: %s",\r
+ 'dbg_test_writable_true' => 'IS writable: %s',\r
+ 'dbg_found_dir' => 'found directory %s',\r
+ 'dbg_found_file' => 'Found File: %s',\r
+ 'dbg_finished_parse_dir' => "Finished parsing Directory %s",\r
+ 'dbg_start_parse_dir' => "Start parsing Directory %s",\r
+\r
+ // config_default.inc.php\r
+ 'cfg_enable' => 'Enable',\r
+ 'cfg_disable' => 'Disable',\r
+ 'cfg_show_all' => 'Show all',\r
+ 'monday' => 'Monday',\r
+ 'sunday' => 'Sunday',\r
+ 'cfg_hide' => 'Hide',\r
+ 'cfg_show' => 'Show',\r
+ 'cfg_site_settings' => 'Site Settings',\r
+ 'cfg_path_to_aws_data' => 'Path to AWStats Data',\r
+ 'cfg_path_to_aws_data_hlp' => "Set this value to the directory where AWStats "\r
+ . "saves its database files into. ATTENTION: If you read those files on "\r
+ . "windows but have them created on linux or the other way round, make "\r
+ . "sure you transfer them 'BINARY'. Otherwise they cannot be read properly. "\r
+ . "No trailing slash",\r
+ 'cfg_path_to_aws_lib' => 'Path to AWStats Libraries',\r
+ 'cfg_path_to_aws_lib_hlp' => "Set this value to the directory where AWStats "\r
+ . "saves its library files into. No trailing slash",\r
+ 'cfg_path_to_aws_lang' => 'Path to AWStats Language files',\r
+ 'cfg_path_to_aws_lang_hlp' => 'Set this value to the directory where AWStats '\r
+ . 'saves its language files into. No trailing slash',\r
+ 'cfg_script_url' => 'Script URL',\r
+ 'cfg_script_url_hlp' => "The url of BetterAWstats' directory, No trailing slash",\r
+ 'cfg_script_path' => 'Script path',\r
+ 'cfg_script_path_hlp' => 'The path of BetterAWstats, No trailing slash',\r
+ 'cfg_aws_icons_url' => 'URL to AWStats Icons',\r
+ 'cfg_aws_icons_url_hlp' => 'The url to the awstats icons, should include the '\r
+ . 'whole http://..., no trailing slash.',\r
+ 'cfg_web_config' => 'Web Configuration',\r
+ 'cfg_web_config_hlp' => 'Enable the online configuration editor? WARNING: '\r
+ . 'Your config.php has to be writable in order to enable this. This is '\r
+ . 'a BAD idea to use unless the folder is password-protected with a '\r
+ . '.htaccess file or similar.',\r
+ 'cfg_web_config_pw' => 'Change configuration password?',\r
+ 'cfg_web_config_pw_hlp' => 'This password is needed to access the online '\r
+ . 'configuration. It has to be longer than 5 letters.',\r
+ 'cfg_limit_server' => 'Limit to server?',\r
+ 'cfg_limit_server_hlp' => 'Set this to a simgle server that you want to limit '\r
+ . 'or "false" to show all. The server name should be the one used for awstats.',\r
+ 'cfg_layout_settings' => 'Layout Settings',\r
+ 'cfg_layout_type' => 'Layout Type',\r
+ 'cfg_layout_type_hlp' => 'Display page in vertical or horizontal layout?',\r
+ 'cfg_vertical' => 'Vertical',\r
+ 'cfg_horizontal' => 'Horizontal',\r
+ 'cfg_language' => 'Language',\r
+ 'cfg_language_hlp' => 'Set your language. Set to "auto" to autodetect from browser',\r
+ 'cfg_firstweekday' => 'First day of the week',\r
+ 'cfg_firstweekday_hlp' => 'Should Sunday be the first day of the week or monday?',\r
+ 'cfg_decimalpoint' => 'Decimal Point',\r
+ 'cfg_decimalpoint_hlp' => "Decimal Point Character (99.9)",\r
+ 'cfg_thous_sep' => 'Thousands separator',\r
+ 'cfg_thous_sep_hlp' => "Thousand Digit separator (1'000)",\r
+ 'cfg_date_form' => 'Date format (2007-31-12)',\r
+ 'cfg_date_form_hlp' => 'How should a date look like? For formatting, please '\r
+ . 'consult http://php.net/manual/en/function.date.php',\r
+ 'cfg_date_time_form' => 'Date & Time format (2007-31-12 23:59)',\r
+ 'cfg_date_time_form_hlp' => 'How should a date & time look like? For formatting,'\r
+ . 'please consult http://php.net/manual/en/function.date.php',\r
+ 'cfg_percent_dec' => 'Percentage decimals',\r
+ 'cfg_percent_dec_hlp' => "How many decimals for percentage value? (99.9%)",\r
+ 'cfg_field_length' => 'Field Length',\r
+ 'cfg_field_length_hlp' => 'What is the max. text length of table fields? '\r
+ . "(Applies only to links)",\r
+ 'cfg_max_lines' => 'Max. Table Lines',\r
+ 'cfg_max_lines_hlp' => 'What is the max. no. of lines a table can have? '\r
+ . 'Set to "false" to disable. If a table reaches this number of lines, '\r
+ . 'The rest is summarized into one line. This also applies to the "full list" '\r
+ . 'view of a table',\r
+ 'cfg_hide_empty' => 'Hide Empty data',\r
+ 'cfg_hide_empty_hlp' => 'Completely hide graphs with zero entries? '\r
+ . '(The menu will also be hidden)',\r
+ 'cfg_auto_submit_form' => 'Submit dropdowns on change',\r
+ 'cfg_auto_submit_form_hlp' => 'If enabled, the site/date dropdowns do '\r
+ . 'not have an "OK"-button. The page is refreshed as soon as you choose '\r
+ . 'a new value. Not recommended for large sites.',\r
+ 'cfg_chart_settings' => 'Chart Settings',\r
+ 'cfg_max_scale_visitors' => 'Max scale for Visitors',\r
+ 'cfg_max_scale_visitors_hlp' => 'The maximum value of the chosen option will '\r
+ . 'define the maximum height of the Visitors bars in the chart',\r
+ 'cfg_max_scale_visits' => 'Max scale for Visits',\r
+ 'cfg_max_scale_visits_hlp' => 'The maximum value of the chosen option will '\r
+ . 'define the maximum height of the Visits bars in the chart',\r
+ 'cfg_max_scale_pages' => 'Max scale for Pages',\r
+ 'cfg_max_scale_pages_hlp' => 'The maximum value of the chosen option will '\r
+ . 'define the maximum height of the Pages bars in the chart',\r
+ 'cfg_max_scale_hits' => 'Max scale for Hits',\r
+ 'cfg_max_scale_hits_hlp' => 'The maximum value of the chosen option will '\r
+ . 'define the maximum height of the Hits bars in the chart',\r
+ 'cfg_max_chart_items' => 'Max no of chart rows',\r
+ 'cfg_max_chart_items_hlp' => 'When displaying the charts with the full lists, '\r
+ . 'How many items can there be displayed? The rest will sum up into "'.$BAW_MES[2].'". '\r
+ . 'This is done to prevent too wide charts',\r
+ 'cfg_chart_titles' => 'Chart Titles?',\r
+ 'cfg_chart_titles_hlp' => 'If enabled, it will show a title on top of each chart.',\r
+ 'cfg_jpgraph_settings' => 'JPGraph Settings',\r
+ 'cfg_jpgraph_enable' => 'Enable JPgraph?',\r
+ 'cfg_jpgraph_enable_hlp' => 'To use JPGraph, you have to download it from '\r
+ . 'http://www.aditus.nu/jpgraph/jpdownload.php.',\r
+ 'cfg_jpgraph_path' => 'Path to JPGraph',\r
+ 'cfg_jpgraph_path_hlp' => 'Where is your JPGraph installation? (The folder '\r
+ . 'where jpgraph.php is in. No trailing slash)',\r
+ 'cfg_table_settings' => 'Table Settings',\r
+ 'cfg_advanced_settings' => 'Advanced Settings',\r
+ 'cfg_version' => 'Version',\r
+ 'cfg_version_hlp' => 'Version of this software',\r
+ 'cfg_xhtml' => 'XHTML/ HTML',\r
+ 'cfg_xhtml_hlp' => 'Do you want output in HTML or XHTML?',\r
+ 'cfg_debug' => 'Debug',\r
+ 'cfg_debug_hlp' => 'Do you want to show debug-output (VERY detailed)?',\r
+ 'cfg_parser' => 'Parser Stats',\r
+ 'cfg_parser_hlp' => 'Do you want to show log file parsing data below the stats summary?',\r
+ 'cfg_module' => 'Module settings',\r
+ 'cfg_module_hlp' => 'Are you using BetterAWstats as a module for another '\r
+ . 'software? (Currently only Drupal is supported)',\r
+ 'cfg_type_order' => 'Item Sequence',\r
+ 'cfg_type_show' => 'Show this Data?',\r
+ 'cfg_type_collapse' => 'Collapsed?',\r
+ 'cfg_type_table' => 'Show data table?',\r
+ 'cfg_type_sort' => 'Sort for which column? ',\r
+ 'cfg_possible_values'=> ' Possible values are:',\r
+ 'cfg_type_sort_dir' => "Sort direction?",\r
+ 'cfg_type_sort_dir_opts' => 'SORT_ASC=Ascending, SORT_DESC=Descending',\r
+ 'cfg_type_chart' => 'Show HTML chart?',\r
+ 'cfg_type_map' => 'Show Map Image?',\r
+ 'cfg_type_avg' => 'Show averages?',\r
+ 'cfg_type_total' => 'Show total Sum?',\r
+ 'cfg_type_top_x' => 'Show how many entries?',\r
+ 'cfg_type_assumebot' => 'Hits/pages minimum ratio to assume normal user?',\r
+ 'cfg_type_showmonths' => 'Show how many months?',\r
+ 'cfg_type_favicon' => 'Retrieve favicons for external URLs?',\r
+ 'cfg_type_domain_lvls' => 'Shorten URL to how many domain levels? (-1 to disable)',\r
+ 'cfg_dis_overview' => 'General Overview of key figures and dates',\r
+ 'cfg_dis_months' => 'Monthly data',\r
+ 'cfg_dis_days' => 'Daily data',\r
+ 'cfg_dis_weekdays' => 'Weekdays',\r
+ 'cfg_dis_hours' => 'Hours of the day',\r
+ 'cfg_dis_domains' => 'Domains of visitors',\r
+ 'cfg_dis_visitors' => 'IP addresses of visitors',\r
+ 'cfg_dis_logins' => 'Logins for username/password protected pages',\r
+ 'cfg_dis_robots' => 'Spiders, Robots of Search engines etc.',\r
+ 'cfg_dis_worms' => 'Worms searching for security holes',\r
+ 'cfg_dis_sessions' => 'How long have people been on the site?',\r
+ 'cfg_dis_filetype' => 'What filetypes are on the site',\r
+ 'cfg_dis_urls' => 'Pages on the site',\r
+ 'cfg_dis_paths_hlp' => 'Files/paths on the site',\r
+ 'cfg_dis_paths' => 'Files/paths',\r
+ 'cfg_dis_os' => 'Operating system of users',\r
+ 'cfg_dis_unknownos' => 'Unknown Operating system',\r
+ 'cfg_dis_osversions' => 'Operating system of users including versions',\r
+ 'cfg_dis_browsers' => 'User Browser Type',\r
+ 'cfg_dis_browserversions' => "User Browser Type (+{$BAW_MES[58]})",\r
+ 'cfg_dis_unknownbrowser' => 'Unknown Browsers',\r
+ 'cfg_dis_unknownbrowser_agent' => 'User Agent',\r
+ 'cfg_dis_screensizes' => 'Screensizes of users',\r
+ 'cfg_dis_se_referers' => 'Referrals from search engines',\r
+ 'cfg_dis_referers' => 'Referrals from other sites',\r
+ 'cfg_dis_referer_domains' => 'Referrals from other sites, grouped by 2-nd level domains',\r
+ 'cfg_dis_hotlinks' => 'Pages linking to images/data on your site',\r
+ 'cfg_dis_hotlink_domains' => 'Domains linking to images/data on your site',\r
+ 'cfg_dis_searchphrases' => 'Search phrases',\r
+ 'cfg_dis_searchwords' => 'Search words',\r
+ 'cfg_dis_misc' => 'User system features',\r
+ 'cfg_dis_errors' => 'Acesses to pages that returned errors',\r
+\r
+ // display_helpers\r
+ 'config_not_writable' => 'Configuration file not writable!',\r
+ 'config_editor' => 'Configuration Editor',\r
+ 'created_by' => 'created by %s',\r
+ 'config_intro' => "// ATTENTION: BetterAWstats has an online config "\r
+ . "editor that you can use instead of editing this file here. The link "\r
+ . "is on the bottom of the menu! To use it, set \$BAW_CONF['online_config']"\r
+ . "= true; and make sure that the file is writable by the server, AND protect"\r
+ . "the BetterAWStats installation by a .htaccess file!",\r
+ 'cfg_name' => 'NAME: ',\r
+ 'cfg_info' => 'INFO: ',\r
+ 'cfg_def' => 'DEFAULT:',\r
+ 'cfg_display' => 'DISPLAY',\r
+ 'cfg_display2' => 'Stats Display',\r
+ 'cfg_logout' => 'Log Out',\r
+ 'confirm_password' => 'Confirm Password: ',\r
+ 'cfg_saved' => "The configuration has been saved. Continue to the "\r
+ . "<a href=\"{$BAW_CONF['site_url']}/\">Statistics</a> or go back to the "\r
+ . "<a href=\"{$BAW_CONF['site_url']}/index.php?action=config_editor\">"\r
+ . "Config editor</a>.",\r
+ 'cfg_save' => 'Save all',\r
+ 'cfg_reset' => 'Reset',\r
+ 'cfg_exit' => 'Exit',\r
+ 'cfg_asc'=> 'Ascending',\r
+ 'cfg_desc' => 'Descending',\r
+ 'show' => 'Show',\r
+ 'hide' => 'Hide',\r
+ 'all_months' => 'All (Monthly)',\r
+ 'all_days' => 'All (Daily)',\r
+ 'get_help' => 'Get Help',\r
+ 'back' => 'Back',\r
+ 'version_check' => 'Check for updates',\r
+ 'version_info' => 'Version Data',\r
+ 'unknown_list' => 'Unknown Data',\r
+\r
+ // config.inc.php\r
+ 'require_password' => 'Please enter the password and press OK.',\r
+ 'password_incorrect' => 'The password is incorrect. Please try again',\r
+\r
+ // reder_table\r
+ 'table_max_hits_exceed' => '(Above max_hits config limit of %s)',\r
+ 'records'=> '%s records', // new\r
+\r
+ // section help\r
+ 'hlp_overview' => 'This section shows the general data for the currently '\r
+ . 'selected month. Please note that this data does not accurately exclude '\r
+ . 'hits caused by hotlinks and robots, hacker-scripts etc. If you set '\r
+ . "\$BAW_CONF['show_parser_stats'] to true, you can see here statistics about"\r
+ . 'the logfile update such as Parsed records, Old records, New records, '\r
+ . 'Corrupted and Dropped lines.',\r
+ 'hlp_months' => 'This section shows the history of data several months into '\r
+ . 'the past. You can change the time span in the configuration.',\r
+ 'hlp_days' => 'This section shows the daily history of data of the selected month. '\r
+ . 'If the current month is not finished, it will show the data of the '\r
+ . 'past month for the same amount of days that are left within the current month. ',\r
+ 'hlp_weekdays' => 'This section shows the averages of visits/pages/hits history for '\r
+ .'each weekday. Since the each month has a different amount of weekdays, summing '\r
+ . 'up the data as AWSTATS is doing it, would distort the data. That is why BetterAWStats '\r
+ . 'is showing the averages only.',\r
+ 'hlp_hours' => 'This section shows the averages of visits/pages/hits history for '\r
+ .'each hour of the day. In case the current month is not finished, summing '\r
+ . 'up the data as AWSTATS is doing it, would distort the data. That is why BetterAWStats '\r
+ . 'is showing the averages.',\r
+ 'hlp_domains' => 'This section shows the hits per country (if known). Please note that '\r
+ . 'the map-image summs the domains us, mil, edu, gov and arpa into the "us" domain.',\r
+ 'hlp_visitors' => 'This section shows the statistics per user\'s IP address. '\r
+ . 'Since almost all pages consist out of several files (images, stylesheets etc.), '\r
+ . 'visits with a low hits/pages ratio are most '\r
+ . 'likely bots, scripts or other software but not by normal users. '\r
+ . 'Those are summed up here under "Assumed Scripts & Bots". To change the ratio '\r
+ . 'that defines a visit as a script, please change the '\r
+ . '$BAW_CONF_DIS[\'visitors\'][\'assumebot\'] value in the configuration.'\r
+ . 'Similarly, users with only hits but no pages are hits from proxies or '\r
+ . 'hotlinking users. Those are summed up under "Hotlinks/Proxies".' ,\r
+ 'hlp_logins' => 'This section shows the hits per authenticated user. A user '\r
+ . 'with one hit most likely represents a unsuccessful login attempt.',\r
+ 'hlp_referer_domains' => 'This section takes the data from "Referring sites" '\r
+ . 'and sums it up by domain. AWStats does not show this information. '\r
+ . 'If a referer has a link to your site on each of its '\r
+ . 'pages, the overall number of referred visitors might be high, but the '\r
+ . 'referrer might still not show up in the top 10 of the "Refering Sites". '\r
+ . 'This is why BetterAWStats shows the domain sum so you can judge the true '\r
+ . 'value of a refering site.',\r
+ 'hlp_hotlinks' => 'This section shows the referrers from other sites where files '\r
+ . 'such as graphics where requested but no pages. This indicates that the '\r
+ . 'referring site is hotlinking to your site (using your bandwidth, storage '\r
+ . 'and image) while giving its own users the impression the data was hosted '\r
+ . 'at the referring site. This data is separated from the "Referring sites" '\r
+ . 'Statistics by BetterAWStats. AWStats does not make this difference.',\r
+ 'hlp_hotlink_domains' => 'This section shows the referrers from other sites where files '\r
+ . 'such as graphics where requested but no pages. This indicates that the '\r
+ . 'referring site is hotlinking to your site (using your bandwidth, storage '\r
+ . 'and image) while giving its own users the impression the data was hosted '\r
+ . 'at the referring site. This data is separated from the "Referring sites" '\r
+ . 'Statistics by BetterAWStats. AWStats does not make this difference. '\r
+ . 'In addition, BetterAWStats sums in this section the data by domain to make the hits by '\r
+ . 'domain more visible since one domain might hotlink the same data from '\r
+ . 'multiple URLs.',\r
+);\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+// since we are merging this here with the message file from AWSTATS, we have to\r
+// add these internal messages to the ones from AWSTATS. Please remember NOT to\r
+// use any numeric indexes since they are used by AWSTATS.\r
+\r
+// this language files is kindly translated into Dutch by Edwin de Ruijter\r
+\r
+global $BAW_MES;\r
+$BAW_MES += array(\r
+\r
+ // display.inc.php\r
+ 'data_file_stats' => 'Gegevens bestand bijwerken statistieken:',\r
+ 'parsed_records' => 'Geanalyseerde records:',\r
+ 'old_records' => 'Oude records:',\r
+ 'new_records' => 'Nieuwe records:',\r
+ 'corrupted' => 'Onbetrouwbaar:',\r
+ 'dropped' => 'Niet meegenomen:',\r
+ 'ratio_pages_hits' => 'Verhouding'.BR.'(Hits/Pagina\'s)',\r
+ 'files_paths' => 'Bestanden/directories',\r
+ 'user_agent' => 'User Agent',\r
+ 'size' => 'Grootte',\r
+ 'by_domains' => '%s per domeinen',\r
+ 'visits' => 'Bezoeken',\r
+ 'averages' => ' (Gemiddelden)',\r
+ 'assumedscript' => 'Verondersteld Robots/Spiders',\r
+ 'weekday_averages' => $BAW_MES[91] . ' (Gemiddelden)',\r
+ 'hours_averages' => $BAW_MES[20] . ' (Gemiddelden)',\r
+ 'os_versions' => "{$BAW_MES[59]} (+{$BAW_MES[58]})",\r
+ 'browser_versions' => "{$BAW_MES[21]} (+{$BAW_MES[58]})",\r
+ 'referer_hotlinks' => 'Hotlinks',\r
+ 'hl_by_domains ' => "Hotlinks per domeinen",\r
+ 'hotlinks_proxies' => 'Hotlinks/Proxies',\r
+\r
+ // baw_raise_error\r
+ 'baw_error' => 'BetterAWstats Fout',\r
+ 'datafile' =>\r
+ "Gegevens bestand is onbetrouwbaar, gegevens konden niet worden gelezen: %s;<br>'%s' moet zijn BEGIN_...".BR\r
+ . "Lees a.u.b. de FAQ (/doc/FAQ.txt)",\r
+ 'datafileindex' =>\r
+ "Gegevens bestand is onbetrouwbaar, gegevens-index kon niet worden gelezen: %s;<br>'%s' moet zijn BEGIN_...".BR\r
+ . "Lees a.u.b. de FAQ (/doc/FAQ.txt)",\r
+ 'datafilesdir' =>\r
+ "De gegevens bestanden konden niet gevonden worden in deze lokatie: %s".BR\r
+ . "Controleer a.u.b. uw config.php. De waarde van \$BAW_CONF['path_data'] moet "\r
+ . "verwijzen naar de directory waar awstats zijn gegevens bestanden bewaart "\r
+ . "(typisch iets als /cgi-bin/awstats/data). Controleer a.u.b. ook "\r
+ . "dat php lees-rechten heeft op deze directory.",\r
+ 'languagefile' =>\r
+ "Het taal bestand kon niet gevonden worden in deze lokatie: %s".BR\r
+ . "Controleer a.u.b. uw config.php. De waarde van \$BAW_CONF['path_lang'] moet "\r
+ . "verwijzen naar de directory waar awstats zijn taal bestand bewaart "\r
+ . "(typisch iets als /cgi-bin/awstats/lang). Controleer a.u.b. ook "\r
+ . "dat php lees-rechten heeft op deze directory.",\r
+ 'libraryfiles' =>\r
+ "De library bestanden konden niet gevonden worden in deze lokatie: %s".BR\r
+ . "Controleer a.u.b. uw config.php. De wwarde van \$BAW_CONF['path_lib'] moet "\r
+ . "verwijzen naar de directory waar awstats zijn library bestanden bewaart "\r
+ . "(typisch iets als /cgi-bin/awstats/lib). Controleer a.u.b. ook "\r
+ . "dat php lees-rechten heeft op deze directory.",\r
+ 'configwrite' =>\r
+ "Het configuratie bestand is niet overschrijfbaar. Controleer a.u.b. dat het script "\r
+ . "naar dit bestand kan schrijven of wijzig simpelweg dit bestand direct op de server "\r
+ . "in plaats van de configuratie Editor te gebruiken.",\r
+ 'configread' =>\r
+ "Het configuratie bestand kon niet worden geopend voor lees/schrijf toegang",\r
+ 'configdisabled' =>\r
+ "De online configureerder is uitgeschakeld. Zet a.u.b. "\r
+ . "\$BAW_CONF['online_config'] = true in uw config.php",\r
+ 'libraryeval' =>\r
+ "Een fout is opgetreden bij het analyseren van het awstats library bestand %s dat wordt gebruikt bij "\r
+ . "het ontleden van de variabele %s. Schakel a.u.b. debugging aan in config.php en "\r
+ . "zend de getoonde PHP foutboodschappen naar het support forum zodat het probleem verholpen kan worden.",\r
+ 'jpgraph_path' =>\r
+ "De bestanden voor jpgraph konden niet gevonden worden in %s. Schakel dit onderdeel uit in "\r
+ . "config.php of corrigeer het pad naar de bestanden.",\r
+ 'gd2notavailable' =>\r
+ "De PHP graphics library GD2 is niet beschikbaar. Schakel a.u.b. de map functie uit of installeer GD2."\r
+ . "U kunt meer informatie verkrijgen op http://php.net/manual/en/ref.image.php",\r
+ 'mapnotavailable' =>\r
+ "De afbeeldingen om de Map (%s) te maken zijn niet beschikbaar. Controleer a.u.b. dat u "\r
+ . "alle bestanden van de setup heeft en dat deze leesbaar zijn door "\r
+ . "de server.",\r
+ 'iconpath' =>\r
+ "De AWSTATS icons konden niet gevonden worden in deze locatie: %s".BR\r
+ . "Controlleer a.u.b. uw config.php. De waarde van \$BAW_CONF['icons_url'] moet "\r
+ . "wijzen naar de URL waar awstats zijn library bestanden bewaart "\r
+ . "(typisch iets als http://awstats.local/awstats/icon).",\r
+ 'site_path' =>\r
+ "Het pad naar awstats is niet goed gezet naar directory: %s".BR\r
+ . "Controlleer a.u.b. uw config.php. De waarde van \$BAW_CONF['site_path'] moet "\r
+ . "wijzen naar de directory waar BetterAWStats is ge-installeerd "\r
+ . "(typisch iets als /home/user/public_html/baw).".BR\r
+ . "Het schijnt dat uw script is ge-installeerd in '%s'.",\r
+ 'site_url' =>\r
+ 'De URL naar BetterAWStats is niet goed gezet in uw config.php. Hij staat momenteel '\r
+ . 'op %s, maar dat is niet goed. Het zou kunnen dat de URL %s moet zijn.',\r
+ 'password_match' =>\r
+ 'De ingevoerde wachtwoorden komen niet overeen. Ga a.u.b. terug en probeer opnieuw.',\r
+ 'password_change' =>\r
+ 'U probeert het standaard wachtwoord te gebruiken. Ga a.u.b. terug en wijzig hetnaar een '\r
+ . 'ander wachtwoord.',\r
+ 'password_short' =>\r
+ 'Uw wachtwoord dient minimaal uit 6 tekens te bestaan. Ga a.u.b. terug en '\r
+ . 'kies een langer wachtwoord.',\r
+ 'xmldata' =>\r
+ 'Your AWStats data files are stored in XML format. Unfortunately, BetterAWSTats '\r
+ . 'does not support XML data yet. Please store your datafiles in plain text.',\r
+\r
+ // $BAW_LIB['item_groups']\r
+ 'time' => 'Tijd',\r
+ 'user_information' => 'Gebruiker informatie',\r
+ 'user_actions' => 'Gebruiker akties',\r
+ 'user_origin' => 'Gebruiker herkomst',\r
+ 'other_access' => 'Andere toegang',\r
+\r
+ // debug messages\r
+ 'dbg_detect_language' => "Bezig de taal te vinden",\r
+ 'dbg_detected_language' => "Gevonden taal %s",\r
+ 'dbg_test_writable' => "Bezig te controleren of %s overschrijfbaar is",\r
+ 'dbg_test_writable_false' => "IS NIET overschrijfbaar: %s",\r
+ 'dbg_test_writable_true' => 'IS overschrijfbaar: %s',\r
+ 'dbg_found_dir' => 'Gevonden directory %s',\r
+ 'dbg_found_file' => 'Gevonden bestand: %s',\r
+ 'dbg_finished_parse_dir' => "Klaar met analyseren directory %s",\r
+ 'dbg_start_parse_dir' => "Start analyseren directory %s",\r
+\r
+ // config_default.inc.php\r
+ 'cfg_enable' => 'Schakel in',\r
+ 'cfg_disable' => 'Schakel uit',\r
+ 'cfg_show_all' => 'Toon alle',\r
+ 'monday' => 'Maandag',\r
+ 'sunday' => 'Zondag',\r
+ 'cfg_hide' => 'Verberg',\r
+ 'cfg_show' => 'Toon',\r
+ 'cfg_site_settings' => 'Site instellingen',\r
+ 'cfg_path_to_aws_data' => 'Pad naar AWStats gegevens',\r
+ 'cfg_path_to_aws_data_hlp' => "Zet deze waarde op de directory waar AWStats "\r
+ . "zijn gegevens bestanden in bewaart. ATTENTIE: Als u deze bestanden met "\r
+ . "windows leest, maar u heeft ze met Linux aangemaakt of vice versa, let er dan op "\r
+ . "dat u ze 'BINARY' overzet. Anders kunnen ze niet goed gelezen worden. "\r
+ . "Niet afsluiten met een slash.",\r
+ 'cfg_path_to_aws_lib' => 'Pad naar AWStats libraries',\r
+ 'cfg_path_to_aws_lib_hlp' => "Zet deze waarde op de directory waar AWStats "\r
+ . "zijn library bestanden in bewaart. Niet afsluiten met een slash.",\r
+ 'cfg_path_to_aws_lang' => 'Pad naar AWStats taal bestanden',\r
+ 'cfg_path_to_aws_lang_hlp' => 'Zet deze waarde op de directory waar AWStats '\r
+ . 'zijn language bestanden in bewaart. Niet afsluiten met een slash.',\r
+ 'cfg_script_url' => 'Script URL',\r
+ 'cfg_script_url_hlp' => "De url van BetterAWstats' directory, Niet afsluiten met een slash.",\r
+ 'cfg_script_path' => 'Script pad',\r
+ 'cfg_script_path_hlp' => 'Het pad van BetterAWstats, Niet afsluiten met een slash.',\r
+ 'cfg_aws_icons_url' => 'URL naar AWStats icons',\r
+ 'cfg_aws_icons_url_hlp' => 'De url naar de awstats icons, moet bevatten de '\r
+ . 'gehele http://..., niet afsluiten met een slash.',\r
+ 'cfg_web_config' => 'Web configuratie',\r
+ 'cfg_web_config_hlp' => 'De online configuratie editor inschakelen? LET OP: '\r
+ . 'Uw config.php bestand moet schrijfbaar zijn om dit in te schakelen. Het is AF TE RADEN '\r
+ . 'om dit te gebruiken, tenzij de directory wachtwoord-beveiligd is met een '\r
+ . '.htaccess bestand.',\r
+ 'cfg_web_config_pw' => 'Wijzig configuratie wachtwoord?',\r
+ 'cfg_web_config_pw_hlp' => 'Dit wachtwoord is nodig om toegang tot de online configuratie '\r
+ . 'te krijgen.',\r
+ 'cfg_limit_server' => 'Beperken tot server?',\r
+ 'cfg_limit_server_hlp' => 'Zet dit naar een enkele server waartoe u zich wilt beperken '\r
+ . 'of "false" om allen te tonen. De server naam moet degene zijn die gebruikt wordt voor awstats.',\r
+ 'cfg_layout_settings' => 'Opmaak instellingen',\r
+ 'cfg_layout_type' => 'Opmaak type',\r
+ 'cfg_layout_type_hlp' => 'Toon page in verticale of horizontale opmaak?',\r
+ 'cfg_vertical' => 'Verticaal',\r
+ 'cfg_horizontal' => 'Horizontaal',\r
+ 'cfg_language' => 'Taal',\r
+ 'cfg_language_hlp' => 'Zet uw taal. Zet op "auto" om de browserwaarde te nemen.',\r
+ 'cfg_firstweekday' => 'Eerste dag van de week',\r
+ 'cfg_firstweekday_hlp' => 'Moet Zondag de eerste dag van de weekzijn of maandag?',\r
+ 'cfg_decimalpoint' => 'Decimale punt',\r
+ 'cfg_decimalpoint_hlp' => "Decimale punt teken (99.9)",\r
+ 'cfg_thous_sep' => 'Duizendtal scheidingsteken',\r
+ 'cfg_thous_sep_hlp' => "Duizendtal scheidingsteken (1'000)",\r
+ 'cfg_date_form' => 'Datum formaat (2007-31-12)',\r
+ 'cfg_date_form_hlp' => 'Hoe moet een datum er uit zien? Voor formattering, raadpleeg '\r
+ . 'a.u.b. http://php.net/manual/en/function.date.php',\r
+ 'cfg_date_time_form' => 'Datum & tijd formaat (2007-31-12 23:59)',\r
+ 'cfg_date_time_form_hlp' => 'Hoe moet een datum & tijd er uit zien? Voor formattering, raadpleeg '\r
+ . 'a.u.b http://php.net/manual/en/function.date.php',\r
+ 'cfg_percent_dec' => 'Percentage decimalen',\r
+ 'cfg_percent_dec_hlp' => "Hoeveel decimalen voor percentages? (99.9%)",\r
+ 'cfg_field_length' => 'Veld lengte',\r
+ 'cfg_field_length_hlp' => 'Wat is de maximale tekstlengte van tabel velden? '\r
+ . "(Alleen van toepassing op links)",\r
+ 'cfg_max_lines' => 'Maximaal aantal tabel rijen',\r
+ 'cfg_max_lines_hlp' => 'Wat is het maximale aantal rijen dat een tabel kan hebben? '\r
+ . 'Zet op "false" om uit te schakelen. Als een tabel dit aantal rijen bereikt, '\r
+ . 'wordt de rest geaggregeerd in 1 regel. Dit gaat ook op voor de "full list view"'\r
+ . ' van een tabel.',\r
+ 'cfg_hide_empty' => 'Verberg lege gegevens',\r
+ 'cfg_hide_empty_hlp' => 'Volledig verbergen van grafieken met nul-entries? '\r
+ . '(Het menu wordt ook verborgen)',\r
+ 'cfg_auto_submit_form' => 'Voer dropdown-wijzigingen meteen uit',\r
+ 'cfg_auto_submit_form_hlp' => 'Als dit is ingeschakeld, zullen de site/datum dropdowns geen '\r
+ . '"OK"-button hebben. De pagina wordt aangeroepen zodra u een nieuwe waarde '\r
+ . 'kiest. Niet aanbevolen voor grote sites.',\r
+ 'cfg_chart_settings' => 'Grafiek instellingen',\r
+ 'cfg_max_scale_visitors' => 'Maximale schaal voor Bezoekers',\r
+ 'cfg_max_scale_visitors_hlp' => 'De maximum waarde van de gekozen optie zal '\r
+ . 'de maximum hoogte van de Bezoekers staven in de grafiek bepalen.',\r
+ 'cfg_max_scale_visits' => 'Maximale schaal voor Bezoeken',\r
+ 'cfg_max_scale_visits_hlp' => 'De maximum waarde van de gekozen optie zal '\r
+ . 'de maximum hoogte van de Bezoeken staven in de grafiek bepalen.',\r
+ 'cfg_max_scale_pages' => 'Maximale schaal voor Paginas',\r
+ 'cfg_max_scale_pages_hlp' => 'De maximum waarde van de gekozen optie zal '\r
+ . 'de maximum hoogte van de Paginas staven in de grafiek bepalen.',\r
+ 'cfg_max_scale_hits' => 'Maximale schaal voor Hits',\r
+ 'cfg_max_scale_hits_hlp' => 'De maximum waarde van de gekozen optie zal '\r
+ . 'de maximum hoogte van de Hits staven in de grafiek bepalen.',\r
+ 'cfg_max_chart_items' => 'Maximaal aantal grafiek rijen',\r
+ 'cfg_max_chart_items_hlp' => 'Wanneer grafieken getoond worden met de volledige lijsten, '\r
+ . 'hoeveel items kunnen dan getoond worden? De rest wordt gesommeerd in "'.$BAW_MES[2].'". '\r
+ . 'Dit wordt zo gedaan om te brede grafieken te voorkomen.',\r
+ 'cfg_chart_titles' => 'Grafiek Titels?',\r
+ 'cfg_chart_titles_hlp' => 'Indien ingeschakeld, zal er een titel boven iedere grafiek getoond worden.',\r
+ 'cfg_jpgraph_settings' => 'JPGraph instellingen',\r
+ 'cfg_jpgraph_enable' => 'Schakel JPgraph in?',\r
+ 'cfg_jpgraph_enable_hlp' => 'Om JPGraph te gebruiken, zult u dit moeten downloaden van '\r
+ . 'http://www.aditus.nu/jpgraph/jpdownload.php.',\r
+ 'cfg_jpgraph_path' => 'Pad naar JPGraph',\r
+ 'cfg_jpgraph_path_hlp' => 'Waar staat uw JPGraph installatie? (De directory '\r
+ . 'waar jpgraph.php in staat. Niet afsluiten met een slash.)',\r
+ 'cfg_table_settings' => 'Tabel instellingen',\r
+ 'cfg_advanced_settings' => 'Geavanceerde instellingen',\r
+ 'cfg_version' => 'Versie',\r
+ 'cfg_version_hlp' => 'Versie van deze software',\r
+ 'cfg_xhtml' => 'XHTML/ HTML',\r
+ 'cfg_xhtml_hlp' => 'Wilt u uw output in HTML or XHTML?',\r
+ 'cfg_debug' => 'Debug',\r
+ 'cfg_debug_hlp' => 'Wilt u debug-output tonen (ZEER gedetaileerd)?',\r
+ 'cfg_parser' => 'Analyse statistieken',\r
+ 'cfg_parser_hlp' => 'Wilt u log file analyse gegevens tonen onder de statistiek samenvatting?',\r
+ 'cfg_module' => 'Module instellingen',\r
+ 'cfg_module_hlp' => 'Gebruikt u BetterAWstats als module voor andere '\r
+ . 'software? (Momenteel is alleen Drupal ondersteund)',\r
+ 'cfg_type_order' => 'Sorteer volgorde',\r
+ 'cfg_type_show' => 'Toon deze gegevens?',\r
+ 'cfg_type_collapse' => 'Ingeklapt?',\r
+ 'cfg_type_table' => 'Toon gegevens tabel?',\r
+ 'cfg_type_sort' => 'Gesorteerd op welke kolom?',\r
+ 'cfg_possible_values'=> ' Mogelijke waarden zijn:',\r
+ 'cfg_type_sort_dir' => 'Sorteer richting?',\r
+ 'cfg_type_sort_dir_opts' => 'SORT_ASC=Oplopend, SORT_DESC=Aflopend',\r
+ 'cfg_type_chart' => 'Toon HTML grafiek?',\r
+ 'cfg_type_map' => 'Toon landkaart afbeelding?',\r
+ 'cfg_type_avg' => 'Toon geniddelden?',\r
+ 'cfg_type_total' => 'Toon totalen som?',\r
+ 'cfg_type_top_x' => 'Toon hoeveel entries?',\r
+ 'cfg_type_assumebot' => 'Verberg visitors waar Hits = Paginas?',\r
+ 'cfg_type_showmonths' => 'Toon hoeveel maanden?',\r
+ 'cfg_type_favicon' => 'Favicons ophalen voor externe URLs?',\r
+ 'cfg_type_domain_lvls' => 'Verkort URL naar hoeveel domein levels? (-1 om uit te schakelen)',\r
+ 'cfg_dis_overview' => 'Algemeen overzicht van kentallen en datums',\r
+ 'cfg_dis_months' => 'Maandelijkse gegevens',\r
+ 'cfg_dis_days' => 'Dagelijkse gegevens',\r
+ 'cfg_dis_weekdays' => 'Weekdagen',\r
+ 'cfg_dis_hours' => 'Uren van de dag',\r
+ 'cfg_dis_domains' => 'Domeinen van bezoekers',\r
+ 'cfg_dis_visitors' => 'IP addressen van bezoekers',\r
+ 'cfg_dis_logins' => 'Logins voor gebruikersnaam/wachtwoord beschermde paginas',\r
+ 'cfg_dis_robots' => 'Spiders, Robots van Zoek machines etc.',\r
+ 'cfg_dis_worms' => 'Worms die beveiligingslekken zoeken',\r
+ 'cfg_dis_sessions' => 'Hoe lang is men op de site geweest?',\r
+ 'cfg_dis_filetype' => 'Welke bestandstypen zijn op de site',\r
+ 'cfg_dis_urls' => 'Paginas op de site',\r
+ 'cfg_dis_paths_hlp' => 'Bestanden/paden op de site',\r
+ 'cfg_dis_paths' => 'Bestanden/paden',\r
+ 'cfg_dis_os' => 'Besturingssysteem van gebruikers',\r
+ 'cfg_dis_unknownos' => 'Onbekend besturingssysteem',\r
+ 'cfg_dis_osversions' => 'Besturingssysteem van gebruikers inklusief versies',\r
+ 'cfg_dis_browsers' => 'Gebruikers browser type',\r
+ 'cfg_dis_browserversions' => "Gebruikers browser type (+{$BAW_MES[58]})",\r
+ 'cfg_dis_unknownbrowser' => 'Onbekende browsers',\r
+ 'cfg_dis_unknownbrowser_agent' => 'User agent',\r
+ 'cfg_dis_screensizes' => 'Schermafmetingen van gebruikers',\r
+ 'cfg_dis_se_referers' => 'Referrals van zoek machines',\r
+ 'cfg_dis_referers' => 'Referrals van andere sites',\r
+ 'cfg_dis_referer_domains' => 'Referrals van andere sites, gegroepeerd per 2e level domeinen',\r
+ 'cfg_dis_hotlinks' => 'Paginas die verwijzen naar afbeeldingen/gegevens op uw site',\r
+ 'cfg_dis_hotlink_domains' => 'Domeinen die verwijzen naar afbeeldingen/gegevens op uw site',\r
+ 'cfg_dis_searchphrases' => 'Zoek zinnen',\r
+ 'cfg_dis_searchwords' => 'Zoek woorden',\r
+ 'cfg_dis_misc' => 'Gebruikers systeem kenmerken',\r
+ 'cfg_dis_errors' => 'Toegang tot pagina\'s die foutmeldingen afgaven',\r
+\r
+ // display_helpers\r
+ 'config_not_writable' => 'Configuratie bestand niet overschrijfbaar!',\r
+ 'config_editor' => 'Configuratie editor',\r
+ 'created_by' => 'gemaakt door %s',\r
+ 'config_intro' => "// ATTENTIE:\r\n// BetterAWstats heeft een online config "\r
+ . "editor die u kunt gebruiken inplaats van deze file te editen. De "\r
+ . "verwijzing naar de online config editor staat onderaan het menu! Om "\r
+ . "deze te gebruiken zet u \$BAW_CONF['online_config']= true; en zorgt "\r
+ . "u ervoor dat het bestand overschrijfbaar is door de server.\r\n",\r
+ 'cfg_name' => 'NAAM: ',\r
+ 'cfg_info' => 'INFO: ',\r
+ 'cfg_def' => 'DEFAULT:',\r
+ 'cfg_display' => 'TOON',\r
+ 'cfg_display2' => 'Toon',\r
+ 'cfg_logout' => 'Uitloggen',\r
+ 'confirm_password' => 'Bevestig Wachtwoord: ',\r
+ 'cfg_saved' => "De configuratie is bewaard. Ga verder met "\r
+ . "<a href=\"{$BAW_CONF['site_url']}/\">Statistieken</a> of ga terug naar de "\r
+ . "<a href=\"{$BAW_CONF['site_url']}/index.php?action=config_editor\">"\r
+ . "Config editor</a>.",\r
+ 'cfg_save' => 'Bewaar alles',\r
+ 'cfg_reset' => 'Reset',\r
+ 'cfg_exit' => 'Exit',\r
+ 'cfg_asc'=> 'Oplopend',\r
+ 'cfg_desc' => 'Aflopend',\r
+ 'show' => 'Toon',\r
+ 'hide' => 'Verberg',\r
+ 'all_months' => 'Alle (Maandelijks)',\r
+ 'all_days' => 'Alle (Dagelijks)',\r
+ 'get_help' => 'Vraag hulp',\r
+ 'back' => 'Terug',\r
+ 'version_check' => 'Kijk of er updates zijn',\r
+ 'version_info' => 'Versie Gegevens',\r
+ 'unknown_list' => 'Onbekende Gegevens',\r
+\r
+ // config.inc.php\r
+ 'require_password' => 'Voer a.u.b. het wachtwoord in en druk op OK.',\r
+ 'password_incorrect' => 'Het wachtwoord is onjuist. Probeer a.u.b. opnieuw.',\r
+\r
+ // reder_table\r
+ 'table_max_hits_exceed' => '(Overstijgende max_hits config beperken tot %s)',\r
+ 'records'=> '%s records',\r
+\r
+ // section help\r
+ 'hlp_overview' => 'Deze sectie toont de algemene gegevens van de huidig '\r
+ . 'geselecteerde maand. Let a.u.b. op dat de hits, veroorzaakt door hotlinks en '\r
+ . 'robots, hacker-scripts etc., op een niet accurate wijze zijn weggelaten. Als u '\r
+ . "\$BAW_CONF['show_parser_stats'] op true zet, kunt u hier statistieken zien over"\r
+ . 'de logfile update zoals geanalyseerde records, oude records, nieuwe records, '\r
+ . 'onbetrouwbare en weggelaten regels.',\r
+ 'hlp_months' => 'Deze sectie toont de historie van gegevens enkele maanden in het '\r
+ . 'verleden. U kunt de tijdspanne veranderen in de configuratie.',\r
+ 'hlp_days' => 'Deze sectie toont de dagelijkse historie van gegevens van de geselecteerde maand. '\r
+ . 'Als de huidige maand nog gaande is, zullen hier de gegevens getoond worden van de '\r
+ . 'verleden maand voor hezelfde aantal dagen dat nog te gaan is in de huidige maand. ',\r
+ 'hlp_weekdays' => 'Deze sectie toont de gemiddelden van bezoeken/pagina\'s/hits historie voor '\r
+ .'elke weekdag. Omdat iedere maand een verschillend aantal weekdagen heeft, zou sommering '\r
+ . 'van de gegevens, zoals AWSTATS dat doet, de gegevens vervormen. Daarom toont BetterAWStats '\r
+ . 'alleen de gemiddelden.',\r
+ 'hlp_hours' => 'Deze sectie toont de gemiddelden van bezoeken/pagina\'s/hits historie voor '\r
+ .'elk uur van de dag. Als de huidige maand nog gaande is, zou sommering '\r
+ . 'van de gegevens, zoals AWSTATS dat doet, de gegevens vervormen. Daarom toont BetterAWStats '\r
+ . 'alleen de gemiddelden.',\r
+ 'hlp_domains' => 'Deze sectie toont de hits per land (indien bekend). Let a.u.b. op dat '\r
+ . 'in de wereldkaartafbeelding de domeinen us, mil, edu, gov en arpa gesommeerd zijn in het "us" domein.',\r
+ 'hlp_visitors' => 'Deze sectie toont de statistieken per gebruiker\'s IP adres. '\r
+ . 'Omdat haast alle pagina\'s bestaan uit verschillende bestanden (afbeeldingen, stylesheets etc.), '\r
+ . 'zijn bezoeken met met een lage hits/pagina\'s ratio zeer '\r
+ . 'waarschijnlijk gecreeerd door bots, scripts of andere software maar niet door reguliere gebruikers. '\r
+ . 'Deze zijn hier gesommeerd onder "Veronderstelde Scripts & Bots". Om de ratio te wijzigen '\r
+ . 'die een gebruiker als een script definieert, verandert u de '\r
+ . '$BAW_CONF_DIS[\'visitors\'][\'assumebot\'] waarde in de configuratie.'\r
+ . 'Evenzo, gebruikers met alleen hits maar geen pagina\'s zijn hits van proxies of '\r
+ . 'hotlinking gebruikers. Deze zijn gesommeerd onder "Hotlinks/Proxies".' ,\r
+ 'hlp_logins' => 'Deze sectie toont de hits per ge-autoriseerde gebruiker. Een gebruiker '\r
+ . 'met maar 1 hit is zeer waarschijnlijk het resultaat van een mislukte login poging.',\r
+ 'hlp_referer_domains' => 'Deze sectie neemt de gegevens van "Referring sites" '\r
+ . 'en sommeerd dit per domein. AWStats toont deze informatie niet. '\r
+ . 'Als een referer een link naar uw site heeft op al zijn '\r
+ . 'pagina\'s, dan zou het totaal aantal van refer bezoekers zeer hoog zijn, maar de '\r
+ . 'referrer zou nog steeds niet getoond worden in de top 10 van de "Refering Sites". '\r
+ . 'Dit is de reden dat BetterAWStats het domein totaal toont, zodat u de juiste waarde aan '\r
+ . 'refering site kunt hechten.',\r
+ 'hlp_hotlinks' => 'Deze sectie toont de referrers van andere sites die bestanden '\r
+ . 'zoals afbeeldingen aanvragen maar geen pagina\'s. Dit houdt in dat de '\r
+ . 'referring site hotlinks naar uw site heeft (en dus gebruik maakt van uw bandbreedte, opslag '\r
+ . 'en afbeelding(en)) terwijl zijn gebruikers het idee gegeven wordt dat de gegevens gehost '\r
+ . 'zijn op de referring site. Deze gegevens zijn gescheiden van "Referring sites" '\r
+ . 'Statistieken door BetterAWStats. AWStats maakt dit onderscheid niet. ',\r
+ 'hlp_hotlink_domains' => 'Deze sectie toont de referrers van andere sites die bestanden '\r
+ . 'zoals afbeeldingen aanvragen maar geen pagina\'s. Dit houdt in dat de '\r
+ . 'referring site hotlinks naar uw site heeft (en dus gebruik maakt van uw bandbreedte, opslag '\r
+ . 'en afbeelding(en)) terwijl zijn gebruikers het idee gegeven wordt dat de gegevens gehost '\r
+ . 'zijn op de referring site. Deze gegevens zijn gescheiden van "Referring sites" '\r
+ . 'Statistieken door BetterAWStats. AWStats maakt dit onderscheid niet '\r
+ . 'Bovendien, BetterAWStats sommeert in deze sectie de gegevens per domain om de hits per '\r
+ . 'domein meer inzichtelijk te maken, omdat een domain wellicht dezelfde gegevens '\r
+ . 'van meerdere URLs hotlinkt.',\r
+);\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+// this file can't be used on its own\r
+if (strpos ($_SERVER['PHP_SELF'], 'render_htmlchart.inc.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+function baw_render_htmlchart($chart, $format, $get_avg=false, $top_x=false, $dataformat=false) {\r
+ baw_debug("rendering chart");\r
+ global $BAW_CONF, $BAW_LIB, $BAW_MES;\r
+\r
+ // FORMATS -----------------------------------------------------------------\r
+ $format_arr = array();\r
+ $itemcount = count($chart);\r
+\r
+ // we have time data, $top_x has to work from the back instead of the front\r
+ $time_data = false;\r
+ if ($top_x < 0) {\r
+ $time_data = true;\r
+ $top_x = abs($top_x);\r
+ }\r
+ if ($get_avg) {\r
+ $top_x++;\r
+ }\r
+\r
+ $top_x = min($BAW_CONF['max_chart_items'], $top_x);\r
+ $top_x_count = $top_x;\r
+ // if its not set, use count of items (day, month etc)\r
+ if (!$top_x_count) {\r
+ $top_x_count = $itemcount;\r
+ }\r
+ // find the smaller one to know the resulting lines\r
+ if (min($top_x_count, $itemcount) > 12) {\r
+ $width = 4;\r
+ } else {\r
+ $width = 6;\r
+ }\r
+ // iterate formats for header\r
+ $text_fields = 0;\r
+ foreach ($format as $cell => $attr) {\r
+ // iterate one formats attributes\r
+ $format_arr[] = $attr['format'];\r
+ // we need the number of textfields so we can prepend them to the averages array.\r
+ // otherwise the fields for avg and others are not in the right columns\r
+ if ($attr['format'] == 'layout_text') {\r
+ $text_fields++;\r
+ }\r
+ // $title_arr[] = $attr['title'];\r
+ }\r
+ // Max & averages calculation ----------------------------------------------\r
+ // the max has to be calculated before so the bar height can be calculated\r
+ // the sum has to be known for averages\r
+ // iterate all the table and count the sums of all numeric data\r
+ $max_arr = array();\r
+ $sum_arr = array();\r
+ $avg_arr = array();\r
+ $others = array();\r
+\r
+ $filled_lines = $itemcount; // get the value for substraction\r
+ $row_no = 0;\r
+ $othercount = 0;\r
+ $hasothers = false;\r
+ foreach ($chart as $lineid => $row) {\r
+ $cell_no = 0;\r
+ $rowsum = 0;\r
+ $hasothers = false;\r
+ foreach ($row as $cell) {\r
+ if ($format_arr[$cell_no] != 'layout_text') { // we dont include the text\r
+ // max calculation\r
+ @$max_arr[$cell_no] = max($max_arr[$cell_no], $cell);\r
+ // sum calculation\r
+ @$sum_arr[$cell_no] += $cell;\r
+ // average calculation\r
+ if (is_numeric($cell) && $get_avg) {\r
+ $rowsum += $cell;\r
+ if ($row_no == ($itemcount-1) && $filled_lines >= 1) { // last line, assume sums are done\r
+ if ($rowsum == 0 && $cell_no == 0) { // do once again for last line, dont substract further after first cell\r
+ $filled_lines--;\r
+ }\r
+ $avg_arr[$cell_no] = $sum_arr[$cell_no] / $filled_lines;\r
+ }\r
+ } else if ($get_avg) {\r
+ $avg_arr[$cell_no] = '';\r
+ }\r
+ // others calculation\r
+ if ((!$time_data && $top_x && ($row_no >= $top_x))) {\r
+ // max calculation\r
+ @$max_arr[$cell_no] = max($max_arr[$cell_no], $others[$cell_no]);\r
+ $hasothers = true;\r
+ @$others[$cell_no] += $cell;\r
+ } else if ($time_data && $top_x && (($itemcount - $row_no) >= $top_x)){\r
+ $hasothers = true;\r
+ // for now, we do not accumulate old data for months/days -- optional?\r
+ // risk is that 'others' is so big that it does not make sense\r
+ //@$others[$cell_no] += $cell;\r
+ //@$max_arr[$cell_no] = max($max_arr[$cell_no], $others[$cell_no]);\r
+ }\r
+ }\r
+ $cell_no ++;\r
+ }\r
+ // we processes the line, if we are already in the 'others' remove the line\r
+ if ($hasothers) {\r
+ $othercount ++;\r
+ unset($chart[$lineid]);\r
+ }\r
+ // remove one line from avg-count if data empty\r
+ if ($rowsum == 0) {\r
+ $filled_lines--;\r
+ }\r
+ $row_no++; // count to find out if we are ready to do averages\r
+ }\r
+ // make the array longer to fit, first index is 1 since it comes after the array title\r
+ if ($text_fields >= 1) {\r
+ $empty_arr = array_pad(array(), $text_fields - 1, '');\r
+ } else {\r
+ $empty_arr = array();\r
+ }\r
+ // add others to the table\r
+ if ($hasothers && !$time_data) { // we got others, add them to the end\r
+ $row_no++;\r
+ $others = $empty_arr + array($text_fields - 1 => $BAW_MES[2]) + $others;\r
+ $chart += array('layout_others' => $others);\r
+ } else if ($hasothers && $time_data) {\r
+ $row_no++;\r
+ $others = $empty_arr + array($text_fields - 1 => $BAW_MES[2]) + $others;\r
+ //$temp = array('layout_others' => $others);\r
+ //$chart = $temp + $empty_arr + $chart;\r
+ }\r
+ // add averages to the table\r
+ if ($get_avg) {\r
+ $row_no++;\r
+ $avg_arr = $empty_arr + array($text_fields - 1 => $BAW_MES[96]) + $avg_arr;\r
+ $chart += array('layout_avg' => $avg_arr);\r
+ }\r
+\r
+ $out = "\n<table class=\"charttable\">\n";\r
+ $out .= " <tr>\n";\r
+ // create the title\r
+\r
+ if (isset($format[0]['title']) && $BAW_CONF['chart_titles']) {\r
+ $count_str = sprintf($BAW_MES['records'], baw_num_format($itemcount));\r
+ $out .=" <tr>\n <th class=\"header_wrap\" colspan=\"$row_no\">{$format[0]['title']} ($count_str)</th>\n </tr>\n";\r
+ }\r
+\r
+ $l = 0;\r
+ $fieldcount = 0;\r
+ $legend = array();\r
+ foreach ($chart as $lineid => $row) {\r
+ $class = '';\r
+ if (isset($dataformat[$lineid])) {\r
+ $class = " {$dataformat[$lineid]}";\r
+ } else if ($lineid === 'layout_others' || $lineid === 'layout_avg') {\r
+ $class .= " $lineid";\r
+ }\r
+ $out .= " <td class=\"chartcell$class\">\n";\r
+ $cell_no = 0;\r
+ foreach ($row as $cell) {\r
+ // only take the numeric values\r
+ if ($format_arr[$cell_no] != 'layout_text') {\r
+ $tags = '';\r
+ $function = $BAW_LIB['formats'][$format_arr[$cell_no]]['frm'];\r
+ $txt = $BAW_LIB['formats'][$format_arr[$cell_no]]['txt'];\r
+ $img = $BAW_LIB['formats'][$format_arr[$cell_no]]['img'];\r
+ $alt = "{$BAW_MES[$txt]}: ". exec_function($function, $cell);\r
+ $max_string = str_replace('layout_', '', $format[$cell_no]['format']);\r
+ // scale after what?\r
+ $max_key = array_search($BAW_CONF["max_$max_string"], $format_arr);\r
+ if ((isset($max_arr[$max_key])) && ($max_arr[$max_key]>0)) {\r
+ $height = $cell / ($max_arr[$max_key] / 100);\r
+ } else {\r
+ $height = 1;\r
+ }\r
+ if ($height < 1) {\r
+ $height = 1;\r
+ }\r
+ $attr = array(\r
+ 'height'=> $height,\r
+ 'width' => $width,\r
+ 'alt' => $alt,\r
+ 'title' => $alt,\r
+ 'class' => 'chartimg'\r
+ );\r
+ $out .= baw_create_image($BAW_CONF['icons_url'] . "/other/{$img}", $attr);\r
+ } else {\r
+ // write legend\r
+ $fieldcount = max($cell_no, $fieldcount);\r
+ @$legend[$l][$cell_no] =" <td$tags colspan=\"1\">$cell</td>\n";\r
+ if (isset($legend[$l-1][$cell_no]) && isset($cell)) {\r
+ if (preg_match('#colspan=\\"(\d+)\\">'. $cell.'</td>#', $legend[$l-1][$cell_no], $number)) {\r
+ $number[1]++;\r
+ @$legend[$l][$cell_no] =" <td$tags colspan=\"{$number[1]}\">$cell</td>\n";\r
+ $legend[$l-1][$cell_no] ="";\r
+ }\r
+ }\r
+ }\r
+ $cell_no ++;\r
+ }\r
+ $out .= "\n </td>\n";\r
+ $f = 1;\r
+ $l ++;\r
+ }\r
+\r
+ $out .= " </tr>\n";\r
+ // Display legend\r
+ $linecount = $l;\r
+ // we inverse the order so the ones standing closer to the data in the table\r
+ // are on top here\r
+ for ($f=$fieldcount; $f>=0; $f--) {\r
+ $out .= " <tr class=\"chartlegend\">\n";\r
+ for ($l=0; $l<$linecount; $l++) {\r
+ $out .= $legend[$l][$f];\r
+ }\r
+ $out .= " </tr>\n";\r
+ }\r
+ $out .= "</table>\n";\r
+ baw_debug("rendering chart finished");\r
+ return $out;\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+// this file can't be used on its own\r
+if (strpos ($_SERVER['PHP_SELF'], 'render_htmlchart.inc.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+function baw_render_htmlchart2($chart, $get_avg, $top_x) {\r
+ baw_debug("rendering chart");\r
+ global $BAW_CONF, $BAW_LIB, $BAW_MES;\r
+ $out = '';\r
+ // in case this is a full list, dont make it too wide\r
+ $top_x = min($BAW_CONF['max_chart_items'], $top_x);\r
+ // find out max values\r
+ $max = array();\r
+ $avg = array();\r
+ $sum = array();\r
+ $other = array();\r
+ $count_val = count($chart);\r
+ // take out topx so we can manipulate it for width calculation\r
+ $top_x_count = $top_x;\r
+ // if its not set, use count of items (day, month etc)\r
+ if (!$top_x_count) {\r
+ $top_x_count = $count_val;\r
+ }\r
+ // find the smaller one to know the resulting lines\r
+ if (min($top_x_count, $count_val) > 12) {\r
+ $width = 4;\r
+ } else {\r
+ $width = 6;\r
+ }\r
+ // get maximum values for scaling\r
+ $count_up = 0;\r
+ $count_val_static = $count_val;\r
+ foreach ($chart as $lineid => $row) { // get the first set of data (one month/day/etc)\r
+ $rowsum = 0;\r
+ $count_val--; // this is used to find the final line\r
+ foreach ($row as $cell => $attr) { // iterate through all the different data of one set\r
+ $data = $attr['data'];\r
+ @$max[$attr['format']] = max(@$max[$attr['format']], $data);\r
+ // add others to chart\r
+ if ($top_x && $count_up >= $top_x) {\r
+ @$other[$attr['format']] += $data;\r
+ if ($count_val == 0) { // do this only for the last value\r
+ // adding averages to the end of the data\r
+ $chart[$BAW_MES[2]][] = array(\r
+ 'data'=> $other[$attr['format']],\r
+ 'format' => $attr['format']\r
+ );\r
+ // add one more line so that others gets displayed\r
+ // get max again for others value\r
+ @$max[$attr['format']] = max(@$max[$attr['format']], $other[$attr['format']]);\r
+ }\r
+ }\r
+ if ($get_avg) {\r
+ // add avg to charts\r
+ @$sum[$attr['format']] += $data;\r
+ //if ($count_val >= 0) { // sum all values of this row\r
+ $rowsum += $data;\r
+ //}\r
+ if ($count_val == 0) { // do this only for the last value\r
+ @$avg[$attr['format']] = $sum[$attr['format']] / $count_val_static;\r
+ // adding averages to the end of the data\r
+ $chart[$BAW_MES[96]][] = array(\r
+ 'data'=> $avg[$attr['format']],\r
+ 'format' => $attr['format']\r
+ );\r
+ }\r
+ }\r
+ }\r
+ if ($top_x && $count_up >= $top_x) {\r
+ // remove 'other' data from chart after its processed\r
+ unset($chart[$lineid]);\r
+ }\r
+ if ($rowsum == 0) { // substract line if all values zero\r
+ $count_val_static--;\r
+ }\r
+ $count_up++;\r
+ }\r
+ // we need extra lines if we have this data\r
+ if (isset($chart[$BAW_MES[2]])) { // others\r
+ $top_x++;\r
+ }\r
+ if ($get_avg) {\r
+ $top_x++;\r
+ }\r
+ // create actual chart\r
+ $legend = '';\r
+ $out .= "\n<table class=\"charttable\">\n";\r
+ $out .= " <tr>\n";\r
+ $c = 0;\r
+ $others = false;\r
+ $otherdata = array();\r
+ foreach ($chart as $lineid => $row) {\r
+ if (!$top_x or $c < $top_x) {\r
+ $out .= " <td class=\"chartcell\">\n";\r
+ foreach ($row as $cell => $attr) {\r
+ $tags = '';\r
+ // create attributes\r
+ foreach ($attr as $name => $value){\r
+ if ($name == 'data') {\r
+ $data = $value;\r
+ } else if ($name != 'format') {\r
+ $tags .= " $name=\"$value\"";\r
+ }\r
+ }\r
+ $format = $BAW_LIB['formats'][$attr['format']];\r
+ $function = $format['frm'];\r
+ $alt = "{$BAW_MES[$format['txt']]}: ". exec_function($function, $data);\r
+ // insert here the scaling figure\r
+ $max_string = str_replace('layout_', '', $attr['format']);\r
+ $max_val_field = $BAW_CONF["max_$max_string"];\r
+ if ((isset($max[$max_val_field])) && ($max[$max_val_field]>0)) {\r
+ $height = $data / ($max[$max_val_field] / 100); //( / ) * 100;\r
+ } else {\r
+ $height = 1;\r
+ }\r
+ if ($height < 1) {\r
+ $height = 1;\r
+ }\r
+ $attr = array(\r
+ 'height'=> $height,\r
+ 'width' => $width,\r
+ 'alt' => $alt,\r
+ 'title' => $alt,\r
+ 'class' => 'chartimg'\r
+ );\r
+ $out .= baw_create_image($BAW_CONF['icons_url'] . "/other/{$format['img']}", $attr);\r
+ }\r
+ $out .= "\n </td>\n";\r
+ $legend_arr = explode("|",$lineid);\r
+ if (!isset($legendcount)) {\r
+ $legendcount = count($legend_arr);\r
+ }\r
+ $f = 1;\r
+ for ($i=0; $i<$legendcount; $i++) {\r
+ if ($i > 0) {\r
+ $tags = '';\r
+ }\r
+ @$legend[$i][$c] =" <td$tags colspan=\"1\">{$legend_arr[$i]}</td>\n";\r
+ if (isset($legend[$i][$c-1]) && isset($legend_arr[$i])) {\r
+ $f ++;\r
+ if (preg_match('#colspan=\\"(\d+)\\">'. $legend_arr[$i].'</td>#', $legend[$i][$c-1], $number)) {\r
+ $number[1]++;\r
+ @$legend[$i][$c] =" <td$tags colspan=\"{$number[1]}\">{$legend_arr[$i]}</td>\n";\r
+ $legend[$i][$c-1] ="";\r
+ }\r
+ } else {\r
+ $f = 1;\r
+ }\r
+ }\r
+ }\r
+ $c ++;\r
+ }\r
+ if ($top_x and $c > $top_x) {\r
+ $c = $top_x;\r
+ }\r
+ $out .= " </tr>\n";\r
+ // Display legend\r
+ if (!isset($legendcount)) {\r
+ $legendcount = 0;\r
+ }\r
+\r
+ for ($i=0; $i<$legendcount; $i++) {\r
+ $out .= " <tr class=\"chartlegend\">\n";\r
+ for ($j=0; $j<$c; $j++) {\r
+ $out .= $legend[$i][$j];\r
+ }\r
+ $out .= " </tr>\n";\r
+ }\r
+ $out .= "</table>\n";\r
+ baw_debug("rendering chart finished");\r
+ return $out;\r
+}\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2007 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+\r
+// this file can't be used on its own\r
+if (isset($_GET['getgraph'])) {\r
+ baw_render_jpgraph_img();\r
+} else if (strpos ($_SERVER['PHP_SELF'], 'reder_map.inc.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+// $out .= baw_render_jpgraph ($set['name'], $newval, $format, 'pie', false, $set['top_x']);\r
+\r
+function baw_render_jpgraph ($name, $chart, $format, $type='pie', $get_avg=false, $top_x=false, $sort=0) {\r
+ global $BAW_CONF, $BAW_MES;\r
+ $dir = $BAW_CONF['jpgraph_path'] . '/jpgraph.php';\r
+\r
+ if (!file_exists($dir)) {\r
+ return baw_raise_error('jpgraph_path', array($dir));\r
+ }\r
+\r
+ $jp_data = array();\r
+ // $jp_legend = array();\r
+ $entries = 0;\r
+ if (count($chart) == 0) {\r
+ return "";\r
+ }\r
+ // calc others\r
+ $f = '';\r
+ $d = '';\r
+ $others = 0;\r
+ $other_arr = array();\r
+\r
+ foreach ($chart as $id => $data) {\r
+ $count = count($data);\r
+ if ($entries < $top_x) {\r
+ foreach ($format as $fid => $fdata) {\r
+ $d .= "&d[$fid][]={$data[$fid]}";\r
+ }\r
+ } else { // 'others'\r
+ foreach ($format as $fid => $fdata) {\r
+ if ($fdata['format'] !== 'layout_text' &&\r
+ $fdata['format'] !== 'layout_date') {\r
+ @$other_arr[$fid] += $data[$fid];\r
+ } else {\r
+ if ($fid == 0) {\r
+ $other_arr[$fid] = $BAW_MES[2];\r
+ } else {\r
+ $other_arr[$fid] = '';\r
+ }\r
+ }\r
+ }\r
+ }\r
+ $entries ++;\r
+ }\r
+ foreach ($other_arr as $oid => $odata) {\r
+ $d .= "&d[$oid][$top_x]=$odata";\r
+ }\r
+ foreach ($format as $fid => $fdata) {\r
+ $f .= "&f[]= {$fdata['title']}";\r
+ }\r
+\r
+ // $count = count($jp_data);\r
+\r
+ $img_url = $BAW_CONF['site_url'] . "/modules/render_jpgraph.inc.php?getgraph=true&type=$type$d$f";\r
+ $out = "<div class=\"aligncenter\"><img width=\"575\" height=\"286\" alt=\"chart: $name\" src=\"$img_url\"></div>";\r
+ return $out;\r
+}\r
+\r
+function baw_render_jpgraph_img() {\r
+ include_once("../config.php");\r
+\r
+ if (isset($_GET['type'])) {\r
+ $type = $_GET['type'];\r
+ } else {\r
+ return;\r
+ }\r
+\r
+ $d = $_GET['d'];\r
+ $f = $_GET['f'];\r
+\r
+ $count = count($d);\r
+ $dir = $BAW_CONF['jpgraph_path'] . '/jpgraph.php';\r
+ include_once ($dir);\r
+ switch($type){\r
+ case 'bar':\r
+ include_once ($BAW_CONF['jpgraph_path'] . '/jpgraph_bar.php');\r
+ break;\r
+ case 'pie':\r
+ include_once ($BAW_CONF['jpgraph_path'] . "/jpgraph_pie.php");\r
+ $size = 0.17;\r
+ $graph = new PieGraph(600,250,"auto");\r
+ for ($i=0; $i<1; $i++) {\r
+ $p1 = new PiePlot($d[$i]);\r
+ if ($i == 0) {\r
+ $p1->SetLegends($d[0]);\r
+ }\r
+ $p1->title->Set($f[1]);\r
+ $p1->SetSize($size);\r
+ $vert = 0.15 + (($size + 0.1) * $i);\r
+ $p1->SetCenter($vert,0.3);\r
+ $p1->SetStartAngle(0);\r
+ $p1->SetTheme("sand");\r
+ $graph->Add($p1);\r
+ }\r
+ $graph->Stroke();\r
+ break;\r
+ case 'line':\r
+ include_once ($BAW_CONF['jpgraph_path'] . "/jpgraph_line.php");\r
+ break;\r
+ }\r
+ return $out;\r
+}\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the initial BAWstats drupal module map\r
+ * copyright 2007 Andrew Gillies (anaru at equivocation dot org)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+\r
+// this file can't be used on its own\r
+if (isset($_GET['getmap'])) {\r
+ baw_render_map_img();\r
+} else if (strpos ($_SERVER['PHP_SELF'], 'reder_map.inc.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+function baw_render_map($data, $top_x = false) {\r
+ global $BAW_CONF;\r
+ // if we don't have GD2 functions, we can't generate the image\r
+ baw_debug("rendering map");\r
+ if (!function_exists('imagecreatetruecolor')) {\r
+ echo baw_raise_error('gd2notavailable', array());\r
+ return;\r
+ }\r
+\r
+ $im = $BAW_CONF['site_path'] .'/icons/wmap.png';\r
+ if (!file_exists($im)) {\r
+ echo baw_raise_error('mapnotavailable', array($im));\r
+ }\r
+\r
+ // fix data for geography\r
+ $us_domains =array('us', 'mil', 'edu', 'gov', 'arpa');\r
+ foreach ($us_domains as $us_domain) {\r
+ if (isset($data[$us_domain][3])) {\r
+ if (!isset($data['us'])) {\r
+ $data['us'] = array(0,0,0,0,0);\r
+ }\r
+ $data['us'][3] += $data[$us_domain][3];\r
+ }\r
+ if (isset($data[$us_domain][4])) {\r
+ if (!isset($data['us'])) {\r
+ $data['us'] = array(0,0,0,0,0);\r
+ }\r
+ $data['us'][4] += $data[$us_domain][4];\r
+ }\r
+ }\r
+ $new_data = '';\r
+ $doms = 0;\r
+ foreach ($data as $country => $vars) {\r
+ if (($doms >= $top_x) && ($top_x !== false)) {\r
+ break;\r
+ }\r
+ $new_data .= "&c[$country][0]={$vars[3]}&c[$country][1]={$vars[4]}";\r
+ $doms ++;\r
+ }\r
+ $module = $BAW_CONF['module'];\r
+ if ($module == 'drupal') {\r
+ $img_url = drupal_get_path('module', 'bawstats');\r
+ } else {\r
+ $img_url = $BAW_CONF['site_url'];\r
+ }\r
+ $img_url .= "/modules/render_map.inc.php?getmap=true$new_data&m=$module";\r
+ $out = "<div class=\"aligncenter\"><img width=\"574\" height=\"286\" alt=\"map of domains\" src=\"$img_url\"" . XHTML . "></div>";\r
+ baw_debug("rendering map finished");\r
+ return $out;\r
+}\r
+\r
+function baw_render_map_img() {\r
+ $data = $_GET['c'];\r
+ $module = $_GET['m'];\r
+\r
+ // Set headers\r
+ header('Expires: Mon, 01 Jan 1997 05:00:00 GMT');\r
+ header('Cache-Control: no-store, no-cache, must-revalidate');\r
+ header('Cache-Control: post-check=0, pre-check=0', false);\r
+ header('Pragma: no-cache');\r
+\r
+ header('Content-type: image/png');\r
+\r
+ if ($module == 'drupal') {\r
+ $BAW_CONF['site_path'] = drupal_get_path('module', 'bawstats');\r
+ } else {\r
+ include_once("./../config.php");\r
+ }\r
+\r
+ $im = $BAW_CONF['site_path'] .'/icons/wmap.png';\r
+ if (!file_exists($im)) {\r
+ echo "Error!";\r
+ }\r
+ $im = imagecreatefrompng($im);\r
+ imagealphablending($im, true);\r
+\r
+ $mapX = imagesx($im);\r
+ $mapY = imagesy($im);\r
+\r
+ $dommap = array(\r
+ 'uk' => array(266,88), 'au' => array(485,224), 'nz' => array(545,251),\r
+ 'be' => array(276,95), 'es' => array(262,116), 'pt' => array(256,117),\r
+ 'ad' => array(271,111), 'it' => array(289,111), 'fr' => array(272,103),\r
+ 'ie' => array(257,90), 'nl' => array(277,92), 'de' => array(284,94),\r
+ 'pl' => array(292,91), 'lu' => array(276,97), 'ch' => array(283,102),\r
+ 'at' => array(287,102), 'gr' => array(304,118), 'al' => array(300,114),\r
+ 'cs' => array(299,109), 'ba' => array(296,108), 'mk' => array(303,114),\r
+ 'bg' => array(307,110), 'ro' => array(309,105), 'hu' => array(300,102),\r
+ 'sk' => array(300,99), 'cz' => array(292,97), 'pl' => array(296,91),\r
+ 'dk' => array(283,83), 'va' => array(288,112), 'tr' => array(321,117),\r
+ 'ua' => array(320,97), 'by' => array(312,88), 'lt' => array(304,86),\r
+ 'lv' => array(305,81), 'ee' => array(308,77), 'fi' => array(310,65),\r
+ 'se' => array(296,64), 'no' => array(281,72), 'is' => array(241,62),\r
+ 'cy' => array(321,125), 'sy' => array(329,125), 'il' => array(325,129),\r
+ 'ps' => array(325,130), 'jo' => array(326,132), 'sa' => array(339,142),\r
+ 'iq' => array(340,130), 'ir' => array(358,130), 'kw' => array(344,135),\r
+ 'bh' => array(348,140), 'qa' => array(350,141), 'ae' => array(355,144),\r
+ 'om' => array(358,148), 'ye' => array(345,157), 'eg' => array(316,140),\r
+ 'pk' => array(372,135), 'af' => array(368,125), 'tm' => array(364,119),\r
+ 'uz' => array(365,111), 'kz' => array(371,97), 'kg' => array(379,112),\r
+ 'ti' => array(378,116), 'in' => array(391,152), 'np' => array(402,137),\r
+ 'bd' => array(411,143), 'lk' => array(396,171), 'bt' => array(412,137),\r
+ 'mm' => array(419,146), 'la' => array(431,151), 'vn' => array(435,149),\r
+ 'kh' => array(435,162), 'th' => array(431,159), 'my' => array(430,177),\r
+ 'sg' => array(433,180), 'ph' => array(462,162), 'id' => array(459,185),\r
+ 'ti' => array(468,197), 'tw' => array(460,144), 'cn' => array(433,120),\r
+ 'mm' => array(411,92), 'ru' => array(399,64), 'kr' => array(471,121),\r
+ 'kp' => array(469,115), 'jp' => array(490,120), //TODO polynesia\r
+ 'gl' => array(204,27), 'ca' => array(103,76), 'us' => array(107,116),\r
+ 'bm' => array(160,132), 'mx' => array(108,145), 'cu' => array(145,149),\r
+ 'gt' => array(126,156), 'bz' => array(129,155), 'hn' => array(134,160),\r
+ 'sv' => array(128,161), 'ni' => array(136,163), 'cr' => array(138,169),\r
+ 'pa' => array(145,170), 'co' => array(152,176), 've' => array(165,170),\r
+ 'gy' => array(175,174), 'sr' => array(182,177), 'gf' => array(186,177),\r
+ 'pe' => array(151,196), 'ec' => array(147,183), 'br' => array(189,197),\r
+ 'bo' => array(170,212), 'py' => array(176,218), 'uy' => array(182,235),\r
+ 'cl' => array(158,231), 'ar' => array(168,235), 'fk' => array(177,274),\r
+ 'ly' => array(293,135), 'tn' => array(284,124), 'dz' => array(174,128),\r
+ 'ma' => array(258,130), 'eh' => array(249,139), 'mr' => array(252,152),\r
+ 'ml' => array(263,154), 'ne' => array(282,155), 'td' => array(304,158),\r
+ 'sd' => array(316,154), 'et' => array(331,165), 'er' => array(330,156),\r
+ 'dj' => array(336,162), 'sn' => array(246,159), 'gm' => array(244,160),\r
+ 'gw' => array(246,163), 'gn' => array(248,163), 'sl' => array(250,168),\r
+ 'lr' => array(255,172), 'ci' => array(260,170), 'gh' => array(267,169),\r
+ 'bf' => array(266,163), 'bj' => array(273,176), 'ng' => array(276,167),\r
+ 'tg' => array(174,167), 'cm' => array(288,174), 'cf' => array(299,170),\r
+ 'so' => array(343,173), 'ke' => array(325,183), 'cd' => array(309,186),\r
+ 'ug' => array(319,183), 'rw' => array(319,188), 'bi' => array(319,190),\r
+ 'tz' => array(325,194), 'ao' => array(298,200), 'zm' => array(313,204),\r
+ 'mz' => array(329,202), 'mw' => array(323,204), 'zw' => array(315,212),\r
+ 'bw' => array(305,221), 'na' => array(296,216), 'za' => array(306,230),\r
+ 'sz' => array(317,227), 'mg' => array(343,212), 'com' => array(40,158),\r
+ 'net' => array(40,188), 'org' => array(40,221), 'info' => array(94,222),\r
+ 'ip' => array(94,189), 'mobi'=> array(40,253), 'mobi'=> array(94,253)\r
+ );\r
+\r
+ $maxpages = 0;\r
+ $maxhits = 0;\r
+ $doms = array();\r
+ //var_dump($data);\r
+ foreach ($data as $domain => $set) {\r
+ $pages = $set[0];\r
+ $hits = $set[1];\r
+ // we use hits here since they are always bigger than pages\r
+ if (isset($dommap[$domain]) && ($hits>0)) {\r
+ $doms[$domain] = array('pages' => $pages, 'hits' => $hits);\r
+ if ($hits > $maxhits) {\r
+ $maxhits = $hits;\r
+ }\r
+ if ($pages > $maxpages) {\r
+ $maxpages = $pages;\r
+ }\r
+ }\r
+ }\r
+\r
+ $crcblue = $BAW_CONF['site_path'] .'/icons/circ-blue.png';\r
+ $crcblue = @imagecreatefrompng($crcblue);\r
+ imagealphablending($crcblue, true);\r
+ $crcgreen = $BAW_CONF['site_path'] .'/icons/circ-green.png';\r
+ $crcgreen = @imagecreatefrompng($crcgreen);\r
+ imagealphablending($crcgreen, true);\r
+ $crcX = imagesx($crcgreen);\r
+ $crcY = imagesy($crcgreen);\r
+\r
+ $maxcirc = 80;\r
+ $mincirc = 2;\r
+\r
+ foreach ($doms as $dom => $val) {\r
+ $hits = ($val['hits'] / $maxhits);\r
+ $scz = $mincirc + ($hits*($maxcirc-$mincirc));\r
+ imagecopyresampled(\r
+ $im,\r
+ $crcgreen,\r
+ $dommap[$dom][0]-1,\r
+ $dommap[$dom][1]-($scz/2),\r
+ 0,\r
+ 0,\r
+ $scz/2,\r
+ $scz,\r
+ $crcX,\r
+ $crcY\r
+ );\r
+ $pages = ($val['pages'] / $maxpages);\r
+ $scz = $mincirc + ($pages*($maxcirc-$mincirc));\r
+ imagecopyresampled(\r
+ $im,\r
+ $crcblue,\r
+ $dommap[$dom][0]-($scz/2),\r
+ $dommap[$dom][1]-($scz/2),\r
+ 0,\r
+ 0,\r
+ $scz/2,\r
+ $scz,\r
+ $crcX,\r
+ $crcY\r
+ );\r
+ }\r
+ //output image to browser\r
+ imagepng($im);\r
+ imagedestroy($im);\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2007 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+// this file can't be used on its own\r
+if (strpos ($_SERVER['PHP_SELF'], 'reder_table.inc.php') !== false) {\r
+ die ('This file can not be used on its own!');\r
+}\r
+\r
+// this function generates ratio-calculations for a whole line\r
+// it requires that the format of the data contains\r
+// 'format' => 'layout_ratio', 'ratio' => '2/1'\r
+// it would take the second field and divide it by the first\r
+function baw_calc_ratio($data_set, $ratio_set) {\r
+ foreach ($ratio_set as $field => $formula) {\r
+ $frm = explode("/", $formula);\r
+ $data_set[$field] = $data_set[$frm[0]] / $data_set[$frm[1]];\r
+ }\r
+ return $data_set;\r
+}\r
+\r
+// this function does std. processing that this needed in 2 places\r
+function baw_process_cell($cell, $format, $target = null) {\r
+ if ($target == null) {\r
+ $target = 0;\r
+ }\r
+ if (is_numeric($cell)) {\r
+ if ($format == 'layout_date') {\r
+ $target = max($target, $cell);\r
+ } else if ($format == 'layout_ratio') {\r
+ $target = 0;\r
+ } else {\r
+ $target += $cell;\r
+ }\r
+ } else {\r
+ $target = '';\r
+ }\r
+ return $target;\r
+}\r
+\r
+\r
+function baw_render_table($section_name, $table, $format, $get_avg = false, $get_sum = false,\r
+ $top_x = false, $dataformat = false) {\r
+ global $BAW_CONF, $BAW_LIB, $BAW_MES, $BAW_CONF_DIS;\r
+ baw_debug("rendering table");\r
+ $out = '';\r
+ $theader = "\n<table class=\"datatable\">\n";\r
+ // HEADER -----------------------------------------------------------------\r
+ $out .= " <tr>\n";\r
+ $format_arr = array();\r
+ $column = 0;\r
+ $itemcount = count($table);\r
+ $ratio_set = array();\r
+ // iterate formats for header\r
+ foreach ($format as $cell => $attr) {\r
+ $class = '';\r
+ $tags ='';\r
+ $percent_header = '';\r
+ // iterate one formats attributes\r
+ foreach ($attr as $name => $value){\r
+ if ($name == 'title') {\r
+ $data = $value;\r
+ } else if ($name == 'format') {\r
+ $format_arr[] = $value;\r
+ $class_arr[] = $value;\r
+ $class = " $value";\r
+ } else if ($name == 'ratio') {\r
+ $ratio_set[$cell] = $value;\r
+ // percentage header insert ... this could be set per column in the config?\r
+ } else if ($name == 'percent' && $value){\r
+ $percent_header = " <th class=\"layout_percent\">{$BAW_MES[15]}</th>\n";\r
+ } else if (strlen($value)>0) {\r
+ $tags .= " $name=\"$value\"";\r
+ }\r
+ }\r
+ // find out how many items in whole table\r
+ if ($column == 0) { // add only to first column\r
+ $data = sprintf($BAW_MES['records'], baw_num_format($itemcount));\r
+ }\r
+ if (isset($attr['title'])) {\r
+ $out .=" <th class=\"header_wrap$class\"$tags>$data</th>\n$percent_header";\r
+ $column ++;\r
+ }\r
+ }\r
+ $out .= " </tr>\n";\r
+\r
+ // SUM & averages calculation ----------------------------------------------\r
+ // the sum has to be calculated before so the percentages can be calculated\r
+ // iterate all the table and count the sums of all numeric data\r
+ $sum_arr = array(0 => $BAW_MES[102]); // we set the text here to make sure its in the right position\r
+ $avg_arr = array(0 => $BAW_MES[96]);\r
+ $others = array();\r
+ $filled_lines = $itemcount; // get the value for substraction\r
+ $row_no = 0;\r
+ $othercount = 0;\r
+ $hasothers = false;\r
+ foreach ($table as $lineid => $row) {\r
+ $cell_no = 0;\r
+ $rowsum = 0;\r
+ foreach ($row as $cell) {\r
+ // sum calculation\r
+ $sum_arr[$cell_no] = baw_process_cell($cell, @$format_arr[$cell_no] , @$sum_arr[$cell_no]);\r
+ // average calculation\r
+ if (is_numeric($cell) && $get_avg) {\r
+ $rowsum += $cell;\r
+ if ($row_no == ($itemcount-1) && $filled_lines >= 1) { // last line, assume sums are done\r
+ if ($rowsum == 0 && $cell_no == 0) { // do once again for last line, dont substract further after first cell\r
+ $filled_lines--;\r
+ }\r
+ if ($format_arr[$cell_no] == 'layout_date') {\r
+ $avg_arr[$cell_no] = false; // this will prevent formatting, averages on date not possible?\r
+ } else {\r
+ $avg_arr[$cell_no] = $sum_arr[$cell_no] / $filled_lines;\r
+ }\r
+ }\r
+ } else if ($get_avg) {\r
+ $avg_arr[$cell_no] = '';\r
+ }\r
+ // others calculation\r
+ if ($top_x && ($row_no >= $top_x)) {\r
+ $hasothers = true;\r
+ $others[$cell_no] = baw_process_cell($cell, @$format_arr[$cell_no] , @$others[$cell_no]);\r
+ }\r
+ $cell_no ++;\r
+ }\r
+ // we processes the line, if we are already in the 'others' remove the line\r
+ if ($hasothers) {\r
+ $othercount ++;\r
+ unset($table[$lineid]);\r
+ }\r
+ // remove one line from avg-count if data empty\r
+ if ($rowsum == 0) {\r
+ $filled_lines--;\r
+ }\r
+ $row_no++; // count to find out if we are ready to do averages\r
+ }\r
+ // add others to the table\r
+ if ($hasothers) { // we got others, add them to the end\r
+ if ($top_x < $BAW_CONF['maxlines']) {\r
+ $text = baw_display_list_link($BAW_MES[2], $BAW_MES[2], $section_name, false, 'full_list')\r
+ . " (". baw_num_format($othercount) . ")";\r
+ } else {\r
+ $text = $BAW_MES[2]\r
+ . " (". baw_num_format($othercount) . ")<br>"\r
+ . sprintf($BAW_MES['table_max_hits_exceed'], baw_num_format($BAW_CONF['maxlines']));\r
+ }\r
+ $others = baw_calc_ratio($others, $ratio_set);\r
+ $others[0] = $text;\r
+ $table += array('layout_others'=> $others);\r
+ }\r
+ // add averages to the table\r
+ if ($get_avg) {\r
+ // re-set the value here since it might have been overwritten\r
+ $avg_arr[0] = $BAW_MES[96];\r
+ $avg_arr = baw_calc_ratio($avg_arr, $ratio_set);\r
+ $table += array('layout_avg' => $avg_arr);\r
+ }\r
+ // add the sum to the table\r
+ if ($get_sum) {\r
+ $sum_arr[0] = $BAW_MES[102];\r
+ $sum_arr = baw_calc_ratio($sum_arr, $ratio_set);\r
+ $table += array('layout_sum' => $sum_arr);\r
+ }\r
+\r
+ // these are set later to make sure they are not overwritten in the func before\r
+ // this saves one more check\r
+\r
+ // DATA --------------------------------------------------------------------\r
+ $lastlineid = '';\r
+ $rowspan = array();\r
+ foreach ($table as $lineid => $row) {\r
+ $cell_no = 0;\r
+ $class = '';\r
+ // get the class for the whole row\r
+ if (isset($dataformat[$lineid])) {\r
+ $class = " class=\"{$dataformat[$lineid]}\"";\r
+ // for some _STRANGE_ reason, the 403-error lineid is equal to the string here, so use ===\r
+ } else if ($lineid === 'layout_others' || $lineid === 'layout_avg' || $lineid === 'layout_sum') {\r
+ $class = " class=\"$lineid\"";\r
+ }\r
+ $out .= " <tr$class>\n";\r
+ $iteration = 0;\r
+ foreach ($row as $cell) {\r
+ $class = ''; // get the class for the column (set by field)\r
+ // for some _STRANGE_ reason, the 403-error lineid is equal to the string here, so use ===\r
+ if ($lineid === 'layout_others' || $lineid === 'layout_avg' || $lineid === 'layout_sum') {\r
+ $span = 0;\r
+ $attr = '';\r
+ if ($cell_no > $iteration) {\r
+ $iteration ++;\r
+ continue;\r
+ }\r
+ if (isset($format[$cell_no]['colspan'])) {\r
+ $span = $format[$cell_no]['colspan'];\r
+ $class .= " colspan=\"$span\"";\r
+ $span --;\r
+ $cell_no += $span;\r
+ }\r
+ $iteration ++;\r
+ } else {\r
+ $class = '';\r
+ }\r
+ // check if the row has data, otherwise remove 1 line for average count\r
+ $function = $BAW_LIB['formats'][$format_arr[$cell_no]]['frm'];\r
+ $cell_str = exec_function($function, $cell);\r
+ if (isset($class_arr[$cell_no]) && strlen($class_arr[$cell_no]) > 0) {\r
+ $class .= " class=\"{$class_arr[$cell_no]}\"";\r
+ }\r
+ // do rowspan\r
+ $doline = true;\r
+ $rowspan_str = '';\r
+ if (($format_arr[$cell_no] === 'layout_text') &&\r
+ ($lineid !== 'layout_others' && $lineid !== 'layout_avg' && $lineid !== 'layout_sum')) {\r
+ if (isset($table[$lastlineid][$cell_no]) && $cell === $table[$lastlineid][$cell_no]) {\r
+ $rowspan[$lineid][$cell_no] = $rowspan[$lastlineid][$cell_no] + 1;\r
+ $search = " rowspan=\"{$rowspan[$lastlineid][$cell_no]}\">$cell_str</td>";\r
+ $replace = " rowspan=\"{$rowspan[$lineid][$cell_no]}\">$cell_str</td>";\r
+ // we search the last time we had this data and replace it\r
+ $pos = strrpos($out, $search);\r
+ $out = substr_replace($out, $replace, $pos, strlen($search));\r
+ $doline = false;\r
+ } else { // no match, restart with 1\r
+ $rowspan_str = ' rowspan="1"'; // do =1 always so we can replace later\r
+ $rowspan[$lineid][$cell_no] = 1;\r
+ }\r
+ }\r
+ if ($doline) {\r
+ $out .= " <td$class$rowspan_str>$cell_str</td>\n";\r
+ }\r
+ if (isset($format[$cell_no]['percent']) &&\r
+ $format[$cell_no]['percent'] == true &&\r
+ $sum_arr[$cell_no] !== 0) {\r
+ $percent = $cell / ($sum_arr[$cell_no] / 100);\r
+ $out .=" <td$class>" . @baw_percent_format($percent) . "</td>\n";\r
+ }\r
+ $cell_no ++;\r
+ }\r
+ $lastlineid = $lineid;\r
+ $out .= " </tr>\n";\r
+ }\r
+ $out .= "</table>\n";\r
+ baw_debug("rendering table finished");\r
+ return $theader . $out;\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+/**\r
+ * betterawstats - an alternative display for awstats data\r
+ *\r
+ * @author Oliver Spiesshofer, support at betterawstats dot com\r
+ * @copyright 2008 Oliver Spiesshofer\r
+ * @version 1.0\r
+ * @link http://betterawstats.com\r
+\r
+ * Based on the GPL AWStats Totals script by:\r
+ * Jeroen de Jong <jeroen@telartis.nl>\r
+ * copyright 2004-2006 Telartis\r
+ * version 1.13 (http://www.telartis.nl/xcms/awstats)\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+ */\r
+\r
+function hideElement(element) {\r
+ document.getElementById('box_' + element).style.display = 'none';\r
+ document.getElementById('button_show_' + element).style.display = '';\r
+ document.getElementById('button_hide_' + element).style.display = 'none';\r
+}\r
+\r
+function showElement(element) {\r
+ document.getElementById('box_' + element).style.display = '';\r
+ document.getElementById('button_hide_' + element).style.display = '';\r
+ document.getElementById('button_show_' + element).style.display = 'none';\r
+}\r
+\r
+function toggleBox(element, group, count, layout) {\r
+ for (i=0; i<count; i++) {\r
+ if (element != i) {\r
+ document.getElementById('box_' + group + '_' + i).className = layout + "_section_inactive";\r
+ document.getElementById('button_' + group + '_' + i).className = layout + "_button_inactive";\r
+ } else {\r
+ document.getElementById('box_' + group + '_' + i).className = layout + "_section_active";\r
+ document.getElementById('button_' + group + '_' + i).className = layout + "_button_active";\r
+ }\r
+ }\r
+}\r
--- /dev/null
+/* General Semantics ---------------------------------------------------------*/\r
+* {\r
+ margin:0px;\r
+ padding:0px;\r
+ font-family: sans-serif;\r
+ font-size: 11px;\r
+}\r
+body {\r
+ padding:5px;\r
+}\r
+input, select {\r
+ font-size: 11px;\r
+}\r
+input {\r
+ padding: 1px;\r
+ padding-right:5px;\r
+ padding-left:5px;\r
+}\r
+a {\r
+ text-decoration:none;\r
+ color: #0000FF;\r
+}\r
+\r
+a.ext_link {\r
+ background-image: url(./icons/external.png);\r
+ background-repeat: no-repeat;\r
+ background-attachment: scroll;\r
+ background-position: right center;\r
+ padding-right: 13px;\r
+}\r
+\r
+h2, .headline {\r
+ background-color:#DDDDDD;\r
+ font-size: 12px;\r
+ font-weight: bold;\r
+ text-align: center;\r
+ height:22px;\r
+ padding-top:7px;\r
+ background-image: url(./icons/bar.png);\r
+}\r
+\r
+h2 {\r
+ margin-top:15px;\r
+ font-weight:bold;\r
+}\r
+\r
+table {\r
+ font-size: 11px;\r
+ margin: 0px auto;\r
+}\r
+td, th{\r
+ padding-left:4px;\r
+ padding-right:4px;\r
+ padding-bottom:1px;\r
+ padding-top:1px;\r
+}\r
+th {\r
+ text-align:center;\r
+}\r
+img {\r
+ margin: 0px;\r
+ padding: 0px;\r
+ border:0px;\r
+}\r
+form {\r
+ display: inline;\r
+}\r
+option {\r
+ padding:0px 4px 0px 0px;\r
+}\r
+fieldset {\r
+ padding:3px;\r
+ background-color:#DDDDDD;\r
+ float:left;\r
+ margin:1px;\r
+ overflow: auto;\r
+ height:40px;\r
+}\r
+legend {\r
+ border:1px solid #999999;\r
+ background-color:#CCCCCC;\r
+ padding-left:3px;\r
+ padding-right:3px;\r
+}\r
+fieldset input {\r
+ text-align:center;\r
+}\r
+/* General elements ***********************************************************/\r
+\r
+.clearfix:after {\r
+ content: ".";\r
+ display: block;\r
+ height: 0;\r
+ clear: both;\r
+ visibility: hidden;\r
+}\r
+\r
+.clearfix {\r
+ display: inline-block;\r
+}\r
+\r
+/* Hides from IE-mac */\r
+* html .clearfix {height: 1%;}\r
+.clearfix {display: block;}\r
+/* End hide from IE-mac */\r
+\r
+.aligncenter {\r
+ text-align:center;\r
+}\r
+.alignright {\r
+ text-align:right;\r
+}\r
+.alignleft {\r
+ text-align:left;\r
+}\r
+/* Unique elements ************************************************************/\r
+.contentbox {\r
+ margin-left:225px;\r
+}\r
+/* Menu ***********************************************************************/\r
+.top_menu_button {\r
+ display:none;\r
+}\r
+.top_menu_button_active {\r
+ display:none;\r
+}\r
+div.menubox{\r
+ position:fixed;\r
+ left:5px;\r
+ top:5px;\r
+ width:210px;\r
+ border: 2px solid #BBBBBB;\r
+ padding:0px;\r
+}\r
+.menubox ul{\r
+ margin:3px;\r
+}\r
+.menubox .headline {\r
+ border-bottom: 2px solid #BBBBBB;\r
+}\r
+\r
+.menubox .timereport{\r
+ border: 0px;\r
+ margin:0px;\r
+ padding:0px;\r
+ background-color: transparent;\r
+}\r
+.menu {\r
+ margin-bottom:15px;\r
+ margin-top:15px;\r
+}\r
+a.leftlink:hover{\r
+ background-color:#DDDDDD;\r
+}\r
+.menu a{\r
+ display:block;\r
+}\r
+.menu_odd {\r
+ background-color:#EEEEEE;\r
+}\r
+ul.top_menu_bar{\r
+ overflow:auto;\r
+ border: 2px solid #BBBBBB;\r
+ background-color:#dddddd;\r
+ height:29px;\r
+ list-style:none;\r
+ margin-left:225px;\r
+ background-image: url(./icons/bar.png);\r
+}\r
+.top_menu_bar li{\r
+ float:left;\r
+ padding-top:4px;\r
+ padding-right:20px;\r
+}\r
+.top_menu_bar li.link {\r
+ text-align:center;\r
+ float:right;\r
+ margin-top:5px;\r
+}\r
+.top_menu_bar select{\r
+ margin-left:8px;\r
+}\r
+.menubox li {\r
+ list-style-type:none;\r
+ position:relative;\r
+}\r
+.menubox select{\r
+ max-width:200px;\r
+}\r
+.submenu li{\r
+ padding-left:10px;\r
+}\r
+.small {\r
+ font-size:9px;\r
+ font-weight:normal;\r
+}\r
+.percent_button {\r
+ width:9px;\r
+ text-align:center;\r
+ border:1px solid #999999;\r
+ position:absolute;\r
+ bottom:0px;\r
+ right:-8px;\r
+ font-size:9px;\r
+}\r
+.header_wrap {\r
+ margin-right:7px;\r
+ position:relative;\r
+}\r
+.headline select,\r
+.headline span{\r
+ margin-top:-2px;\r
+ font-weight:bold;\r
+}\r
+.helplink{\r
+ position:absolute;\r
+ right:5px;\r
+}\r
+.version {\r
+ font-size: smaller;\r
+ border-top: 1px solid #DDDDDD;\r
+ padding-top: 3px;\r
+ margin-top: 3px;\r
+ text-align: center;\r
+}\r
+/* Help & show/hide buttons ***************************************************/\r
+h2 img.showhidebutton{\r
+ position:absolute;\r
+ right:10px;\r
+}\r
+h2 .icon_indent_1 img {\r
+ position:absolute;\r
+ right:29px;\r
+}\r
+h2 .icon_indent_2 img {\r
+ position:absolute;\r
+ right:48px;\r
+}\r
+h2 .icon_indent_3 img {\r
+ position:absolute;\r
+ right:67px;\r
+}\r
+li .icon_indent_1 img {\r
+ position:absolute;\r
+ right:5px;\r
+ top:2px;\r
+}\r
+li .icon_indent_2 img {\r
+ position:absolute;\r
+ right:18px;\r
+ top:2px;\r
+}\r
+li .icon_indent_3 img {\r
+ position:absolute;\r
+ right:30px;\r
+ top:2px;\r
+}\r
+.section_help span{\r
+ display: none;\r
+}\r
+.section_help:hover span{ /*the span will display just on :hover state*/\r
+ z-index:9;\r
+ font-weight:normal;\r
+ background-color: #FFFFE6;\r
+ position:absolute;\r
+ right:50px;\r
+ width:380px;\r
+ display:block;\r
+ padding:5px;\r
+ text-align:left;\r
+ border:1px solid #000000;\r
+ color:#000000;\r
+ margin-top:10px;\r
+}\r
+\r
+.errorbox {\r
+ width: 600px;\r
+ margin: 10px auto;\r
+ border: 1px solid blue;\r
+ padding: 10px;\r
+ background-color: #FFFFDD;\r
+ font-size:12px;\r
+}\r
+.errorbox h1{\r
+ font-size: 15px;\r
+}\r
+/* Chart layout ***************************************************************/\r
+.chartcell {\r
+ padding:2px;\r
+ vertical-align:bottom;\r
+ white-space: nowrap;\r
+ text-align:center;\r
+}\r
+.charttable {\r
+ border:3px solid #EEEEEE;\r
+ margin-bottom: 10px;\r
+ margin-top:8px;\r
+}\r
+/* table layout ***************************************************************/\r
+th span {\r
+ display:none;\r
+}\r
+th:hover span {\r
+ z-index:9;\r
+ font-weight:normal;\r
+ background-color: #FFFFE6;\r
+ position:absolute;\r
+ width:380px;\r
+ display:block;\r
+ padding:5px;\r
+ text-align:left;\r
+ border:1px solid #000000;\r
+ color:#000000;\r
+ margin-top:10px;\r
+}\r
+th.layout_text,\r
+th.layout_date,\r
+th.header_wrap {\r
+ background-color: #ECECEC;\r
+ min-width: 70px;\r
+}\r
+th.layout_visitors {\r
+ background-color: #FFAA66;\r
+ width: 70px;\r
+}\r
+th.layout_visits {\r
+ background-color: #F4F090;\r
+ width: 70px;\r
+}\r
+th.layout_pages {\r
+ background-color: #4477DD;\r
+ width: 70px;\r
+}\r
+th.layout_hits {\r
+ background-color: #66DDEE;\r
+ width: 70px;\r
+}\r
+th.layout_percent {\r
+ background-color: #ECECEC;\r
+ width: 60px;\r
+}\r
+th.layout_bytes {\r
+ background-color: #2EA495;\r
+ width: 70px;\r
+}\r
+th.layout_number_2 {\r
+ background-color: #DDDDDD;\r
+ width: 60px;\r
+}\r
+td.layout_text {\r
+ text-align:left;\r
+}\r
+.layout_avg td,\r
+td.layout_avg {\r
+ background-color: #DDDDDD;\r
+}\r
+.layout_others td,\r
+td.layout_others{\r
+ color:#999999;\r
+}\r
+.layout_sum td{\r
+ background-color: #CCCCCC;\r
+}\r
+td.layout_bytes ,\r
+td.layout_hits ,\r
+td.layout_pages ,\r
+td.layout_visits ,\r
+td.layout_visitors ,\r
+td.layout_percent,\r
+td.layout_ratio {\r
+ text-align:right;\r
+}\r
+.currentday{\r
+ font-weight:bold;\r
+}\r
+.screensize {\r
+ border:1px solid #000000;\r
+}\r
+.datatable {\r
+ border-collapse: collapse;\r
+}\r
+.datatable td,\r
+.datatable th {\r
+ border: 2px solid #EEEEEE;\r
+}\r
+.datatable tr{\r
+ background-color:#FFFFFF;\r
+}\r
+.evenyear td,\r
+.evenmonth td,\r
+td.evenyear,\r
+td.evenmonth{\r
+ background: #FFFFEE;\r
+}\r
+.weekend td,\r
+td.weekend {\r
+ background-color:#EEEEDD;\r
+}\r
+.chartlegend {\r
+ background-color:#EEEEEE;\r
+}\r
+\r
+\r
+/* Config editor **************************************************************/\r
+.conf_button_inactive {\r
+ border-top:1px solid #000000;\r
+ border-left:1px solid #000000;\r
+ border-right:1px solid #000000;\r
+ padding:3px;\r
+ margin-right:2px;\r
+ margin-top:2px;\r
+ background-color: #DDDDDD;\r
+ white-space:nowrap;\r
+ cursor:pointer;\r
+ float:left;\r
+ height:20px;\r
+ font-weight:bold;\r
+}\r
+.conf_button_active {\r
+ border-top:1px solid #000000;\r
+ border-left:1px solid #000000;\r
+ border-right:1px solid #000000;\r
+ border-bottom:1px solid #FFFFFF;\r
+ padding:3px;\r
+ margin-right:2px;\r
+ margin-top:2px;\r
+ margin-bottom:-1px;\r
+ float:left;\r
+ background-color: #FFFFFF;\r
+ white-space:nowrap;\r
+ cursor:pointer;\r
+ height:20px;\r
+ font-weight:bold;\r
+}\r
+.conf_section_active {\r
+ border:1px solid #000000;\r
+ padding:4px;\r
+}\r
+.conf_section_inactive {\r
+ display:none;\r
+ border:1px solid #000000;\r
+ padding:4px;\r
+}\r
+.conf_setting{\r
+ border-bottom:1px solid #999999;\r
+ margin-bottom: 4px;\r
+ padding-bottom: 4px;\r
+}\r
+.default {\r
+ color:blue;\r
+}\r
+.login_form p{\r
+ text-align:center;\r
+ margin:0px auto;\r
+ margin-top:50px;\r
+ padding:20px;\r
+ width:300px;\r
+ border: 1px solid blue;\r
+ background-color: #FFFFDD;\r
+ font-size:12px;\r
+}
\ No newline at end of file
--- /dev/null
+h2.group_title {\r
+ display:none;\r
+}\r
+div.menu_section {\r
+ text-align: center;\r
+ border-bottom: 2px solid #BBBBBB;\r
+ border-left: 2px solid #BBBBBB;\r
+ border-right: 2px solid #BBBBBB;\r
+ padding: 10px;\r
+}\r
+h2.menu_section {\r
+ background-color: #DDDDDD;\r
+ border: 2px solid #BBBBBB;\r
+}
\ No newline at end of file
--- /dev/null
+<VirtualHost *>
+ ServerName stats.izideal.com
+ DocumentRoot /home/www/stats/
+ Alias /icon/ /usr/share/awstats/icon/
+ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
+ Include /home/www/izideal/share/apache/include/auth
+ Timeout 120
+ <Location />
+ Order deny,allow
+ Deny from all
+ require group stats
+ Satisfy any
+ </Location>
+ <IfModule apache_ssl.c>
+ SSLEnable
+ </IfModule>
+</VirtualHost>
--- /dev/null
+<?php
+/*
+$sites = array(
+);
+uksort($sites,'cmp');
+*/
+/**********************************************************
+NB 11.12.05
+Frame to choose stats in awstats configuration directry
+# NB 28.01.10 add awstatstotals.php
+**********************************************************/
+$glob['dir_conf'] = '/etc/awstats/';
+$glob['cgi'] = '/cgi-bin/awstats.pl';
+$glob['title'] = 'Stats - '.$_SERVER['HTTP_HOST'];
+$glob['page'] = $_REQUEST['page'];
+$glob['config'] = $_REQUEST['config'];
+$glob['script'] = $_SERVER['SCRIPT_NAME'];
+$glob['home'] = $glob['script'].'?page=blank';
+$glob['home'] = 'awstatstotals/awstatstotals.php';
+#$glob['home'] = 'awstatstotals/awstats.php';
+$sites=array();
+if ($d = opendir($glob['dir_conf'])) {
+ while (false !== ($f = readdir($d))) {
+ if(!preg_match('/^awstats\.(.*)\.conf$/',$f,$e)) continue;
+ $sites[$f]=$e[1];
+ }
+}
+usort($sites,'strcmp');
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html>
+ <head>
+ <title><?=$glob['title']?></title>
+<script type="text/javascript"><!--
+function gopage(sel) {
+ var conf = sel[sel.selectedIndex].value;
+ if (conf) {
+ parent.main.location.href = '<?=$glob['cgi']?>?config='+conf;
+ } else {
+ parent.location.href = '/';
+ }
+}
+--></script>
+<style type="text/css"><!--
+body {
+ margin: 0;
+ padding: 3px;
+ border-bottom: solid 4px #CCCCDD;
+}
+--></style>
+ </head>
+<?php
+if (!$glob['page']) {
+ frame();
+ echo '</html>';
+ exit;
+}
+echo '<body style="text-align: center;">';
+if ($glob['page']=='menu') {
+ menu();
+}
+echo '</body></html>';
+exit;
+?>
+<?php
+//////////////////////////////////////////////////////////////////////////////
+function frame() {
+ global $glob;
+echo '<frameset rows="40,*">
+ <frame src="'.$glob['script'].'?page=menu&config='.$glob['config'].'" name="menu" frameborder="0" />';
+if ($glob['config']) {
+ echo '<frame src="'.$glob['cgi'].'?config='.$glob['config'].'" name="main" frameborder="0" scrolling="no" noresize="noresize"/>';
+} else {
+ echo '<frame src="'.$glob['home'].'" name="main" frameborder="0"/>';
+}
+echo '</frameset>';
+}
+
+function menu() {
+ global $sites,$glob;
+?>
+ <a href="/" target="_parent" alt="Home" style="float: left">Home</a>
+ <select onchange="gopage(this)">
+ <option value="">Home ...</option>
+<?php foreach ($sites as $k=>$v) {
+ $k = $v;
+ echo '<option value="'.$k.'"';
+ if ($v==$glob['config']) echo ' selected="selected"';
+ echo '>'.$v.'</option>';
+} ?>
+ </select>
+ <a href="/betterawstats/" target="_parent" onclick="parent.main.location.href=this.href;return false;" alt="Betterawstats" style="float: right">Betterawstats</a>
+<?php
+}
+?>
--- /dev/null
+<?php\r
+\r
+ // core config parameters\r
+ $sConfigDefaultView = "thismonth.all";\r
+ $bConfigChangeSites = true;\r
+ $bConfigUpdateSites = true;\r
+ $sUpdateSiteFilename = "xml_update.php";\r
+\r
+$glob['dir_conf'] = '/etc/awstats';\r
+$glob['cgi'] = '/cgi-bin/awstats.pl';\r
+if ($d = opendir($glob['dir_conf'])) {\r
+ while (false !== ($f = readdir($d))) {\r
+ #echo $f.'<br/>';\r
+ if(!ereg('^awstats\.(.*)\.conf$',$f,$e)) continue;\r
+ #echo $glob['dir_conf']."/$f:".$e[1].'<br/>';\r
+ $content = file_get_contents($glob['dir_conf']."/$f");\r
+ #echo $content;\r
+ if (!preg_match('/DirData="([^"]+)/',$content,$data_dir)) continue; $data_dir = $data_dir[1];\r
+ if (!preg_match('/SiteDomain="([^"]+)/',$content,$site)) continue; $site = $site[1];\r
+ if (!file_exists($data_dir)) continue;\r
+ #echo $site.":".$data_dir.'<br/>';\r
+ $aConfig[$site] = array(\r
+ "statspath" => "$data_dir/",\r
+ #"updatepath" => "/path/to/awstats.pl/",\r
+ "siteurl" => "http://$site",\r
+ "theme" => "default",\r
+ "fadespeed" => 250,\r
+ #"password" => "my-1st-password",\r
+ #"includes" => ""\r
+ );\r
+ }\r
+}\r
+return;\r
+\r
+ // individual site configuration\r
+ $aConfig["site1"] = array(\r
+ "statspath" => "/path/to/data/",\r
+ "updatepath" => "/path/to/awstats.pl/",\r
+ "siteurl" => "http://www.my-1st-domain.com",\r
+ "theme" => "default",\r
+ "fadespeed" => 250,\r
+ "password" => "my-1st-password",\r
+ "includes" => ""\r
+ );\r
+\r
+ $aConfig["site2"] = array(\r
+ "statspath" => "/path/to/data/",\r
+ "updatepath" => "/path/to/awstats.pl/",\r
+ "siteurl" => "http://www.my-2nd-domain.com",\r
+ "theme" => "default",\r
+ "fadespeed" => 250,\r
+ "password" => "my-2nd-password",\r
+ "includes" => ""\r
+ );\r
+\r
+?>\r
--- /dev/null
+<?php\r
+\r
+/*\r
+ * JAWStats 0.7 Web Statistics\r
+ *\r
+ * Copyright (c) 2009 Jon Combe (jawstats.com)\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person\r
+ * obtaining a copy of this software and associated documentation\r
+ * files (the "Software"), to deal in the Software without\r
+ * restriction, including without limitation the rights to use,\r
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+ * copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following\r
+ * conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be\r
+ * included in all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r
+ * OTHER DEALINGS IN THE SOFTWARE.\r
+ */\r
+\r
+ class clsAWStats {\r
+ var $sAWStats = "";\r
+ var $bLoaded = false;\r
+ var $iYear = 0;\r
+ var $iMonth = 0;\r
+ var $dtLastUpdate = 0;\r
+ var $iTotalVisits = 0;\r
+ var $iUniqueVisits = 0;\r
+ var $arrLabel = array();\r
+ var $arrLogMonths = array();\r
+\r
+ function clsAWStats($sStatName, $sFilePath="", $iYear=0, $iMonth=0) {\r
+ // validate dates\r
+ $dtDate = ValidateDate($iYear, $iMonth);\r
+ $this->iYear = date("Y", $dtDate);\r
+ $this->iMonth = date("n", $dtDate);\r
+\r
+ // load data\r
+ $sFilePath .= "awstats";\r
+ if ($this->iMonth < 10) {\r
+ $sFilePath .= "0";\r
+ }\r
+ $sFilePath .= ($this->iMonth . $this->iYear . "." . $sStatName . ".txt");\r
+ if (is_readable($sFilePath)) {\r
+ $this->sAWStats = htmlspecialchars(file_get_contents($sFilePath));\r
+ $this->bLoaded = true;\r
+ }\r
+\r
+ // get summary data\r
+ $arrData = $this->GetSection("GENERAL");\r
+ $sLastUpdate = $this->GetSummaryElement($arrData, "lastupdate", 1);\r
+ $this->dtLastUpdate = strtotime($this->GetSummaryElement($arrData, "lastupdate", 1));\r
+ $this->dtLastUpdate = mktime(abs(substr($sLastUpdate, 8, 2)),\r
+ abs(substr($sLastUpdate, 10, 2)),\r
+ abs(substr($sLastUpdate, 12, 2)),\r
+ abs(substr($sLastUpdate, 4, 2)),\r
+ abs(substr($sLastUpdate, 6, 2)),\r
+ abs(substr($sLastUpdate, 0, 4)));\r
+ $this->iTotalVisits = $this->GetSummaryElement($arrData, "totalvisits", 1);\r
+ $this->iTotalUnique = $this->GetSummaryElement($arrData, "totalunique", 1);\r
+\r
+ // populate label array\r
+ $this->arrLabel["BROWSER"] = array("id", "hits");\r
+ $this->arrLabel["DAY"] = array("date", "pages", "hits", "bw", "visits");\r
+ $this->arrLabel["DOMAIN"] = array("id", "pages", "hits", "bw");\r
+ $this->arrLabel["ERRORS"] = array("id", "hits", "bw");\r
+ $this->arrLabel["FILETYPES"] = array("id", "hits", "bw", "noncompressedbw", "compressedbw");\r
+ $this->arrLabel["KEYWORDS"] = array("word", "freq");\r
+ $this->arrLabel["OS"] = array("id", "hits");\r
+ $this->arrLabel["PAGEREFS"] = array("url", "pages", "hits");\r
+ $this->arrLabel["ROBOT"] = array("id", "hits", "bw", "lastvisit", "robotstxt");\r
+ $this->arrLabel["SEARCHWORDS"] = array("phrase", "freq");\r
+ $this->arrLabel["SEREFERRALS"] = array("id", "pages", "hits");\r
+ $this->arrLabel["SESSION"] = array("range", "freq");\r
+ $this->arrLabel["SIDER"] = array("url", "pages", "bw", "entry", "exit");\r
+ $this->arrLabel["SIDER_404"] = array("url", "hits", "referrer");\r
+ $this->arrLabel["TIME"] = array("hour", "pages", "hits", "bw", "notviewedpages", "notviewedhits", "notviewedbw");\r
+ }\r
+\r
+ function CreateJSON($sSection) {\r
+ echo json_encode($this->GetSection($sSection));\r
+ }\r
+\r
+ function CreatePagesXMLString() {\r
+ // produce xml\r
+ $aXML = array();\r
+ $aData = $this->GetSection("SIDER");\r
+\r
+ // count totals\r
+ $iTotalPages = 0;\r
+ $iTotalBW = 0;\r
+ $iTotalEntry = 0;\r
+ $iTotalExit = 0;\r
+ for ($iIndexItem = 0; $iIndexItem < count($aData); $iIndexItem++) {\r
+ $aData[$iIndexItem][1] = abs($aData[$iIndexItem][1]);\r
+ $aData[$iIndexItem][2] = abs($aData[$iIndexItem][2]);\r
+ $aData[$iIndexItem][3] = abs($aData[$iIndexItem][3]);\r
+ $aData[$iIndexItem][4] = abs($aData[$iIndexItem][4]);\r
+\r
+ $iTotalPages += $aData[$iIndexItem][1];\r
+ $iTotalBW += $aData[$iIndexItem][2];\r
+ $iTotalEntry += $aData[$iIndexItem][3];\r
+ $iTotalExit += $aData[$iIndexItem][4];\r
+ }\r
+\r
+ // define size\r
+ $iSize = 50;\r
+\r
+ // last update and totals\r
+ $aXML[] = ("<info lastupdate=\"" . $this->dtLastUpdate . "\" />\n" .\r
+ "<totals pages=\"" . $iTotalPages . "\" bw=\"" . $iTotalBW . "\" entry=\"" .\r
+ $iTotalEntry . "\" exit=\"" . $iTotalExit . "\" />\n");\r
+\r
+ // sort by page views\r
+ usort($aData, "Sort1");\r
+ $aXML[] = "<data_pages>";\r
+ for ($iIndexItem = 0; $iIndexItem < count($aData); $iIndexItem++) {\r
+ $sTemp = "";\r
+ for ($iIndexAttr = 0; $iIndexAttr < count($aData[$iIndexItem]); $iIndexAttr++) {\r
+ $sTemp .= $this->arrLabel["SIDER"][$iIndexAttr] . "=\"" . trim($aData[$iIndexItem][$iIndexAttr]) . "\" ";\r
+ }\r
+ $aXML[] = ("<item " . $sTemp . "/>\n");\r
+ if ($iIndexItem > $iSize) {\r
+ break;\r
+ }\r
+ }\r
+ $aXML[] = "</data_pages>\n";\r
+\r
+ // sort by bandwidth\r
+ usort($aData, "Sort2");\r
+ $aXML[] = "<data_bw>";\r
+ for ($iIndexItem = 0; $iIndexItem < count($aData); $iIndexItem++) {\r
+ $sTemp = "";\r
+ for ($iIndexAttr = 0; $iIndexAttr < count($aData[$iIndexItem]); $iIndexAttr++) {\r
+ $sTemp .= $this->arrLabel["SIDER"][$iIndexAttr] . "=\"" . trim($aData[$iIndexItem][$iIndexAttr]) . "\" ";\r
+ }\r
+ $aXML[] = ("<item " . $sTemp . "/>\n");\r
+ if ($iIndexItem > $iSize) {\r
+ break;\r
+ }\r
+ }\r
+ $aXML[] = "</data_bw>\n";\r
+\r
+ // sort by bandwidth\r
+ usort($aData, "Sort3");\r
+ $aXML[] = "<data_entry>";\r
+ for ($iIndexItem = 0; $iIndexItem < count($aData); $iIndexItem++) {\r
+ $sTemp = "";\r
+ for ($iIndexAttr = 0; $iIndexAttr < count($aData[$iIndexItem]); $iIndexAttr++) {\r
+ $sTemp .= $this->arrLabel["SIDER"][$iIndexAttr] . "=\"" . trim($aData[$iIndexItem][$iIndexAttr]) . "\" ";\r
+ }\r
+ $aXML[] = ("<item " . $sTemp . "/>\n");\r
+ if ($iIndexItem > $iSize) {\r
+ break;\r
+ }\r
+ }\r
+ $aXML[] = "</data_entry>\n";\r
+\r
+ // sort by bandwidth\r
+ usort($aData, "Sort4");\r
+ $aXML[] = "<data_exit>";\r
+ for ($iIndexItem = 0; $iIndexItem < count($aData); $iIndexItem++) {\r
+ $sTemp = "";\r
+ for ($iIndexAttr = 0; $iIndexAttr < count($aData[$iIndexItem]); $iIndexAttr++) {\r
+ $sTemp .= $this->arrLabel["SIDER"][$iIndexAttr] . "=\"" . trim($aData[$iIndexItem][$iIndexAttr]) . "\" ";\r
+ }\r
+ $aXML[] = ("<item " . $sTemp . "/>\n");\r
+ if ($iIndexItem > $iSize) {\r
+ break;\r
+ }\r
+ }\r
+ $aXML[] = "</data_exit>\n";\r
+\r
+ // return\r
+ return implode($aXML, "");\r
+ }\r
+\r
+ function CreateXMLString($sSection) {\r
+ // produce xml\r
+ $aXML = array();\r
+ $arrData = $this->GetSection($sSection);\r
+ $aXML[] = "<info lastupdate=\"" . $this->dtLastUpdate . "\" />\n<data>\n";\r
+ for ($iIndexItem = 0; $iIndexItem < count($arrData); $iIndexItem++) {\r
+ $sTemp = "";\r
+ for ($iIndexAttr = 0; $iIndexAttr < count($arrData[$iIndexItem]); $iIndexAttr++) {\r
+ $sTemp .= $this->arrLabel[$sSection][$iIndexAttr] . "=\"" . htmlspecialchars(urldecode(trim($arrData[$iIndexItem][$iIndexAttr]))) . "\" ";\r
+ }\r
+ $aXML[] = ("<item " . $sTemp . "/>\n");\r
+ }\r
+ $aXML[] = "</data>\n";\r
+ return implode("", $aXML);\r
+ }\r
+\r
+ function GetSection($sSection) {\r
+ $iStartPos = strpos($this->sAWStats, ("\nBEGIN_" . $sSection . " "));\r
+ $iEndPos = strpos($this->sAWStats, ("\nEND_" . $sSection), $iStartPos);\r
+ $arrStat = explode("\n", substr($this->sAWStats, ($iStartPos + 1), ($iEndPos - $iStartPos - 1)));\r
+ for ($iIndex = 1; $iIndex < count($arrStat); $iIndex++) {\r
+ $arrData[] = split(' ', $arrStat[$iIndex]);\r
+ }\r
+ return $arrData;\r
+ }\r
+\r
+ function GetSummaryElement($arrData, $sLabel, $iElementID) {\r
+ for ($iIndex = 1; $iIndex < count($arrData); $iIndex++) {\r
+ if (strtolower($arrData[$iIndex][0]) == $sLabel) {\r
+ return $arrData[$iIndex][$iElementID];\r
+ }\r
+ }\r
+ }\r
+\r
+ function OutputXML($sXML) {\r
+ header("content-type: text/xml");\r
+ echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" .\r
+ "<jawstats>\n" . $sXML . "</jawstats>";\r
+ }\r
+ }\r
+\r
+ function DrawFooter() {\r
+ $aString = explode("_", str_replace("]", "]_", str_replace("[", "_[", Lang("Powered by [AWSTART]AWStats[END]. Made beautiful by [JAWSTART]JAWStats Web Statistics and Analytics[END]."))));\r
+ for ($i = 0; $i <count($aString); $i++) {\r
+ if ((strlen(trim($aString[$i])) > 0) && (substr($aString[$i], 0, 1) != "[") && (substr($aString[$i + 1], 0, 5) != "[END]")) {\r
+ $aString[$i] = ("<span>" . $aString[$i] . "</span>");\r
+ } else {\r
+ switch ($aString[$i]) {\r
+ case "[AWSTART]":\r
+ $aString[$i] = "<a href=\"http://www.awstats.org/\" target=\"_blank\">";\r
+ break;\r
+ case "[END]":\r
+ $aString[$i] = "</a>";\r
+ break;\r
+ case "[JAWSTART]":\r
+ $aString[$i] = "<a href=\"http://www.jawstats.com/\" target=\"_blank\">";\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ return implode($aString);\r
+ }\r
+\r
+ function DrawHeader($dtDate) {\r
+ $aString = explode("_", str_replace("]", "]_", str_replace("[", "_[", Lang("Statistics for [SITE] in [MONTH] [YEAR]"))));\r
+ for ($i = 0; $i <count($aString); $i++) {\r
+ if ((strlen(trim($aString[$i])) > 0) && (substr($aString[$i], 0, 1) != "[")) {\r
+ $aString[$i] = ("<span>" . $aString[$i] . "</span>");\r
+ } else {\r
+ switch ($aString[$i]) {\r
+ case "[MONTH]":\r
+ $aString[$i] = Lang(date("F", $dtDate));\r
+ break;\r
+ case "[SITE]":\r
+ $aString[$i] = (GetSiteName() . "<a href=\"" . $GLOBALS["g_aConfig"]["siteurl"] .\r
+ "\" target=\"_blank\"><img src=\"themes/default/images/external_link.png\" class=\"externallink\" /></a>");\r
+ break;\r
+ case "[YEAR]":\r
+ $aString[$i] = date("Y", $dtDate);\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ return ("<h1>" . implode($aString) . "</h1>");\r
+ }\r
+\r
+ function ElapsedTime($iSeconds) {\r
+ if ($GLOBALS["g_iThisLog"] == 0) {\r
+ if ($iSeconds < 60) {\r
+ return (" (<" . Lang("1 min ago") . ")");\r
+ }\r
+ $iMinutes = floor($iSeconds / 60);\r
+ if ($iMinutes < 60) {\r
+ if ($iMinutes == 1) {\r
+ return (" (" . Lang("1 min ago") . ")");\r
+ } else {\r
+ return (" (" . str_replace("[MINUTES]", $iMinutes, Lang("[MINUTES] mins ago")) . ")");\r
+ }\r
+ }\r
+ $iHours = floor($iMinutes / 60);\r
+ if ($iHours < 24) {\r
+ $iMinutes = ($iMinutes - ($iHours * 60));\r
+ return (" (" . str_replace("[HOURS]", $iHours, str_replace("[MINUTES]", $iMinutes, Lang("[HOURS]h [MINUTES]m ago"))) . ")");\r
+ }\r
+ $iDays = floor($iHours / 24);\r
+ if ($iDays == 1) {\r
+ return (" (" . Lang("1 day ago") . ")");\r
+ } else {\r
+ return (" (" . str_replace("[DAYS]", $iDays, Lang("[DAYS] days ago")) . ")");\r
+ }\r
+ }\r
+ }\r
+\r
+ function GetConfig() {\r
+ // check config(s) exists\r
+ if (count($GLOBALS["aConfig"]) < 1) {\r
+ Error("BadConfigNoSites");\r
+ }\r
+\r
+ // check this site config exists\r
+ if ((isset($_GET["config"]) == true) && (isset($GLOBALS["aConfig"][$_GET["config"]]) == true)) {\r
+ $sConfig = $_GET["config"];\r
+ } else {\r
+ $sConfig = key($GLOBALS["aConfig"]);\r
+ }\r
+\r
+ // validate settings\r
+ if ((isset($GLOBALS["aConfig"][$sConfig]["staticxml"]) != true) || (is_bool($GLOBALS["aConfig"][$sConfig]["staticxml"]) != true)) {\r
+ $GLOBALS["aConfig"][$sConfig]["staticxml"] = false;\r
+ }\r
+\r
+ // return\r
+ return $sConfig;\r
+ }\r
+\r
+ function GetLogList($sStatsName, $sFilePath) {\r
+ if ($oDir = opendir($sFilePath)) {\r
+ // load available dates into array and sort by date\r
+ while (($oItem = readdir($oDir)) !== false) {\r
+ if ((substr($oItem, 0, 7) == "awstats") &&\r
+ (substr($oItem, 14) == ($sStatsName . ".txt"))) {\r
+ $aTemp[] = mktime(0, 0, 0, intval(substr($oItem, 7, 2)), 1, intval(substr($oItem, 9, 4)));\r
+ }\r
+ }\r
+ if (count($aTemp) < 1) {\r
+ Error("NoLogsFound", $GLOBALS["g_sConfig"]);\r
+ }\r
+ if (count($aTemp) > 1) {\r
+ rsort($aTemp);\r
+ }\r
+\r
+ // find first & last dates\r
+ $dtLatest = $aTemp[0];\r
+ $dtEarliest = $aTemp[count($aTemp) - 1];\r
+\r
+ // create full array of all potential dates\r
+ $aMonths = array();\r
+ $dtLoop = $dtLatest;\r
+ while ($dtLoop >= $dtEarliest) {\r
+ $bFound = false;\r
+ for ($iIndex = 0; $iIndex < count($aTemp); $iIndex++) {\r
+ if ($aTemp[$iIndex] == $dtLoop) {\r
+ $bFound = true;\r
+ array_splice($aTemp, $iIndex, 1);\r
+ break;\r
+ }\r
+ }\r
+ array_push($aMonths, array($dtLoop, $bFound));\r
+ $dtLoop = mktime(0, 0, 0, (date("n", $dtLoop) - 1), 1, date("Y", $dtLoop));\r
+ }\r
+ } else {\r
+ Error("CannotOpenLog");\r
+ }\r
+ return $aMonths;\r
+ }\r
+\r
+ function GetSiteName() {\r
+ if ((isset($GLOBALS["g_aConfig"]["sitename"]) == true) && (strlen($GLOBALS["g_aConfig"]["sitename"]) > 0)) {\r
+ return $GLOBALS["g_aConfig"]["sitename"];\r
+ } else {\r
+ return $GLOBALS["g_aConfig"]["siteurl"];\r
+ }\r
+ }\r
+\r
+ function SetTranslation() {\r
+ function FindTranslation($sCode) {\r
+ $sCode = strtolower($sCode);\r
+ if ($sCode == "en-gb") {\r
+ return true;\r
+ }\r
+ for ($i = 0; $i < count($GLOBALS["g_aTranslation"]); $i++) {\r
+ if (strtolower($GLOBALS["g_aTranslation"][$i]["code"]) == $sCode) {\r
+ $GLOBALS["g_aCurrentTranslation"] = $GLOBALS["g_aTranslation"][$i]["translations"];\r
+ return true;\r
+ }\r
+ }\r
+ return false;\r
+ }\r
+\r
+ // check for existence of querystring\r
+ if ((isset($_GET["lang"]) == true) && (FindTranslation($_GET["lang"]) == true)) {\r
+ return $_GET["lang"];\r
+ }\r
+ // check for existence of site config\r
+ if ((isset($GLOBALS["g_aConfig"]["language"]) == true) && (FindTranslation($GLOBALS["g_aConfig"]["language"]) == true)) {\r
+ return $GLOBALS["g_aConfig"]["language"];\r
+ }\r
+ // check for existence of global config\r
+ if ((isset($GLOBALS["sDefaultLanguage"]) == true) && (FindTranslation($GLOBALS["sDefaultLanguage"]) == true)) {\r
+ return $GLOBALS["sDefaultLanguage"];\r
+ }\r
+ return "en-gb";\r
+ }\r
+\r
+ function Sort1($a, $b) {\r
+ if ($a[1] == $b[1]) { return 0; }\r
+ return ($a[1] > $b[1]) ? -1 : 1;\r
+ }\r
+\r
+ function Sort2($a, $b) {\r
+ if ($a[2] == $b[2]) { return 0; }\r
+ return ($a[2] > $b[2]) ? -1 : 1;\r
+ }\r
+\r
+ function Sort3($a, $b) {\r
+ if ($a[3] == $b[3]) { return 0; }\r
+ return ($a[3] > $b[3]) ? -1 : 1;\r
+ }\r
+\r
+ function Sort4($a, $b) {\r
+ if ($a[4] == $b[4]) { return 0; }\r
+ return ($a[4] > $b[4]) ? -1 : 1;\r
+ }\r
+\r
+ function ToolChangeLanguage() {\r
+ if (count($GLOBALS["g_aTranslation"]) < 1) {\r
+ return "";\r
+ }\r
+\r
+ function LanguageSort($a, $b) {\r
+ return ($a["name"] < $b["name"]) ? -1 : 1;\r
+ }\r
+\r
+ // create html\r
+ $aHTML = array();\r
+ $aHTML[] = "<div id=\"toolLanguage\" class=\"tool\">\n<div>";\r
+ $aHTML[] = "<h1>" . Lang("Please select your language") . "<span onclick=\"ShowTools('toolLanguage')\">(" . Lang("Cancel") . ")</span></h1>";\r
+ $aHTML[] = "<table id=\"langpicker\" cellspacing=\"0\">\n<tr><td><ul>";\r
+\r
+ // copy array\r
+ array_push($GLOBALS["g_aTranslation"], array("code" => "en-gb", "name" => "English", "translations" => array()));\r
+ usort($GLOBALS["g_aTranslation"], "LanguageSort");\r
+\r
+ // loop through sites\r
+ $iColA = ceil(count($GLOBALS["g_aTranslation"]) / 3);\r
+ $iColB = ceil((count($GLOBALS["g_aTranslation"]) - $iColA) / 2) + $iColA;\r
+ for ($i = 0; $i < count($GLOBALS["g_aTranslation"]); $i++) {\r
+ $sCSS = "";\r
+ if ($GLOBALS["g_aTranslation"][$i]["code"] == $GLOBALS["sLanguageCode"]) {\r
+ $sCSS = " class=\"selected\"";\r
+ }\r
+ $aHTML[] = "<li" . $sCSS . " onclick=\"ChangeLanguage('" . $GLOBALS["g_aTranslation"][$i]["code"] . "')\">" . $GLOBALS["g_aTranslation"][$i]["name"] . "</li>";\r
+ if ((($i + 1) == $iColA) || (($i + 1) == $iColB)) {\r
+ $aHTML[] = "</ul>\n</td>\n<td><ul>";\r
+ if (count($GLOBALS["g_aTranslation"]) == $i) {\r
+ $aHTML[] = "<li> </li>";\r
+ }\r
+ }\r
+ }\r
+\r
+ // close html\r
+ $aHTML[] = "</ul>\n</td>\n</tr>\n</table>";\r
+ $aHTML[] = "</div></div>";\r
+\r
+ return implode($aHTML, "\n");\r
+ }\r
+\r
+ function ToolChangeMonth() {\r
+ $aHTML = array();\r
+ $aHTML[] = "<div id=\"toolMonth\" class=\"tool\">\n<div>";\r
+ $aHTML[] = "<h1>" . Lang("Please select the month you wish to view") . "<span onclick=\"ShowTools('toolMonth')\">(" . Lang("Cancel") . ")</span></h1>";\r
+ $aHTML[] = "<table id=\"datepicker\" cellspacing=\"0\">";\r
+\r
+ //loop through years\r
+ for ($iYear = date("Y", $GLOBALS["g_aLogFiles"][0][0]); $iYear >= date("Y", $GLOBALS["g_aLogFiles"][count($GLOBALS["g_aLogFiles"]) - 1][0]); $iYear--) {\r
+ $aHTML[] = "<tr>\n<td>" . $iYear . ":</td>";\r
+\r
+ // loop through months\r
+ for ($iMonth = 1; $iMonth < 13; $iMonth++) {\r
+ $dtTemp = mktime(0, 0, 0, $iMonth, 1, $iYear);\r
+ $bExists = false;\r
+ foreach ($GLOBALS["g_aLogFiles"] as $aLog) {\r
+ if (($aLog[0] == $dtTemp) && ($aLog[1] == true)) {\r
+ $bExists = true;\r
+ break;\r
+ }\r
+ }\r
+ if ($bExists == true) {\r
+ $sCSS = "";\r
+ if ((date("n", $GLOBALS["g_aLogFiles"][$GLOBALS["g_iThisLog"]][0]) == $iMonth) && (date("Y", $GLOBALS["g_aLogFiles"][$GLOBALS["g_iThisLog"]][0]) == $iYear)) {\r
+ $sCSS .= " selected";\r
+ }\r
+ $aHTML[] = "<td class='date" . $sCSS . "' onclick='ChangeMonth(" . date("Y,n", $dtTemp) . ")'>" . Lang(date("F", $dtTemp)) . "</td>";\r
+ } else {\r
+ if ($dtTemp > time()) {\r
+ $aHTML[] = "<td class='fade'> </td>";\r
+ } else {\r
+ $aHTML[] = "<td class='fade'>" . Lang(date("F", $dtTemp)) . "</td>";\r
+ }\r
+ }\r
+ }\r
+ $aHTML[] = "</tr>";\r
+ }\r
+ $aHTML[] = "</table>";\r
+ $aHTML[] = "</div></div>";\r
+\r
+ return implode($aHTML, "\n");\r
+ }\r
+\r
+ function ToolChangeSite() {\r
+ if (($GLOBALS["bConfigChangeSites"] != true) || (count($GLOBALS["aConfig"]) < 2)) {\r
+ return "";\r
+ }\r
+\r
+ // create html\r
+ $aHTML = array();\r
+ $aHTML[] = "<div id=\"toolSite\" class=\"tool\">\n<div>";\r
+ $aHTML[] = "<h1>" . Lang("Please select the site you wish to view") . "<span onclick=\"ShowTools('toolSite')\">(" . Lang("Cancel") . ")</span></h1>";\r
+ $aHTML[] = "<table id=\"sitepicker\" cellspacing=\"0\">\n<tr><td><ul>";\r
+\r
+ // loop through sites\r
+ $i = 0;\r
+ $iColA = ceil(count($GLOBALS["aConfig"]) / 3);\r
+ $iColB = ceil((count($GLOBALS["aConfig"]) - $iColA) / 2) + $iColA;\r
+ foreach ($GLOBALS["aConfig"] as $sSiteCode => $aSite) {\r
+ $sCSS = "";\r
+ if ($GLOBALS["g_sConfig"] == $sSiteCode) {\r
+ $sCSS = " class=\"selected\"";\r
+ }\r
+ $aHTML[] = "<li" . $sCSS . " onclick=\"ChangeSite('" . $sSiteCode . "')\">" .\r
+ (((isset($aSite["sitename"]) == true) && (strlen(trim($aSite["sitename"])) > 0)) ? $aSite["sitename"] : $aSite["siteurl"]) . "</li>";\r
+ $i++;\r
+ if (($i == $iColA) || ($i == $iColB)) {\r
+ $aHTML[] = "</ul>\n</td>\n<td><ul>";\r
+ if (count($GLOBALS["aConfig"]) == 2) {\r
+ $aHTML[] = "<li> </li>";\r
+ }\r
+ }\r
+ }\r
+\r
+ // close html\r
+ $aHTML[] = "</ul>\n</td>\n</tr>\n</table>";\r
+ $aHTML[] = "</div></div>";\r
+\r
+ return implode($aHTML, "\n");\r
+ }\r
+\r
+ function ToolUpdateSite() {\r
+ if ($GLOBALS["bConfigUpdateSites"] != true) {\r
+ return "";\r
+ }\r
+\r
+ // create html\r
+ $aHTML = array();\r
+ $aHTML[] = "<div id=\"toolUpdate\" class=\"tool\">\n<div>";\r
+ $aHTML[] = "<h1>" . Lang("Please enter the password to update this site") . "<span onclick=\"ShowTools('toolUpdate')\">(" . Lang("Cancel") . ")</span></h1>\n<div id=\"siteupdate\">";\r
+ $aHTML[] = "<input type=\"password\" id=\"password\" onkeyup=\"UpdateSiteKeyUp(event)\" />";\r
+ $aHTML[] = "<input type=\"button\" onclick=\"UpdateSite()\" value=\"" . Lang("Update") . "\" />";\r
+ $aHTML[] = "</div>\n</div>\n</div>";\r
+ return implode($aHTML, "\n");\r
+ }\r
+\r
+ function ValidateConfig() {\r
+ // core values\r
+ if (ValidateView($GLOBALS["sConfigDefaultView"]) != true) {\r
+ Error("BadConfig", "sConfigDefaultView");\r
+ }\r
+ if (is_bool($GLOBALS["bConfigChangeSites"]) != true) {\r
+ Error("BadConfig", "bConfigChangeSites");\r
+ }\r
+ if (is_bool($GLOBALS["bConfigUpdateSites"]) != true) {\r
+ Error("BadConfig", "bConfigUpdateSites");\r
+ }\r
+ }\r
+\r
+ function ValidateDate($iYear, $iMonth) {\r
+ $iYear = intval($iYear);\r
+ $iMonth = intval($iMonth);\r
+ if (($iYear < 2000) || ($iYear > date("Y"))) {\r
+ $iYear = intval(date("Y"));\r
+ }\r
+ if (($iMonth < 1) || ($iMonth > 12)) {\r
+ $iMonth = intval(date("n"));\r
+ }\r
+ return mktime(0, 0, 0, $iMonth, 1, $iYear);\r
+ }\r
+\r
+ function ValidateView($sView) {\r
+ $bValid = false;\r
+ switch ($sView) {\r
+ case "allmonths.all":\r
+ case "browser.all":\r
+ case "browser.family":\r
+ case "country.Africa":\r
+ case "country.all":\r
+ case "country.Asia":\r
+ case "country.continent":\r
+ case "country.Europe":\r
+ case "country.North America":\r
+ case "country.Oceania":\r
+ case "country.Other":\r
+ case "country.South America":\r
+ case "filetypes":\r
+ case "os.all":\r
+ case "os.family":\r
+ case "pagerefs.all":\r
+ case "pagerefs.domains":\r
+ case "pagerefs.se":\r
+ case "pagerefs.top10":\r
+ case "pagerefs.top50":\r
+ case "pages.topPages":\r
+ case "pages.topBW":\r
+ case "pages.topEntry":\r
+ case "pages.topExit":\r
+ case "robots":\r
+ case "searches.keywordcloud":\r
+ case "searches.keywords":\r
+ case "searches.keyphrasecloud":\r
+ case "searches.keyphrases":\r
+ case "session":\r
+ case "status":\r
+ case "status.404":\r
+ case "thismonth.all";\r
+ case "thismonth.bandwidth":\r
+ case "thismonth.hits":\r
+ case "thismonth.pages":\r
+ case "thismonth.visits":\r
+ case "time";\r
+ $bValid = true;\r
+ break;\r
+ }\r
+ return $bValid;\r
+ }\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+ // core config parameters\r
+ $sDefaultLanguage = "en-gb";\r
+ $sConfigDefaultView = "thismonth.all";\r
+ $bConfigChangeSites = true;\r
+ $bConfigUpdateSites = true;\r
+ $sUpdateSiteFilename = "xml_update.php";\r
+\r
+ // individual site configuration\r
+ $aConfig["site1"] = array(\r
+ "statspath" => "/path/to/data/",\r
+ "updatepath" => "/path/to/awstats.pl/",\r
+ "siteurl" => "http://www.my-1st-domain.com",\r
+ "sitename" => "",\r
+ "theme" => "default",\r
+ "fadespeed" => 250,\r
+ "password" => "my-1st-password",\r
+ "includes" => "",\r
+ "language" => "en-gb"\r
+ );\r
+\r
+ $aConfig["site2"] = array(\r
+ "statspath" => "/path/to/data/",\r
+ "updatepath" => "/path/to/awstats.pl/",\r
+ "siteurl" => "http://www.my-2nd-domain.com",\r
+ "sitename" => "",\r
+ "theme" => "default",\r
+ "fadespeed" => 250,\r
+ "password" => "my-2nd-password",\r
+ "includes" => "",\r
+ "language" => "en-gb"\r
+ );\r
+\r
+?>\r
--- /dev/null
+../jawstats-config.php
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+/*\r
+ * JAWStats 0.7 Web Statistics\r
+ *\r
+ * Copyright (c) 2009 Jon Combe (jawstats.com)\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person\r
+ * obtaining a copy of this software and associated documentation\r
+ * files (the "Software"), to deal in the Software without\r
+ * restriction, including without limitation the rights to use,\r
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+ * copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following\r
+ * conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be\r
+ * included in all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r
+ * OTHER DEALINGS IN THE SOFTWARE.\r
+ */\r
+\r
+ header('Content-Type: text/html; charset="utf-8"', true);\r
+ error_reporting(0);\r
+ set_error_handler("ErrorHandler");\r
+\r
+ // javascript caching\r
+ $gc_sJavascriptVersion = "200901251254";\r
+ $g_aTranslation = array();\r
+ $g_aCurrentTranslation = array();\r
+\r
+ // includes\r
+ require_once "clsAWStats.php";\r
+ require_once "languages/translations.php";\r
+ require_once "config.php";\r
+ ValidateConfig();\r
+\r
+ // select configuraton and translations\r
+ $g_sConfig = GetConfig();\r
+ $g_aConfig = $aConfig[$g_sConfig];\r
+ $sLanguageCode = SetTranslation();\r
+\r
+ // external include files\r
+ if ((isset($g_aConfig["includes"]) == true) && (strlen($g_aConfig["includes"]) > 0)) {\r
+ $aIncludes = explode(",", $g_aConfig["includes"]);\r
+ foreach ($aIncludes as $sInclude) {\r
+ include $sInclude;\r
+ }\r
+ }\r
+\r
+ // get date range and valid log file\r
+ $g_dtStatsMonth = ValidateDate($_GET["year"], $_GET["month"]);\r
+ $g_aLogFiles = GetLogList($g_sConfig, $g_aConfig["statspath"]);\r
+ $g_iThisLog = -1;\r
+ for ($iIndex = 0; $iIndex < count($g_aLogFiles); $iIndex++) {\r
+ if (($g_dtStatsMonth == $g_aLogFiles[$iIndex][0]) && ($g_aLogFiles[$iIndex][1] == true)) {\r
+ $g_iThisLog = $iIndex;\r
+ break;\r
+ }\r
+ }\r
+ if ($g_iThisLog < 0) {\r
+ if (count($g_aLogFiles) > 0) {\r
+ $g_iThisLog = 0;\r
+ } else {\r
+ Error("NoLogsFound");\r
+ }\r
+ }\r
+\r
+ // validate current view\r
+ if (ValidateView($_GET["view"]) == true) {\r
+ $sCurrentView = $_GET["view"];\r
+ } else {\r
+ $sCurrentView = $sConfigDefaultView;\r
+ }\r
+\r
+ // create class\r
+ $clsAWStats = new clsAWStats($g_sConfig,\r
+ $g_aConfig["statspath"],\r
+ date("Y", $g_aLogFiles[$g_iThisLog][0]),\r
+ date("n", $g_aLogFiles[$g_iThisLog][0]));\r
+ if ($clsAWStats->bLoaded != true) {\r
+ Error("CannotOpenLog");\r
+ }\r
+\r
+ // days in month\r
+ if (($clsAWStats->iYear == date("Y")) && ($clsAWStats->iMonth == date("n"))) {\r
+ $iDaysInMonth = abs(date("s", $clsAWStats->dtLastUpdate));\r
+ $iDaysInMonth += (abs(date("i", $clsAWStats->dtLastUpdate)) * 60);\r
+ $iDaysInMonth += (abs(date("H", $clsAWStats->dtLastUpdate)) * 60 * 60);\r
+ $iDaysInMonth = abs(date("j", $clsAWStats->dtLastUpdate) - 1) + ($iDaysInMonth / (60 * 60 * 24));\r
+ } else {\r
+ $iDaysInMonth = date("d", mktime (0, 0, 0, date("n", $clsAWStats->dtLastUpdate), 0, date("Y", $clsAWStats->dtLastUpdate)));\r
+ }\r
+\r
+ // start of the month\r
+ $dtStartOfMonth = mktime(0, 0, 0, $clsAWStats->iMonth, 1, $clsAWStats->iYear);\r
+ $iDailyVisitAvg = ($clsAWStats->iTotalVisits / $iDaysInMonth);\r
+ $iDailyUniqueAvg = ($clsAWStats->iTotalUnique / $iDaysInMonth);\r
+\r
+?>\r
+\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+ <title><?php echo str_replace("[SITE]", GetSiteName(), str_replace("[MONTH]", Lang(date("F", $g_aLogFiles[$g_iThisLog][0])), str_replace("[YEAR]", date("Y", $g_aLogFiles[$g_iThisLog][0]), Lang("Statistics for [SITE] in [MONTH] [YEAR]")))) ?></title>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+ <link rel="stylesheet" href="themes/<?php echo $g_aConfig["theme"] ?>/style.css" type="text/css" />\r
+ <script type="text/javascript" src="js/packed.js?<?php echo $gc_sJavascriptVersion ?>"></script>\r
+\r
+ <!--\r
+ <script type="text/javascript" src="js/jquery.js"></script>\r
+ <script type="text/javascript" src="js/jquery.tablesorter.js"></script>\r
+ <script type="text/javascript" src="js/swfobject.js"></script>\r
+ -->\r
+\r
+ <script type="text/javascript" src="js/constants.js?<?php echo $gc_sJavascriptVersion ?>"></script>\r
+ <script type="text/javascript" src="js/jawstats.js?<?php echo $gc_sJavascriptVersion ?>"></script>\r
+ <script type="text/javascript">\r
+ var g_sConfig = "<?php echo $g_sConfig ?>";\r
+ var g_iYear = <?php echo date("Y", $g_aLogFiles[$g_iThisLog][0]) ?>;\r
+ var g_iMonth = <?php echo date("n", $g_aLogFiles[$g_iThisLog][0]) ?>;\r
+ var g_sCurrentView = "<?php echo $sCurrentView ?>";\r
+ var g_dtLastUpdate = <?php echo $clsAWStats->dtLastUpdate ?>;\r
+ var g_iFadeSpeed = <?php echo $g_aConfig["fadespeed"] ?>;\r
+ var g_bUseStaticXML = <?php echo BooleanToText($g_aConfig["staticxml"]) ?>;\r
+ var g_sLanguage = "<?php echo $sLanguageCode ?>";\r
+ var sThemeDir = "<?php echo $g_aConfig["theme"] ?>";\r
+ var sUpdateFilename = "<?php echo $sUpdateSiteFilename ?>";\r
+ </script>\r
+ <script type="text/javascript" src="themes/<?php echo $g_aConfig["theme"] ?>/style.js?<?php echo $gc_sJavascriptVersion ?>"></script>\r
+<?php\r
+ if ($sLanguageCode != "en-gb") {\r
+ echo " <script type=\"text/javascript\" src=\"languages/" . $sLanguageCode . ".js\"></script>\n";\r
+ }\r
+?>\r
+ <script type="text/javascript" src="http://version.jawstats.com/version.js"></script>\r
+</head>\r
+\r
+<body>\r
+\r
+ <div id="tools">\r
+<?php\r
+\r
+ echo ToolChangeMonth();\r
+ echo ToolChangeSite();\r
+ echo ToolUpdateSite();\r
+ echo ToolChangeLanguage();\r
+\r
+?>\r
+ </div>\r
+\r
+ <div id="toolmenu">\r
+ <div class="container">\r
+<?php\r
+\r
+ // change month\r
+ echo "<span>";\r
+ if ($g_iThisLog < (count($g_aLogFiles) - 1)) {\r
+ echo "<img src=\"themes/" . $g_aConfig["theme"] . "/changemonth/first.gif\" onmouseover=\"this.src='themes/" . $g_aConfig["theme"] . "/changemonth/first_on.gif'\" onmouseout=\"this.src='themes/" . $g_aConfig["theme"] . "/changemonth/first.gif'\" class=\"changemonth\" onclick=\"ChangeMonth(" . date("Y,n", $g_aLogFiles[count($g_aLogFiles) - 1][0]) . ")\" />" .\r
+ "<img src=\"themes/" . $g_aConfig["theme"] . "/changemonth/prev.gif\" onmouseover=\"this.src='themes/" . $g_aConfig["theme"] . "/changemonth/prev_on.gif'\" onmouseout=\"this.src='themes/" . $g_aConfig["theme"] . "/changemonth/prev.gif'\" class=\"changemonth\" onclick=\"ChangeMonth(" . date("Y,n", $g_aLogFiles[$g_iThisLog + 1][0]) . ")\" />";\r
+ } else {\r
+ echo "<img src=\"themes/" . $g_aConfig["theme"] . "/changemonth/first_off.gif\" class=\"changemonthOff\" />" .\r
+ "<img src=\"themes/" . $g_aConfig["theme"] . "/changemonth/prev_off.gif\" class=\"changemonthOff\" />";\r
+ }\r
+ echo "<span onclick=\"ShowTools('toolMonth');\">" . Lang("Change Month") . "</span>";\r
+ if ($g_iThisLog > 0) {\r
+ echo "<img src=\"themes/" . $g_aConfig["theme"] . "/changemonth/next.gif\" onmouseover=\"this.src='themes/" . $g_aConfig["theme"] . "/changemonth/next_on.gif'\" onmouseout=\"this.src='themes/" . $g_aConfig["theme"] . "/changemonth/next.gif'\" class=\"changemonth\" onclick=\"ChangeMonth(" . date("Y,n", $g_aLogFiles[$g_iThisLog - 1][0]) . ")\" />" .\r
+ "<img src=\"themes/" . $g_aConfig["theme"] . "/changemonth/last.gif\" onmouseover=\"this.src='themes/" . $g_aConfig["theme"] . "/changemonth/last_on.gif'\" onmouseout=\"this.src='themes/" . $g_aConfig["theme"] . "/changemonth/last.gif'\" class=\"changemonth\" onclick=\"ChangeMonth(" . date("Y,n", $g_aLogFiles[0][0]) . ")\" /> ";\r
+ } else {\r
+ echo "<img src=\"themes/" . $g_aConfig["theme"] . "/changemonth/next_off.gif\" class=\"changemonthOff\" />" .\r
+ "<img src=\"themes/" . $g_aConfig["theme"] . "/changemonth/last_off.gif\" class=\"changemonthOff\" />";\r
+ }\r
+ echo "</span>\n";\r
+\r
+ // change site (if available)\r
+ if (($bConfigChangeSites == true) && (count($aConfig) > 1)) {\r
+ echo "<span onclick=\"ShowTools('toolSite')\">" . Lang("Change Site") . "</span>\n";\r
+ }\r
+\r
+ // update site (if available)\r
+ if ($bConfigUpdateSites == true) {\r
+ echo "<span onclick=\"ShowTools('toolUpdate')\">" . Lang("Update Site") . "</span>\n";\r
+ }\r
+\r
+ // change language\r
+ echo "<span id=\"toolLanguageButton\" onclick=\"ShowTools('toolLanguage')\">" . Lang("Change Language") .\r
+ "<img src=\"themes/" . $g_aConfig["theme"] . "/images/change_language.gif\" /></span>\n";\r
+\r
+?>\r
+ </div>\r
+ </div>\r
+\r
+ <div id="header">\r
+ <div class="container">\r
+ <?php echo DrawHeader($g_aLogFiles[$g_iThisLog][0]) ?>\r
+\r
+\r
+ <div id="summary">\r
+<?php\r
+\r
+ $sTemp = Lang("Last updated [DAYNAME], [DATE] [MONTH] [YEAR] at [TIME] [ELAPSEDTIME]. A total of [TOTALVISITORS] visitors ([UNIQUEVISITORS] unique) this month, an average of [DAILYAVERAGE] per day ([DAILYUNIQUE] unique).");\r
+ $sTemp = str_replace("[DAYNAME]", "<span>" . Lang(date("l", $clsAWStats->dtLastUpdate)), $sTemp);\r
+ $sTemp = str_replace("[YEAR]", date("Y", $clsAWStats->dtLastUpdate) . "</span>", $sTemp);\r
+ $sTemp = str_replace("[DATE]", Lang(date("jS", $clsAWStats->dtLastUpdate)), $sTemp);\r
+ $sTemp = str_replace("[MONTH]", Lang(date("F", $clsAWStats->dtLastUpdate)), $sTemp);\r
+ $sTemp = str_replace("[TIME]", "<span>" . date("H:i", $clsAWStats->dtLastUpdate) . "</span>", $sTemp);\r
+ $sTemp = str_replace("[ELAPSEDTIME]", ElapsedTime(time() - $clsAWStats->dtLastUpdate), $sTemp);\r
+ $sTemp = str_replace("[TOTALVISITORS]", "<span>" . number_format($clsAWStats->iTotalVisits) . "</span>", $sTemp);\r
+ $sTemp = str_replace("[UNIQUEVISITORS]", number_format($clsAWStats->iTotalUnique), $sTemp);\r
+ $sTemp = str_replace("[DAILYAVERAGE]", "<span>" . number_format($iDailyVisitAvg, 1) . "</span>", $sTemp);\r
+ $sTemp = str_replace("[DAILYUNIQUE]", number_format($iDailyUniqueAvg, 1), $sTemp);\r
+ echo $sTemp;\r
+\r
+?>\r
+ </div>\r
+ <div id="menu">\r
+ <ul>\r
+ <li id="tabthismonth"><span onclick="ChangeTab(this, 'thismonth.all')"><?php echo Lang("This Month"); ?></span></li>\r
+ <li id="taballmonths"><span onclick="ChangeTab(this, 'allmonths.all')"><?php echo Lang("All Months"); ?></span></li>\r
+ <li id="tabtime"><span onclick="ChangeTab(this, 'time')"><?php echo Lang("Hours"); ?></span></li>\r
+ <li id="tabbrowser"><span onclick="ChangeTab(this, 'browser.family')"><?php echo Lang("Browsers"); ?></span></li>\r
+ <li id="tabcountry"><span onclick="ChangeTab(this, 'country.all')"><?php echo Lang("Countries"); ?></span></li>\r
+ <li id="tabfiletypes"><span onclick="ChangeTab(this, 'filetypes')"><?php echo Lang("Filetypes"); ?></span></li>\r
+ <li id="tabos"><span onclick="ChangeTab(this, 'os.family')"><?php echo Lang("Operating Systems"); ?></span></li>\r
+ <li id="tabpages"><span onclick="ChangeTab(this, 'pages.topPages')"><?php echo Lang("Pages"); ?></span></li>\r
+ <li id="tabpagerefs"><span onclick="ChangeTab(this, 'pagerefs.se')"><?php echo Lang("Referrers"); ?></span></li>\r
+ <li id="tabrobots"><span onclick="ChangeTab(this, 'robots')"><?php echo Lang("Spiders"); ?></span></li>\r
+ <li id="tabsearches"><span onclick="ChangeTab(this, 'searches.keywords')"><?php echo Lang("Searches"); ?></span></li>\r
+ <li id="tabsession"><span onclick="ChangeTab(this, 'session')"><?php echo Lang("Sessions"); ?></span></li>\r
+ <li id="tabstatus"><span onclick="ChangeTab(this, 'status')"><?php echo Lang("Status"); ?></span></li>\r
+ </ul>\r
+ </div>\r
+ <br style="clear: both" />\r
+ <div id="loading"> </div>\r
+ </div>\r
+ </div>\r
+ <div id="main">\r
+ <div class="container">\r
+ <div id="content"> </div>\r
+ <div id="footer">\r
+ <?php echo DrawFooter(); ?>\r
+ <span id="version"> </span>\r
+ </div>\r
+ </div>\r
+ </div>\r
+</body>\r
+\r
+</html>\r
+\r
+<?\r
+\r
+ // output booleans for javascript\r
+ function BooleanToText($bValue) {\r
+ if ($bValue == true) {\r
+ return "true";\r
+ } else {\r
+ return "false";\r
+ }\r
+ }\r
+\r
+ // error display\r
+ function Error($sReason, $sExtra="") {\r
+ // echo "ERROR!<br />" . $sReason;\r
+ switch ($sReason) {\r
+ case "BadConfig":\r
+ $sProblem = str_replace("[FILENAME]", "\"config.php\"", Lang("There is an error in [FILENAME]"));\r
+ $sResolution = "<p>" . str_replace("[VARIABLE]", ("<i>" . $sExtra . "</i>"), Lang("The variable [VARIABLE] is missing or invalid.")) . "</p>";\r
+ break;\r
+ case "BadConfigNoSites":\r
+ $sProblem = str_replace("[FILENAME]", "\"config.php\"", Lang("There is an error in [FILENAME]"));\r
+ $sResolution = "<p>" . Lang("No individual AWStats configurations have been defined.") . "</p>";\r
+ break;\r
+ case "CannotLoadClass":\r
+ $sProblem = str_replace("[FILENAME]", "\"clsAWStats.php\"", Lang("Cannot find required file [FILENAME]"));\r
+ $sResolution = "<p>" . Lang("At least one file required by JAWStats has been deleted, renamed or corrupted.") . "</p>";\r
+ break;\r
+ case "CannotLoadConfig":\r
+ $sProblem = str_replace("[FILENAME]", "\"config.php\"", Lang("Cannot find required file [FILENAME]"));\r
+ $sResolution = "<p>" . str_replace("[CONFIGDIST]", "<i>config.dist.php</i>", str_replace("[CONFIG]", "<i>config.php</i>", Lang("JAWStats cannot find it's configuration file, [CONFIG]. Did you successfully copy and rename the [CONFIGDIST] file?"))) . "</p>";\r
+ break;\r
+ case "CannotLoadLanguage":\r
+ $sProblem = str_replace("[FILENAME]", "\"languages/translations.php\"", Lang("Cannot find required file [FILENAME]"));\r
+ $sResolution = "<p>" . Lang("At least one file required by JAWStats has been deleted, renamed or corrupted.") . "</p>";\r
+ break;\r
+ case "CannotOpenLog":\r
+ $sStatsPath = $GLOBALS["aConfig"][$GLOBALS["g_sConfig"]]["statspath"];\r
+ $sProblem = Lang("JAWStats could not open an AWStats log file");\r
+ $sResolution = "<p>" . Lang("Is the specified AWStats log file directory correct? Does it have a trailing slash?") . "<br />" .\r
+ str_replace("[VARIABLE]", "<strong>\"statspath\"</strong>", str_replace("[CONFIG]", "<i>config.php</i>", Lang("The problem may be the variable [VARIABLE] in your [CONFIG] file."))) . "</p>" .\r
+ "<p>" . str_replace("[FOLDER]", "<strong>" . $sStatsPath . "</strong>\n", str_replace("[FILE]", "<strong>awstats" . date("Yn") . "." . $GLOBALS["g_sConfig"] . ".txt</strong>", Lang("The data file being looked for is [FILE] in folder [FOLDER]")));\r
+ if (substr($sStatsPath, -1) != "/") {\r
+ $sResolution .= "<br />" . str_replace("[FOLDER]", "<strong>" . $sStatsPath . "</strong>", Lang("Try changing the folder to [FOLDER]"));\r
+ }\r
+ $sResolution .= "</p>";\r
+ break;\r
+ case "NoLogsFound":\r
+ $sStatsPath = $GLOBALS["aConfig"][$GLOBALS["g_sConfig"]]["statspath"];\r
+ $sProblem = Lang("No AWStats Log Files Found");\r
+ $sResolution = "<p>JAWStats cannot find any AWStats log files in the specified directory: <strong>" . $sStatsPath . "</strong><br />" .\r
+ "Is this the correct folder? Is your config name, <i>" . $GLOBALS["g_sConfig"] . "</i>, correct?</p>\n";\r
+ break;\r
+ case "Unknown":\r
+ $sProblem = "";\r
+ $sResolution = "<p>" . $sExtra . "</p>\n";\r
+ break;\r
+ }\r
+ echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" " .\r
+ "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" .\r
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" .\r
+ "<head>\n" .\r
+ "<title>JAWStats</title>\n" .\r
+ "<style type=\"text/css\">\n" .\r
+ "html, body { background: #33332d; border: 0; color: #eee; font-family: arial, helvetica, sans-serif; font-size: 15px; margin: 20px; padding: 0; }\n" .\r
+ "a { color: #9fb4cc; text-decoration: none; }\n" .\r
+ "a:hover { color: #fff; text-decoration: underline; }\n" .\r
+ "h1 { border-bottom: 1px solid #cccc9f; color: #eee; font-size: 22px; font-weight: normal; } \n" .\r
+ "h1 span { color: #cccc9f !important; font-size: 16px; } \n" .\r
+ "p { margin: 20px 30px; }\n" .\r
+ "</style>\n" .\r
+ "</head>\n<body>\n" .\r
+ "<h1><span>" . Lang("An error has occured") . ":</span><br />" . $sProblem . "</h1>\n" . $sResolution .\r
+ "<p>" . str_replace("[LINKSTART]", "<a href=\"http://www.jawstats.com/documentation\" target=\"_blank\">", str_replace("[LINKEND]", "</a>", Lang("Please refer to the [LINKSTART]installation instructions[LINKEND] for more information."))) . "</p>\n" .\r
+ "</body>\n</html>";\r
+ exit;\r
+ }\r
+\r
+ // error handler\r
+ function ErrorHandler ($errno, $errstr, $errfile, $errline, $errcontext) {\r
+ if (strpos($errfile, "index.php") != false) {\r
+ switch ($errline) {\r
+ case 39:\r
+ Error("CannotLoadClass");\r
+ break;\r
+ case 40:\r
+ Error("CannotLoadLanguage");\r
+ break;\r
+ case 41:\r
+ Error("CannotLoadConfig");\r
+ break;\r
+ default:\r
+ //Error("Unknown", ("Line #" . $errline . "<br />" . $errstr));\r
+ }\r
+ }\r
+ }\r
+\r
+ // translator\r
+ function Lang($sString) {\r
+ if (isset($GLOBALS["g_aCurrentTranslation"][$sString]) == true) {\r
+ return $GLOBALS["g_aCurrentTranslation"][$sString];\r
+ } else {\r
+ return $sString;\r
+ }\r
+ }\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+/*\r
+ * JAWStats 0.7 Web Statistics\r
+ *\r
+ * Copyright (c) 2009 Jon Combe (jawstats.com)\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person\r
+ * obtaining a copy of this software and associated documentation\r
+ * files (the "Software"), to deal in the Software without\r
+ * restriction, including without limitation the rights to use,\r
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+ * copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following\r
+ * conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be\r
+ * included in all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r
+ * OTHER DEALINGS IN THE SOFTWARE.\r
+ */\r
+\r
+// JAWStats constants\r
+var g_iMajorVersion = 0;\r
+var g_iMinorVersion = 7;\r
+var oSubMenu = {};\r
+oSubMenu.AllMonths = { "Visitors each Month" : "allmonths.all",\r
+ "Visitors each Year" : "allmonths.year" };\r
+oSubMenu.Browser = { "Browser Families" : "browser.family",\r
+ "All Browsers" : "browser.all" };\r
+oSubMenu.Country = { "Countries" : "country.all",\r
+ "Continents" : "country.continent",\r
+ "Africa" : "country.Africa",\r
+ "Asia" : "country.Asia",\r
+ "Europe" : "country.Europe",\r
+ "North America" : "country.North America",\r
+ "Oceania" : "country.Oceania",\r
+ "South America" : "country.South America",\r
+ "Other" : "country.Other" };\r
+oSubMenu.OS = { "Operating System Families" : "os.family",\r
+ "All Operating Systems" : "os.all" };\r
+oSubMenu.PageRefs = { "Search Engines" : "pagerefs.se",\r
+ "Top 10 Referrers" : "pagerefs.top10",\r
+ "Top 50 Referrers" : "pagerefs.top50",\r
+ "All Referrers" : "pagerefs.all",\r
+ "Referring Domains" : "pagerefs.domains" };\r
+oSubMenu.Pages = { "Top Page Views" : "pages.topPages",\r
+ "Top Bandwidth" : "pages.topBW",\r
+ "Top Entry Pages" : "pages.topEntry",\r
+ "Top Exit Pages" : "pages.topExit" };\r
+oSubMenu.Searches = { "Keywords" : "searches.keywords",\r
+ "Keyphrases" : "searches.keyphrases",\r
+ "Keywords Tag Cloud" : "searches.keywordcloud",\r
+ "Keyphrases Tag Cloud" : "searches.keyphrasecloud" };\r
+oSubMenu.Status = { "Status Codes" : "status",\r
+ "File Not Found URLs" : "status.404" };\r
+oSubMenu.ThisMonth = { "Overview" : "thismonth.all",\r
+ "Calendar of Visitors" : "thismonth.visits",\r
+ "Calendar of Page Views" : "thismonth.pages",\r
+ "Calendar of Hits" : "thismonth.hits",\r
+ "Calendar of Bandwidth Usage" : "thismonth.bandwidth" };\r
+\r
+// data constants\r
+var gc_aContinents = { "Africa":0, "Asia":0, "Europe":0, "North America":0, "Oceania":0, "South America":0 };\r
+var gc_aBrowserFamily = [ { sBrowser:"camino", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"firefox", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"icab", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"konqueror", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"libwww", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"lotus\\-notes", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"mozilla", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"msie", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"netscape", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"omniweb", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"opera", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"safari", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"wget", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"Unknown", iHits:0, sImage:"unknown" },\r
+ { sBrowser:"Other Browsers", iHits:0, sImage:"unknown" } ]\r
+var gc_aBrowserFamilyCaption = { "camino":"Camino", "firefox":"Firefox", "icab":"iCab", "konqueror":"Konqueror", "libwww":"Libwww", "lotus\\-notes":"Lotus Notes", "mozilla":"Mozilla", "msie":"Internet Explorer", "netscape":"Netscape", "omniweb":"OmniWeb", "opera":"Opera", "safari":"Safari", "wget":"GNU Wget", "Unknown":"Unknown", "Other Browsers":"Other Browsers" }\r
+\r
+// http://en.wikipedia.org/wiki/List_of_countries_by_continent\r
+var gc_aCountryContinent = {\r
+ "af":"Asia",\r
+ "ax":"Europe",\r
+ "al":"Europe",\r
+ "dz":"Africa",\r
+ "as":"Oceania",\r
+ "ad":"Europe",\r
+ "ao":"Africa",\r
+ "ai":"North America",\r
+ "aq":"Antarctica",\r
+ "ag":"North America",\r
+ "ar":"South America",\r
+ "am":"Europe",\r
+ "aw":"North America",\r
+ "au":"Oceania",\r
+ "at":"Europe",\r
+ "az":"Asia",\r
+ "bs":"North America",\r
+ "bh":"Asia",\r
+ "bd":"Asia",\r
+ "bb":"North America",\r
+ "by":"Europe",\r
+ "be":"Europe",\r
+ "bz":"North America",\r
+ "bj":"Africa",\r
+ "bm":"North America",\r
+ "bt":"Asia",\r
+ "bo":"South America",\r
+ "ba":"Europe",\r
+ "bw":"Africa",\r
+ "bv":"Antarctica",\r
+ "br":"South America",\r
+ "io":"Asia",\r
+ "bn":"Asia",\r
+ "bg":"Europe",\r
+ "bf":"Africa",\r
+ "bi":"Africa",\r
+ "kh":"Asia",\r
+ "cm":"Africa",\r
+ "ca":"North America",\r
+ "cv":"Africa",\r
+ "ky":"North America",\r
+ "cf":"Africa",\r
+ "td":"Africa",\r
+ "cl":"South America",\r
+ "cn":"Asia",\r
+ "cx":"Asia",\r
+ "cc":"Asia",\r
+ "co":"South America",\r
+ "km":"Africa",\r
+ "cg":"Africa",\r
+ "cd":"Africa",\r
+ "ck":"Oceania",\r
+ "cr":"North America",\r
+ "ci":"Africa",\r
+ "hr":"Europe",\r
+ "cu":"North America",\r
+ "cy":"Europe",\r
+ "cz":"Europe",\r
+ "dk":"Europe",\r
+ "dj":"Africa",\r
+ "dm":"North America",\r
+ "do":"North America",\r
+ "ec":"South America",\r
+ "eg":"Africa",\r
+ "sv":"North America",\r
+ "gq":"Africa",\r
+ "er":"Africa",\r
+ "ee":"Europe",\r
+ "et":"Africa",\r
+ "fk":"South America",\r
+ "fo":"Europe",\r
+ "fj":"Oceania",\r
+ "fi":"Europe",\r
+ "fr":"Europe",\r
+ "gf":"South America",\r
+ "pf":"Oceania",\r
+ "tf":"Antartica",\r
+ "ga":"Africa",\r
+ "gm":"Africa",\r
+ "ge":"Europe",\r
+ "de":"Europe",\r
+ "gh":"Africa",\r
+ "gi":"Europe",\r
+ "gr":"Europe",\r
+ "gl":"North America",\r
+ "gd":"North America",\r
+ "gp":"North America",\r
+ "gu":"Oceania",\r
+ "gt":"North America",\r
+ "gg":"Europe",\r
+ "gn":"Africa",\r
+ "gw":"Africa",\r
+ "gy":"South America",\r
+ "ht":"North America",\r
+ "hm":"Antarctica",\r
+ "hn":"North America",\r
+ "hk":"Asia",\r
+ "hu":"Europe",\r
+ "is":"Europe",\r
+ "in":"Asia",\r
+ "id":"Asia",\r
+ "ir":"Asia",\r
+ "iq":"Asia",\r
+ "ie":"Europe",\r
+ "im":"Europe",\r
+ "il":"Asia",\r
+ "it":"Europe",\r
+ "jm":"North America",\r
+ "jp":"Asia",\r
+ "je":"Europe",\r
+ "jo":"Asia",\r
+ "kz":"Asia",\r
+ "ke":"Africa",\r
+ "ki":"Oceania",\r
+ "kp":"Asia",\r
+ "kr":"Asia",\r
+ "kw":"Asia",\r
+ "kg":"Asia",\r
+ "la":"Asia",\r
+ "lv":"Europe",\r
+ "lb":"Asia",\r
+ "ls":"Africa",\r
+ "lr":"Africa",\r
+ "ly":"Africa",\r
+ "li":"Europe",\r
+ "lt":"Europe",\r
+ "lu":"Europe",\r
+ "mo":"Asia",\r
+ "mk":"Europe",\r
+ "mg":"Africa",\r
+ "mw":"Africa",\r
+ "my":"Asia",\r
+ "mv":"Asia",\r
+ "ml":"Africa",\r
+ "mt":"Europe",\r
+ "mh":"Oceania",\r
+ "mq":"North America",\r
+ "mr":"Africa",\r
+ "mu":"Africa",\r
+ "yt":"Africa",\r
+ "mx":"South America",\r
+ "fm":"Oceania",\r
+ "md":"Europe",\r
+ "mc":"Europe",\r
+ "mn":"Asia",\r
+ "me":"Europe",\r
+ "ms":"North America",\r
+ "ma":"Africa",\r
+ "mz":"Africa",\r
+ "mm":"Asia",\r
+ "na":"Africa",\r
+ "nr":"Oceania",\r
+ "np":"Asia",\r
+ "nl":"Europe",\r
+ "an":"North America",\r
+ "nc":"Oceania",\r
+ "nz":"Oceania",\r
+ "ni":"North America",\r
+ "ne":"Africa",\r
+ "ng":"Africa",\r
+ "nu":"Oceania",\r
+ "nf":"Oceania",\r
+ "mp":"Oceania",\r
+ "no":"Europe",\r
+ "om":"Asia",\r
+ "pk":"Asia",\r
+ "pw":"Oceania",\r
+ "ps":"Asia",\r
+ "pa":"North America",\r
+ "pg":"Oceania",\r
+ "py":"South America",\r
+ "pe":"South America",\r
+ "ph":"Asia",\r
+ "pn":"Oceania",\r
+ "pl":"Europe",\r
+ "pt":"Europe",\r
+ "pr":"North America",\r
+ "qa":"Asia",\r
+ "re":"Africa",\r
+ "ro":"Europe",\r
+ "ru":"Asia",\r
+ "rw":"Africa",\r
+ "bl":"North America",\r
+ "sh":"Africa",\r
+ "kn":"North America",\r
+ "lc":"North America",\r
+ "mf":"North America",\r
+ "pm":"North America",\r
+ "vc":"North America",\r
+ "ws":"Oceania",\r
+ "sm":"Europe",\r
+ "st":"Africa",\r
+ "sa":"Asia",\r
+ "sn":"Africa",\r
+ "rs":"Europe",\r
+ "sc":"Africa",\r
+ "sl":"Africa",\r
+ "sg":"Asia",\r
+ "sk":"Europe",\r
+ "si":"Europe",\r
+ "sb":"Oceania",\r
+ "so":"Africa",\r
+ "za":"Africa",\r
+ "gs":"Antarctica",\r
+ "es":"Europe",\r
+ "lk":"Asia",\r
+ "sd":"Africa",\r
+ "sr":"South America",\r
+ "sj":"Europe",\r
+ "sz":"Africa",\r
+ "se":"Europe",\r
+ "ch":"Europe",\r
+ "sy":"Asia",\r
+ "tw":"Asia",\r
+ "tj":"Asia",\r
+ "tz":"Africa",\r
+ "th":"Asia",\r
+ "tl":"Oceania",\r
+ "tg":"Africa",\r
+ "tk":"Oceania",\r
+ "to":"Oceania",\r
+ "tt":"North America",\r
+ "tn":"Africa",\r
+ "tr":"Asia",\r
+ "tm":"Asia",\r
+ "tc":"North America",\r
+ "tv":"Oceania",\r
+ "ug":"Africa",\r
+ "ua":"Europe",\r
+ "ae":"Asia",\r
+ "gb":"Europe",\r
+ "uk":"Europe",\r
+ "um":"Oceania",\r
+ "us":"North America",\r
+ "uy":"South America",\r
+ "uz":"Asia",\r
+ "vu":"Oceania",\r
+ "va":"Europe",\r
+ "ve":"South America",\r
+ "vn":"Asia",\r
+ "vg":"North America",\r
+ "vi":"North America",\r
+ "wf":"Oceania",\r
+ "eh":"Africa",\r
+ "ye":"Asia",\r
+ "zm":"Africa",\r
+ "zw":"Africa",\r
+\r
+ "eu":"Europe"\r
+}\r
+\r
+var gc_aCountryName = {\r
+ "af":"Afghanistan",\r
+ "ax":"Aland Islands",\r
+ "al":"Albania",\r
+ "dz":"Algeria",\r
+ "as":"American Samoa",\r
+ "ad":"Andorra",\r
+ "ao":"Angola",\r
+ "ai":"Anguilla",\r
+ "aq":"Antarctica",\r
+ "ag":"Antigua and Barbuda",\r
+ "ar":"Argentina",\r
+ "am":"Armenia",\r
+ "aw":"Aruba",\r
+ "au":"Australia",\r
+ "at":"Austria",\r
+ "az":"Azerbaijan",\r
+ "bs":"Bahamas",\r
+ "bh":"Bahrain",\r
+ "bd":"Bangladesh",\r
+ "bb":"Barbados",\r
+ "by":"Belarus",\r
+ "be":"Belgium",\r
+ "bz":"Belize",\r
+ "bj":"Benin",\r
+ "bm":"Bermuda",\r
+ "bt":"Bhutan",\r
+ "bo":"Bolivia",\r
+ "ba":"Bosnia and Herzegovina",\r
+ "bw":"Botswana",\r
+ "bv":"Bouvet Island",\r
+ "br":"Brazil",\r
+ "io":"British Indian Ocean Territory",\r
+ "bn":"Brunei Darussalam",\r
+ "bg":"Bulgaria",\r
+ "bf":"Burkina Faso",\r
+ "bi":"Burundi",\r
+ "kh":"Cambodia",\r
+ "cm":"Cameroon",\r
+ "ca":"Canada",\r
+ "cv":"Cape Verde",\r
+ "ky":"Cayman Islands",\r
+ "cf":"Central African Republic",\r
+ "td":"Chad",\r
+ "cl":"Chile",\r
+ "cn":"China",\r
+ "cx":"Christmas Island",\r
+ "cc":"Cocos (Keeling) Islands",\r
+ "co":"Colombia",\r
+ "km":"Comoros",\r
+ "cg":"Congo (Brazzaville)",\r
+ "cd":"Congo (Kinshasa)",\r
+ "ck":"Cook Islands",\r
+ "cr":"Costa Rica",\r
+ "ci":"Cote d'Ivoire",\r
+ "hr":"Croatia",\r
+ "cu":"Cuba",\r
+ "cy":"Cyprus",\r
+ "cz":"Czech Republic",\r
+ "dk":"Denmark",\r
+ "dj":"Djibouti",\r
+ "dm":"Dominica",\r
+ "do":"Dominican Republic",\r
+ "ec":"Ecuador",\r
+ "eg":"Egypt",\r
+ "sv":"El Salvador",\r
+ "gq":"Equatorial Guinea",\r
+ "er":"Eritrea",\r
+ "ee":"Estonia",\r
+ "et":"Ethiopia",\r
+ "fk":"Falkland Islands",\r
+ "fo":"Faroe Islands",\r
+ "fj":"Fiji",\r
+ "fi":"Finland",\r
+ "fr":"France",\r
+ "gf":"French Guiana",\r
+ "pf":"French Polynesia",\r
+ "tf":"French Southern Lands",\r
+ "ga":"Gabon",\r
+ "gm":"Gambia",\r
+ "ge":"Georgia",\r
+ "de":"Germany",\r
+ "gh":"Ghana",\r
+ "gi":"Gibraltar",\r
+ "gr":"Greece",\r
+ "gl":"Greenland",\r
+ "gd":"Grenada",\r
+ "gp":"Guadeloupe",\r
+ "gu":"Guam",\r
+ "gt":"Guatemala",\r
+ "gg":"Guernsey",\r
+ "gn":"Guinea",\r
+ "gw":"Guinea-Bissau",\r
+ "gy":"Guyana",\r
+ "ht":"Haiti",\r
+ "hm":"Heard and McDonald Islands",\r
+ "hn":"Honduras",\r
+ "hk":"Hong Kong",\r
+ "hu":"Hungary",\r
+ "is":"Iceland",\r
+ "in":"India",\r
+ "id":"Indonesia",\r
+ "ir":"Iran",\r
+ "iq":"Iraq",\r
+ "ie":"Ireland",\r
+ "im":"Isle of Man",\r
+ "il":"Israel",\r
+ "it":"Italy",\r
+ "jm":"Jamaica",\r
+ "jp":"Japan",\r
+ "je":"Jersey",\r
+ "jo":"Jordan",\r
+ "kz":"Kazakhstan",\r
+ "ke":"Kenya",\r
+ "ki":"Kiribati",\r
+ "kp":"Korea, North",\r
+ "kr":"Korea, South",\r
+ "kw":"Kuwait",\r
+ "kg":"Kyrgyzstan",\r
+ "la":"Laos",\r
+ "lv":"Latvia",\r
+ "lb":"Lebanon",\r
+ "ls":"Lesotho",\r
+ "lr":"Liberia",\r
+ "ly":"Libya",\r
+ "li":"Liechtenstein",\r
+ "lt":"Lithuania",\r
+ "lu":"Luxembourg",\r
+ "mo":"Macau",\r
+ "mk":"Macedonia",\r
+ "mg":"Madagascar",\r
+ "mw":"Malawi",\r
+ "my":"Malaysia",\r
+ "mv":"Maldives",\r
+ "ml":"Mali",\r
+ "mt":"Malta",\r
+ "mh":"Marshall Islands",\r
+ "mq":"Martinique",\r
+ "mr":"Mauritania",\r
+ "mu":"Mauritius",\r
+ "yt":"Mayotte",\r
+ "mx":"Mexico",\r
+ "fm":"Micronesia",\r
+ "md":"Moldova",\r
+ "mc":"Monaco",\r
+ "mn":"Mongolia",\r
+ "me":"Montenegro",\r
+ "ms":"Montserrat",\r
+ "ma":"Morocco",\r
+ "mz":"Mozambique",\r
+ "mm":"Myanmar",\r
+ "na":"Namibia",\r
+ "nr":"Nauru",\r
+ "np":"Nepal",\r
+ "nl":"Netherlands",\r
+ "an":"Netherlands Antilles",\r
+ "nc":"New Caledonia",\r
+ "nz":"New Zealand",\r
+ "ni":"Nicaragua",\r
+ "ne":"Niger",\r
+ "ng":"Nigeria",\r
+ "nu":"Niue",\r
+ "nf":"Norfolk Island",\r
+ "mp":"Northern Mariana Islands",\r
+ "no":"Norway",\r
+ "om":"Oman",\r
+ "pk":"Pakistan",\r
+ "pw":"Palau",\r
+ "ps":"Palestine",\r
+ "pa":"Panama",\r
+ "pg":"Papua New Guinea",\r
+ "py":"Paraguay",\r
+ "pe":"Peru",\r
+ "ph":"Philippines",\r
+ "pn":"Pitcairn",\r
+ "pl":"Poland",\r
+ "pt":"Portugal",\r
+ "pr":"Puerto Rico",\r
+ "qa":"Qatar",\r
+ "re":"Reunion",\r
+ "ro":"Romania",\r
+ "ru":"Russian Federation",\r
+ "rw":"Rwanda",\r
+ "bl":"Saint Barthelemy",\r
+ "sh":"Saint Helena",\r
+ "kn":"Saint Kitts and Nevis",\r
+ "lc":"Saint Lucia",\r
+ "mf":"Saint Martin (French part)",\r
+ "pm":"Saint Pierre and Miquelon",\r
+ "vc":"Saint Vincent and the Grenadines",\r
+ "ws":"Samoa",\r
+ "sm":"San Marino",\r
+ "st":"Sao Tome and Principe",\r
+ "sa":"Saudi Arabia",\r
+ "sn":"Senegal",\r
+ "rs":"Serbia",\r
+ "sc":"Seychelles",\r
+ "sl":"Sierra Leone",\r
+ "sg":"Singapore",\r
+ "sk":"Slovakia",\r
+ "si":"Slovenia",\r
+ "sb":"Solomon Islands",\r
+ "so":"Somalia",\r
+ "za":"South Africa",\r
+ "gs":"South Georgia and South Sandwich Islands",\r
+ "es":"Spain",\r
+ "lk":"Sri Lanka",\r
+ "sd":"Sudan",\r
+ "sr":"Suriname",\r
+ "sj":"Svalbard and Jan Mayen Islands",\r
+ "sz":"Swaziland",\r
+ "se":"Sweden",\r
+ "ch":"Switzerland",\r
+ "sy":"Syria",\r
+ "tw":"Taiwan",\r
+ "tj":"Tajikistan",\r
+ "tz":"Tanzania",\r
+ "th":"Thailand",\r
+ "tl":"Timor-Leste",\r
+ "tg":"Togo",\r
+ "tk":"Tokelau",\r
+ "to":"Tonga",\r
+ "tt":"Trinidad and Tobago",\r
+ "tn":"Tunisia",\r
+ "tr":"Turkey",\r
+ "tm":"Turkmenistan",\r
+ "tc":"Turks and Caicos Islands",\r
+ "tv":"Tuvalu",\r
+ "ug":"Uganda",\r
+ "ua":"Ukraine",\r
+ "ae":"United Arab Emirates",\r
+ "gb":"United Kingdom",\r
+ "uk":"United Kingdom",\r
+ "um":"United States Minor Outlying Islands",\r
+ "us":"United States of America",\r
+ "uy":"Uruguay",\r
+ "uz":"Uzbekistan",\r
+ "vu":"Vanuatu",\r
+ "va":"Vatican City",\r
+ "ve":"Venezuela",\r
+ "vn":"Vietnam",\r
+ "vg":"Virgin Islands, British",\r
+ "vi":"Virgin Islands, U.S.",\r
+ "wf":"Wallis and Futuna Islands",\r
+ "eh":"Western Sahara",\r
+ "ye":"Yemen",\r
+ "zm":"Zambia",\r
+ "zw":"Zimbabwe",\r
+\r
+ "a1":"Unknown",\r
+ "a2":"Satellite Provider",\r
+ "eu":"European Union",\r
+ "i0":"Local Network Host",\r
+ "localhost":"Localhost",\r
+\r
+ "aero":"Aero/Travel domains",\r
+ "arpa":"Old style Arpanet",\r
+ "com" :"Commercial",\r
+ "edu" :"USA Educational",\r
+ "info":"Info Domains",\r
+ "mil" :"USA Military",\r
+ "name":"Name domains",\r
+ "nato":"NATO",\r
+ "net" :"Network",\r
+ "org" :"Non-Profit Organisations"\r
+}\r
+\r
+var gc_aFiletypeDesc = { "asp" : "Active Server Page",\r
+ "cfm" : "Coldfusion script",\r
+ "cgi" : "CGI script",\r
+ "css" : "Cascading Style Sheet",\r
+ "flv" : "Flash Video file",\r
+ "gif" : "Image",\r
+ "gz" : "File Archive",\r
+ "htm" : "HTML or XML static page",\r
+ "html" : "HTML or XML static page",\r
+ "ico" : "Icon",\r
+ "jpeg" : "Image",\r
+ "jpg" : "Image",\r
+ "js" : "JavaScript File",\r
+ "jsp" : "JavaServer Page",\r
+ "m4a" : "MPEG-4 Audio File",\r
+ "mov" : "QuickTime Movie",\r
+ "mp3" : "MPEG-1 Audio Layer 3 file",\r
+ "pdf" : "Adobe Portable Document Format file",\r
+ "php" : "PHP script",\r
+ "pl" : "Perl script",\r
+ "png" : "Image",\r
+ "ppt" : "Microsoft PowerPoint file",\r
+ "swf" : "Adobe Flash file",\r
+ "tar" : "File Archive",\r
+ "txt" : "Text file",\r
+ "wav" : "Waveform Audio file",\r
+ "xml" : "XML file",\r
+ "zip" : "File Archive" };\r
+\r
+var gc_aOSFamily = [ { sOperatingSystem:"bsd", iHits:0 },\r
+ { sOperatingSystem:"linux", iHits:0 },\r
+ { sOperatingSystem:"mac", iHits:0 },\r
+ { sOperatingSystem:"psp", iHits:0 },\r
+ { sOperatingSystem:"sun", iHits:0 },\r
+ { sOperatingSystem:"symbian", iHits:0 },\r
+ { sOperatingSystem:"win", iHits:0 },\r
+ { sOperatingSystem:"Unknown", iHits:0 },\r
+ { sOperatingSystem:"Other OS", iHits:0 } ]\r
+var gc_aOSFamilyCaption = { "bsd":"BSD", "linux":"Linux", "mac":"Apple", "psp":"PSP", "sun":"Sun", "symbian":"Symbian", "win":"Windows", "Unknown":"Unknown", "Other OS":"Other OS" }\r
+var gc_aSearchEngines = [ { sCode:"alexa", sName:"Alexa", sImage:"alexa", sURL:"<a href=\"http://www.alexa.com/\" target=\"_blank\">Alexa</a>" },\r
+ { sCode:"aliceit", sName:"Alice", sImage:"alice", sURL:"<a href=\"http://www.alice.it/\" target=\"_blank\">Alice</a>" },\r
+ { sCode:"alltheweb", sName:"All The Web", sImage:"alltheweb", sURL:"<a href=\"http://www.alltheweb.com/\" target=\"_blank\">All The Web</a>" },\r
+ { sCode:"altavista", sName:"AltaVista", sImage:"altavista", sURL:"<a href=\"http://www.altavista.com/\" target=\"_blank\">AltaVista</a>" },\r
+ { sCode:"aol", sName:"AOL", sImage:"aol", sURL:"<a href=\"http://www.aol.com/\" target=\"_blank\">AOL</a>" },\r
+ { sCode:"ask", sName:"Ask", sImage:"ask", sURL:"<a href=\"http://www.ask.com/\" target=\"_blank\">Ask</a>" },\r
+ { sCode:"att", sName:"AT&T", sImage:"yahoo", sURL:"<a href=\"http://att.my.yahoo.com/\" target=\"_blank\">AT&T</a>" },\r
+ { sCode:"avantfind", sName:"AvantFind", sImage:"avantfind", sURL:"<a href=\"http://www.avantfind.com/\" target=\"_blank\">AvantFind</a>" },\r
+ { sCode:"blingo", sName:"Blingo", sImage:"blingo", sURL:"<a href=\"http://www.blingo.com/\" target=\"_blank\">Blingo</a>" },\r
+ { sCode:"bluewin", sName:"Bluewin", sImage:"bluewin", sURL:"<a href=\"http://www.bluewin.com/\" target=\"_blank\">Bluewin</a>" },\r
+ { sCode:"clusty", sName:"Clusty", sImage:"clusty", sURL:"<a href=\"http://www.clusty.com/\" target=\"_blank\">Clusty</a>" },\r
+ { sCode:"delicious", sName:"del.icio.us", sImage:"delicious", sURL:"<a href=\"http://del.icio.us/\" target=\"_blank\">del.icio.us</a>" },\r
+ { sCode:"enirose", sName:"Eniro", sImage:"eniro", sURL:"<a href=\"http://www.eniro.se/\" target=\"_blank\">Eniro</a>" },\r
+ { sCode:"dogpile", sName:"Dogpile", sImage:"dogpile", sURL:"<a href=\"http://www.dogpile.com/\" target=\"_blank\">Dogpile</a>" },\r
+ { sCode:"earthlink", sName:"EarthLink", sImage:"earthlink", sURL:"<a href=\"http://www.earthlink.com/\" target=\"_blank\">EarthLink</a>" },\r
+ { sCode:"excite", sName:"Excite", sImage:"excite", sURL:"<a href=\"http://www.excite.com/\" target=\"_blank\">Excite</a>" },\r
+ { sCode:"goodsearch", sName:"GoodSearch", sImage:"goodsearch", sURL:"<a href=\"http://www.goodsearch.com/\" target=\"_blank\">GoodSearch</a>" },\r
+ { sCode:"google", sName:"Google", sImage:"google", sURL:"<a href=\"http://www.google.com/\" target=\"_blank\">Google</a>" },\r
+ { sCode:"google_cache", sName:"Google Cache", sImage:"google", sURL:"<a href=\"http://www.google.com/\" target=\"_blank\">Google Cache</a>" },\r
+ { sCode:"google_image", sName:"Google Images", sImage:"google", sURL:"<a href=\"http://images.google.com/\" target=\"_blank\">Google Images</a>" },\r
+ { sCode:"infospace", sName:"InfoSpace", sImage:"infospace", sURL:"<a href=\"http://www.infospaceinc.com/\" target=\"_blank\">InfoSpace</a>" },\r
+ { sCode:"kvasir", sName:"Kvasir", sImage:"kvasir", sURL:"<a href=\"http://www.kvasir.no/\" target=\"_blank\">Kvasir</a>" },\r
+ { sCode:"live", sName:"Windows Live", sImage:"live", sURL:"<a href=\"http://www.live.com/\" target=\"_blank\">Windows Live</a>" },\r
+ { sCode:"lycos", sName:"Lycos", sImage:"lycos", sURL:"<a href=\"http://www.lycos.com/\" target=\"_blank\">Lycos</a>" },\r
+ { sCode:"mamma", sName:"Mamma", sImage:"mamma", sURL:"<a href=\"http://www.mamma.com/\" target=\"_blank\">Mamma</a>" },\r
+ { sCode:"msn", sName:"MSN", sImage:"msn", sURL:"<a href=\"http://www.msn.com/\" target=\"_blank\">MSN</a>" },\r
+ { sCode:"mywebsearch", sName:"My Web Search", sImage:"mywebsearch", sURL:"<a href=\"http://www.mywebsearch.com/\" target=\"_blank\">My Web Search</a>" },\r
+ { sCode:"netscape", sName:"Netscape", sImage:"aol", sURL:"<a href=\"http://netscape.aol.com/\" target=\"_blank\">Netscape</a>" },\r
+ { sCode:"sapo", sName:"Sapo", sImage:"sapo", sURL:"<a href=\"http://www.sapo.pt/\" target=\"_blank\">Sapo</a>" },\r
+ { sCode:"search", sName:"Search.com", sImage:"search", sURL:"<a href=\"http://www.search.com/\" target=\"_blank\">Search.com</a>" },\r
+ { sCode:"search.com", sName:"Search.com", sImage:"search", sURL:"<a href=\"http://www.search.com/\" target=\"_blank\">Search.com</a>" },\r
+ { sCode:"seznam", sName:"Seznam", sImage:"seznam", sURL:"<a href=\"http://www.seznam.cz/\" target=\"_blank\">Seznam</a>" },\r
+ { sCode:"steadysearch", sName:"SteadySearch", sImage:"steadysearch", sURL:"<a href=\"http://www.steadysearch.com/\" target=\"_blank\">SteadySearch</a>" },\r
+ { sCode:"stumbleupon", sName:"StumbleUpon", sImage:"stumbleupon", sURL:"<a href=\"http://www.stumbleupon.com/\" target=\"_blank\">StumbleUpon</a>" },\r
+ { sCode:"tiscali", sName:"Tiscali", sImage:"tiscali", sURL:"<a href=\"http://www.tiscali.it/\" target=\"_blank\">Tiscali</a>" },\r
+ { sCode:"vivisimo", sName:"Vivisimo", sImage:"vivisimo", sURL:"<a href=\"http://www.vivisimo.com/\" target=\"_blank\">Vivisimo</a>" },\r
+ { sCode:"voila", sName:"Voila", sImage:"voila", sURL:"<a href=\"http://www.voila.fr/\" target=\"_blank\">Voila</a>" },\r
+ { sCode:"webcrawler", sName:"WebCrawler", sImage:"webcrawler", sURL:"<a href=\"http://www.webcrawler.com/\" target=\"_blank\">WebCrawler</a>" },\r
+ { sCode:"webde", sName:"Web.de", sImage:"webde", sURL:"<a href=\"http://web.de/\" target=\"_blank\">Web.de</a>" },\r
+ { sCode:"yahoo", sName:"Yahoo!", sImage:"yahoo", sURL:"<a href=\"http://www.yahoo.com/\" target=\"_blank\">Yahoo!</a>" } ];\r
+\r
+var gc_aHTTPStatus = { "206" : "Partial Content",\r
+ "301" : "Moved Permanently (redirect)",\r
+ "307" : "Moved Temporarily (redirect)",\r
+ "400" : "Bad Request",\r
+ "401" : "Unauthorized",\r
+ "403" : "Forbidden",\r
+ "404" : "File Not Found",\r
+ "503" : "Service Unavailable" };\r
+\r
+var gc_aDayName = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];\r
+var gc_aMonthName = ["January","February","March","April","May","June","July","August","September","October","November","December"];
\ No newline at end of file
--- /dev/null
+/*
+ * JAWStats 0.7 Web Statistics
+ *
+ * Copyright (c) 2009 Jon Combe (jawstats.com)
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+var oTranslation = {};
+var oStatistics = {};
+var dtLastUpdate = 0;
+var sToolID;
+var oPaging = {
+ oKeywords:{ iCurrPage:0, iRowCount:0, iRowsPerPage:15, sSort:"freqDESC" },
+ oKeyphrases:{ iCurrPage:0, iRowCount:0, iRowsPerPage:15, sSort:"freqDESC" }
+};
+
+// jQuery methods
+$(document).ready(function() {
+ var aCurrentView = g_sCurrentView.split(".");
+ $("#menu").children("ul:eq(0)").children("li").addClass("off");
+ $("#tab" + aCurrentView[0]).removeClass("off");
+ DrawPage(g_sCurrentView);
+
+ // change language mouseover
+ $("#toolLanguageButton").mouseover(function() {
+ $("#toolLanguageButton img").attr("src", "themes/" + sThemeDir + "/images/change_language_on.gif");
+ });
+ $("#toolLanguageButton").mouseout(function() {
+ $("#toolLanguageButton img").attr("src", "themes/" + sThemeDir + "/images/change_language.gif");
+ });
+});
+
+function AddLeadingZero(vValue, iLength) {
+ sValue = vValue.toString();
+ while (sValue.length < iLength) {
+ sValue = ("0" + sValue);
+ }
+ return sValue;
+}
+
+function ChangeLanguage(sLanguage) {
+ $("#loading").show();
+ self.location.href = ("?config=" + g_sConfig + "&year=" + g_iYear + "&month=" + g_iMonth + "&view=" + g_sCurrentView + "&lang=" + sLanguage);
+}
+
+function ChangeMonth(iYear, iMonth) {
+ $("#loading").show();
+ self.location.href = ("?config=" + g_sConfig + "&year=" + iYear + "&month=" + iMonth + "&view=" + g_sCurrentView + "&lang=" + g_sLanguage);
+}
+
+function ChangeSite(sConfig) {
+ $("#loading").show();
+ self.location.href = ("?config=" + sConfig + "&year=" + g_iYear + "&month=" + g_iMonth + "&view=" + g_sCurrentView + "&lang=" + g_sLanguage);
+}
+
+function ChangeTab(oSpan, sPage) {
+ $("#menu").children("ul:eq(0)").children("li").addClass("off");
+ $(oSpan).parent().removeClass("off");
+ DrawPage(sPage);
+}
+
+function CheckLastUpdate(oXML) {
+ if (parseInt($(oXML).find('info').attr("lastupdate")) != g_dtLastUpdate) {
+ var sURL = "?config=" + g_sConfig + "&year=" + g_iYear + "&month=" + g_iMonth + "&view=" + g_sCurrentView;
+ self.location.href = sURL;
+ }
+}
+
+function DisplayBandwidth(iBW) {
+ iVal = iBW;
+
+ iBW = (iBW / 1024);
+ if (iBW < 1024) {
+ return NumberFormat(iBW, 1) + "k";
+ }
+ iBW = (iBW / 1024);
+ if (iBW < 1024) {
+ return NumberFormat(iBW, 1) + "M";
+ }
+ iBW = (iBW / 1024);
+ return NumberFormat(iBW, 1) + "G";
+}
+
+function DrawGraph(aItem, aValue, aInitial, sStyle) {
+ var oGraph = new SWFObject("swf/" + sStyle + "_graph.swf", "SWFgraph", "100%", "100%", "8", "#ffffff");
+ oGraph.addParam("wmode", "transparent");
+ oGraph.addVariable("sItem", aItem.join(","));
+ oGraph.addVariable("sValue", aValue.join(","));
+ oGraph.addVariable("sInitial", aInitial.join(","));
+ oGraph.addVariable("sColor", g_sColor);
+ oGraph.addVariable("sShadowColor", g_sShadowColor);
+ oGraph.write("graph");
+}
+
+function DrawGraph_AllMonths() {
+ var aItem = [];
+ var aValue = [];
+ for (var iIndex in oStatistics.oAllMonths.aData) {
+ aItem.push(Lang(gc_aMonthName[oStatistics.oAllMonths.aData[iIndex].dtDate.getMonth()].substr(0,3)) + " '" +
+ (oStatistics.oAllMonths.aData[iIndex].dtDate.getFullYear()).toString().substr(2));
+ aValue.push(oStatistics.oAllMonths.aData[iIndex].iVisits);
+ }
+ DrawGraph(aItem, aValue, [], "line");
+}
+
+function DrawGraph_ThisMonth() {
+ var aItem = [];
+ var aValue = [];
+ var aInitial = [];
+
+ // populate days
+ var iDaysInMonth = (new Date(g_iYear, g_iMonth, 0)).getDate();
+ var iDayOfWeek = (new Date(g_iYear, (g_iMonth - 1), 1)).getDay();
+ for (var iDay = 0; iDay < iDaysInMonth; iDay++) {
+ aItem.push(Lang((iDay + 1) + DateSuffix(iDay + 1)));
+ aValue.push(0);
+ aInitial.push(Lang(gc_aDayName[iDayOfWeek].substr(0, 3)));
+
+ // day of week
+ iDayOfWeek++;
+ if (iDayOfWeek > 6) {
+ iDayOfWeek = 0;
+ }
+ }
+
+ // update values we know about
+ for (var iIndex in oStatistics.oThisMonth.aData) {
+ iDay = (oStatistics.oThisMonth.aData[iIndex].dtDate.getDate() - 1);
+ aValue[iDay] = oStatistics.oThisMonth.aData[iIndex].iVisits;
+ }
+ DrawGraph(aItem, aValue, aInitial, "bar");
+}
+
+function DrawGraph_Time() {
+ var aItem = [];
+ var aValue = [];
+ for (var iRow in oStatistics.oTime.aData) {
+ oRow = oStatistics.oTime.aData[iRow];
+ sHour = oRow.iHour;
+ if (oRow.iHour < 10) {
+ sHour = ("0" + sHour)
+ }
+ aItem.push(sHour);
+ aValue.push(oRow.iPages);
+ }
+ DrawGraph(aItem, aValue, [], "line");
+}
+
+function DrawPage(sPage) {
+ $("#content").fadeOut(g_iFadeSpeed, function() {
+ g_sCurrentView = sPage;
+ var aPage = sPage.split(".");
+ switch (aPage[0]) {
+ case "allmonths":
+ if (typeof oStatistics.oAllMonths == "undefined") {
+ PopulateData_AllMonths(sPage);
+ return false;
+ }
+ PageLayout_AllMonths(aPage[1]);
+ break;
+ case "browser":
+ if (typeof oStatistics.oBrowser == "undefined") {
+ PopulateData_Browser(sPage);
+ return false;
+ }
+ PageLayout_Browser(aPage[1]);
+ break;
+ case "country":
+ if (typeof oStatistics.oCountry == "undefined") {
+ PopulateData_Country(sPage);
+ return false;
+ }
+ PageLayout_Country(aPage[1]);
+ break;
+ case "filetypes":
+ if (typeof oStatistics.oFiletypes == "undefined") {
+ PopulateData_Filetypes(sPage);
+ return false;
+ }
+ PageLayout_Filetypes();
+ break;
+ case "keyphrases":
+ if (typeof oStatistics.oKeyphrases == "undefined") {
+ PopulateData_Keyphrases(sPage);
+ return false;
+ }
+ PageLayout_Keyphrases(aPage[1]);
+ break;
+ case "keywords":
+ if (typeof oStatistics.oKeywords == "undefined") {
+ PopulateData_Keywords(sPage);
+ return false;
+ }
+ PageLayout_Keywords(aPage[1]);
+ break;
+ case "os":
+ if (typeof oStatistics.oOperatingSystems == "undefined") {
+ PopulateData_OperatingSystems(sPage);
+ return false;
+ }
+ PageLayout_OperatingSystems(aPage[1]);
+ break;
+ case "pagerefs":
+ if (aPage[1] == "se") {
+ if (typeof oStatistics.oPageRefsSE == "undefined") {
+ PopulateData_PageRefsSE();
+ return false;
+ }
+ PageLayout_PageRefsSE();
+ } else {
+ if (typeof oStatistics.oPageRefs == "undefined") {
+ PopulateData_PageRefs(sPage, false);
+ return false;
+ }
+ PageLayout_PageRefs(aPage[1]);
+ }
+ break;
+ case "pages":
+ if (typeof oStatistics.oPages == "undefined") {
+ PopulateData_Pages(sPage);
+ return false;
+ }
+ PageLayout_Pages(aPage[1]);
+ break;
+ case "robots":
+ if (typeof oStatistics.oRobots == "undefined") {
+ PopulateData_Robots(sPage);
+ return false;
+ }
+ PageLayout_Robots();
+ break;
+case "searches":
+ switch (aPage[1]) {
+ case "keyphrasecloud":
+ if (typeof oStatistics.oKeyphrases == "undefined") {
+ PopulateData_Keyphrases(sPage);
+ return false;
+ }
+ PageLayout_Searches(aPage[1]);
+ break;
+ case "keyphrases":
+ if (typeof oStatistics.oKeyphrases == "undefined") {
+ PopulateData_Keyphrases(sPage);
+ return false;
+ }
+ PageLayout_Searches(aPage[1]);
+ break;
+ case "keywordcloud":
+ if (typeof oStatistics.oKeywords == "undefined") {
+ PopulateData_Keywords(sPage);
+ return false;
+ }
+ PageLayout_Searches(aPage[1]);
+ break;
+ case "keywords":
+ if (typeof oStatistics.oKeywords == "undefined") {
+ PopulateData_Keywords(sPage);
+ return false;
+ }
+ PageLayout_Searches(aPage[1]);
+ break;
+ }
+ break;
+ case "session":
+ if (typeof oStatistics.oSession == "undefined") {
+ PopulateData_Session();
+ return false;
+ }
+ PageLayout_Session();
+ break;
+ case "status":
+ if (aPage[1] == "404") {
+ if (typeof oStatistics.oStatus404 == "undefined") {
+ PopulateData_Status404(sPage);
+ return false;
+ }
+ } else {
+ if (typeof oStatistics.oStatus == "undefined") {
+ PopulateData_Status(sPage);
+ return false;
+ }
+ }
+ PageLayout_Status(aPage[1]);
+ break;
+ case "thismonth":
+ if (typeof oStatistics.oThisMonth == "undefined") {
+ PopulateData_ThisMonth(sPage);
+ return false;
+ }
+ PageLayout_ThisMonth(aPage[1]);
+ break;
+ case "time":
+ if (typeof oStatistics.oTime == "undefined") {
+ PopulateData_Time(sPage);
+ return false;
+ }
+ PageLayout_Time();
+ break;
+ }
+ });
+}
+
+function DrawPie(iTotal, aItem, aValue) {
+ var oPie = new SWFObject("swf/pie.swf", "SWFpie", "100%", "100%", "8", "#ffffff");
+ oPie.addParam("wmode", "transparent");
+ oPie.addVariable("sTotal", iTotal);
+ oPie.addVariable("sItem", encodeURIComponent(aItem.join(",")));
+ oPie.addVariable("sValue", encodeURIComponent(aValue.join(",")));
+ oPie.addVariable("sColor", g_sColor);
+ oPie.addVariable("sShadowColor", g_sShadowColor);
+ oPie.write("pie");
+}
+
+function DrawPie_Browser(sPage) {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+
+ switch (sPage) {
+ case "all":
+ for (var iRow in oStatistics.oBrowser.aData) {
+ if (iCount < 6) {
+ aItem.push(oStatistics.oBrowser.aData[iRow].sBrowser);
+ aValue.push(oStatistics.oBrowser.aData[iRow].iHits);
+ iRunningTotal += oStatistics.oBrowser.aData[iRow].iHits;
+ iCount++;
+ }
+ }
+ if (oStatistics.oBrowser.iTotalHits > iRunningTotal) {
+ aItem.push(Lang("Other Browsers"));
+ aValue.push(oStatistics.oBrowser.iTotalHits - iRunningTotal);
+ }
+ DrawPie(oStatistics.oBrowser.iTotalHits, aItem, aValue);
+ break;
+ case "family":
+ for (var iRow in oStatistics.oBrowser.aFamily) {
+ if (iCount < 6) {
+ if (oStatistics.oBrowser.aFamily[iRow].iHits > 0) {
+ aItem.push(gc_aBrowserFamilyCaption[oStatistics.oBrowser.aFamily[iRow].sBrowser]);
+ aValue.push(oStatistics.oBrowser.aFamily[iRow].iHits);
+ iRunningTotal += oStatistics.oBrowser.aFamily[iRow].iHits;
+ iCount++;
+ }
+ }
+ }
+ if (oStatistics.oBrowser.iTotalHits > iRunningTotal) {
+ aItem.push(Lang("Other Browsers"));
+ aValue.push(oStatistics.oBrowser.iTotalHits - iRunningTotal);
+ }
+ DrawPie(oStatistics.oBrowser.iTotalHits, aItem, aValue);
+ break;
+ default:
+ // find family totals
+ for (var iRow in aFamily) {
+ if (aFamily[iRow].sBrowser == sPage) {
+ iFamilyTotalHits = aFamily[iRow].iHits;
+ break;
+ }
+ }
+
+ // extract data
+ for (var iRow in oStatistics.oBrowser.aData) {
+ if ((iCount < 6) && (oStatistics.oBrowser.aData[iRow].sFamily == sPage)) {
+ aItem.push(oStatistics.oBrowser.aData[iRow].sBrowser);
+ aValue.push(oStatistics.oBrowser.aData[iRow].iHits);
+ iRunningTotal += oStatistics.oBrowser.aData[iRow].iHits;
+ iCount++;
+ }
+ }
+ if (iFamilyTotalHits > iRunningTotal) {
+ aItem.push(Lang("Other Versions"));
+ aValue.push(iFamilyTotalHits - iRunningTotal);
+ }
+ DrawPie(iFamilyTotalHits, aItem, aValue);
+ break;
+ }
+}
+
+function DrawPie_Country(sContinent) {
+ // get values
+ if (typeof sContinent == "undefined") {
+ iTotalPages = oStatistics.oCountry.iTotalPages;
+ } else {
+ iTotalPages = oStatistics.oCountry.oContinent[sContinent].iTotalPages;
+ }
+ aData = oStatistics.oCountry.aData;
+
+ // build arrays
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+ for (var iIndex in aData) {
+ if (iCount < 6) {
+ if ((typeof sContinent == "undefined") || (aData[iIndex].sContinent == sContinent)) {
+ aItem.push(Lang(aData[iIndex].sCountryName));
+ aValue.push(aData[iIndex].iPages);
+ iRunningTotal += aData[iIndex].iPages;
+ iCount++;
+ }
+ }
+ }
+ if (iTotalPages > iRunningTotal) {
+ aItem.push(Lang("Other Countries"));
+ aValue.push(iTotalPages - iRunningTotal);
+ }
+ DrawPie(iTotalPages, aItem, aValue);
+}
+
+function DrawPie_CountryContinent() {
+ // this section is an anomaly whereby the continents need to be sorted by size before being passsed to the flash
+ // thankfully there are only 6 (we are interested in)
+ var aTemp = [];
+ for (var sContinent in gc_aContinents) {
+ aTemp.push({ "sContinent" : sContinent,
+ "iPages" : oStatistics.oCountry.oContinent[sContinent].iTotalPages });
+ }
+ aTemp.sort(Sort_Pages);
+
+ // pass across to simpler array format
+ var iTotalPages = oStatistics.oCountry.iTotalPages;
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ for (var iIndex in aTemp) {
+ aItem.push(Lang(aTemp[iIndex].sContinent));
+ aValue.push(aTemp[iIndex].iPages);
+ iRunningTotal += aTemp[iIndex].iPages;
+ }
+ if (iTotalPages > iRunningTotal) {
+ aItem.push(Lang("Other"));
+ aValue.push(iTotalPages - iRunningTotal);
+ }
+ DrawPie(iTotalPages, aItem, aValue);
+}
+
+function DrawPie_Filetypes() {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+ for (var iIndex in oStatistics.oFiletypes.aData) {
+ if (iCount < 6) {
+ if (oStatistics.oFiletypes.aData[iIndex].sFiletype != " ") {
+ aItem.push(oStatistics.oFiletypes.aData[iIndex].sFiletype.toUpperCase() + ": " +
+ Lang(oStatistics.oFiletypes.aData[iIndex].sDescription));
+ } else {
+ aItem.push(Lang(oStatistics.oFiletypes.aData[iIndex].sDescription));
+ }
+ aValue.push(oStatistics.oFiletypes.aData[iIndex].iHits);
+ iRunningTotal += oStatistics.oFiletypes.aData[iIndex].iHits;
+ }
+ iCount++;
+ }
+ if (oStatistics.oFiletypes.iTotalHits > iRunningTotal) {
+ aItem.push(Lang("Other Filetypes"));
+ aValue.push(oStatistics.oFiletypes.iTotalHits - iRunningTotal);
+ }
+ DrawPie(oStatistics.oFiletypes.iTotalHits, aItem, aValue);
+}
+
+function DrawPie_Keyphrases() {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+ for (var iIndex in oStatistics.oKeyphrases.aData) {
+ if (iCount < 6) {
+ aItem.push(oStatistics.oKeyphrases.aData[iIndex].sPhrase);
+ aValue.push(oStatistics.oKeyphrases.aData[iIndex].iFreq);
+ iRunningTotal += oStatistics.oKeyphrases.aData[iIndex].iFreq;
+ }
+ iCount++;
+ }
+ if (oStatistics.oKeyphrases.iTotalFreq > iRunningTotal) {
+ aItem.push(Lang("Other Keyphrases"));
+ aValue.push(oStatistics.oKeyphrases.iTotalFreq - iRunningTotal);
+ }
+ DrawPie(oStatistics.oKeyphrases.iTotalFreq, aItem, aValue);
+}
+
+function DrawPie_Keywords() {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+ for (var iIndex in oStatistics.oKeywords.aData) {
+ if (iCount < 6) {
+ aItem.push(oStatistics.oKeywords.aData[iIndex].sWord);
+ aValue.push(oStatistics.oKeywords.aData[iIndex].iFreq);
+ iRunningTotal += oStatistics.oKeywords.aData[iIndex].iFreq;
+ }
+ iCount++;
+ }
+ if (oStatistics.oKeywords.iTotalFreq > iRunningTotal) {
+ aItem.push(Lang("Other Keywords"));
+ aValue.push(oStatistics.oKeywords.iTotalFreq - iRunningTotal);
+ }
+ DrawPie(oStatistics.oKeywords.iTotalFreq, aItem, aValue);
+}
+
+function DrawPie_OperatingSystems(sPage) {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+
+ switch (sPage) {
+ case "all":
+ for (var iRow in oStatistics.oOperatingSystems.aData) {
+ if (iCount < 6) {
+ aItem.push(oStatistics.oOperatingSystems.aData[iRow].sOperatingSystem);
+ aValue.push(oStatistics.oOperatingSystems.aData[iRow].iHits);
+ iRunningTotal += oStatistics.oOperatingSystems.aData[iRow].iHits;
+ iCount++;
+ }
+ }
+ if (oStatistics.oOperatingSystems.iTotalHits > iRunningTotal) {
+ aItem.push(Lang("Other Operating Systems"));
+ aValue.push(oStatistics.oOperatingSystems.iTotalHits - iRunningTotal);
+ }
+ DrawPie(oStatistics.oOperatingSystems.iTotalHits, aItem, aValue);
+ break;
+ case "family":
+ for (var iRow in oStatistics.oOperatingSystems.aFamily) {
+ if (iCount < 6) {
+ if (oStatistics.oOperatingSystems.aFamily[iRow].iHits > 0) {
+ aItem.push(gc_aOSFamilyCaption[oStatistics.oOperatingSystems.aFamily[iRow].sOperatingSystem]);
+ aValue.push(oStatistics.oOperatingSystems.aFamily[iRow].iHits);
+ iRunningTotal += oStatistics.oOperatingSystems.aFamily[iRow].iHits;
+ iCount++;
+ }
+ }
+ }
+ if (oStatistics.oOperatingSystems.iTotalHits > iRunningTotal) {
+ aItem.push(Lang("Other Operating Systems"));
+ aValue.push(oStatistics.oOperatingSystems.iTotalHits - iRunningTotal);
+ }
+ DrawPie(oStatistics.oOperatingSystems.iTotalHits, aItem, aValue);
+ break;
+ default:
+ // find family totals
+ for (var iRow in oStatistics.oOperatingSystems.aFamily) {
+ if (oStatistics.oOperatingSystems.aFamily[iRow].sBrowser == sPage) {
+ iFamilyTotalHits = oStatistics.oOperatingSystems.aFamily[iRow].iHits;
+ break;
+ }
+ }
+
+ // extract data
+ for (var iRow in oStatistics.oOperatingSystems.aData) {
+ if ((iCount < 6) && (oStatistics.oOperatingSystems.aData[iRow].sFamily == sPage)) {
+ aItem.push(oStatistics.oOperatingSystems.aData[iRow].sOperatingSystem);
+ aValue.push(oStatistics.oOperatingSystems.aData[iRow].iHits);
+ iRunningTotal += oStatistics.oOperatingSystems.aData[iRow].iHits;
+ iCount++;
+ }
+ }
+ if (iFamilyTotalHits > iRunningTotal) {
+ aItem.push(Lang("Other Versions"));
+ aValue.push(iFamilyTotalHits - iRunningTotal);
+ }
+ DrawPie(iFamilyTotalHits, aItem, aValue);
+ break;
+ }
+}
+
+function DrawPie_PageRefs(sPage) {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+
+ // switch view
+ switch (sPage) {
+ case "all":
+ case "top10":
+ case "top50":
+ var aData = oStatistics.oPageRefs.aData;
+ var sVarName = "sURL";
+ break;
+ case "domains":
+ var aData = oStatistics.oPageRefs.aDataDomain;
+ var sVarName = "sVisibleURL";
+ break;
+ }
+
+ // loop through data
+ for (var iIndex in aData) {
+ if (iCount < 6) {
+ aItem.push(aData[iIndex][sVarName]);
+ aValue.push(aData[iIndex].iPages);
+ iRunningTotal += aData[iIndex].iPages;
+ }
+ iCount++;
+ }
+ if (oStatistics.oPageRefs.iTotalPages > iRunningTotal) {
+ aItem.push(Lang("Other Referrers"));
+ aValue.push(oStatistics.oPageRefs.iTotalPages - iRunningTotal);
+ }
+ DrawPie(oStatistics.oPageRefs.iTotalPages, aItem, aValue);
+}
+
+function DrawPie_PageRefsSE(sPage) {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+ var aData = oStatistics.oPageRefsSE.aData;
+
+ // loop through data
+ for (var iIndex in aData) {
+ if (iCount < 6) {
+ aItem.push(aData[iIndex].sReferrer);
+ aValue.push(aData[iIndex].iPages);
+ iRunningTotal += aData[iIndex].iPages;
+ }
+ iCount++;
+ }
+ if (oStatistics.oPageRefsSE.iTotalPages > iRunningTotal) {
+ aItem.push(Lang("Other Search Engines"));
+ aValue.push(oStatistics.oPageRefsSE.iTotalPages - iRunningTotal);
+ }
+ DrawPie(oStatistics.oPageRefsSE.iTotalPages, aItem, aValue);
+}
+
+function DrawPie_Pages(aData, iTotal, sItemName) {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+ for (var iIndex in aData) {
+ if (iCount < 6) {
+ aItem.push(aData[iIndex].sURL);
+ aValue.push(aData[iIndex][sItemName]);
+ iRunningTotal += aData[iIndex][sItemName];
+ }
+ iCount++;
+ }
+ if (iTotal > iRunningTotal) {
+ aItem.push(Lang("Other URLs"));
+ aValue.push(iTotal - iRunningTotal);
+ }
+ DrawPie(iTotal, aItem, aValue);
+}
+
+function DrawPie_Robots() {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+ for (var iIndex in oStatistics.oRobots.aData) {
+ if (iCount < 6) {
+ aItem.push(oStatistics.oRobots.aData[iIndex].sRobot);
+ aValue.push(oStatistics.oRobots.aData[iIndex].iHits);
+ iRunningTotal += oStatistics.oRobots.aData[iIndex].iHits;
+ }
+ iCount++;
+ }
+ if (oStatistics.oRobots.iTotalHits > iRunningTotal) {
+ aItem.push(Lang("Other Spiders"));
+ aValue.push(oStatistics.oRobots.iTotalHits - iRunningTotal);
+ }
+ DrawPie(oStatistics.oRobots.iTotalHits, aItem, aValue);
+}
+
+function DrawPie_Session() {
+ var aItem = [Lang("0 seconds - 30 seconds"), Lang("30 seconds - 2 minutes"), Lang("2 minutes - 5 minutes"), Lang("5 minutes - 15 minutes"), Lang("15 minutes - 30 minutes"), Lang("30 minutes - 1 hour"), Lang("More than 1 hour")];
+ var aValue = [oStatistics.oSession.aData.s0s30s,
+ oStatistics.oSession.aData.s30s2mn,
+ oStatistics.oSession.aData.s2mn5mn,
+ oStatistics.oSession.aData.s5mn15mn,
+ oStatistics.oSession.aData.s15mn30mn,
+ oStatistics.oSession.aData.s30mn1h,
+ oStatistics.oSession.aData.s1h];
+ DrawPie(oStatistics.oSession.iTotalFreq, aItem, aValue);
+}
+
+function DrawPie_Status() {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+ for (var iIndex in oStatistics.oStatus.aData) {
+ if (iCount < 6) {
+ if (oStatistics.oStatus.aData[iIndex].sDescription != " ") {
+ aItem.push(oStatistics.oStatus.aData[iIndex].sCode + ": " +
+ Lang(oStatistics.oStatus.aData[iIndex].sDescription));
+ } else {
+ aItem.push(oStatistics.oStatus.aData[iIndex].sCode);
+ }
+ aValue.push(oStatistics.oStatus.aData[iIndex].iHits);
+ iRunningTotal += oStatistics.oStatus.aData[iIndex].iHits;
+ }
+ iCount++;
+ }
+ if (oStatistics.oStatus.iTotalHits > iRunningTotal) {
+ aItem.push(Lang("Other Status Codes"));
+ aValue.push(oStatistics.oStatus.iTotalHits - iRunningTotal);
+ }
+ DrawPie(oStatistics.oStatus.iTotalHits, aItem, aValue);
+}
+
+function DrawPie_Status404() {
+ var aItem = [];
+ var aValue = [];
+ var iRunningTotal = 0;
+ var iCount = 0;
+ for (var iIndex in oStatistics.oStatus404.aData) {
+ if (iCount < 6) {
+ aItem.push(oStatistics.oStatus404.aData[iIndex].sURL.replace(/​/g, ""));
+ aValue.push(oStatistics.oStatus404.aData[iIndex].iHits);
+ iRunningTotal += oStatistics.oStatus404.aData[iIndex].iHits;
+ }
+ iCount++;
+ }
+ if (oStatistics.oStatus404.iTotalHits > iRunningTotal) {
+ aItem.push("Other URLs");
+ aValue.push(oStatistics.oStatus404.iTotalHits - iRunningTotal);
+ }
+ DrawPie(oStatistics.oStatus404.iTotalHits, aItem, aValue);
+}
+
+function DrawSubMenu(sMenu, sSelected) {
+ // choose object
+ switch (sMenu) {
+ case "allmonths":
+ oMenu = oSubMenu["AllMonths"];
+ break;
+ case "browser":
+ oMenu = oSubMenu["Browser"];
+ break;
+ case "country":
+ oMenu = oSubMenu["Country"];
+ break;
+ case "keyphrases":
+ oMenu = oSubMenu["Keyphrases"];
+ break;
+ case "keywords":
+ oMenu = oSubMenu["Keywords"];
+ break;
+ case "os":
+ oMenu = oSubMenu["OS"];
+ break;
+ case "pagerefs":
+ oMenu = oSubMenu["PageRefs"];
+ break;
+ case "pages":
+ oMenu = oSubMenu["Pages"];
+ break;
+ case "searches":
+ oMenu = oSubMenu["Searches"];
+ break;
+ case "status":
+ oMenu = oSubMenu["Status"];
+ break;
+ case "thismonth":
+ oMenu = oSubMenu["ThisMonth"];
+ break;
+ default:
+ return "Bad SubMenu Name";
+ }
+
+ // create menu
+ var aMenu = [];
+ for (sLabel in oMenu) {
+ if (sSelected == sLabel) {
+ aMenu.push("<span class=\"submenuselect\" onclick=\"DrawPage('" + oMenu[sLabel] + "')\">" + Lang(sLabel) + "</span>");
+ } else {
+ aMenu.push("<span class=\"submenu\" onclick=\"DrawPage('" + oMenu[sLabel] + "')\">" + Lang(sLabel) + "</span>");
+ }
+ }
+ return ("<div id=\"submenu\">" + aMenu.join(" | ") + "</div>");
+}
+
+function DrawTable_AllMonths(sPage) {
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>";
+ if (sPage == "all") {
+ sHTML += "<th width=\"16%\">" + Lang("Month") + "</th>";
+ } else {
+ sHTML += "<th width=\"16%\">" + Lang("Year") + "</th>";
+ }
+ sHTML += "<th width=\"12%\">" + Lang("Total Visitors") + "</th>" +
+ "<th width=\"12%\">" + Lang("Visitors per Day") + "</th>" +
+ "<th width=\"12%\">" + Lang("Unique Visitors") + "</th>" +
+ "<th width=\"12%\">" + Lang("Unique Ratio") + "</th>" +
+ "<th width=\"12%\">" + Lang("Pages") + "</th>" +
+ "<th width=\"12%\">" + Lang("Hits") + "</th>" +
+ "<th width=\"12%\" class=\"noborder\">" + Lang("BW") + "</th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ var iTotalVisits = 0;
+ var iTotalUniques = 0;
+ var iTotalPages = 0;
+ var iTotalHits = 0;
+ var iTotalBW = 0;
+ var iAnnualVisits = 0;
+ var iAnnualUniques = 0;
+ var iAnnualPages = 0;
+ var iAnnualHits = 0;
+ var iAnnualBW = 0;
+ var iCurrentYear = oStatistics.oAllMonths.aData[0].iYear;
+
+ for (var iRow in oStatistics.oAllMonths.aData) {
+ oRow = oStatistics.oAllMonths.aData[iRow];
+
+ // create single values
+ var iVisits = parseInt(oRow.iVisits);
+ var iUniques = parseInt(oRow.iUniques);
+ var iPages = parseInt(oRow.iPages);
+ var iHits = parseInt(oRow.iHits);
+ var iBW = parseInt(oRow.iBW);
+ var iDaysInMonth = parseFloat(oRow.iDaysInMonth);
+
+ // sum totals
+ iTotalVisits += iVisits;
+ iTotalUniques += iUniques;
+ iTotalPages += iPages;
+ iTotalHits += iHits;
+ iTotalBW += iBW;
+ iAnnualVisits += iVisits;
+ iAnnualUniques += iUniques;
+ iAnnualPages += iPages;
+ iAnnualHits += iHits;
+ iAnnualBW += iBW;
+ iCurrentYear = oRow.iYear;
+
+ // create table
+ switch (sPage) {
+ case "all":
+ if ((g_iMonth == oRow.iMonth) && (g_iYear == oRow.iYear)) {
+ var sHTMLRow = "<tr class=\"highlight\">";
+ } else {
+ var sHTMLRow = "<tr>";
+ }
+ sHTMLRow += "<td><span class=\"hidden\">" + oRow.dtDate.valueOf() + "</span>" + Lang(gc_aMonthName[oRow.iMonth - 1]) + " " + oRow.iYear + "</td>" +
+ "<td class=\"right\">" + NumberFormat(iVisits, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat((iVisits / iDaysInMonth), 1) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(iUniques) + "</td>";
+ if (iVisits > 0) {
+ sHTMLRow += "<td class=\"right\">" + NumberFormat(((iUniques / iVisits) * 100), 0) + "%</td>";
+ } else {
+ sHTMLRow += "<td class=\"right\">0%</td>";
+ }
+ sHTMLRow += "<td class=\"right\">" + NumberFormat(iPages, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(iHits, 0) + "</td>" +
+ "<td class=\"right\">" + DisplayBandwidth(iBW) + "</td>" +
+ "</tr>\n";
+ aHTML.push(sHTMLRow);
+ break;
+ case "year":
+ //if ((iCurrentYear != oRow.iYear) || (iRow == (oStatistics.oAllMonths.aData.length - 1))) {
+ if ((oRow.iMonth == 12) || (iRow == (oStatistics.oAllMonths.aData.length - 1))) {
+ var sHTMLRow = "<tr>" +
+ "<td>" + iCurrentYear + "</td>" +
+ "<td class=\"right\">" + NumberFormat(iAnnualVisits) + "</td>" +
+ "<td class=\"right\">" + NumberFormat((iAnnualVisits / oStatistics.oAllMonths.aYearDayCount[iCurrentYear]), 1) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(iAnnualUniques, 0) + "</td>";
+ if (iAnnualVisits > 0) {
+ sHTMLRow += "<td class=\"right\">" + NumberFormat(((iAnnualUniques / iAnnualVisits) * 100), 0) + "%</td>";
+ } else {
+ sHTMLRow += "<td class=\"right\">0%</td>";
+ }
+ sHTMLRow += "<td class=\"right\">" + NumberFormat(iAnnualPages, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(iAnnualHits, 0) + "</td>" +
+ "<td class=\"right\">" + DisplayBandwidth(iAnnualBW) + "</td>" +
+ "</tr>\n";
+ aHTML.push(sHTMLRow);
+
+ // reset values
+ iAnnualVisits = 0;
+ iAnnualUniques = 0;
+ iAnnualPages = 0;
+ iAnnualHits = 0;
+ iAnnualBW = 0;
+ }
+ break;
+ }
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ sHTML = (sHTML + aHTML.join("\n") + "</tbody><tfoot><tr>" +
+ "<td class=\"noborder\"> </td>" +
+ "<td class=\"noborder right\">" + NumberFormat(iTotalVisits, 0) + "</td>" +
+ "<td class=\"noborder right\"> </td>" +
+ "<td class=\"noborder right\">" + NumberFormat(iTotalUniques, 0) + "</td>" +
+ "<td class=\"noborder right\"> </td>" +
+ "<td class=\"noborder right\">" + NumberFormat(iTotalPages, 0) + "</td>" +
+ "<td class=\"noborder right\">" + NumberFormat(iTotalHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + DisplayBandwidth(iTotalBW) + "</td>" +
+ "</tr></tfoot></table>")
+ return ( [ true, sHTML ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"7\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_Browser(sPage) {
+ // get values
+ iTotalHits = oStatistics.oBrowser.iTotalHits;
+ aData = oStatistics.oBrowser.aData;
+ aFamily = oStatistics.oBrowser.aFamily;
+
+ // create table body
+ aHTML = new Array();
+ switch (sPage) {
+ case "all":
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th width=\"1\"> </th>" +
+ "<th>" + Lang("Browser") + "</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th class=\"noborder\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create output
+ for (var iRow in aData) {
+ iPercent = ((aData[iRow].iHits / iTotalHits) * 100);
+ aHTML.push("<tr>" +
+ "<td class=\"browserlogo\"><img src=\"themes/" + sThemeDir + "/browsers/" + aData[iRow].sFamily.replace(" ", "").replace("-", "").replace("\\", "").toLowerCase() + ".gif\" alt=\"" + aData[iRow].sFamily + "\" /></td>" +
+ "<td>" + aData[iRow].sBrowser + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + iPercent.toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+ break;
+ case "family":
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th width=\"1\"> </th>" +
+ "<th>" + Lang("Browser Family") + "</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th class=\"noborder\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create output
+ for (var iRow in aFamily) {
+ if (aFamily[iRow].iHits > 0) {
+ iPercent = ((aFamily[iRow].iHits / iTotalHits) * 100);
+ aHTML.push("<tr>" +
+ "<td class=\"browserlogo\"><img src=\"themes/" + sThemeDir + "/browsers/" + aFamily[iRow].sBrowser.replace(" ", "").replace("-", "").replace("\\", "").toLowerCase() + ".gif\" alt=\"" + aFamily[iRow].sBrowser + "\"/></td>" +
+ "<td>" + gc_aBrowserFamilyCaption[aFamily[iRow].sBrowser] + " <span class=\"fauxlink tiny\" onclick=\"DrawPage('browser." +
+ aFamily[iRow].sBrowser + "');\">»</span>" + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aFamily[iRow].iHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + iPercent.toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+ }
+ break;
+ default:
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th width=\"1\"> </th>" +
+ "<th>" + Lang("Browser") + "</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th class=\"noborder\" width=\"1\">% " + Lang("within Family") + "</th>" +
+ "<th class=\"noborder\" width=\"1\">% " + Lang("Overall") + "</th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // find family totals
+ for (var iRow in aFamily) {
+ if (aFamily[iRow].sBrowser == sPage) {
+ iFamilyTotalHits = aFamily[iRow].iHits;
+ break;
+ }
+ }
+
+ // create output
+ for (var iRow in aData) {
+ if (aData[iRow].sFamily == sPage) {
+ iTotalPercent = ((aData[iRow].iHits / iTotalHits) * 100);
+ iFamilyPercent = ((aData[iRow].iHits / iFamilyTotalHits) * 100);
+ aHTML.push("<tr>" +
+ "<td class=\"browserlogo\"><img src=\"themes/" + sThemeDir + "/browsers/" + aData[iRow].sFamily.replace(" ", "").replace("-", "").replace("\\", "").toLowerCase() + ".gif\" alt=\"" + aData[iRow].sFamily + "\"/></td>" +
+ "<td>" + aData[iRow].sBrowser + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + iFamilyPercent.toFixed(1) + "%</td>" +
+ "<td class=\"noborder right\">" + iTotalPercent.toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+ }
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"4\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_Country(sContinent) {
+ // get values
+ if (typeof sContinent == "undefined") {
+ iTotalPages = oStatistics.oCountry.iTotalPages;
+ iTotalHits = oStatistics.oCountry.iTotalHits;
+ iTotalBW = oStatistics.oCountry.iTotalBW;
+ } else {
+ iTotalPages = oStatistics.oCountry.oContinent[sContinent].iTotalPages;
+ iTotalHits = oStatistics.oCountry.oContinent[sContinent].iTotalHits;
+ iTotalBW = oStatistics.oCountry.oContinent[sContinent].iTotalBW;
+ }
+ aData = oStatistics.oCountry.aData;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th> </th>" +
+ "<th>" + Lang("Country") + "</th>" +
+ "<th>" + Lang("Pages") + "</th>" +
+ "<th>%</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th>%</th>" +
+ "<th>" + Lang("Bandwidth") + "</th>" +
+ "<th class=\"noborder\">%</th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ var aHTML = new Array();
+ for (var iRow in aData) {
+ if (aData[iRow].sContinent == "Other") {
+ aData[iRow].sCountryCode = "trans";
+ }
+ if ((typeof sContinent == "undefined") || (aData[iRow].sContinent == sContinent)) {
+ aHTML.push("<tr>" +
+ "<td class=\"countryflag\"><img src=\"themes/" + sThemeDir + "/flags/" + aData[iRow].sCountryCode + ".gif\" alt=\"" + aData[iRow].sCountryName + "\" /></td>" +
+ "<td>" + Lang(aData[iRow].sCountryName) + "</td>" +
+ "<td class=\"noborder right\">" + NumberFormat(aData[iRow].iPages, 0) + "</td>" +
+ "<td class=\"right\">" + (SafeDivide(aData[iRow].iPages, iTotalPages) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"noborder right\">" + NumberFormat(aData[iRow].iHits, 0) + "</td>" +
+ "<td class=\"right\">" + ((aData[iRow].iHits / iTotalHits) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"noborder right\">" + DisplayBandwidth(aData[iRow].iBW) + "</td>" +
+ "<td class=\"noborder right\">" + ((aData[iRow].iBW / iTotalBW) * 100).toFixed(1) + "%</td>" +
+ "</tr>");
+ }
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"8\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_CountryContinent() {
+ // get values
+ var iTotalPages = oStatistics.oCountry.iTotalPages;
+ var iTotalHits = oStatistics.oCountry.iTotalHits;
+ var iTotalBW = oStatistics.oCountry.iTotalBW;
+ var iOtherPages = iTotalPages;
+ var iOtherHits = iTotalHits;
+ var iOtherBW = iTotalBW;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th>" + Lang("Continent") + "</th>" +
+ "<th>" + Lang("Pages") + "</th>" +
+ "<th>%</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th>%</th>" +
+ "<th>" + Lang("Bandwidth") + "</th>" +
+ "<th class=\"noborder\">%</th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ for (var sContinent in gc_aContinents) {
+ oC = oStatistics.oCountry.oContinent[sContinent];
+ iOtherPages -= oC.iTotalPages;
+ iOtherHits -= oC.iTotalHits;
+ iOtherBW -= oC.iTotalBW;
+ aHTML.push("<tr>" +
+ "<td>" + Lang(sContinent) + " <span class=\"fauxlink tiny\" onclick=\"DrawPage('country." + sContinent + "');\">»</span></td>" +
+ "<td class=\"right\">" + NumberFormat(oC.iTotalPages, 0) + "</td>" +
+ "<td class=\"right\">" + ((oC.iTotalPages / iTotalPages) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"right\">" + NumberFormat(oC.iTotalHits, 0) + "</td>" +
+ "<td class=\"right\">" + ((oC.iTotalHits / iTotalHits) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"right\">" + DisplayBandwidth(oC.iTotalBW) + "</td>" +
+ "<td class=\"noborder right\">" + ((oC.iTotalBW / iTotalBW) * 100).toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+
+ // add "other" row
+ aHTML.push("<tr>" +
+ "<td>" + Lang("Other") + " <span class=\"fauxlink tiny\" onclick=\"DrawPage('country.Other');\">»</span></td>" +
+ "<td class=\"right\">" + NumberFormat(iOtherPages, 0) + "</td>" +
+ "<td class=\"right\">" + ((iOtherPages / iTotalPages) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"right\">" + NumberFormat(iOtherHits, 0) + "</td>" +
+ "<td class=\"right\">" + ((iOtherHits / iTotalHits) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"right\">" + DisplayBandwidth(iOtherBW) + "</td>" +
+ "<td class=\"noborder right\">" + ((iOtherBW / iTotalBW) * 100).toFixed(1) + "%</td>" +
+ "</tr>\n");
+
+ // output
+ return (sHTML + aHTML.join("\n") + "</tbody></table>");
+}
+
+function DrawTable_Filetypes() {
+ // get values
+ iTotalHits = oStatistics.oFiletypes.iTotalHits;
+ iTotalBW = oStatistics.oFiletypes.iTotalBW;
+ iTotalNonCompBW = oStatistics.oFiletypes.iTotalNonCompBW;
+ iTotalCompBW = oStatistics.oFiletypes.iTotalCompBW;
+ aData = oStatistics.oFiletypes.aData;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th>" + Lang("Filetype") + "</th>" +
+ "<th>" + Lang("Description") + "</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th> </th>" +
+ "<th>" + Lang("Bandwidth") + "</th>" +
+ "<th> </th>" +
+ "<th class=\"noborder\">" + Lang("Average Size") + "</th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ for (var iRow in aData) {
+ aHTML.push("<tr>" +
+ "<td>" + oStatistics.oFiletypes.aData[iRow].sFiletype + "</td>" +
+ "<td>" + Lang(oStatistics.oFiletypes.aData[iRow].sDescription) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oStatistics.oFiletypes.aData[iRow].iHits, 0) + "</td>" +
+ "<td class=\"right\">" + ((oStatistics.oFiletypes.aData[iRow].iHits / iTotalHits) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"right\">" + DisplayBandwidth(oStatistics.oFiletypes.aData[iRow].iBW) + "</td>" +
+ "<td class=\"right\">" + ((oStatistics.oFiletypes.aData[iRow].iBW / iTotalBW) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"noborder right\">" + DisplayBandwidth(oStatistics.oFiletypes.aData[iRow].iBW / oStatistics.oFiletypes.aData[iRow].iHits) + "</td>" +
+ "</tr>\n");
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"7\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_OperatingSystems(sPage) {
+ // get values
+ var iTotalHits = oStatistics.oOperatingSystems.iTotalHits;
+ var aData = oStatistics.oOperatingSystems.aData;
+ var aFamily = oStatistics.oOperatingSystems.aFamily;
+
+ // create table body
+ var aHTML = [];
+ switch (sPage) {
+ case "all":
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th width=\"1\"> </th>" +
+ "<th>" + Lang("Operating System") + "</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th class=\"noborder\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create output
+ for (var iRow in aData) {
+ var iPercent = ((aData[iRow].iHits / iTotalHits) * 100);
+ aHTML.push("<tr>" +
+ "<td class=\"oslogo\"><img src=\"themes/" + sThemeDir + "/os/" + aData[iRow].sFamily.replace(" ", "").toLowerCase() + ".gif\" alt=\"" + aData[iRow].sFamily + "\" /></td>" +
+ "<td>" + aData[iRow].sOperatingSystem + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + iPercent.toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+ break;
+ case "family":
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th width=\"1\"> </th>" +
+ "<th>" + Lang("Operating System Family") + "</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th class=\"noborder\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create output
+ for (var iRow in aFamily) {
+ if (aFamily[iRow].iHits > 0) {
+ var iPercent = ((aFamily[iRow].iHits / iTotalHits) * 100);
+ aHTML.push("<tr>" +
+ "<td class=\"oslogo\"><img src=\"themes/" + sThemeDir + "/os/" + aFamily[iRow].sOperatingSystem.replace(" ", "").toLowerCase() + ".gif\" alt=\"" + aFamily[iRow].sOperatingSystem + "\" /></td>" +
+ "<td>" + gc_aOSFamilyCaption[aFamily[iRow].sOperatingSystem] + " <span class=\"fauxlink tiny\" onclick=\"DrawPage('os." +
+ aFamily[iRow].sOperatingSystem + "');\">»</span>" + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aFamily[iRow].iHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + iPercent.toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+ }
+ break;
+ default:
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th width=\"1\"> </th>" +
+ "<th>" + Lang("Operating System") + "</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th class=\"noborder\" width=\"1\">% " + (Lang("within Family")).replace(" ", " ") + "</th>" +
+ "<th class=\"noborder\" width=\"1\">% " + Lang("Overall") + "</th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // find family totals
+ for (var iRow in aFamily) {
+ if (aFamily[iRow].sOperatingSystem == sPage) {
+ iFamilyTotalHits = aFamily[iRow].iHits;
+ break;
+ }
+ }
+
+ // create output
+ for (var iRow in aData) {
+ if (aData[iRow].sFamily == sPage) {
+ iTotalPercent = ((aData[iRow].iHits / iTotalHits) * 100);
+ iFamilyPercent = ((aData[iRow].iHits / iFamilyTotalHits) * 100);
+ aHTML.push("<tr>" +
+ "<td class=\"oslogo\"><img src=\"themes/" + sThemeDir + "/os/" + aData[iRow].sFamily.replace(" ", "").toLowerCase() + ".gif\" alt=\"" + aData[iRow].sFamily + "\" /></td>" +
+ "<td>" + aData[iRow].sOperatingSystem + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + iFamilyPercent.toFixed(1) + "%</td>" +
+ "<td class=\"noborder right\">" + iTotalPercent.toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+ }
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"3\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_PageRefs(sPage) {
+ // get values
+ iTotalPages = oStatistics.oPageRefs.iTotalPages;
+ iTotalHits = oStatistics.oPageRefs.iTotalHits;
+ switch (sPage) {
+ case "domains":
+ aData = oStatistics.oPageRefs.aDataDomain;
+ break;
+ default:
+ aData = oStatistics.oPageRefs.aData;
+ break;
+ }
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th>" + Lang("Referrer") + "</th>" +
+ "<th>" + Lang("Pages") + "</th>" +
+ "<th> </th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th class=\"noborder\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ for (var iRow in aData) {
+ switch (sPage) {
+ case "all":
+ case "top10":
+ case "top50":
+ sReferrer = "<a href=\"" + aData[iRow].sURL + "\" target=\"_blank\">" + aData[iRow].sVisibleURL + "</a>";
+ break;
+ case "domains":
+ sReferrer = "<a href=\"" + aData[iRow].sURL + "\" target=\"_blank\">" + aData[iRow].sVisibleURL + "</a>";
+ break;
+ default:
+ sReferrer = aData[iRow].sURL;
+ }
+ aHTML.push("<tr>" +
+ "<td>" + sReferrer + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iPages, 0) + "</td>" +
+ "<td class=\"right\">" + (SafeDivide(aData[iRow].iPages, iTotalPages) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + ((aData[iRow].iHits / iTotalHits) * 100).toFixed(1) + "%</td>" +
+ "</tr>\n");
+ if ((sPage == "top10") && (iRow > 9)) {
+ break;
+ }
+ if ((sPage == "top50") && (iRow > 49)) {
+ break;
+ }
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"5\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_PageRefsSE(sPage) {
+ // get values
+ iTotalPages = oStatistics.oPageRefsSE.iTotalPages;
+ iTotalHits = oStatistics.oPageRefsSE.iTotalHits;
+ aData = oStatistics.oPageRefsSE.aData;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th width=\"1\"> </th>" +
+ "<th>" + Lang("Search Engine") + "</th>" +
+ "<th>" + Lang("Pages") + "</th>" +
+ "<th> </th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th class=\"noborder\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ for (var iRow in aData) {
+ aHTML.push("<tr>" +
+ "<td class=\"searchenginelogo\">" + aData[iRow].sImage + "</td>" +
+ "<td><!-- " + aData[iRow].sReferrer + " -->" + aData[iRow].sURL + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iPages, 0) + "</td>" +
+ "<td class=\"right\">" + (SafeDivide(aData[iRow].iPages, iTotalPages) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + ((aData[iRow].iHits / iTotalHits) * 100).toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"6\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_Pages(aData) {
+ // get values
+ var iTotalPages = oStatistics.oPages.iTotalPages;
+ var iTotalBW = oStatistics.oPages.iTotalBW;
+ var iTotalEntry = oStatistics.oPages.iTotalEntry;
+ var iTotalExit = oStatistics.oPages.iTotalExit;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th>" + Lang("URL") + "</th>" +
+ "<th>" + Lang("Pages") + "</th>" +
+ "<th> </th>" +
+ "<th>" + Lang("Bandwidth") + "</th>" +
+ "<th> </th>" +
+ "<th>" + Lang("Entry") + "</th>" +
+ "<th> </th>" +
+ "<th>" + Lang("Exit") + "</th>" +
+ "<th class=\"noborder\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ var aHTML = [];
+ for (var iRow in aData) {
+ aHTML.push("<tr>" +
+ "<td>" + aData[iRow].sURL + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iPages, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(SafeDivide(aData[iRow].iPages, iTotalPages) * 100, 1) + "%</td>" +
+ "<td class=\"right\">" + DisplayBandwidth(aData[iRow].iBW) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(SafeDivide(aData[iRow].iBW, iTotalBW) * 100, 1) + "%</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iEntry, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(SafeDivide(aData[iRow].iEntry, iTotalEntry) * 100, 1) + "%</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[iRow].iExit, 0) + "</td>" +
+ "<td class=\"noborder right\">" + NumberFormat(SafeDivide(aData[iRow].iExit, iTotalExit) * 100, 1) + "%</td>" +
+ "</tr>\n");
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"9\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_Robots() {
+ // get values
+ iTotalHits = oStatistics.oRobots.iTotalHits;
+ iTotalBW = oStatistics.oRobots.iTotalBW;
+ iTotalRobotsTXT = oStatistics.oRobots.iTotalRobotsTXT;
+ aData = oStatistics.oRobots.aData;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th>" + Lang("Spider") + "</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th> </th>" +
+ "<th>" + Lang("Bandwidth") + "</th>" +
+ "<th> </th>" +
+ "<th>" + Lang("Last Visit") + "</th>" +
+ "<th>Robots.txt</th>" +
+ "<th class=\"noborder\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ for (var iRow in aData) {
+ sDate = oStatistics.oRobots.aData[iRow].dtLastVisit.toString();
+ dtDate = new Date(sDate.substr(0,4),
+ (parseInt(StripLeadingZeroes(sDate.substr(4,2))) - 1),
+ sDate.substr(6,2),
+ sDate.substr(8,2),
+ sDate.substr(10,2),
+ sDate.substr(12,2));
+ aHTML.push("<tr>" +
+ "<td>" + oStatistics.oRobots.aData[iRow].sRobot + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oStatistics.oRobots.aData[iRow].iHits, 0) + "</td>" +
+ "<td class=\"right\">" + ((oStatistics.oRobots.aData[iRow].iHits / iTotalHits) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"right\">" + DisplayBandwidth(oStatistics.oRobots.aData[iRow].iBW) + "</td>" +
+ "<td class=\"right\">" + ((oStatistics.oRobots.aData[iRow].iBW / iTotalBW) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"right\"><span class=\"hidden\">" + sDate + "</span>" + dtDate.getDate() + " " + Lang(gc_aMonthName[dtDate.getMonth()].substr(0,3)) + " '" + dtDate.getFullYear().toString().substr(2) + " " + AddLeadingZero(dtDate.getHours(), 2) + ":" + AddLeadingZero(dtDate.getMinutes(), 2) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oStatistics.oRobots.aData[iRow].iRobotsTXT, 0) + "</td>" +
+ "<td class=\"noborder right\">" + (SafeDivide(oStatistics.oRobots.aData[iRow].iRobotsTXT, iTotalRobotsTXT) * 100).toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"8\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_Session() {
+ // get values
+ var iTotalFreq = oStatistics.oSession.iTotalFreq;
+ var aData = oStatistics.oSession.aData;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th>" + Lang("Session Length") + "</th>" +
+ "<th>" + Lang("Frequency") + "</th>" +
+ "<th class=\"noborder\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ aHTML.push("<tr>" +
+ "<td><!-- 7 -->" + Lang("0 seconds - 30 seconds") + "</td>" +
+ "<td>" + NumberFormat(aData.s0s30s, 0) + "</td>" +
+ "<td>" + NumberFormat(SafeDivide(aData.s0s30s, iTotalFreq) * 100, 1) + "%</td>" +
+ "</tr>\n");
+ aHTML.push("<tr>" +
+ "<td><!-- 6 -->" + Lang("30 seconds - 2 minutes") + "</td>" +
+ "<td>" + NumberFormat(aData.s30s2mn, 0) + "</td>" +
+ "<td>" + NumberFormat(SafeDivide(aData.s30s2mn, iTotalFreq) * 100, 1) + "%</td>" +
+ "</tr>\n");
+ aHTML.push("<tr>" +
+ "<td><!-- 5 -->" + Lang("2 minutes - 5 minutes") + "</td>" +
+ "<td>" + NumberFormat(aData.s2mn5mn, 0) + "</td>" +
+ "<td>" + NumberFormat(SafeDivide(aData.s2mn5mn, iTotalFreq) * 100, 1) + "%</td>" +
+ "</tr>\n");
+ aHTML.push("<tr>" +
+ "<td><!-- 4 -->" + Lang("5 minutes - 15 minutes") + "</td>" +
+ "<td>" + NumberFormat(aData.s5mn15mn, 0) + "</td>" +
+ "<td>" + NumberFormat(SafeDivide(aData.s5mn15mn, iTotalFreq) * 100, 1) + "%</td>" +
+ "</tr>\n");
+ aHTML.push("<tr>" +
+ "<td><!-- 3 -->" + Lang("15 minutes - 30 minutes") + "</td>" +
+ "<td>" + NumberFormat(aData.s15mn30mn, 0) + "</td>" +
+ "<td>" + NumberFormat(SafeDivide(aData.s15mn30mn, iTotalFreq) * 100, 1) + "%</td>" +
+ "</tr>\n");
+ aHTML.push("<tr>" +
+ "<td><!-- 2 -->" + Lang("30 minutes - 1 hour") + "</td>" +
+ "<td>" + NumberFormat(aData.s30mn1h, 0) + "</td>" +
+ "<td>" + NumberFormat(SafeDivide(aData.s30mn1h, iTotalFreq) * 100, 1) + "%</td>" +
+ "</tr>\n");
+ aHTML.push("<tr>" +
+ "<td><!-- 1 -->" + Lang("More than 1 hour") + "</td>" +
+ "<td>" + NumberFormat(aData.s1h, 0) + "</td>" +
+ "<td>" + NumberFormat(SafeDivide(aData.s1h, iTotalFreq) * 100, 1) + "%</td>" +
+ "</tr>\n");
+
+ // output
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+}
+
+function DrawTable_Status() {
+ // get values
+ iTotalHits = oStatistics.oStatus.iTotalHits;
+ iTotalBW = oStatistics.oStatus.iTotalBW;
+ aData = oStatistics.oStatus.aData;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th>" + Lang("Code") + "</th>" +
+ "<th>" + Lang("Description") + "</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th> </th>" +
+ "<th>" + Lang("Bandwidth") + "</th>" +
+ "<th> </th>" +
+ "<th class=\"noborder\">" + Lang("Average Size") + "</th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ for (var iRow in aData) {
+ aHTML.push("<tr>" +
+ "<td>" + oStatistics.oStatus.aData[iRow].sCode + "</td>" +
+ "<td>" + Lang(oStatistics.oStatus.aData[iRow].sDescription) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oStatistics.oStatus.aData[iRow].iHits, 0) + "</td>" +
+ "<td class=\"right\">" + ((oStatistics.oStatus.aData[iRow].iHits / iTotalHits) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"right\">" + DisplayBandwidth(oStatistics.oStatus.aData[iRow].iBW) + "</td>" +
+ "<td class=\"right\">" + ((oStatistics.oStatus.aData[iRow].iBW / iTotalBW) * 100).toFixed(1) + "%</td>" +
+ "<td class=\"noborder right\">" + DisplayBandwidth(oStatistics.oStatus.aData[iRow].iBW / oStatistics.oStatus.aData[iRow].iHits) + "</td>" +
+ "</tr>\n");
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"7\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_Status404() {
+ // get values
+ iTotalHits = oStatistics.oStatus404.iTotalHits;
+ aData = oStatistics.oStatus404.aData;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th>" + Lang("URL") + "</th>" +
+ "<th>" + Lang("Hits") + "</th>" +
+ "<th>" + Lang("Referrer") + "</th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ var sReferrer = "";
+ for (var iRow in aData) {
+ if (oStatistics.oStatus404.aData[iRow].sReferrer == "-") {
+ sReferrer = " ";
+ } else {
+ sReferrer = ("<a href=\"" + oStatistics.oStatus404.aData[iRow].sReferrer + "\" target=\"_blank\">" + oStatistics.oStatus404.aData[iRow].sReferrerVisible + "</a>");
+ }
+ aHTML.push("<tr>" +
+ "<td>" + oStatistics.oStatus404.aData[iRow].sURL + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oStatistics.oStatus404.aData[iRow].iHits, 0) + "</td>" +
+ "<td>" + sReferrer + "</td>" +
+ "</tr>\n");
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ return ( [ true, (sHTML + aHTML.join("\n") + "</tbody></table>") ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"3\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_ThisMonth() {
+ // get values
+ iTotalVisits = oStatistics.oThisMonth.iTotalVisits;
+ iTotalPages = oStatistics.oThisMonth.iTotalPages;
+ iTotalHits = oStatistics.oThisMonth.iTotalHits;
+ iTotalBW = oStatistics.oThisMonth.iTotalBW;
+ aData = oStatistics.oThisMonth.aData;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th width=\"15%\">" + Lang("Day") + "</th>" +
+ "<th width=\"14%\">" + Lang("Date") + "</th>" +
+ "<th width=\"9%\">" + Lang("Visits") + "</th>" +
+ "<th width=\"9%\" class=\"noborder\">" + Lang("Pages") + "</th>" +
+ "<th width=\"11%\">" + Lang("per Visit") + "</th>" +
+ "<th width=\"9%\" class=\"noborder\">" + Lang("Hits") + "</th>" +
+ "<th width=\"11%\">" + Lang("per Visit") + "</th>" +
+ "<th width=\"9%\" class=\"noborder\">" + Lang("BW") + "</th>" +
+ "<th width=\"11%\" class=\"noborder\">" + Lang("per Visit") + "</th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ for (var iRow in aData) {
+ oRow = oStatistics.oThisMonth.aData[iRow];
+ sVisibleDate = (oRow.dtDate.getDate() + " " +
+ Lang(gc_aMonthName[oRow.dtDate.getMonth()].substr(0,3)) + " '" +
+ oRow.dtDate.getFullYear().toString().substr(2));
+ if (oRow.dtDate.getDay() == 0) {
+ sRowStyle = " class=\"sunday\"";
+ } else if (oRow.dtDate.getDay() == 6) {
+ sRowStyle = " class=\"saturday\"";
+ } else {
+ sRowStyle = "";
+ }
+ aHTML.push("<tr" + sRowStyle + ">" +
+ "<td><span class=\"hidden\">" + oRow.dtDate.getDay() + "</span>" + Lang(gc_aDayName[oRow.dtDate.getDay()]) + "</td>" +
+ "<td><span class=\"hidden\">" + oRow.dtDate.valueOf() + "</span>" + sVisibleDate + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oRow.iVisits, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oRow.iPages, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat((SafeDivide(oRow.iPages, oRow.iVisits)), 1) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oRow.iHits, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(SafeDivide(oRow.iHits, oRow.iVisits), 1) + "</td>" +
+ "<td class=\"right\">" + DisplayBandwidth(oRow.iBW) + "</td>" +
+ "<td class=\"noborder right\">" + DisplayBandwidth(SafeDivide(oRow.iBW, oRow.iVisits)) + "</td>" +
+ "</tr>\n");
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ sHTML = (sHTML + aHTML.join("\n") + "</tbody><tfoot><tr>" +
+ "<td colspan=\"3\" class=\"noborder right\">" + NumberFormat(iTotalVisits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + NumberFormat(iTotalPages, 0) + "</td>" +
+ "<td class=\"noborder right\">" + NumberFormat(SafeDivide(iTotalPages, iTotalVisits), 1) + "</td>" +
+ "<td class=\"noborder right\">" + NumberFormat(iTotalHits) + "</td>" +
+ "<td class=\"noborder right\">" + NumberFormat(SafeDivide(iTotalHits, iTotalVisits), 2) + "</td>" +
+ "<td class=\"noborder right\">" + DisplayBandwidth(iTotalBW) + "</td>" +
+ "<td class=\"noborder right\">" + DisplayBandwidth(SafeDivide(iTotalBW, iTotalVisits)) + "</td>" +
+ "</tr></tfoot></table>")
+ return ( [ true, sHTML ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"10\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+}
+
+function DrawTable_Time() {
+ // get values
+ var iTotalPages = oStatistics.oTime.iTotalPages;
+ var iTotalHits = oStatistics.oTime.iTotalHits;
+ var iTotalBW = oStatistics.oTime.iTotalBW;
+ var iTotalNVPages = oStatistics.oTime.iTotalNVPages;
+ var iTotalNVHits = oStatistics.oTime.iTotalNVHits;
+ var iTotalNVBW = oStatistics.oTime.iTotalNVBW;
+
+ // create header
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th>" + Lang("Hour") + "</th>" +
+ "<th class=\"noborder\">" + Lang("Pages") + "</th>" +
+ "<th class=\"noborder right\">%</th>" +
+ "<th class=\"right\">+/-</th>" +
+ "<th class=\"noborder\">" + Lang("Hits") + "</th>" +
+ "<th class=\"noborder right\">%</th>" +
+ "<th class=\"right\">+/-</th>" +
+ "<th class=\"noborder\">" + Lang("BW") + "</th>" +
+ "<th class=\"noborder right\">%</th>" +
+ "<th class=\"right\">+/-</th>" +
+ "<th width=\"1\"><small>" + (Lang("Not Viewed")).replace(" ", " ") + "</small><br />" + Lang("Pages") + "</th>" +
+ "<th width=\"1\"><small>" + (Lang("Not Viewed")).replace(" ", " ") + "</small><br />" + Lang("Hits") + "</th>" +
+ "<th class=\"noborder\" width=\"1\"><small>" + (Lang("Not Viewed")).replace(" ", " ") + "</small><br />" + Lang("BW") + "</th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ var aHTML = [];
+ var iAvgPages = (iTotalPages / 24);
+ var iAvgHits = (iTotalHits / 24);
+ var iAvgBW = (iTotalBW / 24);
+ for (var iRow in oStatistics.oTime.aData) {
+ var oRow = oStatistics.oTime.aData[iRow];
+ var sHour = oRow.iHour;
+ if (oRow.iHour < 10) {
+ sHour = ("0" + sHour)
+ }
+
+ // +/- values
+ var sPagesDiff = Difference(oRow.iPages, iAvgPages);
+ var sHitsDiff = Difference(oRow.iHits, iAvgHits);
+ var sBWDiff = Difference(oRow.iBW, iAvgBW);
+
+ // create table
+ aHTML.push("<tr>" +
+ "<td>" + sHour + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oRow.iPages, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat((SafeDivide(oRow.iPages, iTotalPages) * 100), 1) + "%</td>" +
+ "<td class=\"right\">" + sPagesDiff + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oRow.iHits, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat((SafeDivide(oRow.iHits, iTotalHits) * 100), 1) + "%</td>" +
+ "<td class=\"right\">" + sHitsDiff + "</td>" +
+ "<td class=\"right\">" + DisplayBandwidth(oRow.iBW) + "</td>" +
+ "<td class=\"right\">" + NumberFormat((SafeDivide(oRow.iBW, iTotalBW) * 100), 1) + "%</td>" +
+ "<td class=\"right\">" + sBWDiff + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oRow.iNVPages, 0) + "</td>" +
+ "<td class=\"right\">" + NumberFormat(oRow.iNVHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + DisplayBandwidth(oRow.iNVBW) + "</td>" +
+ "</tr>\n");
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ sHTML = (sHTML + aHTML.join("\n") + "</tbody><tfoot><tr>" +
+ "<td class=\"noborder\"> </td>" +
+ "<td class=\"noborder right\">" + NumberFormat(iTotalPages, 0) + "</td>" +
+ "<td class=\"noborder\"> </td>" +
+ "<td class=\"noborder\"> </td>" +
+ "<td class=\"noborder right\">" + NumberFormat(iTotalHits, 0) + "</td>" +
+ "<td class=\"noborder\"> </td>" +
+ "<td class=\"noborder\"> </td>" +
+ "<td class=\"noborder right\">" + DisplayBandwidth(iTotalBW) + "</td>" +
+ "<td class=\"noborder\"> </td>" +
+ "<td class=\"noborder\"> </td>" +
+ "<td class=\"noborder right\">" + NumberFormat(iTotalNVPages, 0) + "</td>" +
+ "<td class=\"noborder right\">" + NumberFormat(iTotalNVHits, 0) + "</td>" +
+ "<td class=\"noborder right\">" + DisplayBandwidth(iTotalNVBW) + "</td>" +
+ "</tr></tfoot></table>")
+ return ( [ true, sHTML ] );
+ } else {
+ return ( [ false, (sHTML + "<tr><td class=\"center\" colspan=\"4\">" + Lang("There is no data to display") + "</td></tr></tbody></table>") ] );
+ }
+
+ function Difference(iValue, iAverage) {
+ if (iValue == iAverage) {
+ return "-";
+ } else {
+ if (iValue > iAverage) {
+ return ("<span class=\"tiny positive\">+" + NumberFormat((SafeDivide((iValue - iAverage), iAverage) * 100), 1) + "%</span>");
+ } else {
+ return ("<span class=\"tiny negative\">-" + NumberFormat((SafeDivide((iAverage - iValue), iAverage) * 100), 1) + "%</span>");
+ }
+ }
+ }
+}
+
+function Lang(sPhrase) {
+ return (oTranslation[sPhrase] || sPhrase);
+}
+
+function Misc_ThisMonthCalendar(sHeadline, sSubMenu, sDataItem) {
+ // create sum arrays
+ var aWeek = [];
+ var aDay = [];
+ for (var iIndex = 0; iIndex < 7; iIndex++) {
+ aDay[iIndex] = { iCount:0, iTotal:0 };
+ }
+ var iTotal = 0;
+
+ // calculate dates
+ var iFirstWeek = getWeekNr(oStatistics.oThisMonth.aData[0].dtDate);
+ var dtLastDayOfMonth = new Date(oStatistics.oThisMonth.aData[0].dtDate.getFullYear(),
+ (oStatistics.oThisMonth.aData[0].dtDate.getMonth() + 1),
+ 0);
+ var iLastWeek = getWeekNr(dtLastDayOfMonth);
+
+ // create table
+ var sHTML = "<table class=\"calendar\"><tbody>" +
+ "<tr>" +
+ "<td class=\"labelTop\"> </td>" +
+ "<td class=\"labelTop\">" + Lang("Monday") + "</td>" +
+ "<td class=\"labelTop\">" + Lang("Tuesday") + "</td>" +
+ "<td class=\"labelTop\">" + Lang("Wednesday") + "</td>" +
+ "<td class=\"labelTop\">" + Lang("Thursday") + "</td>" +
+ "<td class=\"labelTop\">" + Lang("Friday") + "</td>" +
+ "<td class=\"labelTop\">" + Lang("Saturday") + "</td>" +
+ "<td class=\"labelTop\">" + Lang("Sunday") + "</td>" +
+ "<td class=\"labelTopSpacer\"> </td>" +
+ "<td class=\"labelTop\">" + Lang("Week Total") + "</td>" +
+ "<td class=\"labelTop\">" + Lang("Daily Average") + "</td>" +
+ "</tr>";
+ for (var iIndex = iFirstWeek; iIndex <= iLastWeek; iIndex++) {
+ aWeek[iIndex] = { iCount:0, iTotal:0 };
+ sHTML += "<tr>" +
+ "<td id=\"calWeek" + iIndex + "\" class=\"labelSide\">" + Lang("Week") + ": " + iIndex + "</td>" +
+ "<td id=\"calDay1-" + iIndex + "\"> </td>" +
+ "<td id=\"calDay2-" + iIndex + "\"> </td>" +
+ "<td id=\"calDay3-" + iIndex + "\"> </td>" +
+ "<td id=\"calDay4-" + iIndex + "\"> </td>" +
+ "<td id=\"calDay5-" + iIndex + "\"> </td>" +
+ "<td id=\"calDay6-" + iIndex + "\"> </td>" +
+ "<td id=\"calDay0-" + iIndex + "\"> </td>" +
+ "<td> </td>" +
+ "<td id=\"calTotWk" + iIndex + "\" class=\"calTotWk\"> </td>" +
+ "<td id=\"calAvgWk" + iIndex + "\" class=\"calAvgWk\"> </td>" +
+ "</tr>";
+ }
+ sHTML += "<tr>" +
+ "<td> </td>" +
+ "<td colspan=\"7\" id=\"graph\" class=\"calGraph\"> </td>" +
+ "<td colspan=\"3\"> </td>" +
+ "</tr><tr>" +
+ "<td class=\"labelSide\">" + Lang("Day of Week Total") + "</td>" +
+ "<td id=\"calTotDay1\" class=\"calTotDay\"> </td>" +
+ "<td id=\"calTotDay2\" class=\"calTotDay\"> </td>" +
+ "<td id=\"calTotDay3\" class=\"calTotDay\"> </td>" +
+ "<td id=\"calTotDay4\" class=\"calTotDay\"> </td>" +
+ "<td id=\"calTotDay5\" class=\"calTotDay\"> </td>" +
+ "<td id=\"calTotDay6\" class=\"calTotDay\"> </td>" +
+ "<td id=\"calTotDay0\" class=\"calTotDay\"> </td>" +
+ "<td> </td>" +
+ "<td colspan=\"2\" id=\"calTotMonth\" class=\"calTotDay\"> </td>" +
+ "</tr><tr>" +
+ "<td class=\"labelSide\">" + Lang("Day of Week Average") + "</td>" +
+ "<td id=\"calAvgDay1\" class=\"calAvgDay\"> </td>" +
+ "<td id=\"calAvgDay2\" class=\"calAvgDay\"> </td>" +
+ "<td id=\"calAvgDay3\" class=\"calAvgDay\"> </td>" +
+ "<td id=\"calAvgDay4\" class=\"calAvgDay\"> </td>" +
+ "<td id=\"calAvgDay5\" class=\"calAvgDay\"> </td>" +
+ "<td id=\"calAvgDay6\" class=\"calAvgDay\"> </td>" +
+ "<td id=\"calAvgDay0\" class=\"calAvgDay\"> </td>" +
+ "<td> </td>" +
+ "<td colspan=\"2\" id=\"calAvgMonth\" class=\"calAvgDay\"> </td>" +
+ "</tr>";
+ sHTML += "</tbody></table>";
+
+ // apply content
+ $("#content").html("<h2>" + Lang(sHeadline) + "</h2>" +
+ DrawSubMenu("thismonth", sSubMenu) +
+ "<div class=\"tableFull\">" + sHTML + "</div>");
+
+ // populate daily values
+ for (var iRow in oStatistics.oThisMonth.aData) {
+ var oRow = oStatistics.oThisMonth.aData[iRow];
+ var iWeekNumber = getWeekNr(oRow.dtDate);
+ var iDayNumber = oRow.dtDate.getDay();
+
+ // increment counters
+ aWeek[iWeekNumber].iCount++;
+ aWeek[iWeekNumber].iTotal += oRow[sDataItem];
+ aDay[iDayNumber].iCount++;
+ aDay[iDayNumber].iTotal += oRow[sDataItem];
+ iTotal += oRow[sDataItem];
+
+ // modify table
+ if (sDataItem == "iBW") {
+ sHTML = ("<div class=\"date\">" + oRow.dtDate.getDate() + "</div><div class=\"value\">" + DisplayBandwidth(oRow[sDataItem]) + "</div>");
+ } else {
+ sHTML = ("<div class=\"date\">" + oRow.dtDate.getDate() + "</div><div class=\"value\">" + NumberFormat(oRow[sDataItem], 0) + "</div>");
+ }
+ $("#calDay" + iDayNumber + "-" + iWeekNumber).html(sHTML).addClass("calDayPopulated");
+ }
+
+ // populate week totals
+ for (var iIndex = iFirstWeek; iIndex <= iLastWeek; iIndex++) {
+ if (aWeek[iIndex].iCount > 0) {
+ if (sDataItem == "iBW") {
+ $("#calTotWk" + iIndex).html("<div>" + DisplayBandwidth(aWeek[iIndex].iTotal) + "</div>");
+ $("#calAvgWk" + iIndex).html("<div>" + DisplayBandwidth(aWeek[iIndex].iTotal / aWeek[iIndex].iCount) + "</div>");
+ } else {
+ $("#calTotWk" + iIndex).html("<div>" + NumberFormat(aWeek[iIndex].iTotal, 0) + "</div>");
+ $("#calAvgWk" + iIndex).html("<div>" + NumberFormat((aWeek[iIndex].iTotal / aWeek[iIndex].iCount), 1) + "</div>");
+ }
+ }
+ }
+
+ // populate day totals
+ for (var iIndex = 0; iIndex < 7; iIndex++) {
+ if (aDay[iIndex].iCount > 0) {
+ if (sDataItem == "iBW") {
+ $("#calTotDay" + iIndex).html("<div>" + DisplayBandwidth(aDay[iIndex].iTotal) + "</div>");
+ $("#calAvgDay" + iIndex).html("<div>" + DisplayBandwidth(aDay[iIndex].iTotal / aDay[iIndex].iCount) + "</div>");
+ } else {
+ $("#calTotDay" + iIndex).html("<div>" + NumberFormat(aDay[iIndex].iTotal, 0) + "</div>");
+ $("#calAvgDay" + iIndex).html("<div>" + NumberFormat((aDay[iIndex].iTotal / aDay[iIndex].iCount), 1) + "</div>");
+ }
+ }
+ }
+
+ // fill in any remaining empty days
+ var dtThisDate = new Date(oRow.dtDate.getFullYear(), oRow.dtDate.getMonth(), (oRow.dtDate.getDate() + 1));
+ while (dtThisDate.getMonth() == dtLastDayOfMonth.getMonth()) {
+ $("#calDay" + dtThisDate.getDay() + "-" + getWeekNr(dtThisDate)).html("<div class=\"date\">" + dtThisDate.getDate() + "</div>").addClass("calDay");
+ dtThisDate.setDate(dtThisDate.getDate() + 1);
+ }
+
+ // populate month totals
+ if (sDataItem == "iBW") {
+ $("#calTotMonth").html("<div><span>" + Lang("Total") + ":</span> " + DisplayBandwidth(iTotal) + "</div>");
+ $("#calAvgMonth").html("<div><span>" + Lang("Average") + ":</span> " + DisplayBandwidth(iTotal / oRow.dtDate.getDate()) + "</div>");
+ } else {
+ $("#calTotMonth").html("<div><span>" + Lang("Total") + ":</span> " + NumberFormat(iTotal, 0) + "</div>");
+ $("#calAvgMonth").html("<div><span>" + Lang("Average") + ":</span> " + NumberFormat((iTotal / oRow.dtDate.getDate()), 1) + "</div>");
+ }
+
+ // draw graph
+ var aGraphItem = [Lang("Monday"), Lang("Tuesday"), Lang("Wednesday"), Lang("Thursday"), Lang("Friday"), Lang("Saturday"), Lang("Sunday")];
+ var aGraphValue = [SafeDivide(aDay[1].iTotal, aDay[1].iCount),
+ SafeDivide(aDay[2].iTotal, aDay[2].iCount),
+ SafeDivide(aDay[3].iTotal, aDay[3].iCount),
+ SafeDivide(aDay[4].iTotal, aDay[4].iCount),
+ SafeDivide(aDay[5].iTotal, aDay[5].iCount),
+ SafeDivide(aDay[6].iTotal, aDay[6].iCount),
+ SafeDivide(aDay[0].iTotal, aDay[0].iCount)];
+ DrawGraph(["","","","","","",""], aGraphValue, aGraphItem, "bar");
+}
+
+function PageLayout_AllMonths(sPage) {
+ var aTable = DrawTable_AllMonths(sPage);
+ switch (sPage) {
+ case "all":
+ var sHTML = "<h2>" + Lang("Visitors each Month") + "</h2>" +
+ DrawSubMenu("allmonths", "Visitors each Month") +
+ "<div id=\"graph\" class=\"graph\"> </div>";
+ break;
+ case "year":
+ var sHTML = "<h2>" + Lang("Visitors each Year") + "</h2>" +
+ DrawSubMenu("allmonths", "Visitors each Year");
+ break;
+ }
+ sHTML += "<div class=\"tableFull\">" + aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers:{1:{sorter:"commaNumber"},2:{sorter:"commaNumber"},3:{sorter:"commaNumber"},5:{sorter:"commaNumber"},6:{sorter:"commaNumber"},7:{sorter:'bandwidth'}},sortList: [[0,0]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ if (sPage == "all") {
+ DrawGraph_AllMonths();
+ }
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_Browser(sPage) {
+ var aTable = DrawTable_Browser(sPage);
+ switch (sPage) {
+ case "family":
+ var sHTML = "<h2>" + Lang("Browser Families") + "</h2>" +
+ DrawSubMenu("browser", "Browser Families") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ break;
+ case "all":
+ var sHTML = "<h2>" + Lang("All Browsers") + "</h2>" +
+ DrawSubMenu("browser", "All Browsers") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ break;
+ default:
+ var sHTML = "<h2>" + Lang("Browser Family") + ": " + gc_aBrowserFamilyCaption[sPage] + "</h2>" +
+ DrawSubMenu("browser", "") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ }
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers: { 0: { sorter: false }, 2:{sorter:"commaNumber"}, 3: { sorter: false } }, sortList: [[2,1]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawPie_Browser(sPage);
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_Country(sPage) {
+ switch (sPage) {
+ case "all":
+ var aTable = DrawTable_Country();
+ var sHTML = "<h2>" + Lang("Visitors by Country") + "</h2>" +
+ DrawSubMenu("country", "Countries") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" +
+ aTable[1] +
+ "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter( { headers: { 0:{sorter:false},2:{sorter:"commaNumber"},3:{sorter:false},4:{sorter:"commaNumber"},5:{sorter:false},6:{sorter:'bandwidth'},7:{sorter:false} }, sortList: [[2,1]], textExtraction:function(node){return node.innerHTML.replace(',','');}, widgets: ['zebra'] } );
+ }
+ DrawPie_Country();
+ break;
+ case "continent":
+ var sHTML = "<h2>" + Lang("Visitors by Continent") + "</h2>" +
+ DrawSubMenu("country", "Continents") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" +
+ DrawTable_CountryContinent() +
+ "</div>";
+ $("#content").html(sHTML);
+ $(".tablesorter").tablesorter( { headers: { 1:{sorter:"commaNumber"}, 2: { sorter: false }, 3:{sorter:"commaNumber"}, 4: { sorter: false },5:{sorter:'bandwidth'}, 6: { sorter: false } }, sortList: [[1,1]], textExtraction: function(node) { return node.innerHTML.replace(',', '');}, widgets: ['zebra'] } );
+ DrawPie_CountryContinent();
+ break;
+ default:
+ if (sPage == "Other") {
+ var sHTML = "<h2>" + Lang("Other Visitors") + "</h2>";
+ } else {
+ var sHTML = "<h2>" + Lang("Visitors from " + sPage) + "</h2>";
+ }
+ var aTable = DrawTable_Country(sPage);
+ sHTML += DrawSubMenu("country", sPage) +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" +
+ aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter( { headers: { 0:{sorter:false},2:{sorter:"commaNumber"},3:{sorter:false},4:{sorter:"commaNumber"},5:{sorter:false},6:{sorter:'bandwidth'},7:{sorter:false } }, sortList: [[2,1]], textExtraction: function(node) { return node.innerHTML.replace(',', '');}, widgets: ['zebra'] } );
+ }
+ DrawPie_Country(sPage);
+ break;
+ }
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_Filetypes() {
+ var aTable = DrawTable_Filetypes();
+ var sHTML = "<h2>" + Lang("Filetypes") + "</h2><div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers: { 2:{sorter:"commaNumber"}, 3: { sorter: false }, 4:{sorter:'bandwidth'}, 5: { sorter: false }, 6:{sorter:'bandwidth'} }, sortList: [[2,1]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawPie_Filetypes();
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_OperatingSystems(sPage) {
+ var aTable = DrawTable_OperatingSystems(sPage);
+ switch (sPage) {
+ case "family":
+ var sHTML = "<h2>" + Lang("Operating System Families") + "</h2>" +
+ DrawSubMenu("os", "Operating System Families") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ break;
+ case "all":
+ var sHTML = "<h2>" + Lang("Operating Systems") + "</h2>" +
+ DrawSubMenu("os", "All Operating Systems") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ break;
+ default:
+ var sHTML = "<h2>" + Lang("Operating System Family") + ": " + gc_aOSFamilyCaption[sPage] + "</h2>" +
+ DrawSubMenu("os", "") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ }
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers: { 0: { sorter: false }, 2: { sorter: "commaNumber" }, 3: { sorter: false }, 4: { sorter: false } }, sortList: [[2,1]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawPie_OperatingSystems(sPage);
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_PageRefs(sPage) {
+ switch (sPage) {
+ case "all":
+ var aTable = DrawTable_PageRefs("all");
+ var sHTML = "<h2>" + Lang("Referring Pages") + "</h2>" +
+ DrawSubMenu("pagerefs", "All Referrers") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ break;
+ case "domains":
+ var aTable = DrawTable_PageRefs("domains");
+ var sHTML = "<h2>" + Lang("Referring Domains") + "</h2>" +
+ DrawSubMenu("pagerefs", "Referring Domains") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ break;
+ case "top10":
+ var aTable = DrawTable_PageRefs("top10");
+ var sHTML = "<h2>" + Lang("Referring Pages") + "</h2>" +
+ DrawSubMenu("pagerefs", "Top 10 Referrers") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ break;
+ case "top50":
+ var aTable = DrawTable_PageRefs("top50");
+ var sHTML = "<h2>" + Lang("Referring Pages") + "</h2>" +
+ DrawSubMenu("pagerefs", "Top 50 Referrers") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ break;
+ }
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers: { 1:{sorter:"commaNumber"}, 2: { sorter: false }, 3:{sorter:"commaNumber"}, 4: { sorter: false } }, sortList: [[1,1]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawPie_PageRefs(sPage);
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_PageRefsSE() {
+ var aTable = DrawTable_PageRefsSE();
+ var sHTML = "<h2>" + Lang("Referring Search Engines") + "</h2>" +
+ DrawSubMenu("pagerefs", "Search Engines") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers: { 0: { sorter: false }, 2:{sorter:"commaNumber"}, 3: { sorter: false }, 4:{sorter:"commaNumber"}, 5: { sorter: false } }, sortList: [[2,1]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawPie_PageRefsSE();
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_Pages(sPage) {
+ // select data
+ switch (sPage) {
+ case "topBW":
+ var aData = oStatistics.oPages.aDataBW;
+ var aSort = [3,1];
+ var sSubMenu = "Top Bandwidth";
+ var iPieTotal = oStatistics.oPages.iTotalBW;
+ var sPieItem = "iBW";
+ break;
+ case "topEntry":
+ var aData = oStatistics.oPages.aDataEntry;
+ var aSort = [5,1];
+ var sSubMenu = "Top Entry Pages";
+ var iPieTotal = oStatistics.oPages.iTotalEntry;
+ var sPieItem = "iEntry";
+ break;
+ case "topExit":
+ var aData = oStatistics.oPages.aDataExit;
+ var aSort = [7,1];
+ var sSubMenu = "Top Exit Pages";
+ var iPieTotal = oStatistics.oPages.iTotalExit;
+ var sPieItem = "iExit";
+ break;
+ case "topPages":
+ var aData = oStatistics.oPages.aDataPages;
+ var aSort = [1,1];
+ var sSubMenu = "Top Page Views";
+ var iPieTotal = oStatistics.oPages.iTotalPages;
+ var sPieItem = "iPages";
+ break;
+ }
+
+ // create html
+ var aTable = DrawTable_Pages(aData);
+ var sHTML = "<h2>" + Lang("Page Views") + "</h2>" +
+ DrawSubMenu("pages", sSubMenu) +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers: { 2: { sorter: false }, 3:{sorter:'bandwidth'}, 4: { sorter: false }, 6: { sorter: false }, 8: { sorter: false } }, sortList: [aSort],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawPie_Pages(aData, iPieTotal, sPieItem);
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_Robots() {
+ var aTable = DrawTable_Robots();
+ var sHTML = "<h2>" + Lang("Visiting Spiders") + "</h2><div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers: { 1:{sorter:"commaNumber"}, 2: { sorter: false }, 3:{sorter:'bandwidth'}, 4: { sorter: false }, 6:{sorter:"commaNumber"}, 7: { sorter: false } }, sortList: [[1,1]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawPie_Robots();
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_Searches(sPage) {
+ switch (sPage) {
+ case "keyphrasecloud":
+ var sHTML = "<h2>" + Lang("Keyphrases Tag Cloud") + "</h2>" +
+ DrawSubMenu("searches", "Keyphrases Tag Cloud") +
+ "<div class=\"tagcloud\">" + TagCloud("sPhrase", oStatistics.oKeyphrases, 75) + "</div>";
+ $("#content").html(sHTML);
+ break;
+ case "keyphrases":
+ var sHTML = "<h2>" + Lang("Keyphrases") + "</h2>" +
+ DrawSubMenu("searches", "Keyphrases") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + Paging_Keyphrases() + "</div>";
+ $("#content").html(sHTML);
+ DrawPie_Keyphrases();
+ break;
+ case "keywordcloud":
+ var sHTML = "<h2>" + Lang("Keywords Tag Cloud") + "</h2>" +
+ DrawSubMenu("searches", "Keywords Tag Cloud") +
+ "<div class=\"tagcloud\">" + TagCloud("sWord", oStatistics.oKeywords, 150) + "</div>";
+ $("#content").html(sHTML);
+ break;
+ case "keywords":
+ var sHTML = "<h2>" + Lang("Keywords") + "</h2>" +
+ DrawSubMenu("searches", "Keywords") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + Paging_Keywords() + "</div>";
+ $("#content").html(sHTML);
+ DrawPie_Keywords();
+ break;
+ }
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_Session() {
+ var aTable = DrawTable_Session();
+ var sHTML = "<h2>" + Lang("Session Duration") + "</h2><div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ //$(".tablesorter").tablesorter({ headers: { 0: { sorter: false }, 1:{sorter:"commaNumber"}, 2: { sorter: false } }, sortList: [[1,1]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ $(".tablesorter").tablesorter({ headers: { 1:{sorter:"commaNumber"}, 2: { sorter: false } }, sortList: [[0,1]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawPie_Session();
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_Status(sPage) {
+ switch (sPage) {
+ case "404":
+ var aTable = DrawTable_Status404();
+ var sHTML = "<h2>" + Lang("HTTP Status Codes") + ": 404s</h2>" +
+ DrawSubMenu("status", "File Not Found URLs") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers: { 1: { sorter: "commaNumber" } }, sortList: [[1,1]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawPie_Status404(sPage);
+ break;
+ default:
+ var aTable = DrawTable_Status();
+ var sHTML = "<h2>" + Lang("HTTP Status Codes") + "</h2>" +
+ DrawSubMenu("status", "Status Codes") +
+ "<div id=\"pie\" class=\"pie\"> </div><div class=\"tablePie\">" + aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers: { 2: { sorter: "commaNumber" }, 3:{ sorter: false }, 4: { sorter: "bandwidth" }, 5: { sorter: false } }, sortList: [[2,1]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawPie_Status(sPage);
+ }
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_ThisMonth(sPage) {
+ switch (sPage) {
+ case "all":
+ var aTable = DrawTable_ThisMonth();
+ var sHTML = "<h2>" + Lang("Visitors this Month") + "</h2>" +
+ DrawSubMenu("thismonth", "Overview") +
+ "<div id=\"graph\" class=\"graph\"> </div><div class=\"tableFull\">" + aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers:{ 2:{sorter:"commaNumber"},3:{sorter:"commaNumber"},5:{sorter:"commaNumber"},7:{sorter:"bandwidth"},8:{sorter:"bandwidth"}},sortList:[[1,0]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawGraph_ThisMonth();
+ break;
+ case "bandwidth":
+ Misc_ThisMonthCalendar("Calendar of Bandwidth Usage this Month", "Calendar of Bandwidth Usage", "iBW");
+ break;
+ case "hits":
+ Misc_ThisMonthCalendar("Calendar of Hits this Month", "Calendar of Hits", "iHits");
+ break;
+ case "pages":
+ Misc_ThisMonthCalendar("Calendar of Page Views this Month", "Calendar of Page Views", "iPages");
+ break;
+ case "visits":
+ Misc_ThisMonthCalendar("Calendar of Visitors this Month", "Calendar of Visitors", "iVisits");
+ break;
+ }
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PageLayout_Time(sPage) {
+ var aTable = DrawTable_Time(sPage);
+ var sHTML = "<h2>" + Lang("Visitors over 24 Hours") + "</h2>" +
+ "<div id=\"graph\" class=\"graph\"> </div>" +
+ "<div class=\"tableFull\">" + aTable[1] + "</div>";
+ $("#content").html(sHTML);
+ if (aTable[0] == true) {
+ $(".tablesorter").tablesorter({ headers:{1:{sorter:"commaNumber"},2:{sorter:false},3:{sorter:false},4:{sorter:"commaNumber"},5:{sorter:false},6:{sorter:false},7:{sorter:'bandwidth'},8:{sorter:false},9:{sorter:false},10:{sorter:"commaNumber"},11:{sorter:"commaNumber"},12:{sorter:'bandwidth'}},sortList: [[0,0]],textExtraction:function(node){return node.innerHTML.replace(',', '');}, widgets: ['zebra'] });
+ }
+ DrawGraph_Time();
+ $("#content").fadeIn(g_iFadeSpeed);
+}
+
+function PagingInputNumber(oEvent, oInput, sType) {
+ var iCode = (oEvent.charCode || oEvent.keyCode);
+ if (iCode == 13) {
+ var iValue = parseFloat($(oInput).val());
+ if (isNaN(iValue) == true) { return false; }
+ if (iValue < 1) { return false; }
+ if (iValue != Math.round(iValue)) { return false; }
+ switch (sType) {
+ case "keyphrases":
+ if (iValue > (Math.floor((oStatistics.oKeyphrases.aData.length - 1) / oPaging.oKeyphrases.iRowsPerPage) + 1)) { return false; }
+ RedrawTable_Keyphrases("iCurrPage", (iValue - 1));
+ break;
+ case "keywords":
+ if (iValue > (Math.floor((oStatistics.oKeywords.aData.length - 1) / oPaging.oKeywords.iRowsPerPage) + 1)) { return false; }
+ RedrawTable_Keywords("iCurrPage", (iValue - 1));
+ break;
+ }
+ }
+ if ((iCode == 8) || (iCode == 9) || ((iCode > 34) && (iCode < 38)) || (iCode == 39) || (iCode == 46) || ((iCode > 47) && (iCode < 58))) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function Paging_Keyphrases() {
+ // get values
+ iTotalFreq = oStatistics.oKeyphrases.iTotalFreq;
+ switch (oPaging.oKeyphrases.sSort) {
+ case "freqASC":
+ var sKeyphraseClass = "";
+ var sFrequencyClass = " headerSortDown";
+ var sKeyphraseSort = "wordDESC";
+ var sFrequencySort = "freqDESC";
+ var aData = oStatistics.oKeyphrases.aData;
+ var iDisplayOrder = -1;
+ break;
+ case "freqDESC":
+ var sKeyphraseClass = "";
+ var sFrequencyClass = " headerSortUp";
+ var sKeyphraseSort = "wordDESC";
+ var sFrequencySort = "freqASC";
+ var aData = oStatistics.oKeyphrases.aData;
+ var iDisplayOrder = 1;
+ break;
+ case "wordASC":
+ var sKeyphraseClass = " headerSortDown";
+ var sFrequencyClass = "";
+ var sKeyphraseSort = "wordDESC";
+ var sFrequencySort = "freqDESC";
+ var aData = oStatistics.oKeyphrasesAlphabetical.aData;
+ var iDisplayOrder = -1;
+ break;
+ case "wordDESC":
+ var sKeyphraseClass = " headerSortUp";
+ var sFrequencyClass = "";
+ var sKeyphraseSort = "wordASC";
+ var sFrequencySort = "freqDESC";
+ var aData = oStatistics.oKeyphrasesAlphabetical.aData;
+ var iDisplayOrder = 1;
+ break;
+ }
+
+ // create header
+ var sDesc = (Lang("Showing [START] to [END] of [TOTAL] keyphrases")).replace("[TOTAL]", aData.length);
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th class=\"header" + sKeyphraseClass + "\" onclick=\"RedrawTable_Keyphrases('sSort', '" + sKeyphraseSort + "')\" width=\"80%\">" + Lang("Keyphrase") + "</th>" +
+ "<th class=\"header" + sFrequencyClass + "\" onclick=\"RedrawTable_Keyphrases('sSort', '" + sFrequencySort + "')\" width=\"10%\">" + Lang("Frequency") + "</th>" +
+ "<th class=\"noborder\" width=\"10%\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ if (iDisplayOrder == 1) {
+ var iStart = (oPaging.oKeyphrases.iCurrPage * oPaging.oKeyphrases.iRowsPerPage);
+ var iEnd = (iStart + oPaging.oKeyphrases.iRowsPerPage);
+ if (iEnd > aData.length) {
+ iEnd = aData.length;
+ }
+ sDesc = sDesc.replace("[START]", iStart + 1).replace("[END]", iEnd);
+ for (var i = iStart; i < iEnd; i++) {
+ aHTML.push(((i % 2 == 0) ? "<tr>" : "<tr class=\"odd\">") +
+ "<td>" + aData[i].sPhrase + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[i].iFreq, 0) + "</td>" +
+ "<td class=\"noborder right\">" + ((aData[i].iFreq / iTotalFreq) * 100).toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+ } else {
+ if (aData.length > 0) {
+ var iStart = (aData.length - 1) - (oPaging.oKeyphrases.iCurrPage * oPaging.oKeyphrases.iRowsPerPage);
+ var iEnd = (iStart - oPaging.oKeyphrases.iRowsPerPage);
+ if (iEnd < -1) {
+ iEnd = -1;
+ }
+ sDesc = sDesc.replace("[START]", iStart + 1).replace("[END]", iEnd + 2);
+ for (var i = iStart; i > iEnd; i--) {
+ aHTML.push(((i % 2 == 0) ? "<tr>" : "<tr class=\"odd\">") +
+ "<td>" + aData[i].sPhrase + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[i].iFreq, 0) + "</td>" +
+ "<td class=\"noborder right\">" + ((aData[i].iFreq / iTotalFreq) * 100).toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+ }
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ var iMaxPage = Math.floor((aData.length - 1) / oPaging.oKeyphrases.iRowsPerPage);
+ var sNavigation = "<div id=\"paging\"><span>" + sDesc + "</span>";
+ if (oPaging.oKeyphrases.iCurrPage > 0) {
+ sNavigation += "<img src=\"themes/" + sThemeDir + "/paging/first.gif\" onmouseover=\"this.src='themes/" + sThemeDir + "/paging/first_on.gif'\" onmouseout=\"this.src='themes/" + sThemeDir + "/paging/first.gif'\" style=\"cursor: pointer;\" onclick=\"RedrawTable_Keyphrases('iCurrPage', 0)\" />" +
+ "<img src=\"themes/" + sThemeDir + "/paging/prev.gif\" onmouseover=\"this.src='themes/" + sThemeDir + "/paging/prev_on.gif'\" onmouseout=\"this.src='themes/" + sThemeDir + "/paging/prev.gif'\" style=\"cursor: pointer;\" onclick=\"RedrawTable_Keyphrases('iCurrPage', " + (oPaging.oKeyphrases.iCurrPage - 1) + ")\" />";
+ } else {
+ sNavigation += "<img src=\"themes/" + sThemeDir + "/paging/first_off.gif\" />" +
+ "<img src=\"themes/" + sThemeDir + "/paging/prev_off.gif\" />";
+ }
+ sNavigation += "<span><input type=\"text\" value=\"" + (oPaging.oKeyphrases.iCurrPage + 1) + "\" onkeypress=\"return PagingInputNumber(event, this, 'keyphrases');\" />" + " / " + (iMaxPage + 1) + "</span>";
+ if (oPaging.oKeyphrases.iCurrPage < iMaxPage) {
+ sNavigation += "<img src=\"themes/" + sThemeDir + "/paging/next.gif\" onmouseover=\"this.src='themes/" + sThemeDir + "/paging/next_on.gif'\" onmouseout=\"this.src='themes/" + sThemeDir + "/paging/next.gif'\" style=\"cursor: pointer;\" onclick=\"RedrawTable_Keyphrases('iCurrPage', " + (oPaging.oKeyphrases.iCurrPage + 1) + ")\" />" +
+ "<img src=\"themes/" + sThemeDir + "/paging/last.gif\" onmouseover=\"this.src='themes/" + sThemeDir + "/paging/last_on.gif'\" onmouseout=\"this.src='themes/" + sThemeDir + "/paging/last.gif'\" style=\"cursor: pointer;\" onclick=\"RedrawTable_Keyphrases('iCurrPage', " + iMaxPage + ")\" />";
+ } else {
+ sNavigation += "<img src=\"themes/" + sThemeDir + "/paging/next_off.gif\" />" +
+ "<img src=\"themes/" + sThemeDir + "/paging/last_off.gif\" />";
+ }
+ sNavigation += "</div>";
+ return (sHTML + aHTML.join("\n") + "</tbody></table>" + sNavigation);
+ } else {
+ return (sHTML + "<tr><td class=\"center\" colspan=\"3\">" + Lang("There is no data to display") + "</td></tr></tbody></table>");
+ }
+}
+
+function Paging_Keywords() {
+ // get values
+ iTotalFreq = oStatistics.oKeywords.iTotalFreq;
+ switch (oPaging.oKeywords.sSort) {
+ case "freqASC":
+ var sKeywordClass = "";
+ var sFrequencyClass = " headerSortDown";
+ var sKeywordSort = "wordDESC";
+ var sFrequencySort = "freqDESC";
+ var aData = oStatistics.oKeywords.aData;
+ var iDisplayOrder = -1;
+ break;
+ case "freqDESC":
+ var sKeywordClass = "";
+ var sFrequencyClass = " headerSortUp";
+ var sKeywordSort = "wordDESC";
+ var sFrequencySort = "freqASC";
+ var aData = oStatistics.oKeywords.aData;
+ var iDisplayOrder = 1;
+ break;
+ case "wordASC":
+ var sKeywordClass = " headerSortDown";
+ var sFrequencyClass = "";
+ var sKeywordSort = "wordDESC";
+ var sFrequencySort = "freqDESC";
+ var aData = oStatistics.oKeywordsAlphabetical.aData;
+ var iDisplayOrder = -1;
+ break;
+ case "wordDESC":
+ var sKeywordClass = " headerSortUp";
+ var sFrequencyClass = "";
+ var sKeywordSort = "wordASC";
+ var sFrequencySort = "freqDESC";
+ var aData = oStatistics.oKeywordsAlphabetical.aData;
+ var iDisplayOrder = 1;
+ break;
+ }
+
+ // create header
+ var sDesc = (Lang("Showing [START] to [END] of [TOTAL] keywords")).replace("[TOTAL]", aData.length);
+ var sHTML = "<table class=\"tablesorter\" cellspacing=\"0\">\n" +
+ "<thead><tr>" +
+ "<th class=\"header" + sKeywordClass + "\" onclick=\"RedrawTable_Keywords('sSort', '" + sKeywordSort + "')\" width=\"80%\">" + Lang("Keyword") + "</th>" +
+ "<th class=\"header" + sFrequencyClass + "\" onclick=\"RedrawTable_Keywords('sSort', '" + sFrequencySort + "')\" width=\"10%\">" + Lang("Frequency") + "</th>" +
+ "<th class=\"noborder\" width=\"10%\"> </th>" +
+ "</tr></thead>\n" +
+ "<tbody>";
+
+ // create table body
+ aHTML = new Array();
+ if (iDisplayOrder == 1) {
+ var iStart = (oPaging.oKeywords.iCurrPage * oPaging.oKeywords.iRowsPerPage);
+ var iEnd = (iStart + oPaging.oKeywords.iRowsPerPage);
+ if (iEnd > aData.length) {
+ iEnd = aData.length;
+ }
+ sDesc = sDesc.replace("[START]", iStart + 1).replace("[END]", iEnd);
+ for (var i = iStart; i < iEnd; i++) {
+ aHTML.push(((i % 2 == 0) ? "<tr>" : "<tr class=\"odd\">") +
+ "<td>" + aData[i].sWord + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[i].iFreq, 0) + "</td>" +
+ "<td class=\"noborder right\">" + ((aData[i].iFreq / iTotalFreq) * 100).toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+ } else {
+ if (aData.length > 0) {
+ var iStart = (aData.length - 1) - (oPaging.oKeywords.iCurrPage * oPaging.oKeywords.iRowsPerPage);
+ var iEnd = (iStart - oPaging.oKeywords.iRowsPerPage);
+ if (iEnd < -1) {
+ iEnd = -1;
+ }
+ sDesc = sDesc.replace("[START]", iStart + 1).replace("[END]", iEnd + 2);
+ for (var i = iStart; i > iEnd; i--) {
+ aHTML.push(((i % 2 == 0) ? "<tr>" : "<tr class=\"odd\">") +
+ "<td>" + aData[i].sWord + "</td>" +
+ "<td class=\"right\">" + NumberFormat(aData[i].iFreq, 0) + "</td>" +
+ "<td class=\"noborder right\">" + ((aData[i].iFreq / iTotalFreq) * 100).toFixed(1) + "%</td>" +
+ "</tr>\n");
+ }
+ }
+ }
+
+ // output
+ if (aHTML.length > 0) {
+ var iMaxPage = Math.floor((aData.length - 1) / oPaging.oKeywords.iRowsPerPage);
+ var sNavigation = "<div id=\"paging\"><span>" + sDesc + "</span>";
+ if (oPaging.oKeywords.iCurrPage > 0) {
+ sNavigation += "<img src=\"themes/" + sThemeDir + "/paging/first.gif\" onmouseover=\"this.src='themes/" + sThemeDir + "/paging/first_on.gif'\" onmouseout=\"this.src='themes/" + sThemeDir + "/paging/first.gif'\" style=\"cursor: pointer;\" onclick=\"RedrawTable_Keywords('iCurrPage', 0)\" />" +
+ "<img src=\"themes/" + sThemeDir + "/paging/prev.gif\" onmouseover=\"this.src='themes/" + sThemeDir + "/paging/prev_on.gif'\" onmouseout=\"this.src='themes/" + sThemeDir + "/paging/prev.gif'\" style=\"cursor: pointer;\" onclick=\"RedrawTable_Keywords('iCurrPage', " + (oPaging.oKeywords.iCurrPage - 1) + ")\" />";
+ } else {
+ sNavigation += "<img src=\"themes/" + sThemeDir + "/paging/first_off.gif\" />" +
+ "<img src=\"themes/" + sThemeDir + "/paging/prev_off.gif\" />";
+ }
+ sNavigation += "<span><input type=\"text\" value=\"" + (oPaging.oKeywords.iCurrPage + 1) + "\" onkeypress=\"return PagingInputNumber(event, this, 'keywords');\" />" + " / " + (iMaxPage + 1) + "</span>";
+ if (oPaging.oKeywords.iCurrPage < iMaxPage) {
+ sNavigation += "<img src=\"themes/" + sThemeDir + "/paging/next.gif\" onmouseover=\"this.src='themes/" + sThemeDir + "/paging/next_on.gif'\" onmouseout=\"this.src='themes/" + sThemeDir + "/paging/next.gif'\" style=\"cursor: pointer;\" onclick=\"RedrawTable_Keywords('iCurrPage', " + (oPaging.oKeywords.iCurrPage + 1) + ")\" />" +
+ "<img src=\"themes/" + sThemeDir + "/paging/last.gif\" onmouseover=\"this.src='themes/" + sThemeDir + "/paging/last_on.gif'\" onmouseout=\"this.src='themes/" + sThemeDir + "/paging/last.gif'\" style=\"cursor: pointer;\" onclick=\"RedrawTable_Keywords('iCurrPage', " + iMaxPage + ")\" />";
+ } else {
+ sNavigation += "<img src=\"themes/" + sThemeDir + "/paging/next_off.gif\" />" +
+ "<img src=\"themes/" + sThemeDir + "/paging/last_off.gif\" />";
+ }
+ sNavigation += "</div>";
+ return (sHTML + aHTML.join("\n") + "</tbody></table>" + sNavigation);
+ } else {
+ return (sHTML + "<tr><td class=\"center\" colspan=\"3\">" + Lang("There is no data to display") + "</td></tr></tbody></table>");
+ }
+}
+
+function PopulateData_AllMonths(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oAM = { "aData":[], "aYearDayCount":[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("ALLMONTHS"),
+ success: function(oXML){
+ // CheckLastUpdate(oXML); disabled until update problem is fixed. only affects this call.
+
+ var aTemp = [];
+ var iCurrentYear = 0;
+ $(oXML).find('month').each(function() {
+ dtTemp = new Date(parseInt($(this).attr("year")), (parseInt($(this).attr("month")) - 1), 1);
+
+ // days in month
+ iDaysInMonth = parseFloat($(this).attr("daysinmonth"));
+
+ // push items onto array
+ aTemp.push({ "dtDate" : new Date(dtTemp.getFullYear(), dtTemp.getMonth(), 1),
+ "iMonth" : $(this).attr("month"),
+ "iYear" : $(this).attr("year"),
+ "iDaysInMonth" : iDaysInMonth,
+ "iVisits" : $(this).attr("visits"),
+ "iUniques" : $(this).attr("uniques"),
+ "iPages" : $(this).attr("pages"),
+ "iHits" : $(this).attr("hits"),
+ "iBW" : $(this).attr("bw"),
+ "iDaysInMonth" : iDaysInMonth
+ });
+
+ // count days in year
+ if (iCurrentYear != dtTemp.getFullYear()) {
+ iCurrentYear = dtTemp.getFullYear();
+ oAM.aYearDayCount[iCurrentYear] = iDaysInMonth;
+ } else {
+ oAM.aYearDayCount[iCurrentYear] += iDaysInMonth;
+ }
+ });
+
+ // apply data
+ oAM.aData = aTemp;
+ oStatistics.oAllMonths = oAM;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_Browser(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oB = { "iTotalHits":0, "aData":[], "aFamily":[] };
+
+ // pre-populate browser families
+ oB.aFamily = gc_aBrowserFamily;
+
+ // do ajax call
+ $.ajax({
+ type: "GET",
+ url: XMLURL("BROWSER"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ var sBrowser = $(this).attr("id");
+ var iHits = parseInt($(this).attr("hits"));
+
+ // find family browser belongs to
+ var bFamilyFound = false;
+ var sFamily = "";
+ for (var iRow in oB.aFamily) {
+ if (sBrowser.substr(0, oB.aFamily[iRow].sBrowser.length) == oB.aFamily[iRow].sBrowser) {
+ // change name
+ sBrowser = sBrowser.substr(oB.aFamily[iRow].sBrowser.length);
+ sBrowser = (gc_aBrowserFamilyCaption[oB.aFamily[iRow].sBrowser] + " " + sBrowser);
+
+ // add totals
+ oB.aFamily[iRow].iHits += iHits;
+ sFamily = oB.aFamily[iRow].sBrowser;
+ bFamilyFound = true;
+ break;
+ }
+ }
+ if (bFamilyFound != true) {
+ oB.aFamily[oB.aFamily.length - 1].iHits += iHits;
+ sFamily = "Other Browsers";
+ }
+
+ // increment totals
+ oB.iTotalHits += iHits;
+
+ // populate array
+ oB.aData.push({ "sBrowser":sBrowser,
+ "iHits":iHits,
+ "sFamily":sFamily });
+ });
+
+ // apply data
+ oB.aData.sort(Sort_Hits);
+ oB.aFamily.sort(Sort_Hits);
+ oStatistics.oBrowser = oB;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_Country(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oC = { "bPopulated":false, "iTotalPages":0, "iTotalHits":0, "iTotalBW":0, "aData":[] };
+ oC.oContinent = { "Africa":{}, "Antartica":{}, "Asia":{}, "Europe":{}, "North America":{}, "Oceania":{}, "South America":{}, "Other":{} };
+ for (var sContinent in oC.oContinent) {
+ oC.oContinent[sContinent] = { "iTotalPages":0, "iTotalHits":0, "iTotalBW":0 };
+ }
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("DOMAIN"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sCountryCode = $(this).attr("id");
+ var sCountryName = gc_aCountryName[sCountryCode];
+ if (typeof gc_aCountryName[sCountryCode] == "undefined") {
+ sCountryName = ("Unknown (code: " + sCountryCode.toUpperCase() + ")");
+ }
+ var sContinent = gc_aCountryContinent[sCountryCode];
+ if (typeof gc_aContinents[sContinent] == "undefined") {
+ sContinent = "Other";
+ }
+ var iPages = parseInt($(this).attr("pages"));
+ var iHits = parseInt($(this).attr("hits"));
+ var iBW = parseInt($(this).attr("bw"));
+
+ // increment totals
+ oC.iTotalPages += iPages;
+ oC.iTotalHits += iHits;
+ oC.iTotalBW += iBW;
+ oC.oContinent[sContinent].iTotalPages += iPages;
+ oC.oContinent[sContinent].iTotalHits += iHits;
+ oC.oContinent[sContinent].iTotalBW += iBW;
+
+ // populate array
+ oC.aData.push({ "sCountryCode":sCountryCode,
+ "sCountryName":sCountryName,
+ "sContinent":sContinent,
+ "iPages":iPages,
+ "iHits":iHits,
+ "iBW":iBW } );
+ });
+
+ // apply data
+ oC.aData.sort(Sort_Pages);
+ oStatistics.oCountry = oC;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_Filetypes(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oF = { "iTotalHits":0, "iTotalBW":0, "iTotalNonCompBW":0, "iTotalCompBW":0, "aData":[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("FILETYPES"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sFiletype = $(this).attr("id");
+ var sDescription = gc_aFiletypeDesc[sFiletype];
+ if (typeof gc_aFiletypeDesc[sFiletype] == "undefined") {
+ sDescription = " ";
+ }
+ if (sFiletype == "Unknown") {
+ sFiletype = " ";
+ sDescription = "Unknown";
+ }
+ var iHits = parseInt($(this).attr("hits"));
+ var iBW = parseInt($(this).attr("bw"));
+ var iNonCompBW = parseInt($(this).attr("noncompressedbw"));
+ var iCompBW = parseInt($(this).attr("compressedbw"));
+
+ // increment totals
+ oF.iTotalHits += iHits;
+ oF.iTotalBW += iBW;
+ oF.iTotalNonCompBW += iNonCompBW;
+ oF.iTotalCompBW += iCompBW;
+
+ // populate array
+ oF.aData.push({ "sFiletype":sFiletype,
+ "sDescription":sDescription,
+ "iHits":iHits,
+ "iBW":iBW,
+ "iNonCompBW":iNonCompBW,
+ "iCompBW":iCompBW } );
+ });
+
+ // apply data
+ oF.aData.sort(Sort_Hits);
+ oStatistics.oFiletypes = oF;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_Keyphrases(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oKP = { iMaxFreq: 0, iTotalFreq:0, aData:[] };
+ var oKPAlpha = { aData:[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("SEARCHWORDS"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sPhrase = $(this).attr("phrase").split("+").join(" ").split("%").join("%​");
+ var iFreq = parseInt($(this).attr("freq"));
+
+ // increment totals
+ oKP.iTotalFreq += iFreq;
+ if (iFreq > oKP.iMaxFreq) {
+ oKP.iMaxFreq = iFreq;
+ }
+ // populate array
+ oKP.aData.push({ "sPhrase" : sPhrase,
+ "iFreq" : iFreq } );
+ oKPAlpha.aData.push({ sWord : sPhrase,
+ iFreq : iFreq } );
+ });
+
+ // apply data
+ oKP.aData.sort(Sort_Freq);
+ oKPAlpha.aData.sort(Sort_Phrase);
+ oStatistics.oKeyphrases = oKP;
+ oStatistics.oKeyphrasesAlphabetical = oKPAlpha;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_Keywords(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oKW = { iMaxFreq: 0, iTotalFreq:0, aData:[] };
+ var oKWAlpha = { aData:[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("KEYWORDS"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sWord = $(this).attr("word").split("%").join("%​");
+ var iFreq = parseInt($(this).attr("freq"));
+
+ // increment totals
+ oKW.iTotalFreq += iFreq;
+ if (iFreq > oKW.iMaxFreq) {
+ oKW.iMaxFreq = iFreq;
+ }
+
+ // populate array
+ oKW.aData.push({ sWord : sWord,
+ iFreq : iFreq } );
+ oKWAlpha.aData.push({ sWord : sWord,
+ iFreq : iFreq } );
+ });
+
+ // apply data
+ oKW.aData.sort(Sort_Freq);
+ oKWAlpha.aData.sort(Sort_Word);
+ oStatistics.oKeywords = oKW;
+ oStatistics.oKeywordsAlphabetical = oKWAlpha;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_OperatingSystems(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oOS = { "iTotalHits":0, "aData":[], "aFamily":[] };
+
+ // pre-populate browser families
+ oOS.aFamily = gc_aOSFamily;
+
+ // do ajax call
+ $.ajax({
+ type: "GET",
+ url: XMLURL("OS"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ var sOperatingSystem = $(this).attr("id");
+ var iHits = parseInt($(this).attr("hits"));
+
+ // find family OS belongs to
+ var bFamilyFound = false;
+ var sFamily = "";
+ for (var iRow in oOS.aFamily) {
+ if (sOperatingSystem.substr(0, oOS.aFamily[iRow].sOperatingSystem.length) == oOS.aFamily[iRow].sOperatingSystem) {
+ // change name
+ sOperatingSystem = sOperatingSystem.substr(oOS.aFamily[iRow].sOperatingSystem.length);
+ switch (oOS.aFamily[iRow].sOperatingSystem) {
+ case "mac":
+ sOperatingSystem = (sOperatingSystem.substr(0, 1).toUpperCase() + sOperatingSystem.substr(1));
+ switch (sOperatingSystem) {
+ case "Intosh":
+ sOperatingSystem = "Macintosh";
+ break;
+ case "Osx":
+ sOperatingSystem = "OSX";
+ break;
+ }
+ break;
+ case "sun":
+ case "win":
+ sOperatingSystem = sOperatingSystem.toUpperCase();
+ break;
+ default:
+ sOperatingSystem = (sOperatingSystem.substr(0, 1).toUpperCase() + sOperatingSystem.substr(1));
+ }
+ sOperatingSystem = (gc_aOSFamilyCaption[oOS.aFamily[iRow].sOperatingSystem] + " " + sOperatingSystem);
+
+ // add totals
+ oOS.aFamily[iRow].iHits += iHits;
+ sFamily = oOS.aFamily[iRow].sOperatingSystem;
+ bFamilyFound = true;
+ break;
+ }
+ }
+ if (bFamilyFound != true) {
+ oOS.aFamily[oOS.aFamily.length - 1].iHits += iHits;
+ sFamily = "Other OS";
+ }
+
+ // increment totals
+ oOS.iTotalHits += iHits;
+
+ // populate array
+ oOS.aData.push({ "sOperatingSystem":sOperatingSystem,
+ "iHits":iHits,
+ "sFamily":sFamily });
+ });
+
+ // apply data
+ oOS.aData.sort(Sort_Hits);
+ oOS.aFamily.sort(Sort_Hits);
+ oStatistics.oOperatingSystems = oOS;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_PageRefs(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oPR = { "iTotalPages":0, "iTotalHits":0, "aData":[], "aDataDomain":[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("PAGEREFS"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sReferrer = $(this).attr("url");
+ var iPages = parseInt($(this).attr("pages"));
+ var iHits = parseInt($(this).attr("hits"));
+
+ // increment totals
+ oPR.iTotalPages += iPages;
+ oPR.iTotalHits += iHits;
+
+ // populate array
+ oPR.aData.push({ "sURL" : sReferrer,
+ "sVisibleURL" : sReferrer.split("/").join("​/").split("-").join("-​").split("_").join("_​"),
+ "iPages" : iPages,
+ "iHits" : iHits } );
+
+ // populate domain array
+ var aTemp = sReferrer.split("/");
+ var sDomain = (aTemp[0] + "//" + aTemp[2]);
+ var sVisibleDomain = aTemp[2].replace(/^www./, "");
+ $bExists = false;
+ for (var iRow in oPR.aDataDomain) {
+ if (oPR.aDataDomain[iRow].sVisibleURL == sVisibleDomain) {
+ oPR.aDataDomain[iRow].iPages += iPages;
+ oPR.aDataDomain[iRow].iHits += iHits;
+ $bExists = true;
+ break
+ }
+ }
+ if ($bExists != true) {
+ oPR.aDataDomain.push({ "sURL" : sDomain,
+ "sVisibleURL" : aTemp[2].replace(/^www./, ""),
+ "iPages" : iPages,
+ "iHits" : iHits });
+ }
+ });
+
+ // apply data
+ oPR.aData.sort(Sort_Pages);
+ oStatistics.oPageRefs = oPR;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_PageRefsSE() {
+ $("#loading").show();
+
+ // create data objects
+ var oPR = { "iTotalPages":0, "iTotalHits":0, "aData":[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("SEREFERRALS"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sReferrer = $(this).attr("id");
+ var sURL = sReferrer;
+ var sImage = " ";
+ var iPages = parseInt($(this).attr("pages"));
+ var iHits = parseInt($(this).attr("hits"));
+
+ // find if exists in array
+ for (var i = 0; i < gc_aSearchEngines.length; i++) {
+ if (gc_aSearchEngines[i].sCode == sReferrer) {
+ sReferrer = gc_aSearchEngines[i].sName;
+ sURL = gc_aSearchEngines[i].sURL;
+ sImage = "<img src=\"themes/" + sThemeDir + "/searchengines/" + gc_aSearchEngines[i].sImage + ".gif\" alt=\"" + sReferrer + "\" />";
+ break;
+ }
+ }
+
+ // increment totals
+ oPR.iTotalPages += iPages;
+ oPR.iTotalHits += iHits;
+
+ // populate array
+ oPR.aData.push({ "sReferrer" : sReferrer,
+ "sURL" : sURL,
+ "sImage" : sImage,
+ "iPages" : iPages,
+ "iHits" : iHits } );
+ });
+
+ // apply data
+ oPR.aData.sort(Sort_Pages);
+ oStatistics.oPageRefsSE = oPR;
+ $("#loading").hide();
+ DrawPage("pagerefs.se");
+ }
+ });
+}
+
+function PopulateData_Pages(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oP = { iTotalPages:0, iTotalBW:0, iTotalEntry:0, iTotalExit:0, aDataPages:[], aDataBW:[], aDataEntry:[], aDataExit:[] };
+
+ // do ajax call
+ $.ajax({
+ type: "GET",
+ url: XMLURL("PAGES"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ // retrieve totals
+ var oXMLTotals = $(oXML).find("totals");
+ oP.iTotalPages = parseInt(oXMLTotals.attr("pages"));
+ oP.iTotalBW = parseInt(oXMLTotals.attr("bw"));
+ oP.iTotalEntry = parseInt(oXMLTotals.attr("entry"));
+ oP.iTotalExit = parseInt(oXMLTotals.attr("exit"));
+
+ // extract data blocks
+ oP.aDataPages = ExtractData($(oXML).find('data_pages'));
+ oP.aDataBW = ExtractData($(oXML).find('data_bw'));
+ oP.aDataEntry = ExtractData($(oXML).find('data_entry'));
+ oP.aDataExit = ExtractData($(oXML).find('data_exit'));
+
+ // apply data
+ oStatistics.oPages = oP;
+ $("#loading").hide();
+ DrawPage(sPage);
+
+ function ExtractData(oXMLBlock) {
+ var aData = [];
+
+ $(oXMLBlock).find('item').each(function() {
+ aData.push({ "sURL" : $(this).attr("url"),
+ "iPages" : parseInt($(this).attr("pages")),
+ "iBW" : parseInt($(this).attr("bw")),
+ "iEntry" : parseInt($(this).attr("entry")),
+ "iExit" : parseInt($(this).attr("exit")) });
+ });
+
+ return aData;
+ }
+ }
+ });
+}
+
+function PopulateData_Robots(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oR = { "iTotalHits":0, "iTotalBW":0, "dtLastVisit":0, "iTotalRobotsTXT":0, "aData":[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("ROBOT"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sRobot = $(this).attr("id");
+ var iHits = parseInt($(this).attr("hits"));
+ var iBW = parseInt($(this).attr("bw"));
+ var dtLastVisit = parseInt($(this).attr("lastvisit"));
+ var iRobotsTXT = parseInt($(this).attr("robotstxt"));
+
+ // increment totals
+ oR.iTotalHits += iHits;
+ oR.iTotalBW += iBW;
+ oR.iTotalRobotsTXT += iRobotsTXT;
+
+ // populate array
+ oR.aData.push({ "sRobot":sRobot,
+ "iHits":iHits,
+ "iBW":iBW,
+ "dtLastVisit":dtLastVisit,
+ "iRobotsTXT":iRobotsTXT } );
+ });
+
+ // apply data
+ oStatistics.oRobots = oR;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_Session() {
+ $("#loading").show();
+
+ // create data objects
+ var oS = { "iTotalFreq":0, "aData":{s1h:0, s5mn15mn:0, s15mn30mn:0, s30s2mn:0, s0s30s:0, s2mn5mn:0, s30mn1h:0 } };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("SESSION"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sRange = ("s" + $(this).attr("range").replace("+", "").replace("-", ""));
+ oS.aData[sRange] = parseInt($(this).attr("freq"));
+
+ // increment totals
+ oS.iTotalFreq += oS.aData[sRange];
+ });
+
+ // apply data
+ oStatistics.oSession = oS;
+ $("#loading").hide();
+ DrawPage("session");
+ }
+ });
+}
+
+function PopulateData_Status(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oS = { "iTotalHits":0, "iTotalBW":0, "aData":[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("ERRORS"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sCode = $(this).attr("id");
+ var sDescription = gc_aHTTPStatus[sCode];
+ if (typeof gc_aHTTPStatus[sCode] == "undefined") {
+ sDescription = " ";
+ }
+ var iHits = parseInt($(this).attr("hits"));
+ var iBW = parseInt($(this).attr("bw"));
+
+ // increment totals
+ oS.iTotalHits += iHits;
+ oS.iTotalBW += iBW;
+
+ // populate array
+ oS.aData.push({ "sCode":sCode,
+ "sDescription":sDescription,
+ "iHits":iHits,
+ "iBW":iBW } );
+ });
+
+ // apply data
+ oS.aData.sort(Sort_Hits);
+ oStatistics.oStatus = oS;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_Status404(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oS = { "iTotalHits":0, "aData":[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("SIDER_404"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sURL = $(this).attr("url");
+ var iHits = parseInt($(this).attr("hits"));
+ var sReferrer = $(this).attr("referrer");
+
+ // increment totals
+ oS.iTotalHits += iHits;
+
+ // populate array
+ oS.aData.push({ "sURL":sURL.split("/").join("​/").split("-").join("-​").split("_").join("_​"),
+ "iHits":iHits,
+ "sReferrer":sReferrer,
+ "sReferrerVisible":sReferrer.split("/").join("​/").split("-").join("-​").split("_").join("_​") } );
+ });
+
+ // apply data
+ oS.aData.sort(Sort_Hits);
+ oStatistics.oStatus404 = oS;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_ThisMonth(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oTM = { "iTotalPages":0, "iTotalHits":0, "iTotalBW":0, "iTotalVisits":0, "aData":[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("DAY"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ var aTemp1 = [];
+ var iMaxDate = 0;
+ $(oXML).find('item').each(function() {
+ // collect values
+ var sDate = $(this).attr("date");
+ var iVisits = parseInt($(this).attr("visits"));
+ var iPages = parseInt($(this).attr("pages"));
+ var iHits = parseInt($(this).attr("hits"));
+ var iBW = parseInt($(this).attr("bw"));
+
+ // increment totals
+ oTM.iTotalVisits += iVisits;
+ oTM.iTotalPages += iPages;
+ oTM.iTotalHits += iHits;
+ oTM.iTotalBW += iBW;
+
+ // create javascript date
+ dtDate = new Date(sDate.substr(0,4),
+ (parseInt(StripLeadingZeroes(sDate.substr(4,2))) - 1),
+ sDate.substr(6,2));
+
+ // populate array
+ aTemp1.push({ "dtDate" : dtDate,
+ "iVisits" : iVisits,
+ "iPages" : iPages,
+ "iHits" : iHits,
+ "iBW" : iBW } );
+ dtMaxDate = dtDate;
+ });
+
+ // populate complete array (including empty values)
+ var aTemp2 = [];
+ var iPointer = 0;
+ for (var iIndex = 0; iIndex < dtMaxDate.getDate(); iIndex++) {
+ dtExpectedDate = new Date(dtMaxDate.getFullYear(), dtMaxDate.getMonth(), (iIndex + 1));
+ if (aTemp1[iPointer].dtDate.valueOf() == dtExpectedDate.valueOf()) {
+ aTemp2.push({ "dtDate" : new Date(dtMaxDate.getFullYear(), dtMaxDate.getMonth(), (iIndex + 1)),
+ "iVisits" : aTemp1[iPointer].iVisits,
+ "iPages" : aTemp1[iPointer].iPages,
+ "iHits" : aTemp1[iPointer].iHits,
+ "iBW" : aTemp1[iPointer].iBW } );
+ iPointer++;
+ } else {
+ aTemp2.push({ "dtDate" : new Date(dtMaxDate.getFullYear(), dtMaxDate.getMonth(), (iIndex + 1)),
+ "iVisits" : 0,
+ "iPages" : 0,
+ "iHits" : 0,
+ "iBW" : 0 } );
+ }
+ }
+
+ // apply data
+ oTM.aData = aTemp2;
+ oStatistics.oThisMonth = oTM;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function PopulateData_Time(sPage) {
+ $("#loading").show();
+
+ // create data objects
+ var oT = { "iTotalPages":0, "iTotalHits":0, "iTotalBW":0, "iTotalNVPages":0, "iTotalNVHits":0, "iTotalNVBW":0, "aData":[] };
+
+ $.ajax({
+ type: "GET",
+ url: XMLURL("TIME"),
+ success: function(oXML){
+ CheckLastUpdate(oXML);
+
+ var aTemp = [];
+ $(oXML).find('item').each(function() {
+ // collect values
+ var iHour = parseInt($(this).attr("hour"));
+ var iPages = parseInt($(this).attr("pages"));
+ var iHits = parseInt($(this).attr("hits"));
+ var iBW = parseInt($(this).attr("bw"));
+ var iNVPages = parseInt($(this).attr("notviewedpages"));
+ var iNVHits = parseInt($(this).attr("notviewedhits"));
+ var iNVBW = parseInt($(this).attr("notviewedbw"));
+
+ // increment totals
+ oT.iTotalPages += iPages;
+ oT.iTotalHits += iHits;
+ oT.iTotalBW += iBW;
+ oT.iTotalNVPages += iPages;
+ oT.iTotalNVHits += iHits;
+ oT.iTotalNVBW += iBW;
+
+ // populate array
+ oT.aData.push({ "iHour":iHour,
+ "iPages":iPages,
+ "iHits":iHits,
+ "iBW":iBW,
+ "iNVPages":iNVPages,
+ "iNVHits":iNVHits,
+ "iNVBW":iNVBW } );
+ });
+
+ // apply data
+ oStatistics.oTime = oT;
+ $("#loading").hide();
+ DrawPage(sPage);
+ }
+ });
+}
+
+function RedrawTable_Keyphrases(sParam, sValue) {
+ oPaging.oKeyphrases[sParam] = sValue;
+ $(".tablePie").html(Paging_Keyphrases());
+}
+
+function RedrawTable_Keywords(sParam, sValue) {
+ oPaging.oKeywords[sParam] = sValue;
+ $(".tablePie").html(Paging_Keywords());
+}
+
+function SafeDivide(iFirst, iSecond) {
+ if (iSecond != 0) {
+ return (iFirst / iSecond);
+ } else {
+ return 0;
+ }
+}
+
+function ShowTools(sID) {
+ if (arguments.length > 0) {
+ sToolID = sID;
+ }
+
+ // loop through items
+ if ($("#tools .tool:visible").size() > 0) {
+ $("#tools .tool:visible").each(function() {
+ if ($(this).attr("id") == sToolID) {
+ $(this).stop().slideUp(350);
+ } else {
+ $(this).stop().slideUp(350, ShowTools);
+ }
+ });
+ } else {
+ $("#" + sToolID).stop().slideDown(350);
+ }
+}
+
+function Sort_Freq(a, b) {
+ return b.iFreq - a.iFreq;
+}
+
+function Sort_Hits(a, b) {
+ return b.iHits - a.iHits;
+}
+
+function Sort_Pages(a, b) {
+ return b.iPages - a.iPages;
+}
+
+function Sort_Phrase(a, b) {
+ return ((a.sPhrase < b.sPhrase) ? -1 : ((a.sPhrase > b.sPhrase) ? 1 : 0));
+}
+
+function Sort_Word(a, b) {
+ return ((a.sWord < b.sWord) ? -1 : ((a.sWord > b.sWord) ? 1 : 0));
+}
+
+function TagCloud(sType, oData, iMaxCount) {
+ // create array of top tags, sorted alpahabetically
+ var aTag = [];
+ var iCount = oData.aData.length;
+ if (iCount > iMaxCount) { iCount = iMaxCount; }
+ for (var i = 0; i < iCount; i++) {
+ aTag.push(oData.aData[i]);
+ }
+ if (sType == "sWord") {
+ aTag.sort(Sort_Word);
+ } else {
+ aTag.sort(Sort_Phrase);
+ }
+
+ // apply sizes
+ aHTML = [];
+ var iMaxSize = 60;
+ var iMinSize = 11;
+ var iDiff = (iMaxSize - iMinSize);
+ for (var i = 0; i < iCount; i++) {
+ var iSize = (Math.round((aTag[i].iFreq / oData.iMaxFreq) * iDiff) + iMinSize);
+ aHTML.push("<span style=\"font-size: " + iSize + "px; line-height: " + Math.round(iSize * 1.35) + "px;\">" + aTag[i][sType] + "</span>");
+ }
+ return aHTML.join("\n");
+}
+
+function UpdateSite() {
+ $("#loading").show();
+ $.ajax({
+ type: "POST",
+ url: sUpdateFilename,
+ data: ("config=" + g_sConfig + "&pass=" + MD5($("#password").val())),
+ success: function(oXML) {
+ switch ($(oXML).find('result:eq(0)').attr("type")) {
+ case "bad_password":
+ $("#loading").hide();
+ alert( Lang("The password you entered was incorrect.") );
+ break;
+ case "updated":
+ var sURL = "?config=" + g_sConfig + "&year=" + g_iYear + "&month=" + g_iMonth + "&view=" + g_sCurrentView + "&lang=" + g_sLanguage;
+ self.location.href = sURL;
+ break;
+ default:
+ $("#loading").hide();
+ }
+ }
+ });
+}
+
+function UpdateSiteKeyUp(event) {
+ if (event.keyCode == 13) {
+ UpdateSite();
+ }
+}
+
+function XMLURL(sPage) {
+ var sURL = "";
+ if (g_bUseStaticXML == true) {
+ switch (sPage) {
+ case "ALLMONTHS":
+ sURL = ("static/jawstats." + g_sConfig + ".allmonths.xml?cache=" + g_dtLastUpdate);
+ break;
+ default:
+ if (g_iMonth < 10) {
+ sURL = ("static/jawstats" + g_iYear + "0" + g_iMonth + "." + g_sConfig + "." + sPage.toLowerCase() + ".xml?cache=" + g_dtLastUpdate);
+ } else {
+ sURL = ("static/jawstats" + g_iYear + g_iMonth + "." + g_sConfig + "." + sPage.toLowerCase() + ".xml?cache=" + g_dtLastUpdate);
+ }
+ }
+ } else {
+ switch (sPage) {
+ case "ALLMONTHS":
+ sURL = ("xml_history.php?config=" + g_sConfig);
+ break;
+ case "PAGES":
+ sURL = ("xml_pages.php?config=" + g_sConfig + "&year=" + g_iYear + "&month=" + g_iMonth);
+ break;
+ default:
+ sURL = ("xml_stats.php?config=" + g_sConfig + "§ion=" + sPage + "&year=" + g_iYear + "&month=" + g_iMonth);
+ }
+ }
+ return sURL;
+}
+
+
+// Other functions: get week number thanks to http://www.quirksmode.org/js/week.html
+function getWeekNr(dtTempDate) {
+ Year = takeYear(dtTempDate);
+ Month = dtTempDate.getMonth();
+ Day = dtTempDate.getDate();
+ now = Date.UTC(Year,Month,Day+1,0,0,0);
+ var Firstday = new Date();
+ Firstday.setYear(Year);
+ Firstday.setMonth(0);
+ Firstday.setDate(1);
+ then = Date.UTC(Year,0,1,0,0,0);
+ var Compensation = Firstday.getDay();
+ if (Compensation > 3) Compensation -= 4;
+ else Compensation += 3;
+ NumberOfWeek = Math.round((((now-then)/86400000)+Compensation)/7);
+
+ // my alteration to make monday-sunday calendar
+ if (dtTempDate.getDay() == 0) {
+ NumberOfWeek--;
+ }
+ // end
+
+ return NumberOfWeek;
+}
+function takeYear(dtTempDate) {
+ x = dtTempDate.getYear();
+ var y = x % 100;
+ y += (y < 38) ? 2000 : 1900;
+ return y;
+}
+
+// md5 thanks to http://www.webtoolkit.info
+var MD5 = function (string) {
+
+ function RotateLeft(lValue, iShiftBits) {
+ return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits));
+ }
+
+ function AddUnsigned(lX,lY) {
+ var lX4,lY4,lX8,lY8,lResult;
+ lX8 = (lX & 0x80000000);
+ lY8 = (lY & 0x80000000);
+ lX4 = (lX & 0x40000000);
+ lY4 = (lY & 0x40000000);
+ lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF);
+ if (lX4 & lY4) {
+ return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
+ }
+ if (lX4 | lY4) {
+ if (lResult & 0x40000000) {
+ return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
+ } else {
+ return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
+ }
+ } else {
+ return (lResult ^ lX8 ^ lY8);
+ }
+ }
+
+ function F(x,y,z) { return (x & y) | ((~x) & z); }
+ function G(x,y,z) { return (x & z) | (y & (~z)); }
+ function H(x,y,z) { return (x ^ y ^ z); }
+ function I(x,y,z) { return (y ^ (x | (~z))); }
+
+ function FF(a,b,c,d,x,s,ac) {
+ a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
+ return AddUnsigned(RotateLeft(a, s), b);
+ };
+
+ function GG(a,b,c,d,x,s,ac) {
+ a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
+ return AddUnsigned(RotateLeft(a, s), b);
+ };
+
+ function HH(a,b,c,d,x,s,ac) {
+ a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
+ return AddUnsigned(RotateLeft(a, s), b);
+ };
+
+ function II(a,b,c,d,x,s,ac) {
+ a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
+ return AddUnsigned(RotateLeft(a, s), b);
+ };
+
+ function ConvertToWordArray(string) {
+ var lWordCount;
+ var lMessageLength = string.length;
+ var lNumberOfWords_temp1=lMessageLength + 8;
+ var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1 % 64))/64;
+ var lNumberOfWords = (lNumberOfWords_temp2+1)*16;
+ var lWordArray=Array(lNumberOfWords-1);
+ var lBytePosition = 0;
+ var lByteCount = 0;
+ while ( lByteCount < lMessageLength ) {
+ lWordCount = (lByteCount-(lByteCount % 4))/4;
+ lBytePosition = (lByteCount % 4)*8;
+ lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount)<<lBytePosition));
+ lByteCount++;
+ }
+ lWordCount = (lByteCount-(lByteCount % 4))/4;
+ lBytePosition = (lByteCount % 4)*8;
+ lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80<<lBytePosition);
+ lWordArray[lNumberOfWords-2] = lMessageLength<<3;
+ lWordArray[lNumberOfWords-1] = lMessageLength>>>29;
+ return lWordArray;
+ };
+
+ function WordToHex(lValue) {
+ var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;
+ for (lCount = 0;lCount<=3;lCount++) {
+ lByte = (lValue>>>(lCount*8)) & 255;
+ WordToHexValue_temp = "0" + lByte.toString(16);
+ WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);
+ }
+ return WordToHexValue;
+ };
+
+ function Utf8Encode(string) {
+ string = string.replace(/\r\n/g,"\n");
+ var utftext = "";
+
+ for (var n = 0; n < string.length; n++) {
+
+ var c = string.charCodeAt(n);
+
+ if (c < 128) {
+ utftext += String.fromCharCode(c);
+ }
+ else if((c > 127) && (c < 2048)) {
+ utftext += String.fromCharCode((c >> 6) | 192);
+ utftext += String.fromCharCode((c & 63) | 128);
+ }
+ else {
+ utftext += String.fromCharCode((c >> 12) | 224);
+ utftext += String.fromCharCode(((c >> 6) & 63) | 128);
+ utftext += String.fromCharCode((c & 63) | 128);
+ }
+
+ }
+
+ return utftext;
+ };
+
+ var x=Array();
+ var k,AA,BB,CC,DD,a,b,c,d;
+ var S11=7, S12=12, S13=17, S14=22;
+ var S21=5, S22=9 , S23=14, S24=20;
+ var S31=4, S32=11, S33=16, S34=23;
+ var S41=6, S42=10, S43=15, S44=21;
+
+ string = Utf8Encode(string);
+
+ x = ConvertToWordArray(string);
+
+ a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
+
+ for (k=0;k<x.length;k+=16) {
+ AA=a; BB=b; CC=c; DD=d;
+ a=FF(a,b,c,d,x[k+0], S11,0xD76AA478);
+ d=FF(d,a,b,c,x[k+1], S12,0xE8C7B756);
+ c=FF(c,d,a,b,x[k+2], S13,0x242070DB);
+ b=FF(b,c,d,a,x[k+3], S14,0xC1BDCEEE);
+ a=FF(a,b,c,d,x[k+4], S11,0xF57C0FAF);
+ d=FF(d,a,b,c,x[k+5], S12,0x4787C62A);
+ c=FF(c,d,a,b,x[k+6], S13,0xA8304613);
+ b=FF(b,c,d,a,x[k+7], S14,0xFD469501);
+ a=FF(a,b,c,d,x[k+8], S11,0x698098D8);
+ d=FF(d,a,b,c,x[k+9], S12,0x8B44F7AF);
+ c=FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);
+ b=FF(b,c,d,a,x[k+11],S14,0x895CD7BE);
+ a=FF(a,b,c,d,x[k+12],S11,0x6B901122);
+ d=FF(d,a,b,c,x[k+13],S12,0xFD987193);
+ c=FF(c,d,a,b,x[k+14],S13,0xA679438E);
+ b=FF(b,c,d,a,x[k+15],S14,0x49B40821);
+ a=GG(a,b,c,d,x[k+1], S21,0xF61E2562);
+ d=GG(d,a,b,c,x[k+6], S22,0xC040B340);
+ c=GG(c,d,a,b,x[k+11],S23,0x265E5A51);
+ b=GG(b,c,d,a,x[k+0], S24,0xE9B6C7AA);
+ a=GG(a,b,c,d,x[k+5], S21,0xD62F105D);
+ d=GG(d,a,b,c,x[k+10],S22,0x2441453);
+ c=GG(c,d,a,b,x[k+15],S23,0xD8A1E681);
+ b=GG(b,c,d,a,x[k+4], S24,0xE7D3FBC8);
+ a=GG(a,b,c,d,x[k+9], S21,0x21E1CDE6);
+ d=GG(d,a,b,c,x[k+14],S22,0xC33707D6);
+ c=GG(c,d,a,b,x[k+3], S23,0xF4D50D87);
+ b=GG(b,c,d,a,x[k+8], S24,0x455A14ED);
+ a=GG(a,b,c,d,x[k+13],S21,0xA9E3E905);
+ d=GG(d,a,b,c,x[k+2], S22,0xFCEFA3F8);
+ c=GG(c,d,a,b,x[k+7], S23,0x676F02D9);
+ b=GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);
+ a=HH(a,b,c,d,x[k+5], S31,0xFFFA3942);
+ d=HH(d,a,b,c,x[k+8], S32,0x8771F681);
+ c=HH(c,d,a,b,x[k+11],S33,0x6D9D6122);
+ b=HH(b,c,d,a,x[k+14],S34,0xFDE5380C);
+ a=HH(a,b,c,d,x[k+1], S31,0xA4BEEA44);
+ d=HH(d,a,b,c,x[k+4], S32,0x4BDECFA9);
+ c=HH(c,d,a,b,x[k+7], S33,0xF6BB4B60);
+ b=HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);
+ a=HH(a,b,c,d,x[k+13],S31,0x289B7EC6);
+ d=HH(d,a,b,c,x[k+0], S32,0xEAA127FA);
+ c=HH(c,d,a,b,x[k+3], S33,0xD4EF3085);
+ b=HH(b,c,d,a,x[k+6], S34,0x4881D05);
+ a=HH(a,b,c,d,x[k+9], S31,0xD9D4D039);
+ d=HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);
+ c=HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);
+ b=HH(b,c,d,a,x[k+2], S34,0xC4AC5665);
+ a=II(a,b,c,d,x[k+0], S41,0xF4292244);
+ d=II(d,a,b,c,x[k+7], S42,0x432AFF97);
+ c=II(c,d,a,b,x[k+14],S43,0xAB9423A7);
+ b=II(b,c,d,a,x[k+5], S44,0xFC93A039);
+ a=II(a,b,c,d,x[k+12],S41,0x655B59C3);
+ d=II(d,a,b,c,x[k+3], S42,0x8F0CCC92);
+ c=II(c,d,a,b,x[k+10],S43,0xFFEFF47D);
+ b=II(b,c,d,a,x[k+1], S44,0x85845DD1);
+ a=II(a,b,c,d,x[k+8], S41,0x6FA87E4F);
+ d=II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);
+ c=II(c,d,a,b,x[k+6], S43,0xA3014314);
+ b=II(b,c,d,a,x[k+13],S44,0x4E0811A1);
+ a=II(a,b,c,d,x[k+4], S41,0xF7537E82);
+ d=II(d,a,b,c,x[k+11],S42,0xBD3AF235);
+ c=II(c,d,a,b,x[k+2], S43,0x2AD7D2BB);
+ b=II(b,c,d,a,x[k+9], S44,0xEB86D391);
+ a=AddUnsigned(a,AA);
+ b=AddUnsigned(b,BB);
+ c=AddUnsigned(c,CC);
+ d=AddUnsigned(d,DD);
+ }
+
+ var temp = WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);
+
+ return temp.toLowerCase();
+}
+
+// random stuff...
+function DateSuffix(iDate) {
+ switch (iDate) {
+ case 1:
+ case 21:
+ case 31:
+ return "st";
+ case 2:
+ case 22:
+ return "nd";
+ case 3:
+ case 23:
+ return "rd";
+ default:
+ return "th";
+ }
+}
+
+function NumberFormat(vValue, iDecimalPlaces) {
+ if (typeof iDecimalPlaces != "undefined") {
+ vValue = vValue.toFixed(iDecimalPlaces);
+ }
+ var oRegEx = /(\d{3})(?=\d)/g;
+ var aDigits = vValue.toString().split(".");
+ if (aDigits[0] >= 1000) {
+ aDigits[0] = aDigits[0].split("").reverse().join("").replace(oRegEx, "$1,").split("").reverse().join("");
+ }
+ return aDigits.join(".");
+}
+
+function StripLeadingZeroes(sString) {
+ while (sString.substr(0,1) == "0") {
+ sString = sString.substr(1);
+ }
+ return sString;
+}
+
+$.tablesorter.addParser({
+ id: "commaNumber",
+ is: function(s) {
+ return false;
+ },
+ format: function(s) {
+ s = s.replace(/\,/g, "");
+ return s;
+ },
+ type: "numeric"
+});
\ No newline at end of file
--- /dev/null
+/*
+ * jQuery JavaScript Library v1.3
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-01-13 12:50:31 -0500 (Tue, 13 Jan 2009)
+ * Revision: 6104
+ */
+(function(){var l=this,g,x=l.jQuery,o=l.$,n=l.jQuery=l.$=function(D,E){return new n.fn.init(D,E)},C=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;n.fn=n.prototype={init:function(D,G){D=D||document;if(D.nodeType){this[0]=D;this.length=1;this.context=D;return this}if(typeof D==="string"){var F=C.exec(D);if(F&&(F[1]||!G)){if(F[1]){D=n.clean([F[1]],G)}else{var H=document.getElementById(F[3]);if(H){if(H.id!=F[3]){return n().find(D)}var E=n(H);E.context=document;E.selector=D;return E}D=[]}}else{return n(G).find(D)}}else{if(n.isFunction(D)){return n(document).ready(D)}}if(D.selector&&D.context){this.selector=D.selector;this.context=D.context}return this.setArray(n.makeArray(D))},selector:"",jquery:"1.3",size:function(){return this.length},get:function(D){return D===g?n.makeArray(this):this[D]},pushStack:function(E,G,D){var F=n(E);F.prevObject=this;F.context=this.context;if(G==="find"){F.selector=this.selector+(this.selector?" ":"")+D}else{if(G){F.selector=this.selector+"."+G+"("+D+")"}}return F},setArray:function(D){this.length=0;Array.prototype.push.apply(this,D);return this},each:function(E,D){return n.each(this,E,D)},index:function(D){return n.inArray(D&&D.jquery?D[0]:D,this)},attr:function(E,G,F){var D=E;if(typeof E==="string"){if(G===g){return this[0]&&n[F||"attr"](this[0],E)}else{D={};D[E]=G}}return this.each(function(H){for(E in D){n.attr(F?this.style:this,E,n.prop(this,D[E],F,H,E))}})},css:function(D,E){if((D=="width"||D=="height")&&parseFloat(E)<0){E=g}return this.attr(D,E,"curCSS")},text:function(E){if(typeof E!=="object"&&E!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(E))}var D="";n.each(E||this,function(){n.each(this.childNodes,function(){if(this.nodeType!=8){D+=this.nodeType!=1?this.nodeValue:n.fn.text([this])}})});return D},wrapAll:function(D){if(this[0]){var E=n(D,this[0].ownerDocument).clone();if(this[0].parentNode){E.insertBefore(this[0])}E.map(function(){var F=this;while(F.firstChild){F=F.firstChild}return F}).append(this)}return this},wrapInner:function(D){return this.each(function(){n(this).contents().wrapAll(D)})},wrap:function(D){return this.each(function(){n(this).wrapAll(D)})},append:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.appendChild(D)}})},prepend:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.insertBefore(D,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this)})},after:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this.nextSibling)})},end:function(){return this.prevObject||n([])},push:[].push,find:function(D){if(this.length===1&&!/,/.test(D)){var F=this.pushStack([],"find",D);F.length=0;n.find(D,this[0],F);return F}else{var E=n.map(this,function(G){return n.find(D,G)});return this.pushStack(/[^+>] [^+>]/.test(D)?n.unique(E):E,"find",D)}},clone:function(E){var D=this.map(function(){if(!n.support.noCloneEvent&&!n.isXMLDoc(this)){var H=this.cloneNode(true),G=document.createElement("div");G.appendChild(H);return n.clean([G.innerHTML])[0]}else{return this.cloneNode(true)}});var F=D.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(E===true){this.find("*").andSelf().each(function(H){if(this.nodeType==3){return}var G=n.data(this,"events");for(var J in G){for(var I in G[J]){n.event.add(F[H],J,G[J][I],G[J][I].data)}}})}return D},filter:function(D){return this.pushStack(n.isFunction(D)&&n.grep(this,function(F,E){return D.call(F,E)})||n.multiFilter(D,n.grep(this,function(E){return E.nodeType===1})),"filter",D)},closest:function(D){var E=n.expr.match.POS.test(D)?n(D):null;return this.map(function(){var F=this;while(F&&F.ownerDocument){if(E?E.index(F)>-1:n(F).is(D)){return F}F=F.parentNode}})},not:function(D){if(typeof D==="string"){if(f.test(D)){return this.pushStack(n.multiFilter(D,this,true),"not",D)}else{D=n.multiFilter(D,this)}}var E=D.length&&D[D.length-1]!==g&&!D.nodeType;return this.filter(function(){return E?n.inArray(this,D)<0:this!=D})},add:function(D){return this.pushStack(n.unique(n.merge(this.get(),typeof D==="string"?n(D):n.makeArray(D))))},is:function(D){return !!D&&n.multiFilter(D,this).length>0},hasClass:function(D){return !!D&&this.is("."+D)},val:function(J){if(J===g){var D=this[0];if(D){if(n.nodeName(D,"option")){return(D.attributes.value||{}).specified?D.value:D.text}if(n.nodeName(D,"select")){var H=D.selectedIndex,K=[],L=D.options,G=D.type=="select-one";if(H<0){return null}for(var E=G?H:0,I=G?H+1:L.length;E<I;E++){var F=L[E];if(F.selected){J=n(F).val();if(G){return J}K.push(J)}}return K}return(D.value||"").replace(/\r/g,"")}return g}if(typeof J==="number"){J+=""}return this.each(function(){if(this.nodeType!=1){return}if(n.isArray(J)&&/radio|checkbox/.test(this.type)){this.checked=(n.inArray(this.value,J)>=0||n.inArray(this.name,J)>=0)}else{if(n.nodeName(this,"select")){var M=n.makeArray(J);n("option",this).each(function(){this.selected=(n.inArray(this.value,M)>=0||n.inArray(this.text,M)>=0)});if(!M.length){this.selectedIndex=-1}}else{this.value=J}}})},html:function(D){return D===g?(this[0]?this[0].innerHTML:null):this.empty().append(D)},replaceWith:function(D){return this.after(D).remove()},eq:function(D){return this.slice(D,+D+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(D){return this.pushStack(n.map(this,function(F,E){return D.call(F,E,F)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=n.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild,D=this.length>1?I.cloneNode(true):I;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),G>0?D.cloneNode(true):I)}}if(F){n.each(F,y)}}return this;function K(N,O){return M&&n.nodeName(N,"table")&&n.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};n.fn.init.prototype=n.fn;function y(D,E){if(E.src){n.ajax({url:E.src,async:false,dataType:"script"})}else{n.globalEval(E.text||E.textContent||E.innerHTML||"")}if(E.parentNode){E.parentNode.removeChild(E)}}function e(){return +new Date}n.extend=n.fn.extend=function(){var I=arguments[0]||{},G=1,H=arguments.length,D=false,F;if(typeof I==="boolean"){D=I;I=arguments[1]||{};G=2}if(typeof I!=="object"&&!n.isFunction(I)){I={}}if(H==G){I=this;--G}for(;G<H;G++){if((F=arguments[G])!=null){for(var E in F){var J=I[E],K=F[E];if(I===K){continue}if(D&&K&&typeof K==="object"&&!K.nodeType){I[E]=n.extend(D,J||(K.length!=null?[]:{}),K)}else{if(K!==g){I[E]=K}}}}}return I};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,p=document.defaultView||{},r=Object.prototype.toString;n.extend({noConflict:function(D){l.$=o;if(D){l.jQuery=x}return n},isFunction:function(D){return r.call(D)==="[object Function]"},isArray:function(D){return r.call(D)==="[object Array]"},isXMLDoc:function(D){return D.documentElement&&!D.body||D.tagName&&D.ownerDocument&&!D.ownerDocument.body},globalEval:function(F){F=n.trim(F);if(F){var E=document.getElementsByTagName("head")[0]||document.documentElement,D=document.createElement("script");D.type="text/javascript";if(n.support.scriptEval){D.appendChild(document.createTextNode(F))}else{D.text=F}E.insertBefore(D,E.firstChild);E.removeChild(D)}},nodeName:function(E,D){return E.nodeName&&E.nodeName.toUpperCase()==D.toUpperCase()},each:function(F,J,E){var D,G=0,H=F.length;if(E){if(H===g){for(D in F){if(J.apply(F[D],E)===false){break}}}else{for(;G<H;){if(J.apply(F[G++],E)===false){break}}}}else{if(H===g){for(D in F){if(J.call(F[D],D,F[D])===false){break}}}else{for(var I=F[0];G<H&&J.call(I,G,I)!==false;I=F[++G]){}}}return F},prop:function(G,H,F,E,D){if(n.isFunction(H)){H=H.call(G,E)}return typeof H==="number"&&F=="curCSS"&&!b.test(D)?H+"px":H},className:{add:function(D,E){n.each((E||"").split(/\s+/),function(F,G){if(D.nodeType==1&&!n.className.has(D.className,G)){D.className+=(D.className?" ":"")+G}})},remove:function(D,E){if(D.nodeType==1){D.className=E!==g?n.grep(D.className.split(/\s+/),function(F){return !n.className.has(E,F)}).join(" "):""}},has:function(E,D){return n.inArray(D,(E.className||E).toString().split(/\s+/))>-1}},swap:function(G,F,H){var D={};for(var E in F){D[E]=G.style[E];G.style[E]=F[E]}H.call(G);for(var E in F){G.style[E]=D[E]}},css:function(F,D,H){if(D=="width"||D=="height"){var J,E={position:"absolute",visibility:"hidden",display:"block"},I=D=="width"?["Left","Right"]:["Top","Bottom"];function G(){J=D=="width"?F.offsetWidth:F.offsetHeight;var L=0,K=0;n.each(I,function(){L+=parseFloat(n.curCSS(F,"padding"+this,true))||0;K+=parseFloat(n.curCSS(F,"border"+this+"Width",true))||0});J-=Math.round(L+K)}if(n(F).is(":visible")){G()}else{n.swap(F,E,G)}return Math.max(0,J)}return n.curCSS(F,D,H)},curCSS:function(H,E,F){var K,D=H.style;if(E=="opacity"&&!n.support.opacity){K=n.attr(D,"opacity");return K==""?"1":K}if(E.match(/float/i)){E=v}if(!F&&D&&D[E]){K=D[E]}else{if(p.getComputedStyle){if(E.match(/float/i)){E="float"}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var L=p.getComputedStyle(H,null);if(L){K=L.getPropertyValue(E)}if(E=="opacity"&&K==""){K="1"}}else{if(H.currentStyle){var I=E.replace(/\-(\w)/g,function(M,N){return N.toUpperCase()});K=H.currentStyle[E]||H.currentStyle[I];if(!/^\d+(px)?$/i.test(K)&&/^\d/.test(K)){var G=D.left,J=H.runtimeStyle.left;H.runtimeStyle.left=H.currentStyle.left;D.left=K||0;K=D.pixelLeft+"px";D.left=G;H.runtimeStyle.left=J}}}}return K},clean:function(E,J,H){J=J||document;if(typeof J.createElement==="undefined"){J=J.ownerDocument||J[0]&&J[0].ownerDocument||document}if(!H&&E.length===1&&typeof E[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(E[0]);if(G){return[J.createElement(G[1])]}}var F=[],D=[],K=J.createElement("div");n.each(E,function(O,Q){if(typeof Q==="number"){Q+=""}if(!Q){return}if(typeof Q==="string"){Q=Q.replace(/(<(\w+)[^>]*?)\/>/g,function(S,T,R){return R.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?S:T+"></"+R+">"});var N=n.trim(Q).toLowerCase();var P=!N.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!N.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||N.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!N.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!N.indexOf("<td")||!N.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!N.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!n.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];K.innerHTML=P[1]+Q+P[2];while(P[0]--){K=K.lastChild}if(!n.support.tbody){var M=!N.indexOf("<table")&&N.indexOf("<tbody")<0?K.firstChild&&K.firstChild.childNodes:P[1]=="<table>"&&N.indexOf("<tbody")<0?K.childNodes:[];for(var L=M.length-1;L>=0;--L){if(n.nodeName(M[L],"tbody")&&!M[L].childNodes.length){M[L].parentNode.removeChild(M[L])}}}if(!n.support.leadingWhitespace&&/^\s/.test(Q)){K.insertBefore(J.createTextNode(Q.match(/^\s*/)[0]),K.firstChild)}Q=n.makeArray(K.childNodes)}if(Q.nodeType){F.push(Q)}else{F=n.merge(F,Q)}});if(H){for(var I=0;F[I];I++){if(n.nodeName(F[I],"script")&&(!F[I].type||F[I].type.toLowerCase()==="text/javascript")){D.push(F[I].parentNode?F[I].parentNode.removeChild(F[I]):F[I])}else{if(F[I].nodeType===1){F.splice.apply(F,[I+1,0].concat(n.makeArray(F[I].getElementsByTagName("script"))))}H.appendChild(F[I])}}return D}return F},attr:function(I,F,J){if(!I||I.nodeType==3||I.nodeType==8){return g}var G=!n.isXMLDoc(I),K=J!==g;F=G&&n.props[F]||F;if(I.tagName){var E=/href|src|style/.test(F);if(F=="selected"&&I.parentNode){I.parentNode.selectedIndex}if(F in I&&G&&!E){if(K){if(F=="type"&&n.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed"}I[F]=J}if(n.nodeName(I,"form")&&I.getAttributeNode(F)){return I.getAttributeNode(F).nodeValue}if(F=="tabIndex"){var H=I.getAttributeNode("tabIndex");return H&&H.specified?H.value:I.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)?0:g}return I[F]}if(!n.support.style&&G&&F=="style"){return n.attr(I.style,"cssText",J)}if(K){I.setAttribute(F,""+J)}var D=!n.support.hrefNormalized&&G&&E?I.getAttribute(F,2):I.getAttribute(F);return D===null?g:D}if(!n.support.opacity&&F=="opacity"){if(K){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(J)+""=="NaN"?"":"alpha(opacity="+J*100+")")}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}F=F.replace(/-([a-z])/ig,function(L,M){return M.toUpperCase()});if(K){I[F]=J}return I[F]},trim:function(D){return(D||"").replace(/^\s+|\s+$/g,"")},makeArray:function(F){var D=[];if(F!=null){var E=F.length;if(E==null||typeof F==="string"||n.isFunction(F)||F.setInterval){D[0]=F}else{while(E){D[--E]=F[E]}}}return D},inArray:function(F,G){for(var D=0,E=G.length;D<E;D++){if(G[D]===F){return D}}return -1},merge:function(G,D){var E=0,F,H=G.length;if(!n.support.getAll){while((F=D[E++])!=null){if(F.nodeType!=8){G[H++]=F}}}else{while((F=D[E++])!=null){G[H++]=F}}return G},unique:function(J){var E=[],D={};try{for(var F=0,G=J.length;F<G;F++){var I=n.data(J[F]);if(!D[I]){D[I]=true;E.push(J[F])}}}catch(H){E=J}return E},grep:function(E,I,D){var F=[];for(var G=0,H=E.length;G<H;G++){if(!D!=!I(E[G],G)){F.push(E[G])}}return F},map:function(D,I){var E=[];for(var F=0,G=D.length;F<G;F++){var H=I(D[F],F);if(H!=null){E[E.length]=H}}return E.concat.apply([],E)}});var B=navigator.userAgent.toLowerCase();n.browser={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)};n.each({parent:function(D){return D.parentNode},parents:function(D){return n.dir(D,"parentNode")},next:function(D){return n.nth(D,2,"nextSibling")},prev:function(D){return n.nth(D,2,"previousSibling")},nextAll:function(D){return n.dir(D,"nextSibling")},prevAll:function(D){return n.dir(D,"previousSibling")},siblings:function(D){return n.sibling(D.parentNode.firstChild,D)},children:function(D){return n.sibling(D.firstChild)},contents:function(D){return n.nodeName(D,"iframe")?D.contentDocument||D.contentWindow.document:n.makeArray(D.childNodes)}},function(D,E){n.fn[D]=function(F){var G=n.map(this,E);if(F&&typeof F=="string"){G=n.multiFilter(F,G)}return this.pushStack(n.unique(G),D,F)}});n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(D,E){n.fn[D]=function(){var F=arguments;return this.each(function(){for(var G=0,H=F.length;G<H;G++){n(F[G])[E](this)}})}});n.each({removeAttr:function(D){n.attr(this,D,"");if(this.nodeType==1){this.removeAttribute(D)}},addClass:function(D){n.className.add(this,D)},removeClass:function(D){n.className.remove(this,D)},toggleClass:function(E,D){if(typeof D!=="boolean"){D=!n.className.has(this,E)}n.className[D?"add":"remove"](this,E)},remove:function(D){if(!D||n.filter(D,[this]).length){n("*",this).add([this]).each(function(){n.event.remove(this);n.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){n(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(D,E){n.fn[D]=function(){return this.each(E,arguments)}});function j(D,E){return D[0]&&parseInt(n.curCSS(D[0],E,true),10)||0}var h="jQuery"+e(),u=0,z={};n.extend({cache:{},data:function(E,D,F){E=E==l?z:E;var G=E[h];if(!G){G=E[h]=++u}if(D&&!n.cache[G]){n.cache[G]={}}if(F!==g){n.cache[G][D]=F}return D?n.cache[G][D]:G},removeData:function(E,D){E=E==l?z:E;var G=E[h];if(D){if(n.cache[G]){delete n.cache[G][D];D="";for(D in n.cache[G]){break}if(!D){n.removeData(E)}}}else{try{delete E[h]}catch(F){if(E.removeAttribute){E.removeAttribute(h)}}delete n.cache[G]}},queue:function(E,D,G){if(E){D=(D||"fx")+"queue";var F=n.data(E,D);if(!F||n.isArray(G)){F=n.data(E,D,n.makeArray(G))}else{if(G){F.push(G)}}}return F},dequeue:function(G,F){var D=n.queue(G,F),E=D.shift();if(!F||F==="fx"){E=D[0]}if(E!==g){E.call(G)}}});n.fn.extend({data:function(D,F){var G=D.split(".");G[1]=G[1]?"."+G[1]:"";if(F===g){var E=this.triggerHandler("getData"+G[1]+"!",[G[0]]);if(E===g&&this.length){E=n.data(this[0],D)}return E===g&&G[1]?this.data(G[0]):E}else{return this.trigger("setData"+G[1]+"!",[G[0],F]).each(function(){n.data(this,D,F)})}},removeData:function(D){return this.each(function(){n.removeData(this,D)})},queue:function(D,E){if(typeof D!=="string"){E=D;D="fx"}if(E===g){return n.queue(this[0],D)}return this.each(function(){var F=n.queue(this,D,E);if(D=="fx"&&F.length==1){F[0].call(this)}})},dequeue:function(D){return this.each(function(){n.dequeue(this,D)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.1
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){var N=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,I=0,F=Object.prototype.toString;var E=function(ae,S,aa,V){aa=aa||[];S=S||document;if(S.nodeType!==1&&S.nodeType!==9){return[]}if(!ae||typeof ae!=="string"){return aa}var ab=[],ac,Y,ah,ag,Z,R,Q=true;N.lastIndex=0;while((ac=N.exec(ae))!==null){ab.push(ac[1]);if(ac[2]){R=RegExp.rightContext;break}}if(ab.length>1&&G.match.POS.exec(ae)){if(ab.length===2&&G.relative[ab[0]]){var U="",X;while((X=G.match.POS.exec(ae))){U+=X[0];ae=ae.replace(G.match.POS,"")}Y=E.filter(U,E(/\s$/.test(ae)?ae+"*":ae,S))}else{Y=G.relative[ab[0]]?[S]:E(ab.shift(),S);while(ab.length){var P=[];ae=ab.shift();if(G.relative[ae]){ae+=ab.shift()}for(var af=0,ad=Y.length;af<ad;af++){E(ae,Y[af],P)}Y=P}}}else{var ai=V?{expr:ab.pop(),set:D(V)}:E.find(ab.pop(),ab.length===1&&S.parentNode?S.parentNode:S);Y=E.filter(ai.expr,ai.set);if(ab.length>0){ah=D(Y)}else{Q=false}while(ab.length){var T=ab.pop(),W=T;if(!G.relative[T]){T=""}else{W=ab.pop()}if(W==null){W=S}G.relative[T](ah,W,M(S))}}if(!ah){ah=Y}if(!ah){throw"Syntax error, unrecognized expression: "+(T||ae)}if(F.call(ah)==="[object Array]"){if(!Q){aa.push.apply(aa,ah)}else{if(S.nodeType===1){for(var af=0;ah[af]!=null;af++){if(ah[af]&&(ah[af]===true||ah[af].nodeType===1&&H(S,ah[af]))){aa.push(Y[af])}}}else{for(var af=0;ah[af]!=null;af++){if(ah[af]&&ah[af].nodeType===1){aa.push(Y[af])}}}}}else{D(ah,aa)}if(R){E(R,S,aa,V)}return aa};E.matches=function(P,Q){return E(P,null,null,Q)};E.find=function(V,S){var W,Q;if(!V){return[]}for(var R=0,P=G.order.length;R<P;R++){var T=G.order[R],Q;if((Q=G.match[T].exec(V))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){Q[1]=(Q[1]||"").replace(/\\/g,"");W=G.find[T](Q,S);if(W!=null){V=V.replace(G.match[T],"");break}}}}if(!W){W=S.getElementsByTagName("*")}return{set:W,expr:V}};E.filter=function(S,ac,ad,T){var Q=S,Y=[],ah=ac,V,ab;while(S&&ac.length){for(var U in G.filter){if((V=G.match[U].exec(S))!=null){var Z=G.filter[U],R=null,X=0,aa,ag;ab=false;if(ah==Y){Y=[]}if(G.preFilter[U]){V=G.preFilter[U](V,ah,ad,Y,T);if(!V){ab=aa=true}else{if(V===true){continue}else{if(V[0]===true){R=[];var W=null,af;for(var ae=0;(af=ah[ae])!==g;ae++){if(af&&W!==af){R.push(af);W=af}}}}}}if(V){for(var ae=0;(ag=ah[ae])!==g;ae++){if(ag){if(R&&ag!=R[X]){X++}aa=Z(ag,V,X,R);var P=T^!!aa;if(ad&&aa!=null){if(P){ab=true}else{ah[ae]=false}}else{if(P){Y.push(ag);ab=true}}}}}if(aa!==g){if(!ad){ah=Y}S=S.replace(G.match[U],"");if(!ab){return[]}break}}}S=S.replace(/\s*,\s*/,"");if(S==Q){if(ab==null){throw"Syntax error, unrecognized expression: "+S}else{break}}Q=S}return ah};var G=E.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(P){return P.getAttribute("href")}},relative:{"+":function(T,Q){for(var R=0,P=T.length;R<P;R++){var S=T[R];if(S){var U=S.previousSibling;while(U&&U.nodeType!==1){U=U.previousSibling}T[R]=typeof Q==="string"?U||false:U===Q}}if(typeof Q==="string"){E.filter(Q,T,true)}},">":function(U,Q,V){if(typeof Q==="string"&&!/\W/.test(Q)){Q=V?Q:Q.toUpperCase();for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){var S=T.parentNode;U[R]=S.nodeName===Q?S:false}}}else{for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){U[R]=typeof Q==="string"?T.parentNode:T.parentNode===Q}}if(typeof Q==="string"){E.filter(Q,U,true)}}},"":function(S,Q,U){var R="done"+(I++),P=O;if(!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("parentNode",Q,R,S,T,U)},"~":function(S,Q,U){var R="done"+(I++),P=O;if(typeof Q==="string"&&!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("previousSibling",Q,R,S,T,U)}},find:{ID:function(Q,R){if(R.getElementById){var P=R.getElementById(Q[1]);return P?[P]:[]}},NAME:function(P,Q){return Q.getElementsByName?Q.getElementsByName(P[1]):null},TAG:function(P,Q){return Q.getElementsByTagName(P[1])}},preFilter:{CLASS:function(S,Q,R,P,U){S=" "+S[1].replace(/\\/g,"")+" ";for(var T=0;Q[T];T++){if(U^(" "+Q[T].className+" ").indexOf(S)>=0){if(!R){P.push(Q[T])}}else{if(R){Q[T]=false}}}return false},ID:function(P){return P[1].replace(/\\/g,"")},TAG:function(Q,P){for(var R=0;!P[R];R++){}return M(P[R])?Q[1]:Q[1].toUpperCase()},CHILD:function(P){if(P[1]=="nth"){var Q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(P[2]=="even"&&"2n"||P[2]=="odd"&&"2n+1"||!/\D/.test(P[2])&&"0n+"+P[2]||P[2]);P[2]=(Q[1]+(Q[2]||1))-0;P[3]=Q[3]-0}P[0]="done"+(I++);return P},ATTR:function(Q){var P=Q[1];if(G.attrMap[P]){Q[1]=G.attrMap[P]}if(Q[2]==="~="){Q[4]=" "+Q[4]+" "}return Q},PSEUDO:function(T,Q,R,P,U){if(T[1]==="not"){if(T[3].match(N).length>1){T[3]=E(T[3],null,null,Q)}else{var S=E.filter(T[3],Q,R,true^U);if(!R){P.push.apply(P,S)}return false}}else{if(G.match.POS.test(T[0])){return true}}return T},POS:function(P){P.unshift(true);return P}},filters:{enabled:function(P){return P.disabled===false&&P.type!=="hidden"},disabled:function(P){return P.disabled===true},checked:function(P){return P.checked===true},selected:function(P){P.parentNode.selectedIndex;return P.selected===true},parent:function(P){return !!P.firstChild},empty:function(P){return !P.firstChild},has:function(R,Q,P){return !!E(P[3],R).length},header:function(P){return/h\d/i.test(P.nodeName)},text:function(P){return"text"===P.type},radio:function(P){return"radio"===P.type},checkbox:function(P){return"checkbox"===P.type},file:function(P){return"file"===P.type},password:function(P){return"password"===P.type},submit:function(P){return"submit"===P.type},image:function(P){return"image"===P.type},reset:function(P){return"reset"===P.type},button:function(P){return"button"===P.type||P.nodeName.toUpperCase()==="BUTTON"},input:function(P){return/input|select|textarea|button/i.test(P.nodeName)}},setFilters:{first:function(Q,P){return P===0},last:function(R,Q,P,S){return Q===S.length-1},even:function(Q,P){return P%2===0},odd:function(Q,P){return P%2===1},lt:function(R,Q,P){return Q<P[3]-0},gt:function(R,Q,P){return Q>P[3]-0},nth:function(R,Q,P){return P[3]-0==Q},eq:function(R,Q,P){return P[3]-0==Q}},filter:{CHILD:function(P,S){var V=S[1],W=P.parentNode;var U="child"+W.childNodes.length;if(W&&(!W[U]||!P.nodeIndex)){var T=1;for(var Q=W.firstChild;Q;Q=Q.nextSibling){if(Q.nodeType==1){Q.nodeIndex=T++}}W[U]=T-1}if(V=="first"){return P.nodeIndex==1}else{if(V=="last"){return P.nodeIndex==W[U]}else{if(V=="only"){return W[U]==1}else{if(V=="nth"){var Y=false,R=S[2],X=S[3];if(R==1&&X==0){return true}if(R==0){if(P.nodeIndex==X){Y=true}}else{if((P.nodeIndex-X)%R==0&&(P.nodeIndex-X)/R>=0){Y=true}}return Y}}}}},PSEUDO:function(V,R,S,W){var Q=R[1],T=G.filters[Q];if(T){return T(V,S,R,W)}else{if(Q==="contains"){return(V.textContent||V.innerText||"").indexOf(R[3])>=0}else{if(Q==="not"){var U=R[3];for(var S=0,P=U.length;S<P;S++){if(U[S]===V){return false}}return true}}}},ID:function(Q,P){return Q.nodeType===1&&Q.getAttribute("id")===P},TAG:function(Q,P){return(P==="*"&&Q.nodeType===1)||Q.nodeName===P},CLASS:function(Q,P){return P.test(Q.className)},ATTR:function(T,R){var P=G.attrHandle[R[1]]?G.attrHandle[R[1]](T):T[R[1]]||T.getAttribute(R[1]),U=P+"",S=R[2],Q=R[4];return P==null?false:S==="="?U===Q:S==="*="?U.indexOf(Q)>=0:S==="~="?(" "+U+" ").indexOf(Q)>=0:!R[4]?P:S==="!="?U!=Q:S==="^="?U.indexOf(Q)===0:S==="$="?U.substr(U.length-Q.length)===Q:S==="|="?U===Q||U.substr(0,Q.length+1)===Q+"-":false},POS:function(T,Q,R,U){var P=Q[2],S=G.setFilters[P];if(S){return S(T,R,Q,U)}}}};for(var K in G.match){G.match[K]=RegExp(G.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var D=function(Q,P){Q=Array.prototype.slice.call(Q);if(P){P.push.apply(P,Q);return P}return Q};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(J){D=function(T,S){var Q=S||[];if(F.call(T)==="[object Array]"){Array.prototype.push.apply(Q,T)}else{if(typeof T.length==="number"){for(var R=0,P=T.length;R<P;R++){Q.push(T[R])}}else{for(var R=0;T[R];R++){Q.push(T[R])}}}return Q}}(function(){var Q=document.createElement("form"),R="script"+(new Date).getTime();Q.innerHTML="<input name='"+R+"'/>";var P=document.documentElement;P.insertBefore(Q,P.firstChild);if(!!document.getElementById(R)){G.find.ID=function(T,U){if(U.getElementById){var S=U.getElementById(T[1]);return S?S.id===T[1]||S.getAttributeNode&&S.getAttributeNode("id").nodeValue===T[1]?[S]:g:[]}};G.filter.ID=function(U,S){var T=U.getAttributeNode&&U.getAttributeNode("id");return U.nodeType===1&&T&&T.nodeValue===S}}P.removeChild(Q)})();(function(){var P=document.createElement("div");P.appendChild(document.createComment(""));if(P.getElementsByTagName("*").length>0){G.find.TAG=function(Q,U){var T=U.getElementsByTagName(Q[1]);if(Q[1]==="*"){var S=[];for(var R=0;T[R];R++){if(T[R].nodeType===1){S.push(T[R])}}T=S}return T}}P.innerHTML="<a href='#'></a>";if(P.firstChild.getAttribute("href")!=="#"){G.attrHandle.href=function(Q){return Q.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var P=E;E=function(T,S,Q,R){S=S||document;if(!R&&S.nodeType===9){try{return D(S.querySelectorAll(T),Q)}catch(U){}}return P(T,S,Q,R)};E.find=P.find;E.filter=P.filter;E.selectors=P.selectors;E.matches=P.matches})()}if(document.documentElement.getElementsByClassName){G.order.splice(1,0,"CLASS");G.find.CLASS=function(P,Q){return Q.getElementsByClassName(P[1])}}function L(Q,W,V,Z,X,Y){for(var T=0,R=Z.length;T<R;T++){var P=Z[T];if(P){P=P[Q];var U=false;while(P&&P.nodeType){var S=P[V];if(S){U=Z[S];break}if(P.nodeType===1&&!Y){P[V]=T}if(P.nodeName===W){U=P;break}P=P[Q]}Z[T]=U}}}function O(Q,V,U,Y,W,X){for(var S=0,R=Y.length;S<R;S++){var P=Y[S];if(P){P=P[Q];var T=false;while(P&&P.nodeType){if(P[U]){T=Y[P[U]];break}if(P.nodeType===1){if(!X){P[U]=S}if(typeof V!=="string"){if(P===V){T=true;break}}else{if(E.filter(V,[P]).length>0){T=P;break}}}P=P[Q]}Y[S]=T}}}var H=document.compareDocumentPosition?function(Q,P){return Q.compareDocumentPosition(P)&16}:function(Q,P){return Q!==P&&(Q.contains?Q.contains(P):true)};var M=function(P){return P.documentElement&&!P.body||P.tagName&&P.ownerDocument&&!P.ownerDocument.body};n.find=E;n.filter=E.filter;n.expr=E.selectors;n.expr[":"]=n.expr.filters;E.selectors.filters.hidden=function(P){return"hidden"===P.type||n.css(P,"display")==="none"||n.css(P,"visibility")==="hidden"};E.selectors.filters.visible=function(P){return"hidden"!==P.type&&n.css(P,"display")!=="none"&&n.css(P,"visibility")!=="hidden"};E.selectors.filters.animated=function(P){return n.grep(n.timers,function(Q){return P===Q.elem}).length};n.multiFilter=function(R,P,Q){if(Q){R=":not("+R+")"}return E.matches(R,P)};n.dir=function(R,Q){var P=[],S=R[Q];while(S&&S!=document){if(S.nodeType==1){P.push(S)}S=S[Q]}return P};n.nth=function(T,P,R,S){P=P||1;var Q=0;for(;T;T=T[R]){if(T.nodeType==1&&++Q==P){break}}return T};n.sibling=function(R,Q){var P=[];for(;R;R=R.nextSibling){if(R.nodeType==1&&R!=Q){P.push(R)}}return P};return;l.Sizzle=E})();n.event={add:function(H,E,G,J){if(H.nodeType==3||H.nodeType==8){return}if(H.setInterval&&H!=l){H=l}if(!G.guid){G.guid=this.guid++}if(J!==g){var F=G;G=this.proxy(F);G.data=J}var D=n.data(H,"events")||n.data(H,"events",{}),I=n.data(H,"handle")||n.data(H,"handle",function(){return typeof n!=="undefined"&&!n.event.triggered?n.event.handle.apply(arguments.callee.elem,arguments):g});I.elem=H;n.each(E.split(/\s+/),function(L,M){var N=M.split(".");M=N.shift();G.type=N.slice().sort().join(".");var K=D[M];if(n.event.specialAll[M]){n.event.specialAll[M].setup.call(H,J,N)}if(!K){K=D[M]={};if(!n.event.special[M]||n.event.special[M].setup.call(H,J,N)===false){if(H.addEventListener){H.addEventListener(M,I,false)}else{if(H.attachEvent){H.attachEvent("on"+M,I)}}}}K[G.guid]=G;n.event.global[M]=true});H=null},guid:1,global:{},remove:function(J,G,I){if(J.nodeType==3||J.nodeType==8){return}var F=n.data(J,"events"),E,D;if(F){if(G===g||(typeof G==="string"&&G.charAt(0)==".")){for(var H in F){this.remove(J,H+(G||""))}}else{if(G.type){I=G.handler;G=G.type}n.each(G.split(/\s+/),function(L,N){var P=N.split(".");N=P.shift();var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");if(F[N]){if(I){delete F[N][I.guid]}else{for(var O in F[N]){if(M.test(F[N][O].type)){delete F[N][O]}}}if(n.event.specialAll[N]){n.event.specialAll[N].teardown.call(J,P)}for(E in F[N]){break}if(!E){if(!n.event.special[N]||n.event.special[N].teardown.call(J,P)===false){if(J.removeEventListener){J.removeEventListener(N,n.data(J,"handle"),false)}else{if(J.detachEvent){J.detachEvent("on"+N,n.data(J,"handle"))}}}E=null;delete F[N]}}})}for(E in F){break}if(!E){var K=n.data(J,"handle");if(K){K.elem=null}n.removeData(J,"events");n.removeData(J,"handle")}}},trigger:function(H,J,G,D){var F=H.type||H;if(!D){H=typeof H==="object"?H[h]?H:n.extend(n.Event(F),H):n.Event(F);if(F.indexOf("!")>=0){H.type=F=F.slice(0,-1);H.exclusive=true}if(!G){H.stopPropagation();if(this.global[F]){n.each(n.cache,function(){if(this.events&&this.events[F]){n.event.trigger(H,J,this.handle.elem)}})}}if(!G||G.nodeType==3||G.nodeType==8){return g}H.result=g;H.target=G;J=n.makeArray(J);J.unshift(H)}H.currentTarget=G;var I=n.data(G,"handle");if(I){I.apply(G,J)}if((!G[F]||(n.nodeName(G,"a")&&F=="click"))&&G["on"+F]&&G["on"+F].apply(G,J)===false){H.result=false}if(!D&&G[F]&&!H.isDefaultPrevented()&&!(n.nodeName(G,"a")&&F=="click")){this.triggered=true;try{G[F]()}catch(K){}}this.triggered=false;if(!H.isPropagationStopped()){var E=G.parentNode||G.ownerDocument;if(E){n.event.trigger(H,J,E,true)}}},handle:function(J){var I,D;J=arguments[0]=n.event.fix(J||l.event);var K=J.type.split(".");J.type=K.shift();I=!K.length&&!J.exclusive;var H=RegExp("(^|\\.)"+K.slice().sort().join(".*\\.")+"(\\.|$)");D=(n.data(this,"events")||{})[J.type];for(var F in D){var G=D[F];if(I||H.test(G.type)){J.handler=G;J.data=G.data;var E=G.apply(this,arguments);if(E!==g){J.result=E;if(E===false){J.preventDefault();J.stopPropagation()}}if(J.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(G){if(G[h]){return G}var E=G;G=n.Event(E);for(var F=this.props.length,I;F;){I=this.props[--F];G[I]=E[I]}if(!G.target){G.target=G.srcElement||document}if(G.target.nodeType==3){G.target=G.target.parentNode}if(!G.relatedTarget&&G.fromElement){G.relatedTarget=G.fromElement==G.target?G.toElement:G.fromElement}if(G.pageX==null&&G.clientX!=null){var H=document.documentElement,D=document.body;G.pageX=G.clientX+(H&&H.scrollLeft||D&&D.scrollLeft||0)-(H.clientLeft||0);G.pageY=G.clientY+(H&&H.scrollTop||D&&D.scrollTop||0)-(H.clientTop||0)}if(!G.which&&((G.charCode||G.charCode===0)?G.charCode:G.keyCode)){G.which=G.charCode||G.keyCode}if(!G.metaKey&&G.ctrlKey){G.metaKey=G.ctrlKey}if(!G.which&&G.button){G.which=(G.button&1?1:(G.button&2?3:(G.button&4?2:0)))}return G},proxy:function(E,D){D=D||function(){return E.apply(this,arguments)};D.guid=E.guid=E.guid||D.guid||this.guid++;return D},special:{ready:{setup:A,teardown:function(){}}},specialAll:{live:{setup:function(D,E){n.event.add(this,E[0],c)},teardown:function(F){if(F.length){var D=0,E=RegExp("(^|\\.)"+F[0]+"(\\.|$)");n.each((n.data(this,"events").live||{}),function(){if(E.test(this.type)){D++}});if(D<1){n.event.remove(this,F[0],c)}}}}}};n.Event=function(D){if(!this.preventDefault){return new n.Event(D)}if(D&&D.type){this.originalEvent=D;this.type=D.type;this.timeStamp=D.timeStamp}else{this.type=D}if(!this.timeStamp){this.timeStamp=e()}this[h]=true};function k(){return false}function t(){return true}n.Event.prototype={preventDefault:function(){this.isDefaultPrevented=t;var D=this.originalEvent;if(!D){return}if(D.preventDefault){D.preventDefault()}D.returnValue=false},stopPropagation:function(){this.isPropagationStopped=t;var D=this.originalEvent;if(!D){return}if(D.stopPropagation){D.stopPropagation()}D.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=t;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(E){var D=E.relatedTarget;while(D&&D!=this){try{D=D.parentNode}catch(F){D=this}}if(D!=this){E.type=E.data;n.event.handle.apply(this,arguments)}};n.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(E,D){n.event.special[D]={setup:function(){n.event.add(this,E,a,D)},teardown:function(){n.event.remove(this,E,a)}}});n.fn.extend({bind:function(E,F,D){return E=="unload"?this.one(E,F,D):this.each(function(){n.event.add(this,E,D||F,D&&F)})},one:function(F,G,E){var D=n.event.proxy(E||G,function(H){n(this).unbind(H,D);return(E||G).apply(this,arguments)});return this.each(function(){n.event.add(this,F,D,E&&G)})},unbind:function(E,D){return this.each(function(){n.event.remove(this,E,D)})},trigger:function(D,E){return this.each(function(){n.event.trigger(D,E,this)})},triggerHandler:function(D,F){if(this[0]){var E=n.Event(D);E.preventDefault();E.stopPropagation();n.event.trigger(E,F,this[0]);return E.result}},toggle:function(F){var D=arguments,E=1;while(E<D.length){n.event.proxy(F,D[E++])}return this.click(n.event.proxy(F,function(G){this.lastToggle=(this.lastToggle||0)%E;G.preventDefault();return D[this.lastToggle++].apply(this,arguments)||false}))},hover:function(D,E){return this.mouseenter(D).mouseleave(E)},ready:function(D){A();if(n.isReady){D.call(document,n)}else{n.readyList.push(D)}return this},live:function(F,E){var D=n.event.proxy(E);D.guid+=this.selector+F;n(document).bind(i(F,this.selector),this.selector,D);return this},die:function(E,D){n(document).unbind(i(E,this.selector),D?{guid:D.guid+this.selector+E}:null);return this}});function c(G){var D=RegExp("(^|\\.)"+G.type+"(\\.|$)"),F=true,E=[];n.each(n.data(this,"events").live||[],function(H,I){if(D.test(I.type)){var J=n(G.target).closest(I.data)[0];if(J){E.push({elem:J,fn:I})}}});n.each(E,function(){if(!G.isImmediatePropagationStopped()&&this.fn.call(this.elem,G,this.fn.data)===false){F=false}});return F}function i(E,D){return["live",E,D.replace(/\./g,"`").replace(/ /g,"|")].join(".")}n.extend({isReady:false,readyList:[],ready:function(){if(!n.isReady){n.isReady=true;if(n.readyList){n.each(n.readyList,function(){this.call(document,n)});n.readyList=null}n(document).triggerHandler("ready")}}});var w=false;function A(){if(w){return}w=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);n.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);n.ready()}});if(document.documentElement.doScroll&&!l.frameElement){(function(){if(n.isReady){return}try{document.documentElement.doScroll("left")}catch(D){setTimeout(arguments.callee,0);return}n.ready()})()}}}n.event.add(l,"load",n.ready)}n.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(E,D){n.fn[D]=function(F){return F?this.bind(D,F):this.trigger(D)}});n(l).bind("unload",function(){for(var D in n.cache){if(D!=1&&n.cache[D].handle){n.event.remove(n.cache[D].handle.elem)}}});(function(){n.support={};var E=document.documentElement,F=document.createElement("script"),J=document.createElement("div"),I="script"+(new Date).getTime();J.style.display="none";J.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var G=J.getElementsByTagName("*"),D=J.getElementsByTagName("a")[0];if(!G||!G.length||!D){return}n.support={leadingWhitespace:J.firstChild.nodeType==3,tbody:!J.getElementsByTagName("tbody").length,objectAll:!!J.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!J.getElementsByTagName("link").length,style:/red/.test(D.getAttribute("style")),hrefNormalized:D.getAttribute("href")==="/a",opacity:D.style.opacity==="0.5",cssFloat:!!D.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};F.type="text/javascript";try{F.appendChild(document.createTextNode("window."+I+"=1;"))}catch(H){}E.insertBefore(F,E.firstChild);if(l[I]){n.support.scriptEval=true;delete l[I]}E.removeChild(F);if(J.attachEvent&&J.fireEvent){J.attachEvent("onclick",function(){n.support.noCloneEvent=false;J.detachEvent("onclick",arguments.callee)});J.cloneNode(true).fireEvent("onclick")}n(function(){var K=document.createElement("div");K.style.width="1px";K.style.paddingLeft="1px";document.body.appendChild(K);n.boxModel=n.support.boxModel=K.offsetWidth===2;document.body.removeChild(K)})})();var v=n.support.cssFloat?"cssFloat":"styleFloat";n.props={"for":"htmlFor","class":"className","float":v,cssFloat:v,styleFloat:v,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};n.fn.extend({_load:n.fn.load,load:function(F,I,J){if(typeof F!=="string"){return this._load(F)}var H=F.indexOf(" ");if(H>=0){var D=F.slice(H,F.length);F=F.slice(0,H)}var G="GET";if(I){if(n.isFunction(I)){J=I;I=null}else{if(typeof I==="object"){I=n.param(I);G="POST"}}}var E=this;n.ajax({url:F,type:G,dataType:"html",data:I,complete:function(L,K){if(K=="success"||K=="notmodified"){E.html(D?n("<div/>").append(L.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(D):L.responseText)}if(J){E.each(J,[L.responseText,K,L])}}});return this},serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?n.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(D,E){var F=n(this).val();return F==null?null:n.isArray(F)?n.map(F,function(H,G){return{name:E.name,value:H}}):{name:E.name,value:F}}).get()}});n.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(D,E){n.fn[E]=function(F){return this.bind(E,F)}});var q=e();n.extend({get:function(D,F,G,E){if(n.isFunction(F)){G=F;F=null}return n.ajax({type:"GET",url:D,data:F,success:G,dataType:E})},getScript:function(D,E){return n.get(D,null,E,"script")},getJSON:function(D,E,F){return n.get(D,E,F,"json")},post:function(D,F,G,E){if(n.isFunction(F)){G=F;F={}}return n.ajax({type:"POST",url:D,data:F,success:G,dataType:E})},ajaxSetup:function(D){n.extend(n.ajaxSettings,D)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(L){L=n.extend(true,L,n.extend(true,{},n.ajaxSettings,L));var V,E=/=\?(&|$)/g,Q,U,F=L.type.toUpperCase();if(L.data&&L.processData&&typeof L.data!=="string"){L.data=n.param(L.data)}if(L.dataType=="jsonp"){if(F=="GET"){if(!L.url.match(E)){L.url+=(L.url.match(/\?/)?"&":"?")+(L.jsonp||"callback")+"=?"}}else{if(!L.data||!L.data.match(E)){L.data=(L.data?L.data+"&":"")+(L.jsonp||"callback")+"=?"}}L.dataType="json"}if(L.dataType=="json"&&(L.data&&L.data.match(E)||L.url.match(E))){V="jsonp"+q++;if(L.data){L.data=(L.data+"").replace(E,"="+V+"$1")}L.url=L.url.replace(E,"="+V+"$1");L.dataType="script";l[V]=function(W){U=W;H();K();l[V]=g;try{delete l[V]}catch(X){}if(G){G.removeChild(S)}}}if(L.dataType=="script"&&L.cache==null){L.cache=false}if(L.cache===false&&F=="GET"){var D=e();var T=L.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+D+"$2");L.url=T+((T==L.url)?(L.url.match(/\?/)?"&":"?")+"_="+D:"")}if(L.data&&F=="GET"){L.url+=(L.url.match(/\?/)?"&":"?")+L.data;L.data=null}if(L.global&&!n.active++){n.event.trigger("ajaxStart")}var P=/^(\w+:)?\/\/([^\/?#]+)/.exec(L.url);if(L.dataType=="script"&&F=="GET"&&P&&(P[1]&&P[1]!=location.protocol||P[2]!=location.host)){var G=document.getElementsByTagName("head")[0];var S=document.createElement("script");S.src=L.url;if(L.scriptCharset){S.charset=L.scriptCharset}if(!V){var N=false;S.onload=S.onreadystatechange=function(){if(!N&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){N=true;H();K();G.removeChild(S)}}}G.appendChild(S);return g}var J=false;var I=L.xhr();if(L.username){I.open(F,L.url,L.async,L.username,L.password)}else{I.open(F,L.url,L.async)}try{if(L.data){I.setRequestHeader("Content-Type",L.contentType)}if(L.ifModified){I.setRequestHeader("If-Modified-Since",n.lastModified[L.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",L.dataType&&L.accepts[L.dataType]?L.accepts[L.dataType]+", */*":L.accepts._default)}catch(R){}if(L.beforeSend&&L.beforeSend(I,L)===false){if(L.global&&!--n.active){n.event.trigger("ajaxStop")}I.abort();return false}if(L.global){n.event.trigger("ajaxSend",[I,L])}var M=function(W){if(I.readyState==0){if(O){clearInterval(O);O=null;if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}}else{if(!J&&I&&(I.readyState==4||W=="timeout")){J=true;if(O){clearInterval(O);O=null}Q=W=="timeout"?"timeout":!n.httpSuccess(I)?"error":L.ifModified&&n.httpNotModified(I,L.url)?"notmodified":"success";if(Q=="success"){try{U=n.httpData(I,L.dataType,L)}catch(Y){Q="parsererror"}}if(Q=="success"){var X;try{X=I.getResponseHeader("Last-Modified")}catch(Y){}if(L.ifModified&&X){n.lastModified[L.url]=X}if(!V){H()}}else{n.handleError(L,I,Q)}K();if(L.async){I=null}}}};if(L.async){var O=setInterval(M,13);if(L.timeout>0){setTimeout(function(){if(I){if(!J){M("timeout")}if(I){I.abort()}}},L.timeout)}}try{I.send(L.data)}catch(R){n.handleError(L,I,null,R)}if(!L.async){M()}function H(){if(L.success){L.success(U,Q)}if(L.global){n.event.trigger("ajaxSuccess",[I,L])}}function K(){if(L.complete){L.complete(I,Q)}if(L.global){n.event.trigger("ajaxComplete",[I,L])}if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}return I},handleError:function(E,G,D,F){if(E.error){E.error(G,D,F)}if(E.global){n.event.trigger("ajaxError",[G,E,F])}},active:0,httpSuccess:function(E){try{return !E.status&&location.protocol=="file:"||(E.status>=200&&E.status<300)||E.status==304||E.status==1223}catch(D){}return false},httpNotModified:function(F,D){try{var G=F.getResponseHeader("Last-Modified");return F.status==304||G==n.lastModified[D]}catch(E){}return false},httpData:function(I,G,F){var E=I.getResponseHeader("content-type"),D=G=="xml"||!G&&E&&E.indexOf("xml")>=0,H=D?I.responseXML:I.responseText;if(D&&H.documentElement.tagName=="parsererror"){throw"parsererror"}if(F&&F.dataFilter){H=F.dataFilter(H,G)}if(typeof H==="string"){if(G=="script"){n.globalEval(H)}if(G=="json"){H=l["eval"]("("+H+")")}}return H},param:function(D){var F=[];function G(H,I){F[F.length]=encodeURIComponent(H)+"="+encodeURIComponent(I)}if(n.isArray(D)||D.jquery){n.each(D,function(){G(this.name,this.value)})}else{for(var E in D){if(n.isArray(D[E])){n.each(D[E],function(){G(E,this)})}else{G(E,n.isFunction(D[E])?D[E]():D[E])}}}return F.join("&").replace(/%20/g,"+")}});var m={},d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function s(E,D){var F={};n.each(d.concat.apply([],d.slice(0,D)),function(){F[this]=E});return F}n.fn.extend({show:function(I,K){if(I){return this.animate(s("show",3),I,K)}else{for(var G=0,E=this.length;G<E;G++){var D=n.data(this[G],"olddisplay");this[G].style.display=D||"";if(n.css(this[G],"display")==="none"){var F=this[G].tagName,J;if(m[F]){J=m[F]}else{var H=n("<"+F+" />").appendTo("body");J=H.css("display");if(J==="none"){J="block"}H.remove();m[F]=J}this[G].style.display=n.data(this[G],"olddisplay",J)}}return this}},hide:function(G,H){if(G){return this.animate(s("hide",3),G,H)}else{for(var F=0,E=this.length;F<E;F++){var D=n.data(this[F],"olddisplay");if(!D&&D!=="none"){n.data(this[F],"olddisplay",n.css(this[F],"display"))}this[F].style.display="none"}return this}},_toggle:n.fn.toggle,toggle:function(F,E){var D=typeof F==="boolean";return n.isFunction(F)&&n.isFunction(E)?this._toggle.apply(this,arguments):F==null||D?this.each(function(){var G=D?F:n(this).is(":hidden");n(this)[G?"show":"hide"]()}):this.animate(s("toggle",3),F,E)},fadeTo:function(D,F,E){return this.animate({opacity:F},D,E)},animate:function(H,E,G,F){var D=n.speed(E,G,F);return this[D.queue===false?"each":"queue"](function(){var J=n.extend({},D),L,K=this.nodeType==1&&n(this).is(":hidden"),I=this;for(L in H){if(H[L]=="hide"&&K||H[L]=="show"&&!K){return J.complete.call(this)}if((L=="height"||L=="width")&&this.style){J.display=n.css(this,"display");J.overflow=this.style.overflow}}if(J.overflow!=null){this.style.overflow="hidden"}J.curAnim=n.extend({},H);n.each(H,function(N,R){var Q=new n.fx(I,J,N);if(/toggle|show|hide/.test(R)){Q[R=="toggle"?K?"show":"hide":R](H)}else{var P=R.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),S=Q.cur(true)||0;if(P){var M=parseFloat(P[2]),O=P[3]||"px";if(O!="px"){I.style[N]=(M||1)+O;S=((M||1)/Q.cur(true))*S;I.style[N]=S+O}if(P[1]){M=((P[1]=="-="?-1:1)*M)+S}Q.custom(S,M,O)}else{Q.custom(S,R,"")}}});return true})},stop:function(E,D){var F=n.timers;if(E){this.queue([])}this.each(function(){for(var G=F.length-1;G>=0;G--){if(F[G].elem==this){if(D){F[G](true)}F.splice(G,1)}}});if(!D){this.dequeue()}return this}});n.each({slideDown:s("show",1),slideUp:s("hide",1),slideToggle:s("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(D,E){n.fn[D]=function(F,G){return this.animate(E,F,G)}});n.extend({speed:function(F,G,E){var D=typeof F==="object"?F:{complete:E||!E&&G||n.isFunction(F)&&F,duration:F,easing:E&&G||G&&!n.isFunction(G)&&G};D.duration=n.fx.off?0:typeof D.duration==="number"?D.duration:n.fx.speeds[D.duration]||n.fx.speeds._default;D.old=D.complete;D.complete=function(){if(D.queue!==false){n(this).dequeue()}if(n.isFunction(D.old)){D.old.call(this)}};return D},easing:{linear:function(F,G,D,E){return D+E*F},swing:function(F,G,D,E){return((-Math.cos(F*Math.PI)/2)+0.5)*E+D}},timers:[],timerId:null,fx:function(E,D,F){this.options=D;this.elem=E;this.prop=F;if(!D.orig){D.orig={}}}});n.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(n.fx.step[this.prop]||n.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(E){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var D=parseFloat(n.css(this.elem,this.prop,E));return D&&D>-10000?D:parseFloat(n.curCSS(this.elem,this.prop))||0},custom:function(H,G,F){this.startTime=e();this.start=H;this.end=G;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;function E(I){return D.step(I)}E.elem=this.elem;n.timers.push(E);if(E()&&n.timerId==null){n.timerId=setInterval(function(){var J=n.timers;for(var I=0;I<J.length;I++){if(!J[I]()){J.splice(I--,1)}}if(!J.length){clearInterval(n.timerId);n.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());n(this.elem).show()},hide:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(G){var F=e();if(G||F>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var D=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){D=false}}if(D){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(n.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){n(this.elem).hide()}if(this.options.hide||this.options.show){for(var H in this.options.curAnim){n.attr(this.elem.style,H,this.options.orig[H])}}}if(D){this.options.complete.call(this.elem)}return false}else{var I=F-this.startTime;this.state=I/this.options.duration;this.pos=n.easing[this.options.easing||(n.easing.swing?"swing":"linear")](this.state,I,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};n.extend(n.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(D){n.attr(D.elem.style,"opacity",D.now)},_default:function(D){if(D.elem.style&&D.elem.style[D.prop]!=null){D.elem.style[D.prop]=D.now+D.unit}else{D.elem[D.prop]=D.now}}}});if(document.documentElement.getBoundingClientRect){n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}var F=this[0].getBoundingClientRect(),I=this[0].ownerDocument,E=I.body,D=I.documentElement,K=D.clientTop||E.clientTop||0,J=D.clientLeft||E.clientLeft||0,H=F.top+(self.pageYOffset||n.boxModel&&D.scrollTop||E.scrollTop)-K,G=F.left+(self.pageXOffset||n.boxModel&&D.scrollLeft||E.scrollLeft)-J;return{top:H,left:G}}}else{n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}n.offset.initialized||n.offset.initialize();var I=this[0],F=I.offsetParent,E=I,N=I.ownerDocument,L,G=N.documentElement,J=N.body,K=N.defaultView,D=K.getComputedStyle(I,null),M=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=K.getComputedStyle(I,null);M-=I.scrollTop,H-=I.scrollLeft;if(I===F){M+=I.offsetTop,H+=I.offsetLeft;if(n.offset.doesNotAddBorder&&!(n.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}E=F,F=I.offsetParent}if(n.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}D=L}if(D.position==="relative"||D.position==="static"){M+=J.offsetTop,H+=J.offsetLeft}if(D.position==="fixed"){M+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft)}return{top:M,left:H}}}n.offset={initialize:function(){if(this.initialized){return}var K=document.body,E=document.createElement("div"),G,F,M,H,L,D,I=K.style.marginTop,J='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>';L={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(D in L){E.style[D]=L[D]}E.innerHTML=J;K.insertBefore(E,K.firstChild);G=E.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(E);this.initialized=true},bodyOffset:function(D){n.offset.initialized||n.offset.initialize();var F=D.offsetTop,E=D.offsetLeft;if(n.offset.doesNotIncludeMarginInBodyOffset){F+=parseInt(n.curCSS(D,"marginTop",true),10)||0,E+=parseInt(n.curCSS(D,"marginLeft",true),10)||0}return{top:F,left:E}}};n.fn.extend({position:function(){var H=0,G=0,E;if(this[0]){var F=this.offsetParent(),I=this.offset(),D=/^body|html$/i.test(F[0].tagName)?{top:0,left:0}:F.offset();I.top-=j(this,"marginTop");I.left-=j(this,"marginLeft");D.top+=j(F,"borderTopWidth");D.left+=j(F,"borderLeftWidth");E={top:I.top-D.top,left:I.left-D.left}}return E},offsetParent:function(){var D=this[0].offsetParent||document.body;while(D&&(!/^body|html$/i.test(D.tagName)&&n.css(D,"position")=="static")){D=D.offsetParent}return n(D)}});n.each(["Left","Top"],function(E,D){var F="scroll"+D;n.fn[F]=function(G){if(!this[0]){return null}return G!==g?this.each(function(){this==l||this==document?l.scrollTo(!E?G:n(l).scrollLeft(),E?G:n(l).scrollTop()):this[F]=G}):this[0]==l||this[0]==document?self[E?"pageYOffset":"pageXOffset"]||n.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]}});n.each(["Height","Width"],function(G,E){var D=G?"Left":"Top",F=G?"Right":"Bottom";n.fn["inner"+E]=function(){return this[E.toLowerCase()]()+j(this,"padding"+D)+j(this,"padding"+F)};n.fn["outer"+E]=function(I){return this["inner"+E]()+j(this,"border"+D+"Width")+j(this,"border"+F+"Width")+(I?j(this,"margin"+D)+j(this,"margin"+F):0)};var H=E.toLowerCase();n.fn[H]=function(I){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+E]||document.body["client"+E]:this[0]==document?Math.max(document.documentElement["client"+E],document.body["scroll"+E],document.documentElement["scroll"+E],document.body["offset"+E],document.documentElement["offset"+E]):I===g?(this.length?n.css(this[0],H):null):this.css(H,typeof I==="string"?I:I+"px")}})})();
\ No newline at end of file
--- /dev/null
+/*\r
+ *\r
+ * TableSorter 2.0 - Client-side table sorting with ease!\r
+ * Version 2.0.3\r
+ * @requires jQuery v1.2.3\r
+ *\r
+ * Copyright (c) 2007 Christian Bach\r
+ * Examples and docs at: http://tablesorter.com\r
+ * Dual licensed under the MIT and GPL licenses:\r
+ * http://www.opensource.org/licenses/mit-license.php\r
+ * http://www.gnu.org/licenses/gpl.html\r
+ *\r
+ */\r
+/**\r
+ *\r
+ * @description Create a sortable table with multi-column sorting capabilitys\r
+ *\r
+ * @example $('table').tablesorter();\r
+ * @desc Create a simple tablesorter interface.\r
+ *\r
+ * @example $('table').tablesorter({ sortList:[[0,0],[1,0]] });\r
+ * @desc Create a tablesorter interface and sort on the first and secound column in ascending order.\r
+ *\r
+ * @example $('table').tablesorter({ headers: { 0: { sorter: false}, 1: {sorter: false} } });\r
+ * @desc Create a tablesorter interface and disableing the first and secound column headers.\r
+ *\r
+ * @example $('table').tablesorter({ 0: {sorter:"integer"}, 1: {sorter:"currency"} });\r
+ * @desc Create a tablesorter interface and set a column parser for the first and secound column.\r
+ *\r
+ *\r
+ * @param Object settings An object literal containing key/value pairs to provide optional settings.\r
+ *\r
+ * @option String cssHeader (optional) A string of the class name to be appended to sortable tr elements in the thead of the table.\r
+ * Default value: "header"\r
+ *\r
+ * @option String cssAsc (optional) A string of the class name to be appended to sortable tr elements in the thead on a ascending sort.\r
+ * Default value: "headerSortUp"\r
+ *\r
+ * @option String cssDesc (optional) A string of the class name to be appended to sortable tr elements in the thead on a descending sort.\r
+ * Default value: "headerSortDown"\r
+ *\r
+ * @option String sortInitialOrder (optional) A string of the inital sorting order can be asc or desc.\r
+ * Default value: "asc"\r
+ *\r
+ * @option String sortMultisortKey (optional) A string of the multi-column sort key.\r
+ * Default value: "shiftKey"\r
+ *\r
+ * @option String textExtraction (optional) A string of the text-extraction method to use.\r
+ * For complex html structures inside td cell set this option to "complex",\r
+ * on large tables the complex option can be slow.\r
+ * Default value: "simple"\r
+ *\r
+ * @option Object headers (optional) An array containing the forces sorting rules.\r
+ * This option let's you specify a default sorting rule.\r
+ * Default value: null\r
+ *\r
+ * @option Array sortList (optional) An array containing the forces sorting rules.\r
+ * This option let's you specify a default sorting rule.\r
+ * Default value: null\r
+ *\r
+ * @option Array sortForce (optional) An array containing forced sorting rules.\r
+ * This option let's you specify a default sorting rule, which is prepended to user-selected rules.\r
+ * Default value: null\r
+ *\r
+ * @option Array sortAppend (optional) An array containing forced sorting rules.\r
+ * This option let's you specify a default sorting rule, which is appended to user-selected rules.\r
+ * Default value: null\r
+ *\r
+ * @option Boolean widthFixed (optional) Boolean flag indicating if tablesorter should apply fixed widths to the table columns.\r
+ * This is usefull when using the pager companion plugin.\r
+ * This options requires the dimension jquery plugin.\r
+ * Default value: false\r
+ *\r
+ * @option Boolean cancelSelection (optional) Boolean flag indicating if tablesorter should cancel selection of the table headers text.\r
+ * Default value: true\r
+ *\r
+ * @option Boolean debug (optional) Boolean flag indicating if tablesorter should display debuging information usefull for development.\r
+ *\r
+ * @type jQuery\r
+ *\r
+ * @name tablesorter\r
+ *\r
+ * @cat Plugins/Tablesorter\r
+ *\r
+ * @author Christian Bach/christian.bach@polyester.se\r
+ */\r
+\r
+(function($) {\r
+ $.extend({\r
+ tablesorter: new function() {\r
+\r
+ var parsers = [], widgets = [];\r
+\r
+ this.defaults = {\r
+ cssHeader: "header",\r
+ cssAsc: "headerSortUp",\r
+ cssDesc: "headerSortDown",\r
+ sortInitialOrder: "asc",\r
+ sortMultiSortKey: "shiftKey",\r
+ sortForce: null,\r
+ sortAppend: null,\r
+ textExtraction: "simple",\r
+ parsers: {},\r
+ widgets: [],\r
+ widgetZebra: {css: ["even","odd"]},\r
+ headers: {},\r
+ widthFixed: false,\r
+ cancelSelection: true,\r
+ sortList: [],\r
+ headerList: [],\r
+ dateFormat: "us",\r
+ decimal: '.',\r
+ debug: false\r
+ };\r
+\r
+ /* debuging utils */\r
+ function benchmark(s,d) {\r
+ log(s + "," + (new Date().getTime() - d.getTime()) + "ms");\r
+ }\r
+\r
+ this.benchmark = benchmark;\r
+\r
+ function log(s) {\r
+ if (typeof console != "undefined" && typeof console.debug != "undefined") {\r
+ console.log(s);\r
+ } else {\r
+ alert(s);\r
+ }\r
+ }\r
+\r
+ /* parsers utils */\r
+ function buildParserCache(table,$headers) {\r
+\r
+ if(table.config.debug) { var parsersDebug = ""; }\r
+\r
+ var rows = table.tBodies[0].rows;\r
+\r
+ if(table.tBodies[0].rows[0]) {\r
+\r
+ var list = [], cells = rows[0].cells, l = cells.length;\r
+\r
+ for (var i=0;i < l; i++) {\r
+ var p = false;\r
+\r
+ if($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter) ) {\r
+\r
+ p = getParserById($($headers[i]).metadata().sorter);\r
+\r
+ } else if((table.config.headers[i] && table.config.headers[i].sorter)) {\r
+\r
+ p = getParserById(table.config.headers[i].sorter);\r
+ }\r
+ if(!p) {\r
+ p = detectParserForColumn(table,cells[i]);\r
+ }\r
+\r
+ if(table.config.debug) { parsersDebug += "column:" + i + " parser:" +p.id + "\n"; }\r
+\r
+ list.push(p);\r
+ }\r
+ }\r
+\r
+ if(table.config.debug) { log(parsersDebug); }\r
+\r
+ return list;\r
+ };\r
+\r
+ function detectParserForColumn(table,node) {\r
+ var l = parsers.length;\r
+ for(var i=1; i < l; i++) {\r
+ if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)) {\r
+ return parsers[i];\r
+ }\r
+ }\r
+ // 0 is always the generic parser (text)\r
+ return parsers[0];\r
+ }\r
+\r
+ function getParserById(name) {\r
+ var l = parsers.length;\r
+ for(var i=0; i < l; i++) {\r
+ if(parsers[i].id.toLowerCase() == name.toLowerCase()) {\r
+ return parsers[i];\r
+ }\r
+ }\r
+ return false;\r
+ }\r
+\r
+ /* utils */\r
+ function buildCache(table) {\r
+\r
+ if(table.config.debug) { var cacheTime = new Date(); }\r
+\r
+\r
+ var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0,\r
+ totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0,\r
+ parsers = table.config.parsers,\r
+ cache = {row: [], normalized: []};\r
+\r
+ for (var i=0;i < totalRows; ++i) {\r
+\r
+ /** Add the table data to main data array */\r
+ var c = table.tBodies[0].rows[i], cols = [];\r
+\r
+ cache.row.push($(c));\r
+\r
+ for(var j=0; j < totalCells; ++j) {\r
+ cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));\r
+ }\r
+\r
+ cols.push(i); // add position for rowCache\r
+ cache.normalized.push(cols);\r
+ cols = null;\r
+ };\r
+\r
+ if(table.config.debug) { benchmark("Building cache for " + totalRows + " rows:", cacheTime); }\r
+\r
+ return cache;\r
+ };\r
+\r
+ function getElementText(config,node) {\r
+\r
+ if(!node) return "";\r
+\r
+ var t = "";\r
+\r
+ if(config.textExtraction == "simple") {\r
+ if(node.childNodes[0] && node.childNodes[0].hasChildNodes()) {\r
+ t = node.childNodes[0].innerHTML;\r
+ } else {\r
+ t = node.innerHTML;\r
+ }\r
+ } else {\r
+ if(typeof(config.textExtraction) == "function") {\r
+ t = config.textExtraction(node);\r
+ } else {\r
+ t = $(node).text();\r
+ }\r
+ }\r
+ return t;\r
+ }\r
+\r
+ function appendToTable(table,cache) {\r
+\r
+ if(table.config.debug) {var appendTime = new Date()}\r
+\r
+ var c = cache,\r
+ r = c.row,\r
+ n= c.normalized,\r
+ totalRows = n.length,\r
+ checkCell = (n[0].length-1),\r
+ tableBody = $(table.tBodies[0]),\r
+ rows = [];\r
+\r
+ for (var i=0;i < totalRows; i++) {\r
+ rows.push(r[n[i][checkCell]]);\r
+ if(!table.config.appender) {\r
+\r
+ var o = r[n[i][checkCell]];\r
+ var l = o.length;\r
+ for(var j=0; j < l; j++) {\r
+\r
+ tableBody[0].appendChild(o[j]);\r
+\r
+ }\r
+\r
+ //tableBody.append(r[n[i][checkCell]]);\r
+ }\r
+ }\r
+\r
+ if(table.config.appender) {\r
+\r
+ table.config.appender(table,rows);\r
+ }\r
+\r
+ rows = null;\r
+\r
+ if(table.config.debug) { benchmark("Rebuilt table:", appendTime); }\r
+\r
+ //apply table widgets\r
+ applyWidget(table);\r
+\r
+ // trigger sortend\r
+ setTimeout(function() {\r
+ $(table).trigger("sortEnd");\r
+ },0);\r
+\r
+ };\r
+\r
+ function buildHeaders(table) {\r
+\r
+ if(table.config.debug) { var time = new Date(); }\r
+\r
+ var meta = ($.metadata) ? true : false, tableHeadersRows = [];\r
+\r
+ for(var i = 0; i < table.tHead.rows.length; i++) { tableHeadersRows[i]=0; };\r
+\r
+ $tableHeaders = $("thead th",table);\r
+\r
+ $tableHeaders.each(function(index) {\r
+\r
+ this.count = 0;\r
+ this.column = index;\r
+ this.order = formatSortingOrder(table.config.sortInitialOrder);\r
+\r
+ if(checkHeaderMetadata(this) || checkHeaderOptions(table,index)) this.sortDisabled = true;\r
+\r
+ if(!this.sortDisabled) {\r
+ $(this).addClass(table.config.cssHeader);\r
+ }\r
+\r
+ // add cell to headerList\r
+ table.config.headerList[index]= this;\r
+ });\r
+\r
+ if(table.config.debug) { benchmark("Built headers:", time); log($tableHeaders); }\r
+\r
+ return $tableHeaders;\r
+\r
+ };\r
+\r
+ function checkCellColSpan(table, rows, row) {\r
+ var arr = [], r = table.tHead.rows, c = r[row].cells;\r
+\r
+ for(var i=0; i < c.length; i++) {\r
+ var cell = c[i];\r
+\r
+ if ( cell.colSpan > 1) {\r
+ arr = arr.concat(checkCellColSpan(table, headerArr,row++));\r
+ } else {\r
+ if(table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row+1])) {\r
+ arr.push(cell);\r
+ }\r
+ //headerArr[row] = (i+row);\r
+ }\r
+ }\r
+ return arr;\r
+ };\r
+\r
+ function checkHeaderMetadata(cell) {\r
+ if(($.metadata) && ($(cell).metadata().sorter === false)) { return true; };\r
+ return false;\r
+ }\r
+\r
+ function checkHeaderOptions(table,i) {\r
+ if((table.config.headers[i]) && (table.config.headers[i].sorter === false)) { return true; };\r
+ return false;\r
+ }\r
+\r
+ function applyWidget(table) {\r
+ var c = table.config.widgets;\r
+ var l = c.length;\r
+ for(var i=0; i < l; i++) {\r
+\r
+ getWidgetById(c[i]).format(table);\r
+ }\r
+\r
+ }\r
+\r
+ function getWidgetById(name) {\r
+ var l = widgets.length;\r
+ for(var i=0; i < l; i++) {\r
+ if(widgets[i].id.toLowerCase() == name.toLowerCase() ) {\r
+ return widgets[i];\r
+ }\r
+ }\r
+ };\r
+\r
+ function formatSortingOrder(v) {\r
+\r
+ if(typeof(v) != "Number") {\r
+ i = (v.toLowerCase() == "desc") ? 1 : 0;\r
+ } else {\r
+ i = (v == (0 || 1)) ? v : 0;\r
+ }\r
+ return i;\r
+ }\r
+\r
+ function isValueInArray(v, a) {\r
+ var l = a.length;\r
+ for(var i=0; i < l; i++) {\r
+ if(a[i][0] == v) {\r
+ return true;\r
+ }\r
+ }\r
+ return false;\r
+ }\r
+\r
+ function setHeadersCss(table,$headers, list, css) {\r
+ // remove all header information\r
+ $headers.removeClass(css[0]).removeClass(css[1]);\r
+\r
+ var h = [];\r
+ $headers.each(function(offset) {\r
+ if(!this.sortDisabled) {\r
+ h[this.column] = $(this);\r
+ }\r
+ });\r
+\r
+ var l = list.length;\r
+ for(var i=0; i < l; i++) {\r
+ h[list[i][0]].addClass(css[list[i][1]]);\r
+ }\r
+ }\r
+\r
+ function fixColumnWidth(table,$headers) {\r
+ var c = table.config;\r
+ if(c.widthFixed) {\r
+ var colgroup = $('<colgroup>');\r
+ $("tr:first td",table.tBodies[0]).each(function() {\r
+ colgroup.append($('<col>').css('width',$(this).width()));\r
+ });\r
+ $(table).prepend(colgroup);\r
+ };\r
+ }\r
+\r
+ function updateHeaderSortCount(table,sortList) {\r
+ var c = table.config, l = sortList.length;\r
+ for(var i=0; i < l; i++) {\r
+ var s = sortList[i], o = c.headerList[s[0]];\r
+ o.count = s[1];\r
+ o.count++;\r
+ }\r
+ }\r
+\r
+ /* sorting methods */\r
+ function multisort(table,sortList,cache) {\r
+\r
+ if(table.config.debug) { var sortTime = new Date(); }\r
+\r
+ var dynamicExp = "var sortWrapper = function(a,b) {", l = sortList.length;\r
+\r
+ for(var i=0; i < l; i++) {\r
+\r
+ var c = sortList[i][0];\r
+ var order = sortList[i][1];\r
+ var s = (getCachedSortType(table.config.parsers,c) == "text") ? ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ? "sortNumeric" : "sortNumericDesc");\r
+\r
+ var e = "e" + i;\r
+\r
+ dynamicExp += "var " + e + " = " + s + "(a[" + c + "],b[" + c + "]); ";\r
+ dynamicExp += "if(" + e + ") { return " + e + "; } ";\r
+ dynamicExp += "else { ";\r
+ }\r
+\r
+ // if value is the same keep orignal order\r
+ var orgOrderCol = cache.normalized[0].length - 1;\r
+ dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];";\r
+\r
+ for(var i=0; i < l; i++) {\r
+ dynamicExp += "}; ";\r
+ }\r
+\r
+ dynamicExp += "return 0; ";\r
+ dynamicExp += "}; ";\r
+\r
+ eval(dynamicExp);\r
+\r
+ cache.normalized.sort(sortWrapper);\r
+\r
+ if(table.config.debug) { benchmark("Sorting on " + sortList.toString() + " and dir " + order+ " time:", sortTime); }\r
+\r
+ return cache;\r
+ };\r
+\r
+ function sortText(a,b) {\r
+ return ((a < b) ? -1 : ((a > b) ? 1 : 0));\r
+ };\r
+\r
+ function sortTextDesc(a,b) {\r
+ return ((b < a) ? -1 : ((b > a) ? 1 : 0));\r
+ };\r
+\r
+ function sortNumeric(a,b) {\r
+ return a-b;\r
+ };\r
+\r
+ function sortNumericDesc(a,b) {\r
+ return b-a;\r
+ };\r
+\r
+ function getCachedSortType(parsers,i) {\r
+ return parsers[i].type;\r
+ };\r
+\r
+ /* public methods */\r
+ this.construct = function(settings) {\r
+\r
+ return this.each(function() {\r
+\r
+ if(!this.tHead || !this.tBodies) return;\r
+\r
+ var $this, $document,$headers, cache, config, shiftDown = 0, sortOrder;\r
+\r
+ this.config = {};\r
+\r
+ config = $.extend(this.config, $.tablesorter.defaults, settings);\r
+\r
+ // store common expression for speed\r
+ $this = $(this);\r
+\r
+ // build headers\r
+ $headers = buildHeaders(this);\r
+\r
+ // try to auto detect column type, and store in tables config\r
+ this.config.parsers = buildParserCache(this,$headers);\r
+\r
+\r
+ // build the cache for the tbody cells\r
+ cache = buildCache(this);\r
+\r
+ // get the css class names, could be done else where.\r
+ var sortCSS = [config.cssDesc,config.cssAsc];\r
+\r
+ // fixate columns if the users supplies the fixedWidth option\r
+ fixColumnWidth(this);\r
+\r
+ // apply event handling to headers\r
+ // this is to big, perhaps break it out?\r
+ $headers.click(function(e) {\r
+\r
+ $this.trigger("sortStart");\r
+\r
+ var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0;\r
+\r
+ if(!this.sortDisabled && totalRows > 0) {\r
+\r
+\r
+ // store exp, for speed\r
+ var $cell = $(this);\r
+\r
+ // get current column index\r
+ var i = this.column;\r
+\r
+ // get current column sort order\r
+ this.order = this.count++ % 2;\r
+\r
+ // user only whants to sort on one column\r
+ if(!e[config.sortMultiSortKey]) {\r
+\r
+ // flush the sort list\r
+ config.sortList = [];\r
+\r
+ if(config.sortForce != null) {\r
+ var a = config.sortForce;\r
+ for(var j=0; j < a.length; j++) {\r
+ if(a[j][0] != i) {\r
+ config.sortList.push(a[j]);\r
+ }\r
+ }\r
+ }\r
+\r
+ // add column to sort list\r
+ config.sortList.push([i,this.order]);\r
+\r
+ // multi column sorting\r
+ } else {\r
+ // the user has clicked on an all ready sortet column.\r
+ if(isValueInArray(i,config.sortList)) {\r
+\r
+ // revers the sorting direction for all tables.\r
+ for(var j=0; j < config.sortList.length; j++) {\r
+ var s = config.sortList[j], o = config.headerList[s[0]];\r
+ if(s[0] == i) {\r
+ o.count = s[1];\r
+ o.count++;\r
+ s[1] = o.count % 2;\r
+ }\r
+ }\r
+ } else {\r
+ // add column to sort list array\r
+ config.sortList.push([i,this.order]);\r
+ }\r
+ };\r
+ setTimeout(function() {\r
+ //set css for headers\r
+ setHeadersCss($this[0],$headers,config.sortList,sortCSS);\r
+ appendToTable($this[0],multisort($this[0],config.sortList,cache));\r
+ },1);\r
+ // stop normal event by returning false\r
+ return false;\r
+ }\r
+ // cancel selection\r
+ }).mousedown(function() {\r
+ if(config.cancelSelection) {\r
+ this.onselectstart = function() {return false};\r
+ return false;\r
+ }\r
+ });\r
+\r
+ // apply easy methods that trigger binded events\r
+ $this.bind("update",function() {\r
+\r
+ // rebuild parsers.\r
+ this.config.parsers = buildParserCache(this,$headers);\r
+\r
+ // rebuild the cache map\r
+ cache = buildCache(this);\r
+\r
+ }).bind("sorton",function(e,list) {\r
+\r
+ $(this).trigger("sortStart");\r
+\r
+ config.sortList = list;\r
+\r
+ // update and store the sortlist\r
+ var sortList = config.sortList;\r
+\r
+ // update header count index\r
+ updateHeaderSortCount(this,sortList);\r
+\r
+ //set css for headers\r
+ setHeadersCss(this,$headers,sortList,sortCSS);\r
+\r
+\r
+ // sort the table and append it to the dom\r
+ appendToTable(this,multisort(this,sortList,cache));\r
+\r
+ }).bind("appendCache",function() {\r
+\r
+ appendToTable(this,cache);\r
+\r
+ }).bind("applyWidgetId",function(e,id) {\r
+\r
+ getWidgetById(id).format(this);\r
+\r
+ }).bind("applyWidgets",function() {\r
+ // apply widgets\r
+ applyWidget(this);\r
+ });\r
+\r
+ if($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) {\r
+ config.sortList = $(this).metadata().sortlist;\r
+ }\r
+ // if user has supplied a sort list to constructor.\r
+ if(config.sortList.length > 0) {\r
+ $this.trigger("sorton",[config.sortList]);\r
+ }\r
+\r
+ // apply widgets\r
+ applyWidget(this);\r
+ });\r
+ };\r
+\r
+ this.addParser = function(parser) {\r
+ var l = parsers.length, a = true;\r
+ for(var i=0; i < l; i++) {\r
+ if(parsers[i].id.toLowerCase() == parser.id.toLowerCase()) {\r
+ a = false;\r
+ }\r
+ }\r
+ if(a) { parsers.push(parser); };\r
+ };\r
+\r
+ this.addWidget = function(widget) {\r
+ widgets.push(widget);\r
+ };\r
+\r
+ this.formatFloat = function(s) {\r
+ var i = parseFloat(s);\r
+ return (isNaN(i)) ? 0 : i;\r
+ };\r
+ this.formatInt = function(s) {\r
+ var i = parseInt(s);\r
+ return (isNaN(i)) ? 0 : i;\r
+ };\r
+\r
+ this.isDigit = function(s,config) {\r
+ var DECIMAL = '\\' + config.decimal;\r
+ var exp = '/(^[+]?0(' + DECIMAL +'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)' + DECIMAL +'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*' + DECIMAL +'0+$)/';\r
+ return RegExp(exp).test($.trim(s));\r
+ };\r
+\r
+ this.clearTableBody = function(table) {\r
+ if($.browser.msie) {\r
+ function empty() {\r
+ while ( this.firstChild ) this.removeChild( this.firstChild );\r
+ }\r
+ empty.apply(table.tBodies[0]);\r
+ } else {\r
+ table.tBodies[0].innerHTML = "";\r
+ }\r
+ };\r
+ }\r
+ });\r
+\r
+ // extend plugin scope\r
+ $.fn.extend({\r
+ tablesorter: $.tablesorter.construct\r
+ });\r
+\r
+ var ts = $.tablesorter;\r
+\r
+ // add default parsers\r
+ ts.addParser({\r
+ id: "text",\r
+ is: function(s) {\r
+ return true;\r
+ },\r
+ format: function(s) {\r
+ return $.trim(s.toLowerCase());\r
+ },\r
+ type: "text"\r
+ });\r
+\r
+ ts.addParser({\r
+ id: "digit",\r
+ is: function(s,table) {\r
+ var c = table.config;\r
+ return $.tablesorter.isDigit(s,c);\r
+ },\r
+ format: function(s) {\r
+ return $.tablesorter.formatFloat(s);\r
+ },\r
+ type: "numeric"\r
+ });\r
+\r
+ ts.addParser({\r
+ id: "currency",\r
+ is: function(s) {\r
+ return /^[£$€?.]/.test(s);\r
+ },\r
+ format: function(s) {\r
+ return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));\r
+ },\r
+ type: "numeric"\r
+ });\r
+\r
+ ts.addParser({\r
+ id: "ipAddress",\r
+ is: function(s) {\r
+ return /^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);\r
+ },\r
+ format: function(s) {\r
+ var a = s.split("."), r = "", l = a.length;\r
+ for(var i = 0; i < l; i++) {\r
+ var item = a[i];\r
+ if(item.length == 2) {\r
+ r += "0" + item;\r
+ } else {\r
+ r += item;\r
+ }\r
+ }\r
+ return $.tablesorter.formatFloat(r);\r
+ },\r
+ type: "numeric"\r
+ });\r
+\r
+ ts.addParser({\r
+ id: "url",\r
+ is: function(s) {\r
+ return /^(https?|ftp|file):\/\/$/.test(s);\r
+ },\r
+ format: function(s) {\r
+ return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));\r
+ },\r
+ type: "text"\r
+ });\r
+\r
+ ts.addParser({\r
+ id: "isoDate",\r
+ is: function(s) {\r
+ return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);\r
+ },\r
+ format: function(s) {\r
+ return $.tablesorter.formatFloat((s != "") ? new Date(s.replace(new RegExp(/-/g),"/")).getTime() : "0");\r
+ },\r
+ type: "numeric"\r
+ });\r
+\r
+ ts.addParser({\r
+ id: "percent",\r
+ is: function(s) {\r
+ return /\%$/.test($.trim(s));\r
+ },\r
+ format: function(s) {\r
+ return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));\r
+ },\r
+ type: "numeric"\r
+ });\r
+\r
+ ts.addParser({\r
+ id: "usLongDate",\r
+ is: function(s) {\r
+ return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));\r
+ },\r
+ format: function(s) {\r
+ return $.tablesorter.formatFloat(new Date(s).getTime());\r
+ },\r
+ type: "numeric"\r
+ });\r
+\r
+ ts.addParser({\r
+ id: "shortDate",\r
+ is: function(s) {\r
+ return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);\r
+ },\r
+ format: function(s,table) {\r
+ var c = table.config;\r
+ s = s.replace(/\-/g,"/");\r
+ if(c.dateFormat == "us") {\r
+ // reformat the string in ISO format\r
+ s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2");\r
+ } else if(c.dateFormat == "uk") {\r
+ //reformat the string in ISO format\r
+ s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1");\r
+ } else if(c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") {\r
+ s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3");\r
+ }\r
+ return $.tablesorter.formatFloat(new Date(s).getTime());\r
+ },\r
+ type: "numeric"\r
+ });\r
+\r
+ ts.addParser({\r
+ id: "time",\r
+ is: function(s) {\r
+ return /^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);\r
+ },\r
+ format: function(s) {\r
+ return $.tablesorter.formatFloat(new Date("2000/01/01 " + s).getTime());\r
+ },\r
+ type: "numeric"\r
+ });\r
+\r
+\r
+ ts.addParser({\r
+ id: "metadata",\r
+ is: function(s) {\r
+ return false;\r
+ },\r
+ format: function(s,table,cell) {\r
+ var c = table.config, p = (!c.parserMetadataName) ? 'sortValue' : c.parserMetadataName;\r
+ return $(cell).metadata()[p];\r
+ },\r
+ type: "numeric"\r
+ });\r
+\r
+ // JAWStats specific..\r
+ ts.addParser({\r
+ id: "bandwidth",\r
+ is: function(s) {\r
+ return false;\r
+ },\r
+ format: function(s) {\r
+ // format your data for normalization\r
+ switch (s.substr(-1)) {\r
+ case "k":\r
+ s = parseFloat(s);\r
+ break;\r
+ case "M":\r
+ s = (parseFloat(s) * 1024);\r
+ break;\r
+ case "G":\r
+ s = (parseFloat(s) * 1024 * 1024);\r
+ break;\r
+ }\r
+ return s;\r
+ },\r
+ type: "numeric"\r
+ });\r
+\r
+ // add default widgets\r
+ ts.addWidget({\r
+ id: "zebra",\r
+ format: function(table) {\r
+ if(table.config.debug) { var time = new Date(); }\r
+ $("tr:visible",table.tBodies[0])\r
+ .filter(':even')\r
+ .removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0])\r
+ .end().filter(':odd')\r
+ .removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);\r
+ if(table.config.debug) { $.tablesorter.benchmark("Applying Zebra widget", time); }\r
+ }\r
+ });\r
+})(jQuery);
\ No newline at end of file
--- /dev/null
+/*\r
+ * jQuery JavaScript Library v1.3\r
+ * http://jquery.com/\r
+ *\r
+ * Copyright (c) 2009 John Resig\r
+ * Dual licensed under the MIT and GPL licenses.\r
+ * http://docs.jquery.com/License\r
+ *\r
+ * Date: 2009-01-13 12:50:31 -0500 (Tue, 13 Jan 2009)\r
+ * Revision: 6104\r
+ */\r
+(function(){var l=this,g,x=l.jQuery,o=l.$,n=l.jQuery=l.$=function(D,E){return new n.fn.init(D,E)},C=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;n.fn=n.prototype={init:function(D,G){D=D||document;if(D.nodeType){this[0]=D;this.length=1;this.context=D;return this}if(typeof D==="string"){var F=C.exec(D);if(F&&(F[1]||!G)){if(F[1]){D=n.clean([F[1]],G)}else{var H=document.getElementById(F[3]);if(H){if(H.id!=F[3]){return n().find(D)}var E=n(H);E.context=document;E.selector=D;return E}D=[]}}else{return n(G).find(D)}}else{if(n.isFunction(D)){return n(document).ready(D)}}if(D.selector&&D.context){this.selector=D.selector;this.context=D.context}return this.setArray(n.makeArray(D))},selector:"",jquery:"1.3",size:function(){return this.length},get:function(D){return D===g?n.makeArray(this):this[D]},pushStack:function(E,G,D){var F=n(E);F.prevObject=this;F.context=this.context;if(G==="find"){F.selector=this.selector+(this.selector?" ":"")+D}else{if(G){F.selector=this.selector+"."+G+"("+D+")"}}return F},setArray:function(D){this.length=0;Array.prototype.push.apply(this,D);return this},each:function(E,D){return n.each(this,E,D)},index:function(D){return n.inArray(D&&D.jquery?D[0]:D,this)},attr:function(E,G,F){var D=E;if(typeof E==="string"){if(G===g){return this[0]&&n[F||"attr"](this[0],E)}else{D={};D[E]=G}}return this.each(function(H){for(E in D){n.attr(F?this.style:this,E,n.prop(this,D[E],F,H,E))}})},css:function(D,E){if((D=="width"||D=="height")&&parseFloat(E)<0){E=g}return this.attr(D,E,"curCSS")},text:function(E){if(typeof E!=="object"&&E!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(E))}var D="";n.each(E||this,function(){n.each(this.childNodes,function(){if(this.nodeType!=8){D+=this.nodeType!=1?this.nodeValue:n.fn.text([this])}})});return D},wrapAll:function(D){if(this[0]){var E=n(D,this[0].ownerDocument).clone();if(this[0].parentNode){E.insertBefore(this[0])}E.map(function(){var F=this;while(F.firstChild){F=F.firstChild}return F}).append(this)}return this},wrapInner:function(D){return this.each(function(){n(this).contents().wrapAll(D)})},wrap:function(D){return this.each(function(){n(this).wrapAll(D)})},append:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.appendChild(D)}})},prepend:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.insertBefore(D,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this)})},after:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this.nextSibling)})},end:function(){return this.prevObject||n([])},push:[].push,find:function(D){if(this.length===1&&!/,/.test(D)){var F=this.pushStack([],"find",D);F.length=0;n.find(D,this[0],F);return F}else{var E=n.map(this,function(G){return n.find(D,G)});return this.pushStack(/[^+>] [^+>]/.test(D)?n.unique(E):E,"find",D)}},clone:function(E){var D=this.map(function(){if(!n.support.noCloneEvent&&!n.isXMLDoc(this)){var H=this.cloneNode(true),G=document.createElement("div");G.appendChild(H);return n.clean([G.innerHTML])[0]}else{return this.cloneNode(true)}});var F=D.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(E===true){this.find("*").andSelf().each(function(H){if(this.nodeType==3){return}var G=n.data(this,"events");for(var J in G){for(var I in G[J]){n.event.add(F[H],J,G[J][I],G[J][I].data)}}})}return D},filter:function(D){return this.pushStack(n.isFunction(D)&&n.grep(this,function(F,E){return D.call(F,E)})||n.multiFilter(D,n.grep(this,function(E){return E.nodeType===1})),"filter",D)},closest:function(D){var E=n.expr.match.POS.test(D)?n(D):null;return this.map(function(){var F=this;while(F&&F.ownerDocument){if(E?E.index(F)>-1:n(F).is(D)){return F}F=F.parentNode}})},not:function(D){if(typeof D==="string"){if(f.test(D)){return this.pushStack(n.multiFilter(D,this,true),"not",D)}else{D=n.multiFilter(D,this)}}var E=D.length&&D[D.length-1]!==g&&!D.nodeType;return this.filter(function(){return E?n.inArray(this,D)<0:this!=D})},add:function(D){return this.pushStack(n.unique(n.merge(this.get(),typeof D==="string"?n(D):n.makeArray(D))))},is:function(D){return !!D&&n.multiFilter(D,this).length>0},hasClass:function(D){return !!D&&this.is("."+D)},val:function(J){if(J===g){var D=this[0];if(D){if(n.nodeName(D,"option")){return(D.attributes.value||{}).specified?D.value:D.text}if(n.nodeName(D,"select")){var H=D.selectedIndex,K=[],L=D.options,G=D.type=="select-one";if(H<0){return null}for(var E=G?H:0,I=G?H+1:L.length;E<I;E++){var F=L[E];if(F.selected){J=n(F).val();if(G){return J}K.push(J)}}return K}return(D.value||"").replace(/\r/g,"")}return g}if(typeof J==="number"){J+=""}return this.each(function(){if(this.nodeType!=1){return}if(n.isArray(J)&&/radio|checkbox/.test(this.type)){this.checked=(n.inArray(this.value,J)>=0||n.inArray(this.name,J)>=0)}else{if(n.nodeName(this,"select")){var M=n.makeArray(J);n("option",this).each(function(){this.selected=(n.inArray(this.value,M)>=0||n.inArray(this.text,M)>=0)});if(!M.length){this.selectedIndex=-1}}else{this.value=J}}})},html:function(D){return D===g?(this[0]?this[0].innerHTML:null):this.empty().append(D)},replaceWith:function(D){return this.after(D).remove()},eq:function(D){return this.slice(D,+D+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(D){return this.pushStack(n.map(this,function(F,E){return D.call(F,E,F)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=n.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild,D=this.length>1?I.cloneNode(true):I;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),G>0?D.cloneNode(true):I)}}if(F){n.each(F,y)}}return this;function K(N,O){return M&&n.nodeName(N,"table")&&n.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};n.fn.init.prototype=n.fn;function y(D,E){if(E.src){n.ajax({url:E.src,async:false,dataType:"script"})}else{n.globalEval(E.text||E.textContent||E.innerHTML||"")}if(E.parentNode){E.parentNode.removeChild(E)}}function e(){return +new Date}n.extend=n.fn.extend=function(){var I=arguments[0]||{},G=1,H=arguments.length,D=false,F;if(typeof I==="boolean"){D=I;I=arguments[1]||{};G=2}if(typeof I!=="object"&&!n.isFunction(I)){I={}}if(H==G){I=this;--G}for(;G<H;G++){if((F=arguments[G])!=null){for(var E in F){var J=I[E],K=F[E];if(I===K){continue}if(D&&K&&typeof K==="object"&&!K.nodeType){I[E]=n.extend(D,J||(K.length!=null?[]:{}),K)}else{if(K!==g){I[E]=K}}}}}return I};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,p=document.defaultView||{},r=Object.prototype.toString;n.extend({noConflict:function(D){l.$=o;if(D){l.jQuery=x}return n},isFunction:function(D){return r.call(D)==="[object Function]"},isArray:function(D){return r.call(D)==="[object Array]"},isXMLDoc:function(D){return D.documentElement&&!D.body||D.tagName&&D.ownerDocument&&!D.ownerDocument.body},globalEval:function(F){F=n.trim(F);if(F){var E=document.getElementsByTagName("head")[0]||document.documentElement,D=document.createElement("script");D.type="text/javascript";if(n.support.scriptEval){D.appendChild(document.createTextNode(F))}else{D.text=F}E.insertBefore(D,E.firstChild);E.removeChild(D)}},nodeName:function(E,D){return E.nodeName&&E.nodeName.toUpperCase()==D.toUpperCase()},each:function(F,J,E){var D,G=0,H=F.length;if(E){if(H===g){for(D in F){if(J.apply(F[D],E)===false){break}}}else{for(;G<H;){if(J.apply(F[G++],E)===false){break}}}}else{if(H===g){for(D in F){if(J.call(F[D],D,F[D])===false){break}}}else{for(var I=F[0];G<H&&J.call(I,G,I)!==false;I=F[++G]){}}}return F},prop:function(G,H,F,E,D){if(n.isFunction(H)){H=H.call(G,E)}return typeof H==="number"&&F=="curCSS"&&!b.test(D)?H+"px":H},className:{add:function(D,E){n.each((E||"").split(/\s+/),function(F,G){if(D.nodeType==1&&!n.className.has(D.className,G)){D.className+=(D.className?" ":"")+G}})},remove:function(D,E){if(D.nodeType==1){D.className=E!==g?n.grep(D.className.split(/\s+/),function(F){return !n.className.has(E,F)}).join(" "):""}},has:function(E,D){return n.inArray(D,(E.className||E).toString().split(/\s+/))>-1}},swap:function(G,F,H){var D={};for(var E in F){D[E]=G.style[E];G.style[E]=F[E]}H.call(G);for(var E in F){G.style[E]=D[E]}},css:function(F,D,H){if(D=="width"||D=="height"){var J,E={position:"absolute",visibility:"hidden",display:"block"},I=D=="width"?["Left","Right"]:["Top","Bottom"];function G(){J=D=="width"?F.offsetWidth:F.offsetHeight;var L=0,K=0;n.each(I,function(){L+=parseFloat(n.curCSS(F,"padding"+this,true))||0;K+=parseFloat(n.curCSS(F,"border"+this+"Width",true))||0});J-=Math.round(L+K)}if(n(F).is(":visible")){G()}else{n.swap(F,E,G)}return Math.max(0,J)}return n.curCSS(F,D,H)},curCSS:function(H,E,F){var K,D=H.style;if(E=="opacity"&&!n.support.opacity){K=n.attr(D,"opacity");return K==""?"1":K}if(E.match(/float/i)){E=v}if(!F&&D&&D[E]){K=D[E]}else{if(p.getComputedStyle){if(E.match(/float/i)){E="float"}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var L=p.getComputedStyle(H,null);if(L){K=L.getPropertyValue(E)}if(E=="opacity"&&K==""){K="1"}}else{if(H.currentStyle){var I=E.replace(/\-(\w)/g,function(M,N){return N.toUpperCase()});K=H.currentStyle[E]||H.currentStyle[I];if(!/^\d+(px)?$/i.test(K)&&/^\d/.test(K)){var G=D.left,J=H.runtimeStyle.left;H.runtimeStyle.left=H.currentStyle.left;D.left=K||0;K=D.pixelLeft+"px";D.left=G;H.runtimeStyle.left=J}}}}return K},clean:function(E,J,H){J=J||document;if(typeof J.createElement==="undefined"){J=J.ownerDocument||J[0]&&J[0].ownerDocument||document}if(!H&&E.length===1&&typeof E[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(E[0]);if(G){return[J.createElement(G[1])]}}var F=[],D=[],K=J.createElement("div");n.each(E,function(O,Q){if(typeof Q==="number"){Q+=""}if(!Q){return}if(typeof Q==="string"){Q=Q.replace(/(<(\w+)[^>]*?)\/>/g,function(S,T,R){return R.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?S:T+"></"+R+">"});var N=n.trim(Q).toLowerCase();var P=!N.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!N.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||N.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!N.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!N.indexOf("<td")||!N.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!N.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!n.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];K.innerHTML=P[1]+Q+P[2];while(P[0]--){K=K.lastChild}if(!n.support.tbody){var M=!N.indexOf("<table")&&N.indexOf("<tbody")<0?K.firstChild&&K.firstChild.childNodes:P[1]=="<table>"&&N.indexOf("<tbody")<0?K.childNodes:[];for(var L=M.length-1;L>=0;--L){if(n.nodeName(M[L],"tbody")&&!M[L].childNodes.length){M[L].parentNode.removeChild(M[L])}}}if(!n.support.leadingWhitespace&&/^\s/.test(Q)){K.insertBefore(J.createTextNode(Q.match(/^\s*/)[0]),K.firstChild)}Q=n.makeArray(K.childNodes)}if(Q.nodeType){F.push(Q)}else{F=n.merge(F,Q)}});if(H){for(var I=0;F[I];I++){if(n.nodeName(F[I],"script")&&(!F[I].type||F[I].type.toLowerCase()==="text/javascript")){D.push(F[I].parentNode?F[I].parentNode.removeChild(F[I]):F[I])}else{if(F[I].nodeType===1){F.splice.apply(F,[I+1,0].concat(n.makeArray(F[I].getElementsByTagName("script"))))}H.appendChild(F[I])}}return D}return F},attr:function(I,F,J){if(!I||I.nodeType==3||I.nodeType==8){return g}var G=!n.isXMLDoc(I),K=J!==g;F=G&&n.props[F]||F;if(I.tagName){var E=/href|src|style/.test(F);if(F=="selected"&&I.parentNode){I.parentNode.selectedIndex}if(F in I&&G&&!E){if(K){if(F=="type"&&n.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed"}I[F]=J}if(n.nodeName(I,"form")&&I.getAttributeNode(F)){return I.getAttributeNode(F).nodeValue}if(F=="tabIndex"){var H=I.getAttributeNode("tabIndex");return H&&H.specified?H.value:I.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)?0:g}return I[F]}if(!n.support.style&&G&&F=="style"){return n.attr(I.style,"cssText",J)}if(K){I.setAttribute(F,""+J)}var D=!n.support.hrefNormalized&&G&&E?I.getAttribute(F,2):I.getAttribute(F);return D===null?g:D}if(!n.support.opacity&&F=="opacity"){if(K){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(J)+""=="NaN"?"":"alpha(opacity="+J*100+")")}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}F=F.replace(/-([a-z])/ig,function(L,M){return M.toUpperCase()});if(K){I[F]=J}return I[F]},trim:function(D){return(D||"").replace(/^\s+|\s+$/g,"")},makeArray:function(F){var D=[];if(F!=null){var E=F.length;if(E==null||typeof F==="string"||n.isFunction(F)||F.setInterval){D[0]=F}else{while(E){D[--E]=F[E]}}}return D},inArray:function(F,G){for(var D=0,E=G.length;D<E;D++){if(G[D]===F){return D}}return -1},merge:function(G,D){var E=0,F,H=G.length;if(!n.support.getAll){while((F=D[E++])!=null){if(F.nodeType!=8){G[H++]=F}}}else{while((F=D[E++])!=null){G[H++]=F}}return G},unique:function(J){var E=[],D={};try{for(var F=0,G=J.length;F<G;F++){var I=n.data(J[F]);if(!D[I]){D[I]=true;E.push(J[F])}}}catch(H){E=J}return E},grep:function(E,I,D){var F=[];for(var G=0,H=E.length;G<H;G++){if(!D!=!I(E[G],G)){F.push(E[G])}}return F},map:function(D,I){var E=[];for(var F=0,G=D.length;F<G;F++){var H=I(D[F],F);if(H!=null){E[E.length]=H}}return E.concat.apply([],E)}});var B=navigator.userAgent.toLowerCase();n.browser={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)};n.each({parent:function(D){return D.parentNode},parents:function(D){return n.dir(D,"parentNode")},next:function(D){return n.nth(D,2,"nextSibling")},prev:function(D){return n.nth(D,2,"previousSibling")},nextAll:function(D){return n.dir(D,"nextSibling")},prevAll:function(D){return n.dir(D,"previousSibling")},siblings:function(D){return n.sibling(D.parentNode.firstChild,D)},children:function(D){return n.sibling(D.firstChild)},contents:function(D){return n.nodeName(D,"iframe")?D.contentDocument||D.contentWindow.document:n.makeArray(D.childNodes)}},function(D,E){n.fn[D]=function(F){var G=n.map(this,E);if(F&&typeof F=="string"){G=n.multiFilter(F,G)}return this.pushStack(n.unique(G),D,F)}});n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(D,E){n.fn[D]=function(){var F=arguments;return this.each(function(){for(var G=0,H=F.length;G<H;G++){n(F[G])[E](this)}})}});n.each({removeAttr:function(D){n.attr(this,D,"");if(this.nodeType==1){this.removeAttribute(D)}},addClass:function(D){n.className.add(this,D)},removeClass:function(D){n.className.remove(this,D)},toggleClass:function(E,D){if(typeof D!=="boolean"){D=!n.className.has(this,E)}n.className[D?"add":"remove"](this,E)},remove:function(D){if(!D||n.filter(D,[this]).length){n("*",this).add([this]).each(function(){n.event.remove(this);n.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){n(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(D,E){n.fn[D]=function(){return this.each(E,arguments)}});function j(D,E){return D[0]&&parseInt(n.curCSS(D[0],E,true),10)||0}var h="jQuery"+e(),u=0,z={};n.extend({cache:{},data:function(E,D,F){E=E==l?z:E;var G=E[h];if(!G){G=E[h]=++u}if(D&&!n.cache[G]){n.cache[G]={}}if(F!==g){n.cache[G][D]=F}return D?n.cache[G][D]:G},removeData:function(E,D){E=E==l?z:E;var G=E[h];if(D){if(n.cache[G]){delete n.cache[G][D];D="";for(D in n.cache[G]){break}if(!D){n.removeData(E)}}}else{try{delete E[h]}catch(F){if(E.removeAttribute){E.removeAttribute(h)}}delete n.cache[G]}},queue:function(E,D,G){if(E){D=(D||"fx")+"queue";var F=n.data(E,D);if(!F||n.isArray(G)){F=n.data(E,D,n.makeArray(G))}else{if(G){F.push(G)}}}return F},dequeue:function(G,F){var D=n.queue(G,F),E=D.shift();if(!F||F==="fx"){E=D[0]}if(E!==g){E.call(G)}}});n.fn.extend({data:function(D,F){var G=D.split(".");G[1]=G[1]?"."+G[1]:"";if(F===g){var E=this.triggerHandler("getData"+G[1]+"!",[G[0]]);if(E===g&&this.length){E=n.data(this[0],D)}return E===g&&G[1]?this.data(G[0]):E}else{return this.trigger("setData"+G[1]+"!",[G[0],F]).each(function(){n.data(this,D,F)})}},removeData:function(D){return this.each(function(){n.removeData(this,D)})},queue:function(D,E){if(typeof D!=="string"){E=D;D="fx"}if(E===g){return n.queue(this[0],D)}return this.each(function(){var F=n.queue(this,D,E);if(D=="fx"&&F.length==1){F[0].call(this)}})},dequeue:function(D){return this.each(function(){n.dequeue(this,D)})}});\r
+/*\r
+ * Sizzle CSS Selector Engine - v0.9.1\r
+ * Copyright 2009, The Dojo Foundation\r
+ * Released under the MIT, BSD, and GPL Licenses.\r
+ * More information: http://sizzlejs.com/\r
+ */\r
+(function(){var N=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,I=0,F=Object.prototype.toString;var E=function(ae,S,aa,V){aa=aa||[];S=S||document;if(S.nodeType!==1&&S.nodeType!==9){return[]}if(!ae||typeof ae!=="string"){return aa}var ab=[],ac,Y,ah,ag,Z,R,Q=true;N.lastIndex=0;while((ac=N.exec(ae))!==null){ab.push(ac[1]);if(ac[2]){R=RegExp.rightContext;break}}if(ab.length>1&&G.match.POS.exec(ae)){if(ab.length===2&&G.relative[ab[0]]){var U="",X;while((X=G.match.POS.exec(ae))){U+=X[0];ae=ae.replace(G.match.POS,"")}Y=E.filter(U,E(/\s$/.test(ae)?ae+"*":ae,S))}else{Y=G.relative[ab[0]]?[S]:E(ab.shift(),S);while(ab.length){var P=[];ae=ab.shift();if(G.relative[ae]){ae+=ab.shift()}for(var af=0,ad=Y.length;af<ad;af++){E(ae,Y[af],P)}Y=P}}}else{var ai=V?{expr:ab.pop(),set:D(V)}:E.find(ab.pop(),ab.length===1&&S.parentNode?S.parentNode:S);Y=E.filter(ai.expr,ai.set);if(ab.length>0){ah=D(Y)}else{Q=false}while(ab.length){var T=ab.pop(),W=T;if(!G.relative[T]){T=""}else{W=ab.pop()}if(W==null){W=S}G.relative[T](ah,W,M(S))}}if(!ah){ah=Y}if(!ah){throw"Syntax error, unrecognized expression: "+(T||ae)}if(F.call(ah)==="[object Array]"){if(!Q){aa.push.apply(aa,ah)}else{if(S.nodeType===1){for(var af=0;ah[af]!=null;af++){if(ah[af]&&(ah[af]===true||ah[af].nodeType===1&&H(S,ah[af]))){aa.push(Y[af])}}}else{for(var af=0;ah[af]!=null;af++){if(ah[af]&&ah[af].nodeType===1){aa.push(Y[af])}}}}}else{D(ah,aa)}if(R){E(R,S,aa,V)}return aa};E.matches=function(P,Q){return E(P,null,null,Q)};E.find=function(V,S){var W,Q;if(!V){return[]}for(var R=0,P=G.order.length;R<P;R++){var T=G.order[R],Q;if((Q=G.match[T].exec(V))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){Q[1]=(Q[1]||"").replace(/\\/g,"");W=G.find[T](Q,S);if(W!=null){V=V.replace(G.match[T],"");break}}}}if(!W){W=S.getElementsByTagName("*")}return{set:W,expr:V}};E.filter=function(S,ac,ad,T){var Q=S,Y=[],ah=ac,V,ab;while(S&&ac.length){for(var U in G.filter){if((V=G.match[U].exec(S))!=null){var Z=G.filter[U],R=null,X=0,aa,ag;ab=false;if(ah==Y){Y=[]}if(G.preFilter[U]){V=G.preFilter[U](V,ah,ad,Y,T);if(!V){ab=aa=true}else{if(V===true){continue}else{if(V[0]===true){R=[];var W=null,af;for(var ae=0;(af=ah[ae])!==g;ae++){if(af&&W!==af){R.push(af);W=af}}}}}}if(V){for(var ae=0;(ag=ah[ae])!==g;ae++){if(ag){if(R&&ag!=R[X]){X++}aa=Z(ag,V,X,R);var P=T^!!aa;if(ad&&aa!=null){if(P){ab=true}else{ah[ae]=false}}else{if(P){Y.push(ag);ab=true}}}}}if(aa!==g){if(!ad){ah=Y}S=S.replace(G.match[U],"");if(!ab){return[]}break}}}S=S.replace(/\s*,\s*/,"");if(S==Q){if(ab==null){throw"Syntax error, unrecognized expression: "+S}else{break}}Q=S}return ah};var G=E.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(P){return P.getAttribute("href")}},relative:{"+":function(T,Q){for(var R=0,P=T.length;R<P;R++){var S=T[R];if(S){var U=S.previousSibling;while(U&&U.nodeType!==1){U=U.previousSibling}T[R]=typeof Q==="string"?U||false:U===Q}}if(typeof Q==="string"){E.filter(Q,T,true)}},">":function(U,Q,V){if(typeof Q==="string"&&!/\W/.test(Q)){Q=V?Q:Q.toUpperCase();for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){var S=T.parentNode;U[R]=S.nodeName===Q?S:false}}}else{for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){U[R]=typeof Q==="string"?T.parentNode:T.parentNode===Q}}if(typeof Q==="string"){E.filter(Q,U,true)}}},"":function(S,Q,U){var R="done"+(I++),P=O;if(!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("parentNode",Q,R,S,T,U)},"~":function(S,Q,U){var R="done"+(I++),P=O;if(typeof Q==="string"&&!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("previousSibling",Q,R,S,T,U)}},find:{ID:function(Q,R){if(R.getElementById){var P=R.getElementById(Q[1]);return P?[P]:[]}},NAME:function(P,Q){return Q.getElementsByName?Q.getElementsByName(P[1]):null},TAG:function(P,Q){return Q.getElementsByTagName(P[1])}},preFilter:{CLASS:function(S,Q,R,P,U){S=" "+S[1].replace(/\\/g,"")+" ";for(var T=0;Q[T];T++){if(U^(" "+Q[T].className+" ").indexOf(S)>=0){if(!R){P.push(Q[T])}}else{if(R){Q[T]=false}}}return false},ID:function(P){return P[1].replace(/\\/g,"")},TAG:function(Q,P){for(var R=0;!P[R];R++){}return M(P[R])?Q[1]:Q[1].toUpperCase()},CHILD:function(P){if(P[1]=="nth"){var Q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(P[2]=="even"&&"2n"||P[2]=="odd"&&"2n+1"||!/\D/.test(P[2])&&"0n+"+P[2]||P[2]);P[2]=(Q[1]+(Q[2]||1))-0;P[3]=Q[3]-0}P[0]="done"+(I++);return P},ATTR:function(Q){var P=Q[1];if(G.attrMap[P]){Q[1]=G.attrMap[P]}if(Q[2]==="~="){Q[4]=" "+Q[4]+" "}return Q},PSEUDO:function(T,Q,R,P,U){if(T[1]==="not"){if(T[3].match(N).length>1){T[3]=E(T[3],null,null,Q)}else{var S=E.filter(T[3],Q,R,true^U);if(!R){P.push.apply(P,S)}return false}}else{if(G.match.POS.test(T[0])){return true}}return T},POS:function(P){P.unshift(true);return P}},filters:{enabled:function(P){return P.disabled===false&&P.type!=="hidden"},disabled:function(P){return P.disabled===true},checked:function(P){return P.checked===true},selected:function(P){P.parentNode.selectedIndex;return P.selected===true},parent:function(P){return !!P.firstChild},empty:function(P){return !P.firstChild},has:function(R,Q,P){return !!E(P[3],R).length},header:function(P){return/h\d/i.test(P.nodeName)},text:function(P){return"text"===P.type},radio:function(P){return"radio"===P.type},checkbox:function(P){return"checkbox"===P.type},file:function(P){return"file"===P.type},password:function(P){return"password"===P.type},submit:function(P){return"submit"===P.type},image:function(P){return"image"===P.type},reset:function(P){return"reset"===P.type},button:function(P){return"button"===P.type||P.nodeName.toUpperCase()==="BUTTON"},input:function(P){return/input|select|textarea|button/i.test(P.nodeName)}},setFilters:{first:function(Q,P){return P===0},last:function(R,Q,P,S){return Q===S.length-1},even:function(Q,P){return P%2===0},odd:function(Q,P){return P%2===1},lt:function(R,Q,P){return Q<P[3]-0},gt:function(R,Q,P){return Q>P[3]-0},nth:function(R,Q,P){return P[3]-0==Q},eq:function(R,Q,P){return P[3]-0==Q}},filter:{CHILD:function(P,S){var V=S[1],W=P.parentNode;var U="child"+W.childNodes.length;if(W&&(!W[U]||!P.nodeIndex)){var T=1;for(var Q=W.firstChild;Q;Q=Q.nextSibling){if(Q.nodeType==1){Q.nodeIndex=T++}}W[U]=T-1}if(V=="first"){return P.nodeIndex==1}else{if(V=="last"){return P.nodeIndex==W[U]}else{if(V=="only"){return W[U]==1}else{if(V=="nth"){var Y=false,R=S[2],X=S[3];if(R==1&&X==0){return true}if(R==0){if(P.nodeIndex==X){Y=true}}else{if((P.nodeIndex-X)%R==0&&(P.nodeIndex-X)/R>=0){Y=true}}return Y}}}}},PSEUDO:function(V,R,S,W){var Q=R[1],T=G.filters[Q];if(T){return T(V,S,R,W)}else{if(Q==="contains"){return(V.textContent||V.innerText||"").indexOf(R[3])>=0}else{if(Q==="not"){var U=R[3];for(var S=0,P=U.length;S<P;S++){if(U[S]===V){return false}}return true}}}},ID:function(Q,P){return Q.nodeType===1&&Q.getAttribute("id")===P},TAG:function(Q,P){return(P==="*"&&Q.nodeType===1)||Q.nodeName===P},CLASS:function(Q,P){return P.test(Q.className)},ATTR:function(T,R){var P=G.attrHandle[R[1]]?G.attrHandle[R[1]](T):T[R[1]]||T.getAttribute(R[1]),U=P+"",S=R[2],Q=R[4];return P==null?false:S==="="?U===Q:S==="*="?U.indexOf(Q)>=0:S==="~="?(" "+U+" ").indexOf(Q)>=0:!R[4]?P:S==="!="?U!=Q:S==="^="?U.indexOf(Q)===0:S==="$="?U.substr(U.length-Q.length)===Q:S==="|="?U===Q||U.substr(0,Q.length+1)===Q+"-":false},POS:function(T,Q,R,U){var P=Q[2],S=G.setFilters[P];if(S){return S(T,R,Q,U)}}}};for(var K in G.match){G.match[K]=RegExp(G.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var D=function(Q,P){Q=Array.prototype.slice.call(Q);if(P){P.push.apply(P,Q);return P}return Q};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(J){D=function(T,S){var Q=S||[];if(F.call(T)==="[object Array]"){Array.prototype.push.apply(Q,T)}else{if(typeof T.length==="number"){for(var R=0,P=T.length;R<P;R++){Q.push(T[R])}}else{for(var R=0;T[R];R++){Q.push(T[R])}}}return Q}}(function(){var Q=document.createElement("form"),R="script"+(new Date).getTime();Q.innerHTML="<input name='"+R+"'/>";var P=document.documentElement;P.insertBefore(Q,P.firstChild);if(!!document.getElementById(R)){G.find.ID=function(T,U){if(U.getElementById){var S=U.getElementById(T[1]);return S?S.id===T[1]||S.getAttributeNode&&S.getAttributeNode("id").nodeValue===T[1]?[S]:g:[]}};G.filter.ID=function(U,S){var T=U.getAttributeNode&&U.getAttributeNode("id");return U.nodeType===1&&T&&T.nodeValue===S}}P.removeChild(Q)})();(function(){var P=document.createElement("div");P.appendChild(document.createComment(""));if(P.getElementsByTagName("*").length>0){G.find.TAG=function(Q,U){var T=U.getElementsByTagName(Q[1]);if(Q[1]==="*"){var S=[];for(var R=0;T[R];R++){if(T[R].nodeType===1){S.push(T[R])}}T=S}return T}}P.innerHTML="<a href='#'></a>";if(P.firstChild.getAttribute("href")!=="#"){G.attrHandle.href=function(Q){return Q.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var P=E;E=function(T,S,Q,R){S=S||document;if(!R&&S.nodeType===9){try{return D(S.querySelectorAll(T),Q)}catch(U){}}return P(T,S,Q,R)};E.find=P.find;E.filter=P.filter;E.selectors=P.selectors;E.matches=P.matches})()}if(document.documentElement.getElementsByClassName){G.order.splice(1,0,"CLASS");G.find.CLASS=function(P,Q){return Q.getElementsByClassName(P[1])}}function L(Q,W,V,Z,X,Y){for(var T=0,R=Z.length;T<R;T++){var P=Z[T];if(P){P=P[Q];var U=false;while(P&&P.nodeType){var S=P[V];if(S){U=Z[S];break}if(P.nodeType===1&&!Y){P[V]=T}if(P.nodeName===W){U=P;break}P=P[Q]}Z[T]=U}}}function O(Q,V,U,Y,W,X){for(var S=0,R=Y.length;S<R;S++){var P=Y[S];if(P){P=P[Q];var T=false;while(P&&P.nodeType){if(P[U]){T=Y[P[U]];break}if(P.nodeType===1){if(!X){P[U]=S}if(typeof V!=="string"){if(P===V){T=true;break}}else{if(E.filter(V,[P]).length>0){T=P;break}}}P=P[Q]}Y[S]=T}}}var H=document.compareDocumentPosition?function(Q,P){return Q.compareDocumentPosition(P)&16}:function(Q,P){return Q!==P&&(Q.contains?Q.contains(P):true)};var M=function(P){return P.documentElement&&!P.body||P.tagName&&P.ownerDocument&&!P.ownerDocument.body};n.find=E;n.filter=E.filter;n.expr=E.selectors;n.expr[":"]=n.expr.filters;E.selectors.filters.hidden=function(P){return"hidden"===P.type||n.css(P,"display")==="none"||n.css(P,"visibility")==="hidden"};E.selectors.filters.visible=function(P){return"hidden"!==P.type&&n.css(P,"display")!=="none"&&n.css(P,"visibility")!=="hidden"};E.selectors.filters.animated=function(P){return n.grep(n.timers,function(Q){return P===Q.elem}).length};n.multiFilter=function(R,P,Q){if(Q){R=":not("+R+")"}return E.matches(R,P)};n.dir=function(R,Q){var P=[],S=R[Q];while(S&&S!=document){if(S.nodeType==1){P.push(S)}S=S[Q]}return P};n.nth=function(T,P,R,S){P=P||1;var Q=0;for(;T;T=T[R]){if(T.nodeType==1&&++Q==P){break}}return T};n.sibling=function(R,Q){var P=[];for(;R;R=R.nextSibling){if(R.nodeType==1&&R!=Q){P.push(R)}}return P};return;l.Sizzle=E})();n.event={add:function(H,E,G,J){if(H.nodeType==3||H.nodeType==8){return}if(H.setInterval&&H!=l){H=l}if(!G.guid){G.guid=this.guid++}if(J!==g){var F=G;G=this.proxy(F);G.data=J}var D=n.data(H,"events")||n.data(H,"events",{}),I=n.data(H,"handle")||n.data(H,"handle",function(){return typeof n!=="undefined"&&!n.event.triggered?n.event.handle.apply(arguments.callee.elem,arguments):g});I.elem=H;n.each(E.split(/\s+/),function(L,M){var N=M.split(".");M=N.shift();G.type=N.slice().sort().join(".");var K=D[M];if(n.event.specialAll[M]){n.event.specialAll[M].setup.call(H,J,N)}if(!K){K=D[M]={};if(!n.event.special[M]||n.event.special[M].setup.call(H,J,N)===false){if(H.addEventListener){H.addEventListener(M,I,false)}else{if(H.attachEvent){H.attachEvent("on"+M,I)}}}}K[G.guid]=G;n.event.global[M]=true});H=null},guid:1,global:{},remove:function(J,G,I){if(J.nodeType==3||J.nodeType==8){return}var F=n.data(J,"events"),E,D;if(F){if(G===g||(typeof G==="string"&&G.charAt(0)==".")){for(var H in F){this.remove(J,H+(G||""))}}else{if(G.type){I=G.handler;G=G.type}n.each(G.split(/\s+/),function(L,N){var P=N.split(".");N=P.shift();var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");if(F[N]){if(I){delete F[N][I.guid]}else{for(var O in F[N]){if(M.test(F[N][O].type)){delete F[N][O]}}}if(n.event.specialAll[N]){n.event.specialAll[N].teardown.call(J,P)}for(E in F[N]){break}if(!E){if(!n.event.special[N]||n.event.special[N].teardown.call(J,P)===false){if(J.removeEventListener){J.removeEventListener(N,n.data(J,"handle"),false)}else{if(J.detachEvent){J.detachEvent("on"+N,n.data(J,"handle"))}}}E=null;delete F[N]}}})}for(E in F){break}if(!E){var K=n.data(J,"handle");if(K){K.elem=null}n.removeData(J,"events");n.removeData(J,"handle")}}},trigger:function(H,J,G,D){var F=H.type||H;if(!D){H=typeof H==="object"?H[h]?H:n.extend(n.Event(F),H):n.Event(F);if(F.indexOf("!")>=0){H.type=F=F.slice(0,-1);H.exclusive=true}if(!G){H.stopPropagation();if(this.global[F]){n.each(n.cache,function(){if(this.events&&this.events[F]){n.event.trigger(H,J,this.handle.elem)}})}}if(!G||G.nodeType==3||G.nodeType==8){return g}H.result=g;H.target=G;J=n.makeArray(J);J.unshift(H)}H.currentTarget=G;var I=n.data(G,"handle");if(I){I.apply(G,J)}if((!G[F]||(n.nodeName(G,"a")&&F=="click"))&&G["on"+F]&&G["on"+F].apply(G,J)===false){H.result=false}if(!D&&G[F]&&!H.isDefaultPrevented()&&!(n.nodeName(G,"a")&&F=="click")){this.triggered=true;try{G[F]()}catch(K){}}this.triggered=false;if(!H.isPropagationStopped()){var E=G.parentNode||G.ownerDocument;if(E){n.event.trigger(H,J,E,true)}}},handle:function(J){var I,D;J=arguments[0]=n.event.fix(J||l.event);var K=J.type.split(".");J.type=K.shift();I=!K.length&&!J.exclusive;var H=RegExp("(^|\\.)"+K.slice().sort().join(".*\\.")+"(\\.|$)");D=(n.data(this,"events")||{})[J.type];for(var F in D){var G=D[F];if(I||H.test(G.type)){J.handler=G;J.data=G.data;var E=G.apply(this,arguments);if(E!==g){J.result=E;if(E===false){J.preventDefault();J.stopPropagation()}}if(J.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(G){if(G[h]){return G}var E=G;G=n.Event(E);for(var F=this.props.length,I;F;){I=this.props[--F];G[I]=E[I]}if(!G.target){G.target=G.srcElement||document}if(G.target.nodeType==3){G.target=G.target.parentNode}if(!G.relatedTarget&&G.fromElement){G.relatedTarget=G.fromElement==G.target?G.toElement:G.fromElement}if(G.pageX==null&&G.clientX!=null){var H=document.documentElement,D=document.body;G.pageX=G.clientX+(H&&H.scrollLeft||D&&D.scrollLeft||0)-(H.clientLeft||0);G.pageY=G.clientY+(H&&H.scrollTop||D&&D.scrollTop||0)-(H.clientTop||0)}if(!G.which&&((G.charCode||G.charCode===0)?G.charCode:G.keyCode)){G.which=G.charCode||G.keyCode}if(!G.metaKey&&G.ctrlKey){G.metaKey=G.ctrlKey}if(!G.which&&G.button){G.which=(G.button&1?1:(G.button&2?3:(G.button&4?2:0)))}return G},proxy:function(E,D){D=D||function(){return E.apply(this,arguments)};D.guid=E.guid=E.guid||D.guid||this.guid++;return D},special:{ready:{setup:A,teardown:function(){}}},specialAll:{live:{setup:function(D,E){n.event.add(this,E[0],c)},teardown:function(F){if(F.length){var D=0,E=RegExp("(^|\\.)"+F[0]+"(\\.|$)");n.each((n.data(this,"events").live||{}),function(){if(E.test(this.type)){D++}});if(D<1){n.event.remove(this,F[0],c)}}}}}};n.Event=function(D){if(!this.preventDefault){return new n.Event(D)}if(D&&D.type){this.originalEvent=D;this.type=D.type;this.timeStamp=D.timeStamp}else{this.type=D}if(!this.timeStamp){this.timeStamp=e()}this[h]=true};function k(){return false}function t(){return true}n.Event.prototype={preventDefault:function(){this.isDefaultPrevented=t;var D=this.originalEvent;if(!D){return}if(D.preventDefault){D.preventDefault()}D.returnValue=false},stopPropagation:function(){this.isPropagationStopped=t;var D=this.originalEvent;if(!D){return}if(D.stopPropagation){D.stopPropagation()}D.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=t;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(E){var D=E.relatedTarget;while(D&&D!=this){try{D=D.parentNode}catch(F){D=this}}if(D!=this){E.type=E.data;n.event.handle.apply(this,arguments)}};n.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(E,D){n.event.special[D]={setup:function(){n.event.add(this,E,a,D)},teardown:function(){n.event.remove(this,E,a)}}});n.fn.extend({bind:function(E,F,D){return E=="unload"?this.one(E,F,D):this.each(function(){n.event.add(this,E,D||F,D&&F)})},one:function(F,G,E){var D=n.event.proxy(E||G,function(H){n(this).unbind(H,D);return(E||G).apply(this,arguments)});return this.each(function(){n.event.add(this,F,D,E&&G)})},unbind:function(E,D){return this.each(function(){n.event.remove(this,E,D)})},trigger:function(D,E){return this.each(function(){n.event.trigger(D,E,this)})},triggerHandler:function(D,F){if(this[0]){var E=n.Event(D);E.preventDefault();E.stopPropagation();n.event.trigger(E,F,this[0]);return E.result}},toggle:function(F){var D=arguments,E=1;while(E<D.length){n.event.proxy(F,D[E++])}return this.click(n.event.proxy(F,function(G){this.lastToggle=(this.lastToggle||0)%E;G.preventDefault();return D[this.lastToggle++].apply(this,arguments)||false}))},hover:function(D,E){return this.mouseenter(D).mouseleave(E)},ready:function(D){A();if(n.isReady){D.call(document,n)}else{n.readyList.push(D)}return this},live:function(F,E){var D=n.event.proxy(E);D.guid+=this.selector+F;n(document).bind(i(F,this.selector),this.selector,D);return this},die:function(E,D){n(document).unbind(i(E,this.selector),D?{guid:D.guid+this.selector+E}:null);return this}});function c(G){var D=RegExp("(^|\\.)"+G.type+"(\\.|$)"),F=true,E=[];n.each(n.data(this,"events").live||[],function(H,I){if(D.test(I.type)){var J=n(G.target).closest(I.data)[0];if(J){E.push({elem:J,fn:I})}}});n.each(E,function(){if(!G.isImmediatePropagationStopped()&&this.fn.call(this.elem,G,this.fn.data)===false){F=false}});return F}function i(E,D){return["live",E,D.replace(/\./g,"`").replace(/ /g,"|")].join(".")}n.extend({isReady:false,readyList:[],ready:function(){if(!n.isReady){n.isReady=true;if(n.readyList){n.each(n.readyList,function(){this.call(document,n)});n.readyList=null}n(document).triggerHandler("ready")}}});var w=false;function A(){if(w){return}w=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);n.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);n.ready()}});if(document.documentElement.doScroll&&!l.frameElement){(function(){if(n.isReady){return}try{document.documentElement.doScroll("left")}catch(D){setTimeout(arguments.callee,0);return}n.ready()})()}}}n.event.add(l,"load",n.ready)}n.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(E,D){n.fn[D]=function(F){return F?this.bind(D,F):this.trigger(D)}});n(l).bind("unload",function(){for(var D in n.cache){if(D!=1&&n.cache[D].handle){n.event.remove(n.cache[D].handle.elem)}}});(function(){n.support={};var E=document.documentElement,F=document.createElement("script"),J=document.createElement("div"),I="script"+(new Date).getTime();J.style.display="none";J.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var G=J.getElementsByTagName("*"),D=J.getElementsByTagName("a")[0];if(!G||!G.length||!D){return}n.support={leadingWhitespace:J.firstChild.nodeType==3,tbody:!J.getElementsByTagName("tbody").length,objectAll:!!J.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!J.getElementsByTagName("link").length,style:/red/.test(D.getAttribute("style")),hrefNormalized:D.getAttribute("href")==="/a",opacity:D.style.opacity==="0.5",cssFloat:!!D.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};F.type="text/javascript";try{F.appendChild(document.createTextNode("window."+I+"=1;"))}catch(H){}E.insertBefore(F,E.firstChild);if(l[I]){n.support.scriptEval=true;delete l[I]}E.removeChild(F);if(J.attachEvent&&J.fireEvent){J.attachEvent("onclick",function(){n.support.noCloneEvent=false;J.detachEvent("onclick",arguments.callee)});J.cloneNode(true).fireEvent("onclick")}n(function(){var K=document.createElement("div");K.style.width="1px";K.style.paddingLeft="1px";document.body.appendChild(K);n.boxModel=n.support.boxModel=K.offsetWidth===2;document.body.removeChild(K)})})();var v=n.support.cssFloat?"cssFloat":"styleFloat";n.props={"for":"htmlFor","class":"className","float":v,cssFloat:v,styleFloat:v,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};n.fn.extend({_load:n.fn.load,load:function(F,I,J){if(typeof F!=="string"){return this._load(F)}var H=F.indexOf(" ");if(H>=0){var D=F.slice(H,F.length);F=F.slice(0,H)}var G="GET";if(I){if(n.isFunction(I)){J=I;I=null}else{if(typeof I==="object"){I=n.param(I);G="POST"}}}var E=this;n.ajax({url:F,type:G,dataType:"html",data:I,complete:function(L,K){if(K=="success"||K=="notmodified"){E.html(D?n("<div/>").append(L.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(D):L.responseText)}if(J){E.each(J,[L.responseText,K,L])}}});return this},serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?n.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(D,E){var F=n(this).val();return F==null?null:n.isArray(F)?n.map(F,function(H,G){return{name:E.name,value:H}}):{name:E.name,value:F}}).get()}});n.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(D,E){n.fn[E]=function(F){return this.bind(E,F)}});var q=e();n.extend({get:function(D,F,G,E){if(n.isFunction(F)){G=F;F=null}return n.ajax({type:"GET",url:D,data:F,success:G,dataType:E})},getScript:function(D,E){return n.get(D,null,E,"script")},getJSON:function(D,E,F){return n.get(D,E,F,"json")},post:function(D,F,G,E){if(n.isFunction(F)){G=F;F={}}return n.ajax({type:"POST",url:D,data:F,success:G,dataType:E})},ajaxSetup:function(D){n.extend(n.ajaxSettings,D)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(L){L=n.extend(true,L,n.extend(true,{},n.ajaxSettings,L));var V,E=/=\?(&|$)/g,Q,U,F=L.type.toUpperCase();if(L.data&&L.processData&&typeof L.data!=="string"){L.data=n.param(L.data)}if(L.dataType=="jsonp"){if(F=="GET"){if(!L.url.match(E)){L.url+=(L.url.match(/\?/)?"&":"?")+(L.jsonp||"callback")+"=?"}}else{if(!L.data||!L.data.match(E)){L.data=(L.data?L.data+"&":"")+(L.jsonp||"callback")+"=?"}}L.dataType="json"}if(L.dataType=="json"&&(L.data&&L.data.match(E)||L.url.match(E))){V="jsonp"+q++;if(L.data){L.data=(L.data+"").replace(E,"="+V+"$1")}L.url=L.url.replace(E,"="+V+"$1");L.dataType="script";l[V]=function(W){U=W;H();K();l[V]=g;try{delete l[V]}catch(X){}if(G){G.removeChild(S)}}}if(L.dataType=="script"&&L.cache==null){L.cache=false}if(L.cache===false&&F=="GET"){var D=e();var T=L.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+D+"$2");L.url=T+((T==L.url)?(L.url.match(/\?/)?"&":"?")+"_="+D:"")}if(L.data&&F=="GET"){L.url+=(L.url.match(/\?/)?"&":"?")+L.data;L.data=null}if(L.global&&!n.active++){n.event.trigger("ajaxStart")}var P=/^(\w+:)?\/\/([^\/?#]+)/.exec(L.url);if(L.dataType=="script"&&F=="GET"&&P&&(P[1]&&P[1]!=location.protocol||P[2]!=location.host)){var G=document.getElementsByTagName("head")[0];var S=document.createElement("script");S.src=L.url;if(L.scriptCharset){S.charset=L.scriptCharset}if(!V){var N=false;S.onload=S.onreadystatechange=function(){if(!N&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){N=true;H();K();G.removeChild(S)}}}G.appendChild(S);return g}var J=false;var I=L.xhr();if(L.username){I.open(F,L.url,L.async,L.username,L.password)}else{I.open(F,L.url,L.async)}try{if(L.data){I.setRequestHeader("Content-Type",L.contentType)}if(L.ifModified){I.setRequestHeader("If-Modified-Since",n.lastModified[L.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",L.dataType&&L.accepts[L.dataType]?L.accepts[L.dataType]+", */*":L.accepts._default)}catch(R){}if(L.beforeSend&&L.beforeSend(I,L)===false){if(L.global&&!--n.active){n.event.trigger("ajaxStop")}I.abort();return false}if(L.global){n.event.trigger("ajaxSend",[I,L])}var M=function(W){if(I.readyState==0){if(O){clearInterval(O);O=null;if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}}else{if(!J&&I&&(I.readyState==4||W=="timeout")){J=true;if(O){clearInterval(O);O=null}Q=W=="timeout"?"timeout":!n.httpSuccess(I)?"error":L.ifModified&&n.httpNotModified(I,L.url)?"notmodified":"success";if(Q=="success"){try{U=n.httpData(I,L.dataType,L)}catch(Y){Q="parsererror"}}if(Q=="success"){var X;try{X=I.getResponseHeader("Last-Modified")}catch(Y){}if(L.ifModified&&X){n.lastModified[L.url]=X}if(!V){H()}}else{n.handleError(L,I,Q)}K();if(L.async){I=null}}}};if(L.async){var O=setInterval(M,13);if(L.timeout>0){setTimeout(function(){if(I){if(!J){M("timeout")}if(I){I.abort()}}},L.timeout)}}try{I.send(L.data)}catch(R){n.handleError(L,I,null,R)}if(!L.async){M()}function H(){if(L.success){L.success(U,Q)}if(L.global){n.event.trigger("ajaxSuccess",[I,L])}}function K(){if(L.complete){L.complete(I,Q)}if(L.global){n.event.trigger("ajaxComplete",[I,L])}if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}return I},handleError:function(E,G,D,F){if(E.error){E.error(G,D,F)}if(E.global){n.event.trigger("ajaxError",[G,E,F])}},active:0,httpSuccess:function(E){try{return !E.status&&location.protocol=="file:"||(E.status>=200&&E.status<300)||E.status==304||E.status==1223}catch(D){}return false},httpNotModified:function(F,D){try{var G=F.getResponseHeader("Last-Modified");return F.status==304||G==n.lastModified[D]}catch(E){}return false},httpData:function(I,G,F){var E=I.getResponseHeader("content-type"),D=G=="xml"||!G&&E&&E.indexOf("xml")>=0,H=D?I.responseXML:I.responseText;if(D&&H.documentElement.tagName=="parsererror"){throw"parsererror"}if(F&&F.dataFilter){H=F.dataFilter(H,G)}if(typeof H==="string"){if(G=="script"){n.globalEval(H)}if(G=="json"){H=l["eval"]("("+H+")")}}return H},param:function(D){var F=[];function G(H,I){F[F.length]=encodeURIComponent(H)+"="+encodeURIComponent(I)}if(n.isArray(D)||D.jquery){n.each(D,function(){G(this.name,this.value)})}else{for(var E in D){if(n.isArray(D[E])){n.each(D[E],function(){G(E,this)})}else{G(E,n.isFunction(D[E])?D[E]():D[E])}}}return F.join("&").replace(/%20/g,"+")}});var m={},d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function s(E,D){var F={};n.each(d.concat.apply([],d.slice(0,D)),function(){F[this]=E});return F}n.fn.extend({show:function(I,K){if(I){return this.animate(s("show",3),I,K)}else{for(var G=0,E=this.length;G<E;G++){var D=n.data(this[G],"olddisplay");this[G].style.display=D||"";if(n.css(this[G],"display")==="none"){var F=this[G].tagName,J;if(m[F]){J=m[F]}else{var H=n("<"+F+" />").appendTo("body");J=H.css("display");if(J==="none"){J="block"}H.remove();m[F]=J}this[G].style.display=n.data(this[G],"olddisplay",J)}}return this}},hide:function(G,H){if(G){return this.animate(s("hide",3),G,H)}else{for(var F=0,E=this.length;F<E;F++){var D=n.data(this[F],"olddisplay");if(!D&&D!=="none"){n.data(this[F],"olddisplay",n.css(this[F],"display"))}this[F].style.display="none"}return this}},_toggle:n.fn.toggle,toggle:function(F,E){var D=typeof F==="boolean";return n.isFunction(F)&&n.isFunction(E)?this._toggle.apply(this,arguments):F==null||D?this.each(function(){var G=D?F:n(this).is(":hidden");n(this)[G?"show":"hide"]()}):this.animate(s("toggle",3),F,E)},fadeTo:function(D,F,E){return this.animate({opacity:F},D,E)},animate:function(H,E,G,F){var D=n.speed(E,G,F);return this[D.queue===false?"each":"queue"](function(){var J=n.extend({},D),L,K=this.nodeType==1&&n(this).is(":hidden"),I=this;for(L in H){if(H[L]=="hide"&&K||H[L]=="show"&&!K){return J.complete.call(this)}if((L=="height"||L=="width")&&this.style){J.display=n.css(this,"display");J.overflow=this.style.overflow}}if(J.overflow!=null){this.style.overflow="hidden"}J.curAnim=n.extend({},H);n.each(H,function(N,R){var Q=new n.fx(I,J,N);if(/toggle|show|hide/.test(R)){Q[R=="toggle"?K?"show":"hide":R](H)}else{var P=R.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),S=Q.cur(true)||0;if(P){var M=parseFloat(P[2]),O=P[3]||"px";if(O!="px"){I.style[N]=(M||1)+O;S=((M||1)/Q.cur(true))*S;I.style[N]=S+O}if(P[1]){M=((P[1]=="-="?-1:1)*M)+S}Q.custom(S,M,O)}else{Q.custom(S,R,"")}}});return true})},stop:function(E,D){var F=n.timers;if(E){this.queue([])}this.each(function(){for(var G=F.length-1;G>=0;G--){if(F[G].elem==this){if(D){F[G](true)}F.splice(G,1)}}});if(!D){this.dequeue()}return this}});n.each({slideDown:s("show",1),slideUp:s("hide",1),slideToggle:s("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(D,E){n.fn[D]=function(F,G){return this.animate(E,F,G)}});n.extend({speed:function(F,G,E){var D=typeof F==="object"?F:{complete:E||!E&&G||n.isFunction(F)&&F,duration:F,easing:E&&G||G&&!n.isFunction(G)&&G};D.duration=n.fx.off?0:typeof D.duration==="number"?D.duration:n.fx.speeds[D.duration]||n.fx.speeds._default;D.old=D.complete;D.complete=function(){if(D.queue!==false){n(this).dequeue()}if(n.isFunction(D.old)){D.old.call(this)}};return D},easing:{linear:function(F,G,D,E){return D+E*F},swing:function(F,G,D,E){return((-Math.cos(F*Math.PI)/2)+0.5)*E+D}},timers:[],timerId:null,fx:function(E,D,F){this.options=D;this.elem=E;this.prop=F;if(!D.orig){D.orig={}}}});n.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(n.fx.step[this.prop]||n.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(E){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var D=parseFloat(n.css(this.elem,this.prop,E));return D&&D>-10000?D:parseFloat(n.curCSS(this.elem,this.prop))||0},custom:function(H,G,F){this.startTime=e();this.start=H;this.end=G;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;function E(I){return D.step(I)}E.elem=this.elem;n.timers.push(E);if(E()&&n.timerId==null){n.timerId=setInterval(function(){var J=n.timers;for(var I=0;I<J.length;I++){if(!J[I]()){J.splice(I--,1)}}if(!J.length){clearInterval(n.timerId);n.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());n(this.elem).show()},hide:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(G){var F=e();if(G||F>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var D=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){D=false}}if(D){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(n.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){n(this.elem).hide()}if(this.options.hide||this.options.show){for(var H in this.options.curAnim){n.attr(this.elem.style,H,this.options.orig[H])}}}if(D){this.options.complete.call(this.elem)}return false}else{var I=F-this.startTime;this.state=I/this.options.duration;this.pos=n.easing[this.options.easing||(n.easing.swing?"swing":"linear")](this.state,I,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};n.extend(n.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(D){n.attr(D.elem.style,"opacity",D.now)},_default:function(D){if(D.elem.style&&D.elem.style[D.prop]!=null){D.elem.style[D.prop]=D.now+D.unit}else{D.elem[D.prop]=D.now}}}});if(document.documentElement.getBoundingClientRect){n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}var F=this[0].getBoundingClientRect(),I=this[0].ownerDocument,E=I.body,D=I.documentElement,K=D.clientTop||E.clientTop||0,J=D.clientLeft||E.clientLeft||0,H=F.top+(self.pageYOffset||n.boxModel&&D.scrollTop||E.scrollTop)-K,G=F.left+(self.pageXOffset||n.boxModel&&D.scrollLeft||E.scrollLeft)-J;return{top:H,left:G}}}else{n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}n.offset.initialized||n.offset.initialize();var I=this[0],F=I.offsetParent,E=I,N=I.ownerDocument,L,G=N.documentElement,J=N.body,K=N.defaultView,D=K.getComputedStyle(I,null),M=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=K.getComputedStyle(I,null);M-=I.scrollTop,H-=I.scrollLeft;if(I===F){M+=I.offsetTop,H+=I.offsetLeft;if(n.offset.doesNotAddBorder&&!(n.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}E=F,F=I.offsetParent}if(n.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}D=L}if(D.position==="relative"||D.position==="static"){M+=J.offsetTop,H+=J.offsetLeft}if(D.position==="fixed"){M+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft)}return{top:M,left:H}}}n.offset={initialize:function(){if(this.initialized){return}var K=document.body,E=document.createElement("div"),G,F,M,H,L,D,I=K.style.marginTop,J='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>';L={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(D in L){E.style[D]=L[D]}E.innerHTML=J;K.insertBefore(E,K.firstChild);G=E.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(E);this.initialized=true},bodyOffset:function(D){n.offset.initialized||n.offset.initialize();var F=D.offsetTop,E=D.offsetLeft;if(n.offset.doesNotIncludeMarginInBodyOffset){F+=parseInt(n.curCSS(D,"marginTop",true),10)||0,E+=parseInt(n.curCSS(D,"marginLeft",true),10)||0}return{top:F,left:E}}};n.fn.extend({position:function(){var H=0,G=0,E;if(this[0]){var F=this.offsetParent(),I=this.offset(),D=/^body|html$/i.test(F[0].tagName)?{top:0,left:0}:F.offset();I.top-=j(this,"marginTop");I.left-=j(this,"marginLeft");D.top+=j(F,"borderTopWidth");D.left+=j(F,"borderLeftWidth");E={top:I.top-D.top,left:I.left-D.left}}return E},offsetParent:function(){var D=this[0].offsetParent||document.body;while(D&&(!/^body|html$/i.test(D.tagName)&&n.css(D,"position")=="static")){D=D.offsetParent}return n(D)}});n.each(["Left","Top"],function(E,D){var F="scroll"+D;n.fn[F]=function(G){if(!this[0]){return null}return G!==g?this.each(function(){this==l||this==document?l.scrollTo(!E?G:n(l).scrollLeft(),E?G:n(l).scrollTop()):this[F]=G}):this[0]==l||this[0]==document?self[E?"pageYOffset":"pageXOffset"]||n.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]}});n.each(["Height","Width"],function(G,E){var D=G?"Left":"Top",F=G?"Right":"Bottom";n.fn["inner"+E]=function(){return this[E.toLowerCase()]()+j(this,"padding"+D)+j(this,"padding"+F)};n.fn["outer"+E]=function(I){return this["inner"+E]()+j(this,"border"+D+"Width")+j(this,"border"+F+"Width")+(I?j(this,"margin"+D)+j(this,"margin"+F):0)};var H=E.toLowerCase();n.fn[H]=function(I){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+E]||document.body["client"+E]:this[0]==document?Math.max(document.documentElement["client"+E],document.body["scroll"+E],document.documentElement["scroll"+E],document.body["offset"+E],document.documentElement["offset"+E]):I===g?(this.length?n.css(this[0],H):null):this.css(H,typeof I==="string"?I:I+"px")}})})();\r
+\r
+/*\r
+ *\r
+ * TableSorter 2.0 - Client-side table sorting with ease!\r
+ * Version 2.0.1\r
+ * @requires jQuery v1.2.1\r
+ *\r
+ * Copyright (c) 2007 Christian Bach\r
+ * Examples and docs at: http://tablesorter.com\r
+ * Dual licensed under the MIT and GPL licenses:\r
+ * http://www.opensource.org/licenses/mit-license.php\r
+ * http://www.gnu.org/licenses/gpl.html\r
+ *\r
+ */\r
+ // NOTE: This has been modified by myself for JAWStats ("bandwidth" parser added)\r
+(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms")}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s)}else{alert(s)}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug=""}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter)}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter)}if(!p){p=detectParserForColumn(table,cells[i])}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n"}list.push(p)}}if(table.config.debug){log(parsersDebug)}return list};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i]}}return parsers[0]}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i]}}return false}function buildCache(table){if(table.config.debug){var cacheTime=new Date()}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]))}cols.push(i);cache.normalized.push(cols);cols=null};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime)}return cache};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML}else{t=node.innerHTML}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node)}else{t=$(node).text()}}return t}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j])}}}if(table.config.appender){table.config.appender(table,rows)}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime)}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd")},0)};function buildHeaders(table){if(table.config.debug){var time=new Date()}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader)}table.config.headerList[index]=this});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders)}return $tableHeaders};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++))}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell)}}}return arr};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true};return false}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true};return false}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table)}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i]}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0}else{i=(v==(0||1))?v:0}return i}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true}}return false}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this)}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]])}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()))});$(table).prepend(colgroup)}}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date()}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { "}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; "}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime)}return cache};function sortText(a,b){return((a<b)?-1:((a>b)?1:0))};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0))};function sortNumeric(a,b){return a-b};function sortNumericDesc(a,b){return b-a};function getCachedSortType(parsers,i){return parsers[i].type};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j])}}}config.sortList.push([i,this.order])}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2}}}else{config.sortList.push([i,this.order])}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache))},1);return false}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this)}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache))}).bind("appendCache",function(){appendToTable(this,cache)}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this)}).bind("applyWidgets",function(){applyWidget(this)});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList])}applyWidget(this)})};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false}}if(a){parsers.push(parser)}};this.addWidget=function(widget){widgets.push(widget)};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s))};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild)}empty.apply(table.tBodies[0])}else{table.tBodies[0].innerHTML=""}}}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true},format:function(s){return $.trim(s.toLowerCase())},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c)},format:function(s){return $.tablesorter.formatFloat(s)},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s)},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""))},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s)},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item}else{r+=item}}return $.tablesorter.formatFloat(r)},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s)},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''))},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s)},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0")},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s))},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""))},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/))},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime())},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2")}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1")}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3")}return $.tablesorter.formatFloat(new Date(s).getTime())},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s)},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime())},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p]},type:"numeric"});ts.addParser({id:"bandwidth",is:function(s){return false},format:function(s){switch(s.substr(-1)){case"k":s=parseFloat(s);break;case"M":s=(parseFloat(s)*1024);break;case"G":s=(parseFloat(s)*1024*1024);break}return s},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date()}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time)}}})})(jQuery);\r
+\r
+/**\r
+ * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/\r
+ *\r
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:\r
+ * http://www.opensource.org/licenses/mit-license.php\r
+ *\r
+ */\r
+if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
\ No newline at end of file
--- /dev/null
+/**
+ * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
+if(typeof deconcept == "undefined") var deconcept = new Object();
+if(typeof deconcept.util == "undefined") deconcept.util = new Object();
+if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
+deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
+ if (!document.getElementById) { return; }
+ this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
+ this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
+ this.params = new Object();
+ this.variables = new Object();
+ this.attributes = new Array();
+ if(swf) { this.setAttribute('swf', swf); }
+ if(id) { this.setAttribute('id', id); }
+ if(w) { this.setAttribute('width', w); }
+ if(h) { this.setAttribute('height', h); }
+ if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
+ this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
+ if (!window.opera && document.all && this.installedVer.major > 7) {
+ // only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
+ deconcept.SWFObject.doPrepUnload = true;
+ }
+ if(c) { this.addParam('bgcolor', c); }
+ var q = quality ? quality : 'high';
+ this.addParam('quality', q);
+ this.setAttribute('useExpressInstall', false);
+ this.setAttribute('doExpressInstall', false);
+ var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
+ this.setAttribute('xiRedirectUrl', xir);
+ this.setAttribute('redirectUrl', '');
+ if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
+}
+deconcept.SWFObject.prototype = {
+ useExpressInstall: function(path) {
+ this.xiSWFPath = !path ? "expressinstall.swf" : path;
+ this.setAttribute('useExpressInstall', true);
+ },
+ setAttribute: function(name, value){
+ this.attributes[name] = value;
+ },
+ getAttribute: function(name){
+ return this.attributes[name];
+ },
+ addParam: function(name, value){
+ this.params[name] = value;
+ },
+ getParams: function(){
+ return this.params;
+ },
+ addVariable: function(name, value){
+ this.variables[name] = value;
+ },
+ getVariable: function(name){
+ return this.variables[name];
+ },
+ getVariables: function(){
+ return this.variables;
+ },
+ getVariablePairs: function(){
+ var variablePairs = new Array();
+ var key;
+ var variables = this.getVariables();
+ for(key in variables){
+ variablePairs[variablePairs.length] = key +"="+ variables[key];
+ }
+ return variablePairs;
+ },
+ getSWFHTML: function() {
+ var swfNode = "";
+ if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
+ if (this.getAttribute("doExpressInstall")) {
+ this.addVariable("MMplayerType", "PlugIn");
+ this.setAttribute('swf', this.xiSWFPath);
+ }
+ swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
+ swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
+ var params = this.getParams();
+ for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
+ var pairs = this.getVariablePairs().join("&");
+ if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
+ swfNode += '/>';
+ } else { // PC IE
+ if (this.getAttribute("doExpressInstall")) {
+ this.addVariable("MMplayerType", "ActiveX");
+ this.setAttribute('swf', this.xiSWFPath);
+ }
+ swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
+ swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
+ var params = this.getParams();
+ for(var key in params) {
+ swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
+ }
+ var pairs = this.getVariablePairs().join("&");
+ if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
+ swfNode += "</object>";
+ }
+ return swfNode;
+ },
+ write: function(elementId){
+ if(this.getAttribute('useExpressInstall')) {
+ // check to see if we need to do an express install
+ var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
+ if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
+ this.setAttribute('doExpressInstall', true);
+ this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
+ document.title = document.title.slice(0, 47) + " - Flash Player Installation";
+ this.addVariable("MMdoctitle", document.title);
+ }
+ }
+ if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
+ var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
+ n.innerHTML = this.getSWFHTML();
+ return true;
+ }else{
+ if(this.getAttribute('redirectUrl') != "") {
+ document.location.replace(this.getAttribute('redirectUrl'));
+ }
+ }
+ return false;
+ }
+}
+
+/* ---- detection functions ---- */
+deconcept.SWFObjectUtil.getPlayerVersion = function(){
+ var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
+ if(navigator.plugins && navigator.mimeTypes.length){
+ var x = navigator.plugins["Shockwave Flash"];
+ if(x && x.description) {
+ PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
+ }
+ }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
+ var axo = 1;
+ var counter = 3;
+ while(axo) {
+ try {
+ counter++;
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
+// document.write("player v: "+ counter);
+ PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
+ } catch (e) {
+ axo = null;
+ }
+ }
+ } else { // Win IE (non mobile)
+ // do minor version lookup in IE, but avoid fp6 crashing issues
+ // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
+ try{
+ var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
+ }catch(e){
+ try {
+ var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+ PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
+ axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
+ } catch(e) {
+ if (PlayerVersion.major == 6) {
+ return PlayerVersion;
+ }
+ }
+ try {
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
+ } catch(e) {}
+ }
+ if (axo != null) {
+ PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
+ }
+ }
+ return PlayerVersion;
+}
+deconcept.PlayerVersion = function(arrVersion){
+ this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
+ this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
+ this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
+}
+deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
+ if(this.major < fv.major) return false;
+ if(this.major > fv.major) return true;
+ if(this.minor < fv.minor) return false;
+ if(this.minor > fv.minor) return true;
+ if(this.rev < fv.rev) return false;
+ return true;
+}
+/* ---- get value of query string param ---- */
+deconcept.util = {
+ getRequestParameter: function(param) {
+ var q = document.location.search || document.location.hash;
+ if (param == null) { return q; }
+ if(q) {
+ var pairs = q.substring(1).split("&");
+ for (var i=0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return pairs[i].substring((pairs[i].indexOf("=")+1));
+ }
+ }
+ }
+ return "";
+ }
+}
+/* fix for video streaming bug */
+deconcept.SWFObjectUtil.cleanupSWFs = function() {
+ var objects = document.getElementsByTagName("OBJECT");
+ for (var i = objects.length - 1; i >= 0; i--) {
+ objects[i].style.display = 'none';
+ for (var x in objects[i]) {
+ if (typeof objects[i][x] == 'function') {
+ objects[i][x] = function(){};
+ }
+ }
+ }
+}
+// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
+if (deconcept.SWFObject.doPrepUnload) {
+ if (!deconcept.unloadSet) {
+ deconcept.SWFObjectUtil.prepUnload = function() {
+ __flash_unloadHandler = function(){};
+ __flash_savedUnloadHandler = function(){};
+ window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
+ }
+ window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
+ deconcept.unloadSet = true;
+ }
+}
+/* add document.getElementById if needed (mobile IE < 5) */
+if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}
+
+/* add some aliases for ease of use/backwards compatibility */
+var getQueryParamValue = deconcept.util.getRequestParameter;
+var FlashObject = deconcept.SWFObject; // for legacy support
+var SWFObject = deconcept.SWFObject;
--- /dev/null
+// JAWStats de-de translation file\r
+// Last Updated: Sunday, 25th January 2009. 04:10:55\r
+oTranslation = {\r
+"0 seconds - 30 seconds":"0 Sekunden - 30 Sekunden",\r
+"15 minutes - 30 minutes":"15 Minuten - 30 Minuten",\r
+"1st":"Erster",\r
+"2 minutes - 5 minutes":"2 Minuten - 5 Minuten",\r
+"2nd":"Zweiter",\r
+"30 minutes - 1 hour":"30 Minuten - 1 Stunde",\r
+"30 seconds - 2 minutes":"30 Sekunden - 2 Minuten",\r
+"3rd":"Dritter",\r
+"5 minutes - 15 minutes":"5 Minuten - 15 Minuten",\r
+"Active Server Page":"Active Server Page",\r
+"Adobe Flash file":"Adobe Flash Datei",\r
+"Adobe Portable Document Format file":"Adobe PDF Datei",\r
+"Aero/Travel domains":"Luftfahrt-/Reiseunternemens Adressen",\r
+"Afghanistan":"Afghanistan",\r
+"Africa":"Afrika",\r
+"Aland Islands":"Åland",\r
+"Albania":"Albanien",\r
+"Algeria":"Algerien",\r
+"All Browsers":"Alle Browser",\r
+"All Months":"Alle Monate",\r
+"All Operating Systems":"Alle Betriebsysteme",\r
+"All Referrers":"Alle Herkünfte",\r
+"American Samoa":"Amerikanisch-Samoa",\r
+"Andorra":"Andorra",\r
+"Angola":"Angola",\r
+"Anguilla":"Anguilla",\r
+"Antarctica":"Antarktis",\r
+"Antigua and Barbuda":"Antigua und Barbuda",\r
+"Apr":"Apr",\r
+"April":"April",\r
+"Argentina":"Argentinien",\r
+"Armenia":"Armenien",\r
+"Aruba":"Aruba",\r
+"Asia":"Asien",\r
+"Aug":"Aug",\r
+"August":"August",\r
+"Australia":"Australien",\r
+"Austria":"Österreich",\r
+"Average":"Durchschnitt",\r
+"Average Size":"Durchschnittliche Größe",\r
+"Azerbaijan":"Aserbaidschan",\r
+"Bad Request":"Ungültige Anfrage",\r
+"Bahamas":"Bahamas",\r
+"Bahrain":"Bahrain",\r
+"Bandwidth":"Bandbreite",\r
+"Bangladesh":"Bangladesh",\r
+"Barbados":"Barbados",\r
+"Belarus":"Weißrussland",\r
+"Belgium":"Belgien",\r
+"Belize":"Belize",\r
+"Benin":"Benin",\r
+"Bermuda":"Bermuda",\r
+"Bhutan":"Bhutan",\r
+"Bolivia":"Bolivien",\r
+"Bosnia and Herzegovina":"Bosnien und Herzegowina",\r
+"Botswana":"Botswana",\r
+"Bouvet Island":"Bouvetinsel",\r
+"Brazil":"Brasilien",\r
+"British Indian Ocean Territory":"Britisches Territorium im Indischen Ozean",\r
+"Browser":"Browser",\r
+"Browser Families":"Browser Familien",\r
+"Browser Family":"Browser Familie",\r
+"Browsers":"Browser",\r
+"Brunei Darussalam":"Brunei Darussalam",\r
+"Bulgaria":"Bulgarien",\r
+"Burkina Faso":"Burkina Faso",\r
+"Burundi":"Burundi",\r
+"BW":"Bandbreite",\r
+"Calendar of Bandwidth Usage":"Kalender (Bandbreiten Nutzung)",\r
+"Calendar of Bandwidth Usage this Month":"Kalender (Bandbreite) in diesem Monat",\r
+"Calendar of Hits":"Kalender (Zugriffe)",\r
+"Calendar of Hits this Month":"Kaldender (Zugriffe in diesem Monat)",\r
+"Calendar of Page Views":"Kalender (Seitenansichten)",\r
+"Calendar of Page Views this Month":"Kalender (aufgerufene Seiten) in diesem Monat",\r
+"Calendar of Visitors":"Kaldender (Besucher)",\r
+"Calendar of Visitors this Month":"Kalender (Besucher in diesem Monat)",\r
+"Cambodia":"Kambodscha",\r
+"Cameroon":"Kamerun",\r
+"Canada":"Kanada",\r
+"Cape Verde":"Cabo Verde",\r
+"Cascading Style Sheet":"Cascading Style Sheet",\r
+"Cayman Islands":"Kaimaninseln",\r
+"Central African Republic":"Zentralafrikanische Republik",\r
+"CGI script":"CGI-Skript",\r
+"Chad":"Tschad",\r
+"Chile":"Chile",\r
+"China":"China",\r
+"Christmas Island":"Weihnachtsinsel",\r
+"Cocos (Keeling) Islands":"Kokosinseln",\r
+"Code":"Code",\r
+"Coldfusion script":"Coldfusion-Skript",\r
+"Colombia":"Kolumbien",\r
+"Commercial":"Kommerziell",\r
+"Comoros":"Komoren",\r
+"Congo (Brazzaville)":"Republik Kongo",\r
+"Congo (Kinshasa)":"Demokratische Republik Kongo",\r
+"Continents":"Kontinente",\r
+"Cook Islands":"Cookinseln",\r
+"Costa Rica":"Costa Rica",\r
+"Cote d'Ivoire":"Elfenbeinküste",\r
+"Countries":"Länder",\r
+"Countries":"Länder",\r
+"Croatia":"Kroatien",\r
+"Cuba":"Kuba",\r
+"Cyprus":"Zypern",\r
+"Czech Republic":"Tschechische Republik",\r
+"Daily Average":"Täglicher Durchschnitt",\r
+"Date":"Datum",\r
+"Day":"Tag",\r
+"Dec":"Dez",\r
+"December":"Dezember",\r
+"Denmark":"Dänemark",\r
+"Description":"Beschreibung",\r
+"Djibouti":"Dschibuti",\r
+"Dominica":"Dominica",\r
+"Dominican Republic":"Dominikanische Republik",\r
+"Ecuador":"Ecuador",\r
+"Egypt":"Ägypten",\r
+"El Salvador":"El Salvador",\r
+"Entry":"Eingang",\r
+"Equatorial Guinea":"Äquatorialguinea",\r
+"Eritrea":"Eritrea",\r
+"Estonia":"Estland",\r
+"Ethiopia":"Äthiopien",\r
+"Europe":"Europa",\r
+"European Union":"Europäische Union",\r
+"Exit":"Ausgang",\r
+"Falkland Islands":"Falklandinseln",\r
+"Faroe Islands":"Fårö",\r
+"Feb":"Feb",\r
+"February":"Februar",\r
+"Fiji":"Fiji",\r
+"File Archive":"Dateiarchiv",\r
+"File Not Found":"Dokument nicht gefunden",\r
+"File Not Found URLs":"Nicht gefundene Adressen",\r
+"Filetype":"Dateityp",\r
+"Filetypes":"Dateitypen",\r
+"Finland":"Finnland",\r
+"Flash Video file":"Flash Video Datei",\r
+"Forbidden":"Verboten",\r
+"France":"Frankreich",\r
+"French Guiana":"Französisch-Guayana",\r
+"French Polynesia":"Französisch-Polynesien",\r
+"French Southern Lands":"Französische Süd- und Antarktisgebiete",\r
+"Frequency":"Frequenz",\r
+"Fri":"Fr",\r
+"Friday":"Freitag",\r
+"Gabon":"Gabun",\r
+"Gambia":"Gambia",\r
+"Georgia":"Georgien",\r
+"Germany":"Deutschland",\r
+"Ghana":"Ghana",\r
+"Gibraltar":"Gibraltar",\r
+"Greece":"Griechenland",\r
+"Greenland":"Grönland",\r
+"Grenada":"Grenada",\r
+"Guadeloupe":"Guadeloupe",\r
+"Guam":"Guam",\r
+"Guatemala":"Republik Guatemala",\r
+"Guernsey":"Guernsey",\r
+"Guinea":"Guinea",\r
+"Guinea-Bissau":"Guinea-Bissau",\r
+"Guyana":"Guyana",\r
+"Haiti":"Haiti",\r
+"Heard and McDonald Islands":"Heard und McDonaldinseln",\r
+"Hits":"Aufrufe",\r
+"Honduras":"Honduras",\r
+"Hong Kong":"Hong Kong",\r
+"Hour":"Stunde",\r
+"Hours":"Stunden",\r
+"HTML or XML static page":"Statische HTML- oder XML-Seite",\r
+"HTTP Status Codes":"HTTP Status Codes",\r
+"Hungary":"Ungarn",\r
+"Iceland":"Island",\r
+"Icon":"Icon",\r
+"Image":"Bild",\r
+"India":"Indien",\r
+"Indonesia":"Indonesien",\r
+"Info Domains":"Info Domains",\r
+"Iran":"Iran",\r
+"Iraq":"Irak",\r
+"Ireland":"Irland",\r
+"Isle of Man":"Isle of Man",\r
+"Israel":"Israel",\r
+"Italy":"Italien",\r
+"Jamaica":"Jamaika",\r
+"Jan":"Jan",\r
+"January":"Januar",\r
+"Japan":"Japan",\r
+"JavaScript File":"JavaScript-Datei",\r
+"JavaServer Page":"JavaServer-Seite",\r
+"Jersey":"Jersey",\r
+"Jordan":"Jordanien",\r
+"Jul":"Jul",\r
+"July":"Juli",\r
+"Jun":"Jun",\r
+"June":"Juni",\r
+"Kazakhstan":"Kasachstan",\r
+"Kenya":"Kenia",\r
+"Keyphrase":"Keyphrase",\r
+"Keyphrases":"Suchaudrücke",\r
+"Keyword":"Keyword",\r
+"Keywords":"Stichwörter",\r
+"Kiribati":"Kiribati",\r
+"Korea, North":"Nordkorea",\r
+"Korea, South":"Südkorea",\r
+"Kuwait":"Kuwait",\r
+"Kyrgyzstan":"Kirgistan",\r
+"Laos":"Laos",\r
+"Last Visit":"Letzter Besuch",\r
+"Latvia":"Lettland",\r
+"Lebanon":"Libanon",\r
+"Lesotho":"Lesotho",\r
+"Liberia":"Liberia",\r
+"Libya":"Libyen",\r
+"Liechtenstein":"Liechtenstein",\r
+"Lithuania":"Littauen",\r
+"Local Network Host":"Host dem Lokalem Netzwerk",\r
+"Localhost":"Localhost",\r
+"Luxembourg":"Luxemburg",\r
+"Macau":"Macau",\r
+"Macedonia":"Mazedonien",\r
+"Madagascar":"Madagaskar",\r
+"Malawi":"Malawi",\r
+"Malaysia":"Malaysia",\r
+"Maldives":"Malediven",\r
+"Mali":"Mali",\r
+"Malta":"Malta",\r
+"Mar":"Mär",\r
+"March":"März",\r
+"Marshall Islands":"Marshall-Inseln",\r
+"Martinique":"Martinique",\r
+"Mauritania":"Mauretanien",\r
+"Mauritius":"Mauritius",\r
+"May":"Mai",\r
+"May":"Mai",\r
+"Mayotte":"Mayotte",\r
+"Mexico":"Mexiko",\r
+"Micronesia":"Mikronesien",\r
+"Microsoft PowerPoint file":"Microsoft PowerPoint Datei",\r
+"Moldova":"Moldawien",\r
+"Mon":"Mon",\r
+"Monaco":"Monaco",\r
+"Monday":"Montag",\r
+"Mongolia":"Mongolei",\r
+"Montenegro":"Montenegro",\r
+"Month":"Monat",\r
+"Montserrat":"Montserrat",\r
+"More than 1 hour":"Länger als 1 Stunde",\r
+"Morocco":"Marokko",\r
+"Moved Permanently (redirect)":"Permanent verschoben (redirect)",\r
+"Moved Temporarily (redirect)":"Temporär verschoben (redirect)",\r
+"Mozambique":"Mosambik",\r
+"MPEG-1 Audio Layer 3 file":"MPEG-1 Audio Layer 3 Datei",\r
+"MPEG-4 Audio File":"MPEG-4 Audio Datei",\r
+"Myanmar":"Myanmar",\r
+"Name domains":"Namen Domains",\r
+"Namibia":"Namibia",\r
+"NATO":"NATO",\r
+"Nauru":"Nauru",\r
+"Nepal":"Nepal",\r
+"Netherlands":"Niederlande",\r
+"Netherlands Antilles":"Niederländische Antillen",\r
+"Network":"Netzwerk",\r
+"New Caledonia":"Neu-Kaledonien",\r
+"New Zealand":"Neuseeland",\r
+"Nicaragua":"Nicaragua",\r
+"Niger":"Niger",\r
+"Nigeria":"Nigeria",\r
+"Niue":"Niue",\r
+"Non-Profit Organisations":"Nicht Kommerzielle Organisationen",\r
+"Norfolk Island":"Norfolkinsel",\r
+"North America":"Nord Amerika",\r
+"Northern Mariana Islands":"Nord-Marianeninseln",\r
+"Norway":"Norwegen",\r
+"Not Viewed":"Nicht sichtbar",\r
+"Nov":"Nov",\r
+"November":"November",\r
+"Oceania":"Ozeanien",\r
+"Oct":"Okt",\r
+"October":"Oktober",\r
+"Old style Arpanet":"Infrastruktur-Domain",\r
+"Oman":"Oman",\r
+"Operating Systems":"Betriebssystem",\r
+"Other":"Andere",\r
+"Other Browsers":"Andere Browser",\r
+"Other Countries":"Andere Länder",\r
+"Other Filetypes":"Andere Dateitypen",\r
+"Other Keyphrases":"Andere Schlüsselsätze",\r
+"Other Keywords":"Andere Schlüsselwörter",\r
+"Other Operating Systems":"Andere Betriebssysteme",\r
+"Other Referrers":"Andere Herkünfte",\r
+"Other Search Engines":"Andere Suchmaschinen",\r
+"Other Spiders":"Andere Robots",\r
+"Other Status Codes":"Andere Status Meldungen",\r
+"Other URLs":"Andere Adressen",\r
+"Other Versions":"Andere Versionen",\r
+"Other Visitors":"Andere Besucher",\r
+"Overall":"Insgesamt",\r
+"Overview":"Übersicht",\r
+"Pages":"Seiten",\r
+"Pages":"Seiten",\r
+"Pakistan":"Pakistan",\r
+"Palau":"Palau",\r
+"Palestine":"Palästina",\r
+"Panama":"Panama",\r
+"Papua New Guinea":"Papua Neu-Guinea",\r
+"Paraguay":"Paraguay",\r
+"Partial Content":"Partieller Inhalt",\r
+"per Visit":"pro Besuch",\r
+"Perl script":"Perl-Skript",\r
+"Peru":"Peru",\r
+"Philippines":"Philippinen",\r
+"PHP script":"PHP-Skript",\r
+"Pitcairn":"Pitcairn",\r
+"Poland":"Polen",\r
+"Portugal":"Portugal",\r
+"Puerto Rico":"Puerto Rico",\r
+"Qatar":"Katar",\r
+"QuickTime Movie":"QuickTime-Film",\r
+"Referrer":"Referrer",\r
+"Referrers":"Herkünfte",\r
+"Referring Domains":"Verweisende Adressen",\r
+"Referring Pages":"Verweisende Seiten",\r
+"Referring Search Engines":"Verweisende Suchmaschinen",\r
+"Reunion":"La Réunion",\r
+"Romania":"Rumänien",\r
+"Russian Federation":"Russland",\r
+"Rwanda":"Ruanda",\r
+"Saint Barthelemy":"St. Barth",\r
+"Saint Helena":"St. Helena",\r
+"Saint Kitts and Nevis":"St. Kitts und Nevis",\r
+"Saint Lucia":"St. Lucia",\r
+"Saint Martin (French part)":"St. Martin (frz.)",\r
+"Saint Pierre and Miquelon":"Saint-Pierre und Miquelon",\r
+"Saint Vincent and the Grenadines":"St. Vincent und die Grenadinen",\r
+"Samoa":"Samoa",\r
+"San Marino":"San Marino",\r
+"Sao Tome and Principe":"São Tomé und Príncipe",\r
+"Sat":"Sa",\r
+"Satellite Provider":"Satelliten Provider",\r
+"Saturday":"Samstag",\r
+"Saudi Arabia":"Saudi-Arabien",\r
+"Search Engine":"Suchmaschine",\r
+"Search Engines":"Suchmaschinen",\r
+"Senegal":"Senegal",\r
+"Sep":"Sep",\r
+"September":"September",\r
+"Serbia":"Serbien",\r
+"Service Unavailable":"Service nicht verfügbar",\r
+"Session Duration":"Session Dauer",\r
+"Session Length":"Session Länge",\r
+"Sessions":"Sitzungen",\r
+"Seychelles":"Seychellen",\r
+"Sierra Leone":"Sierra Leone",\r
+"Singapore":"Singapur",\r
+"Slovakia":"Slowakei",\r
+"Slovenia":"Slovenien",\r
+"Solomon Islands":"Solomon-Inseln",\r
+"Somalia":"Somalia",\r
+"South Africa":"Südafrika",\r
+"South America":"Süd Amerika",\r
+"South Georgia and South Sandwich Islands":"Südgeorgien und die Südlichen Sandwichinseln",\r
+"Spain":"Spanien",\r
+"Spider":"Spider",\r
+"Spiders":"Spiders",\r
+"Sri Lanka":"Sri Lanka",\r
+"Status":"Status",\r
+"Sudan":"Sudan",\r
+"Sun":"So",\r
+"Sunday":"Sonntag",\r
+"Suriname":"Surinam",\r
+"Svalbard and Jan Mayen Islands":"Svalbard und Jan Mayen Insel",\r
+"Swaziland":"Swasiland",\r
+"Sweden":"Schweden",\r
+"Switzerland":"Schweiz",\r
+"Syria":"Syrien",\r
+"Taiwan":"Taiwan",\r
+"Tajikistan":"Tadschikistan",\r
+"Tanzania":"Tansania",\r
+"Text file":"Textdatei",\r
+"Thailand":"Thailand",\r
+"The password you entered was incorrect":"Das eingegebene Passwort ist nicht korrekt",\r
+"There is no data to display":"Es gibt keine anzuzeigenden Daten.",\r
+"This Month":"Aktueller Monat",\r
+"Thu":"Do",\r
+"Thursday":"Donnerstag",\r
+"Timor-Leste":"Ost-Timor",\r
+"Togo":"Togo",\r
+"Tokelau":"Tokelau",\r
+"Tonga":"Tonga",\r
+"Top 10 Referrers":"Top 10 Herkünfte",\r
+"Top 50 Referrers":"Top 10 Herkünfte",\r
+"Top Bandwidth":"Top Bandbreite",\r
+"Top Entry Pages":"Top Einstiegsseiten",\r
+"Total":"Gesamt",\r
+"Total Visitors":"Besucher Insgesamt",\r
+"Trinidad and Tobago":"Trinidad und Tobago",\r
+"Tue":"Di",\r
+"Tuesday":"Dienstag",\r
+"Tunisia":"Tunesien",\r
+"Turkey":"Türkei",\r
+"Turkmenistan":"Turkmenistan",\r
+"Turks and Caicos Islands":"Turks- und Caicosinseln",\r
+"Tuvalu":"Tuvalu",\r
+"Uganda":"Uganda",\r
+"Ukraine":"Ukraine",\r
+"Unauthorized":"Nicht authorisiert",\r
+"Unique Ratio":"Eindeutiges Verhältnis",\r
+"Unique Visitors":"Eindeutige Besucher",\r
+"United Arab Emirates":"Vereinigte Arabische Emirate",\r
+"United Kingdom":"Großbrittannien",\r
+"United States Minor Outlying Islands":"Amerikanisch-Ozeanien",\r
+"United States of America":"Vereinigte Staaten von Amerika",\r
+"Unknown":"Unbekannt",\r
+"URL":"URL",\r
+"Uruguay":"Uruguay",\r
+"USA Educational":"Bildungseinrichtungen",\r
+"USA Military":"militärische Einrichtungen der USA",\r
+"Uzbekistan":"Usbekistan",\r
+"Vanuatu":"Vanuatu",\r
+"Vatican City":"Vatikan-Stadt",\r
+"Venezuela":"Venezuela",\r
+"Vietnam":"Vietnam",\r
+"Virgin Islands, British":"Britische Virgin-Inseln",\r
+"Virgin Islands, U.S.":"U.S.-amerikanische Virgin-Inseln",\r
+"Visiting Spiders":"Indizierende Suchmaschinen",\r
+"Visitors by Continent":"Besucher pro Kontinent",\r
+"Visitors by Country":"Besucher pro Land",\r
+"Visitors from Africa":"Besucher aus Afrika",\r
+"Visitors from Asia":"Besucher aus Asien",\r
+"Visitors from Europe":"Besucher aus Europa",\r
+"Visitors from North America":"Besucher aus Nord Amerkia",\r
+"Visitors from Oceania":"Besucher aus Ozeanien",\r
+"Visitors from South America":"Besucher aus Süd Amerika",\r
+"Visitors per Day":"Besucher pro Tag",\r
+"Visitors this Month":"Besucher in diesem Monat",\r
+"Visits":"Besuche",\r
+"Wallis and Futuna Islands":"Wallis und Futuna-Inseln",\r
+"Waveform Audio file":"Waveform Audio Datei",\r
+"Wed":"Mi",\r
+"Wednesday":"Mittwoch",\r
+"Week":"Woche",\r
+"Week Total":"Gesamte Woche",\r
+"Western Sahara":"Westliche Sahara",\r
+"within Family":"im Bereich",\r
+"XML file":"XML-Datei",\r
+"Year":"Jahr",\r
+"Yemen":"Jemen",\r
+"Zambia":"Sambia",\r
+"Zimbabwe":"Simbabwe"\r
+}
\ No newline at end of file
--- /dev/null
+// JAWStats fr translation file\r
+// Last Updated: Sunday, 25th January 2009. 04:10:40\r
+oTranslation = {\r
+"0 seconds - 30 seconds":"0 seconde - 30 secondes",\r
+"15 minutes - 30 minutes":"15 minutes - 30 minutes",\r
+"2 minutes - 5 minutes":"2 minutes - 5 minutes",\r
+"30 minutes - 1 hour":"30 minutes - 1 heure",\r
+"30 seconds - 2 minutes":"30 secondes - 2 minutes",\r
+"5 minutes - 15 minutes":"5 minutes - 15 minutes",\r
+"Active Server Page":"Page de serveur active",\r
+"Adobe Flash file":"Fichier Adobe Flash",\r
+"Adobe Portable Document Format file":"Fichier Adobe PDF",\r
+"Afghanistan":"Afghanistan",\r
+"Africa":"Afrique",\r
+"Aland Islands":"Åland",\r
+"Albania":"Albanie",\r
+"Algeria":"Algérie",\r
+"All Browsers":"Tous les navigateurs",\r
+"All Months":"Tous les mois",\r
+"All Operating Systems":"Tous les systèmes d'exploitations",\r
+"All Referrers":"Tous les référents",\r
+"American Samoa":"Samoa américaines",\r
+"Andorra":"Andorre",\r
+"Angola":"Angola",\r
+"Anguilla":"Île d'Anguilla",\r
+"Antarctica":"Antarctique",\r
+"Antigua and Barbuda":"Antigua-et-Barbuda",\r
+"Apr":"Avr",\r
+"April":"Avril",\r
+"Argentina":"Argentine",\r
+"Armenia":"Arménie",\r
+"Aruba":"Aruba",\r
+"Asia":"Asie",\r
+"Aug":"Aou",\r
+"August":"Août",\r
+"Australia":"Australie",\r
+"Austria":"Autriche",\r
+"Average":"Moyenne",\r
+"Average Size":"Taille moyenne",\r
+"Azerbaijan":"Azerbaïdjan",\r
+"Bad Request":"Mauvaise requête",\r
+"Bahamas":"Bahamas",\r
+"Bahrain":"Bahreïn",\r
+"Bandwidth":"Bande Passante",\r
+"Bangladesh":"Bangladesh",\r
+"Barbados":"Barbade",\r
+"Belarus":"Biélorussie",\r
+"Belgium":"Belgique",\r
+"Belize":"Bélize",\r
+"Benin":"Bénin",\r
+"Bermuda":"Bermudes",\r
+"Bhutan":"Bhoutan",\r
+"Bolivia":"Bolivie",\r
+"Bosnia and Herzegovina":"Bosnie-Herzégovine",\r
+"Botswana":"Botswana",\r
+"Bouvet Island":"Île Bouvet",\r
+"Brazil":"Brésil",\r
+"British Indian Ocean Territory":"Territoire britannique de l'océan Indien",\r
+"Browser":"Navigateur",\r
+"Browser Families":"Familles de navigateurs",\r
+"Browser Family":"Famille de navigateurs",\r
+"Browsers":"Navigateurs",\r
+"Brunei Darussalam":"Brunei",\r
+"Bulgaria":"Bulgarie",\r
+"Burkina Faso":"Burkina Faso",\r
+"Burundi":"Burundi",\r
+"BW":"BP",\r
+"Calendar of Bandwidth Usage":"Calendrier de la conso. de la Bande Passante",\r
+"Calendar of Bandwidth Usage this Month":"Calendrier de l'usage de la bande passante pour le mois",\r
+"Calendar of Hits":"Calendrier des Hits",\r
+"Calendar of Hits this Month":"Calendrier des HIT du mois",\r
+"Calendar of Page Views":"Calendrier des pages vues",\r
+"Calendar of Page Views this Month":"Calendrier des Pages vues ce mois",\r
+"Calendar of Visitors":"Calendrier des Visiteurs",\r
+"Calendar of Visitors this Month":"Calendrier des Visiteurs de ce mois",\r
+"Cambodia":"Cambodge",\r
+"Cameroon":"Cameroun",\r
+"Canada":"Canada",\r
+"Cape Verde":"Cap Vert",\r
+"Cascading Style Sheet":"Feuilles de style",\r
+"Cayman Islands":"Îles Caïmans",\r
+"Central African Republic":"République Centre-Africaine",\r
+"CGI script":"Script CGI",\r
+"Chad":"Tchad",\r
+"Chile":"Chili",\r
+"China":"Chine",\r
+"Christmas Island":"Île Christmas",\r
+"Cocos (Keeling) Islands":"Îles Cocos",\r
+"Code":"Code",\r
+"Coldfusion script":"Script Coldfusion",\r
+"Colombia":"Colombie",\r
+"Comoros":"Comores",\r
+"Congo (Brazzaville)":"République du Congo",\r
+"Congo (Kinshasa)":"République démocratique du Congo",\r
+"Continents":"Continents",\r
+"Cook Islands":"Îles Cook",\r
+"Costa Rica":"Costa Rica",\r
+"Cote d'Ivoire":"Côte d'Ivoire",\r
+"Countries":"Pays",\r
+"Countries":"Pays",\r
+"Croatia":"Croatie",\r
+"Cuba":"Cuba",\r
+"Cyprus":"Chypre",\r
+"Czech Republic":"République Tchèque",\r
+"Daily Average":"Moyenne quotidienne",\r
+"Date":"Date",\r
+"Day":"Jour",\r
+"Day of Week Average":"Moyenne pour jours de la semaine",\r
+"Day of Week Total":"Total pour jours de la semaine",\r
+"Dec":"Déc",\r
+"December":"Décembre",\r
+"Denmark":"Danemark",\r
+"Description":"Description",\r
+"Djibouti":"Djibouti",\r
+"Dominica":"Dominique",\r
+"Dominican Republic":"République Dominicaine",\r
+"Ecuador":"Équateur",\r
+"Egypt":"Égypte",\r
+"El Salvador":"Salvador",\r
+"Entry":"Entrée",\r
+"Equatorial Guinea":"Guinée Équatoriale",\r
+"Eritrea":"Érythrée",\r
+"Estonia":"Estonie",\r
+"Ethiopia":"Éthiopie",\r
+"Europe":"Europe",\r
+"Exit":"Sortie",\r
+"Falkland Islands":"Îles Malouines",\r
+"Feb":"Fév",\r
+"February":"Février",\r
+"Fiji":"Îles Fiji",\r
+"File Archive":"Archive",\r
+"File Not Found":"Fichier introuvable",\r
+"File Not Found URLs":"Fichier URLs introuvable",\r
+"Filetype":"Type de fichier",\r
+"Filetypes":"Type de fichier",\r
+"Finland":"Finlande",\r
+"Flash Video file":"Fichier Vidéo Flash",\r
+"Forbidden":"Interdit",\r
+"France":"France",\r
+"Frequency":"Fréquence",\r
+"Fri":"Ven",\r
+"Friday":"Vendredi",\r
+"Greece":"Grèce",\r
+"Greenland":"Groenland",\r
+"Grenada":"Grenade",\r
+"Guadeloupe":"Guadeloupe",\r
+"Hits":"Hits",\r
+"Honduras":"Honduras",\r
+"Hong Kong":"Hong Kong",\r
+"Hour":"Heure",\r
+"Hours":"Heures",\r
+"HTML or XML static page":"Page statique HTML ou XML",\r
+"HTTP Status Codes":"Codes de statut HTTP",\r
+"Hungary":"Hongrie",\r
+"Icon":"Icone",\r
+"Image":"Image",\r
+"India":"Inde",\r
+"Indonesia":"Indonésie",\r
+"Iran":"Iran",\r
+"Iraq":"Iraq",\r
+"Ireland":"Irelande",\r
+"Italy":"Italie",\r
+"Jan":"Jan",\r
+"January":"Janvier",\r
+"Japan":"Japon",\r
+"JavaScript File":"Fichier JavaScript",\r
+"JavaServer Page":"Fichier JSP",\r
+"Jordan":"Jordanie",\r
+"Jul":"Jui",\r
+"July":"Juillet",\r
+"Jun":"Jui",\r
+"June":"Juin",\r
+"Keyphrase":"Phrase clés",\r
+"Keyphrases":"Phrases clés",\r
+"Keyword":"Mot clés",\r
+"Keywords":"Mots clés",\r
+"Last Visit":"Dernière visite",\r
+"Lebanon":"Liban",\r
+"Luxembourg":"Luxembourg",\r
+"Mar":"Mar",\r
+"March":"Mars",\r
+"May":"Mai",\r
+"May":"Mai",\r
+"Microsoft PowerPoint file":"Fichier Microsoft PowerPoint",\r
+"Mon":"Lun",\r
+"Monday":"Lundi",\r
+"Month":"Mois",\r
+"More than 1 hour":"Plus d'une heure",\r
+"Moved Permanently (redirect)":"Changement définitif(redirection)",\r
+"Moved Temporarily (redirect)":"Changement temporaire(redirection)",\r
+"MPEG-1 Audio Layer 3 file":"Fichier Audio MP3",\r
+"MPEG-4 Audio File":"Fichier Audio MPEG-4",\r
+"North America":"Amérique du Nord",\r
+"Not Viewed":"Non vues",\r
+"Nov":"Nov",\r
+"November":"Novembre",\r
+"Oceania":"Océanie",\r
+"Oct":"Oct",\r
+"October":"Octobre",\r
+"Operating System":"Système d'exploitation",\r
+"Operating System Families":"Familles de systèmes d'exploitation",\r
+"Operating System Family":"Famille de systèmes d'exploitation",\r
+"Operating Systems":"Système d'exploitation",\r
+"Other":"Autre",\r
+"Other Browsers":"Autres Navigateurs",\r
+"Other Countries":"Autres Pays",\r
+"Other Filetypes":"Autres types de fichiers",\r
+"Other Keyphrases":"Autres phrases clés",\r
+"Other Keywords":"Autres mots clés",\r
+"Other Operating Systems":"Autres systèmes d'exploitation",\r
+"Other Referrers":"Autres référents",\r
+"Other Search Engines":"Autres moteurs de recherche",\r
+"Other Spiders":"Autres robots d'indexation",\r
+"Other Status Codes":"Autres codes de statut",\r
+"Other URLs":"Autres URLs",\r
+"Other Versions":"Autres versions",\r
+"Other Visitors":"Autre Visiteurs",\r
+"Overall":"Vue d'ensemble",\r
+"Overview":"Survol",\r
+"Page Views":"Pages vues",\r
+"Pages":"Pages",\r
+"Pages":"Pages",\r
+"Partial Content":"Contenu partiel",\r
+"per Visit":"par Visite",\r
+"Perl script":"Script Perl",\r
+"PHP script":"Script PHP",\r
+"QuickTime Movie":"Vidéo QuickTime",\r
+"Referrer":"Référent",\r
+"Referrers":"Referrers",\r
+"Referring Domains":"Domaines référents",\r
+"Referring Pages":"Pages référentes",\r
+"Referring Search Engines":"Moteurs de recherche référents",\r
+"Romania":"Roumanie",\r
+"Sat":"Sam",\r
+"Saturday":"Samedi",\r
+"Search Engine":"Moteur de recherche",\r
+"Search Engines":"Moteurs de recherche",\r
+"Sep":"Sep",\r
+"September":"Septembre",\r
+"Serbia":"Serbie",\r
+"Service Unavailable":"Service indisponible",\r
+"Session Duration":"Durée de session",\r
+"Session Length":"Durée de session",\r
+"Sessions":"Sessions",\r
+"South Africa":"Afrique du Sud",\r
+"South America":"Amérique du Sud",\r
+"Spain":"Espagne",\r
+"Spider":"Robot d'indexation",\r
+"Spiders":"Robot d'indexation",\r
+"Status":"Statut",\r
+"Sudan":"Soudan",\r
+"Sun":"Dim",\r
+"Sunday":"Dimanche",\r
+"Sweden":"Suède",\r
+"Switzerland":"Suisse",\r
+"Syria":"Syrie",\r
+"Taiwan":"Taïwan",\r
+"Tajikistan":"Tadjikistan",\r
+"Tanzania":"Tanzanie",\r
+"Text file":"Fichier Texte",\r
+"Thailand":"Thaïlande",\r
+"The password you entered was incorrect":"Le mot de passe que vous avez entré est incorrect",\r
+"There is no data to display":"Il n'y a pas de donnée à afficher",\r
+"This Month":"Ce mois",\r
+"Thu":"Jeu",\r
+"Thursday":"Jeudi",\r
+"Timor-Leste":"Timor oriental",\r
+"Togo":"Togo",\r
+"Tokelau":"Tokelau",\r
+"Top 10 Referrers":"Top 10 des référents",\r
+"Top 50 Referrers":"Top 50 des référents",\r
+"Top Bandwidth":"Top bande passante",\r
+"Top Entry Pages":"Top des pages d'entrées",\r
+"Top Exit Pages":"Top des pages de sorties",\r
+"Top Page Views":"Top des pages vues",\r
+"Total":"Total",\r
+"Total Visitors":"Total Visiteurs",\r
+"Trinidad and Tobago":"Trinité et Tobago",\r
+"Tue":"Mar",\r
+"Tuesday":"Mardi",\r
+"Tunisia":"Tunisie",\r
+"Turkey":"Turquie",\r
+"Unauthorized":"Non autorisé",\r
+"Unique Ratio":"Ratio uniques",\r
+"Unique Visitors":"Visiteurs uniques",\r
+"Unknown":"Inconnu",\r
+"URL":"URL",\r
+"Visiting Spiders":"Robots d'indexation en cours",\r
+"Visitors by Continent":"Visiteurs par continent",\r
+"Visitors by Country":"Visiteurs par pays",\r
+"Visitors each Month":"Visiteurs par mois",\r
+"Visitors each Year":"Visiteurs par années",\r
+"Visitors from Africa":"Visiteurs d'Afrique",\r
+"Visitors from Asia":"Visiteurs d'Asie",\r
+"Visitors from Europe":"Visiteurs d'Europe",\r
+"Visitors from North America":"Visiteurs d'Amérique du Nord",\r
+"Visitors from Oceania":"Visiteurs d'Océanie",\r
+"Visitors from South America":"Visiteurs d'Amérique du Sud",\r
+"Visitors over 24 Hours":"Visiteurs au delà des 24h.",\r
+"Visitors per Day":"Visiteurs par jour",\r
+"Visitors this Month":"Visiteurs ce mois",\r
+"Visits":"Visites",\r
+"Waveform Audio file":"Fichier Audio Wav",\r
+"Wed":"Mer",\r
+"Wednesday":"Mercredi",\r
+"Week":"Semaine",\r
+"Week Total":"Total pour la semaine",\r
+"within Family":"dans la Famille",\r
+"XML file":"Fichier XML",\r
+"Year":"Année"\r
+}
\ No newline at end of file
--- /dev/null
+// JAWStats jp translation file\r
+// Last Updated: Sunday, 25th January 2009. 04:11:11\r
+oTranslation = {\r
+"Active Server Page":"Active Server Page",\r
+"Adobe Flash file":"Adobe Flashファイル",\r
+"Afghanistan":"アフガニスタン",\r
+"Africa":"アフリカ",\r
+"Aland Islands":"オーランド諸島",\r
+"Albania":"アルバニア",\r
+"Algeria":"アルジェリア",\r
+"All Browsers":"全ブラウザ",\r
+"All Months":"月",\r
+"All Operating Systems":"全OS",\r
+"All Referrers":"全リファラー",\r
+"American Samoa":"アメリカ領サモア",\r
+"Andorra":"アンドラ",\r
+"Angola":"アンゴラ",\r
+"Anguilla":"アンギラ",\r
+"Antarctica":"南極大陸",\r
+"Antigua and Barbuda":"アンティグア・バーブーダ",\r
+"Apr":"4月",\r
+"April":"4月",\r
+"Argentina":"アルゼンチン",\r
+"Armenia":"アルメニア",\r
+"Aruba":"アルバ",\r
+"Asia":"アジア",\r
+"Aug":"8月",\r
+"August":"8月",\r
+"Australia":"オーストラリア",\r
+"Austria":"オーストリア",\r
+"Average":"平均",\r
+"Azerbaijan":"アゼルバイジャン",\r
+"Bad Request":"不正なリクエスト",\r
+"Bahamas":"バハマ",\r
+"Bahrain":"バーレーン",\r
+"Bandwidth":"バンド幅",\r
+"Bangladesh":"バングラデシュ",\r
+"Barbados":"バルバドス",\r
+"Belarus":"ベラルーシ",\r
+"Belgium":"ベルギー",\r
+"Belize":"ベリーズ",\r
+"Benin":"ベナン",\r
+"Bermuda":"バミューダ",\r
+"Bhutan":"ブータン",\r
+"Bolivia":"ボリビア",\r
+"Bosnia and Herzegovina":"ボスニア・ヘルツェゴビナ",\r
+"Botswana":"ボツワナ",\r
+"Bouvet Island":"ブーベ島",\r
+"Brazil":"ブラジル",\r
+"British Indian Ocean Territory":"イギリス領インド洋地域",\r
+"Browser":"ブラウザ",\r
+"Browser Families":"ブラウザ",\r
+"Browser Family":"ブラウザ",\r
+"Browsers":"ブラウザ",\r
+"Brunei Darussalam":"ブルネイ・ダルサラーム",\r
+"Bulgaria":"ブルガリア",\r
+"Burkina Faso":"ブルキナファソ",\r
+"Burundi":"ブルンジ",\r
+"Calendar of Bandwidth Usage":"バンド幅使用量をカレンダーで見る",\r
+"Calendar of Hits":"ヒット件数をカレンダーで見る",\r
+"Calendar of Page Views":"アクセスページ件数をカレンダーで見る",\r
+"Calendar of Visitors":"アクセス件数をカレンダーで見る",\r
+"Cambodia":"カンボジア",\r
+"Cameroon":"カメルーン",\r
+"Canada":"カナダ",\r
+"Cape Verde":"カーボベルデ",\r
+"Cascading Style Sheet":"Cascading Style Sheet",\r
+"Cayman Islands":"ケイマン諸島",\r
+"Central African Republic":"中央アフリカ共和国",\r
+"CGI script":"CGIスクリプト",\r
+"Chad":"チャド",\r
+"Chile":"チリ",\r
+"China":"中国",\r
+"Christmas Island":"クリスマス島",\r
+"Cocos (Keeling) Islands":"ココス(キーリング)諸島",\r
+"Coldfusion script":"Coldfusionスクリプト",\r
+"Colombia":"コロンビア",\r
+"Comoros":"コモロ連合",\r
+"Congo (Brazzaville)":"コンゴ(ブラザビル)",\r
+"Congo (Kinshasa)":"コンゴ(キンシャサ)",\r
+"Continents":"大陸",\r
+"Cook Islands":"クック諸島",\r
+"Costa Rica":"コスタリカ",\r
+"Cote d'Ivoire":"コートジボワール",\r
+"Countries":"国",\r
+"Countries":"国",\r
+"Croatia":"クロアチア",\r
+"Cuba":"キューバ",\r
+"Cyprus":"キプロス",\r
+"Czech Republic":"チェコ",\r
+"Daily Average":"毎日の平均",\r
+"Date":"日付",\r
+"Day":"日",\r
+"Day of Week Average":"曜日の平均",\r
+"Day of Week Total":"曜日の合計",\r
+"Dec":"12月",\r
+"December":"12月",\r
+"Denmark":"デンマーク",\r
+"Description":"説明",\r
+"Djibouti":"ジブチ",\r
+"Dominica":"ドミニカ",\r
+"Dominican Republic":"ドミニカ共和国",\r
+"Ecuador":"エクアドル",\r
+"Egypt":"エジプト",\r
+"El Salvador":"エルサルバドル",\r
+"Entry":"入り口",\r
+"Equatorial Guinea":"赤道ギニア",\r
+"Eritrea":"エリトリア",\r
+"Estonia":"エストニア",\r
+"Ethiopia":"エチオピア",\r
+"Europe":"ヨーロッパ",\r
+"European Union":"欧州連合",\r
+"Exit":"出口",\r
+"Falkland Islands":"フォークランド諸島",\r
+"Faroe Islands":"フェロー諸島",\r
+"Feb":"2月",\r
+"February":"2月",\r
+"Fiji":"フィジー",\r
+"File Archive":"ファイルアーカイブ",\r
+"File Not Found":"ページが見つかりません",\r
+"Filetype":"ファイルの種類",\r
+"Filetypes":"ファイル",\r
+"Finland":"フィンランド",\r
+"Flash Video file":"Flashビデオファイル",\r
+"Forbidden":"禁止",\r
+"France":"フランス",\r
+"French Guiana":"フランス領ギアナ",\r
+"French Polynesia":"タヒチ島",\r
+"French Southern Lands":"フランス領南方地域",\r
+"Frequency":"頻度",\r
+"Fri":"金",\r
+"Friday":"金曜日",\r
+"Gabon":"ガボン",\r
+"Gambia":"ガンビア",\r
+"Georgia":"グルジア",\r
+"Germany":"ドイツ",\r
+"Ghana":"ガーナ",\r
+"Gibraltar":"ジブラルタル",\r
+"Greece":"ギリシャ",\r
+"Greenland":"グリーンランド",\r
+"Grenada":"グレナダ",\r
+"Guadeloupe":"グアドループ",\r
+"Guam":"グアム",\r
+"Guatemala":"グアテマラ",\r
+"Guernsey":"ガーンジー島",\r
+"Guinea":"ギニア",\r
+"Guinea-Bissau":"ギニアビサウ",\r
+"Guyana":"ガイアナ",\r
+"Haiti":"ハイチ",\r
+"Heard and McDonald Islands":"ハード島とマクドナルド諸島",\r
+"Honduras":"ホンジュラス",\r
+"Hong Kong":"香港",\r
+"Hour":"時",\r
+"Hours":"時間",\r
+"HTML or XML static page":"HTML or XML スタティックページ",\r
+"HTTP Status Codes":"エラー",\r
+"Hungary":"ハンガリー",\r
+"Iceland":"アイスランド",\r
+"Image":"イメージ",\r
+"India":"インド",\r
+"Indonesia":"インドネシア",\r
+"Iran":"イラン",\r
+"Iraq":"イラク",\r
+"Ireland":"アイルランド",\r
+"Isle of Man":"マン島",\r
+"Israel":"イスラエル",\r
+"Italy":"イタリア",\r
+"Jamaica":"ジャマイカ",\r
+"Jan":"1月",\r
+"January":"1月",\r
+"Japan":"日本",\r
+"JavaScript File":"Javascriptファイル",\r
+"JavaServer Page":"Javaserverページ",\r
+"Jersey":"ジャージー島",\r
+"Jordan":"ヨルダン",\r
+"Jul":"7月",\r
+"July":"7月",\r
+"Jun":"6月",\r
+"June":"6月",\r
+"Kazakhstan":"カザフスタン",\r
+"Kenya":"ケニア",\r
+"Keyphrases":"キーフレーズ",\r
+"Keywords":"キーワード",\r
+"Kiribati":"キリバス",\r
+"Korea, North":"北朝鮮",\r
+"Korea, South":"韓国",\r
+"Kuwait":"クウェート",\r
+"Kyrgyzstan":"キルギス",\r
+"Laos":"ラオス",\r
+"Last Visit":"最終アクセス",\r
+"Latvia":"ラトビア",\r
+"Lebanon":"レバノン",\r
+"Lesotho":"レソト",\r
+"Liberia":"リベリア",\r
+"Libya":"リビア",\r
+"Liechtenstein":"リヒテンシュタイン",\r
+"Lithuania":"リトアニア",\r
+"Local Network Host":"ローカルネットワークホスト",\r
+"Luxembourg":"ルクセンブルク",\r
+"Macau":"マカオ",\r
+"Macedonia":"マケドニア",\r
+"Madagascar":"マダガスカル",\r
+"Malawi":"マラウイ",\r
+"Malaysia":"マレーシア",\r
+"Maldives":"モルディブ",\r
+"Mali":"マリ",\r
+"Malta":"マルタ",\r
+"Mar":"3月",\r
+"March":"3月",\r
+"Marshall Islands":"マーシャル諸島",\r
+"Martinique":"マルティニーク",\r
+"Mauritania":"モーリタニア",\r
+"Mauritius":"モーリシャス",\r
+"May":"5月",\r
+"May":"5月",\r
+"Mayotte":"マイヨット島",\r
+"Mexico":"メキシコ",\r
+"Micronesia":"ミクロネシア",\r
+"Microsoft PowerPoint file":"Microsoft PowerPointファイル",\r
+"Moldova":"モルドバ",\r
+"Mon":"月",\r
+"Monaco":"モナコ",\r
+"Monday":"月曜日",\r
+"Mongolia":"モンゴル",\r
+"Montenegro":"モンテネグロ",\r
+"Month":"月",\r
+"Montserrat":"モントセラト",\r
+"Morocco":"モロッコ",\r
+"Moved Permanently (redirect)":"恒久的移動",\r
+"Moved Temporarily (redirect)":"一時的な移動(転送)",\r
+"Mozambique":"モザンビーク",\r
+"MPEG-4 Audio File":"MPEG-4音声ファイル",\r
+"Myanmar":"ミャンマー",\r
+"Namibia":"ナミビア",\r
+"Nauru":"ナウル",\r
+"Nepal":"ネパール",\r
+"Netherlands":"オランダ",\r
+"Netherlands Antilles":"オランダ領アンティル",\r
+"New Caledonia":"ニューカレドニア",\r
+"New Zealand":"ニュージーランド",\r
+"Nicaragua":"ニカラグア",\r
+"Niger":"ニジェール",\r
+"Nigeria":"ナイジェリア",\r
+"Niue":"ニウエ",\r
+"Norfolk Island":"ノーフォーク島",\r
+"North America":"北アメリカ",\r
+"Northern Mariana Islands":"北マリアナ諸島",\r
+"Norway":"ノルウェー",\r
+"Not Viewed":"ビューなし",\r
+"Nov":"11月",\r
+"November":"11月",\r
+"Oceania":"]オセアニア",\r
+"Oct":"10月",\r
+"October":"10月",\r
+"Oman":"オマーン",\r
+"Operating System Families":"OSファミリー",\r
+"Operating Systems":"オペレーティングシステム",\r
+"Other":"その他",\r
+"Other Browsers":"その他のブラウザー",\r
+"Other Filetypes":"その他のファイルタイプ",\r
+"Other Keyphrases":"その他のキーフレーズ",\r
+"Other Keywords":"その他のキーワード",\r
+"Other Operating Systems":"その他のOS",\r
+"Other Referrers":"その他のリファレンス",\r
+"Other Search Engines":"その他の検索エンジン",\r
+"Other Spiders":"その他のスパイダー",\r
+"Other Status Codes":"その他のステータスコード",\r
+"Other URLs":"その他のURL",\r
+"Other Versions":"その他のバージョン",\r
+"Other Visitors":"他の訪問者数",\r
+"Overview":"概略",\r
+"Pages":"ページ",\r
+"Pakistan":"パキスタン",\r
+"Palau":"パラオ",\r
+"Palestine":"パレスチナ",\r
+"Panama":"パナマ",\r
+"Papua New Guinea":"パプアニューギニア",\r
+"Paraguay":"パラグアイ",\r
+"Partial Content":"部分的コンテンツ",\r
+"per Visit":"平均",\r
+"Perl script":"Perlスクリプト",\r
+"Peru":"ペルー",\r
+"Philippines":"フィリピン",\r
+"PHP script":"PHPスクリプト",\r
+"Pitcairn":"ピトケアン諸島",\r
+"Poland":"ポーランド",\r
+"Portugal":"ポルトガル",\r
+"Puerto Rico":"プエルトリコ",\r
+"Qatar":"カタール",\r
+"Referrers":"リファラー",\r
+"Referring Domains":"リファラードメイン",\r
+"Referring Pages":"ホームページ",\r
+"Referring Search Engines":"リファラー",\r
+"Reunion":"レユニオン島",\r
+"Romania":"ルーマニア",\r
+"Russian Federation":"ロシア連邦",\r
+"Rwanda":"ルワンダ",\r
+"Saint Barthelemy":"サン・バルテルミー島",\r
+"Saint Helena":"セントヘレナ",\r
+"Saint Kitts and Nevis":"セントクリストファー・ネイビス",\r
+"Saint Lucia":"セントルシア",\r
+"Saint Martin (French part)":"セント・マーチン島",\r
+"Saint Pierre and Miquelon":"サンピエール・ミクロン",\r
+"Saint Vincent and the Grenadines":"セントビンセント・グレナディーン",\r
+"Samoa":"サモア",\r
+"San Marino":"サンマリノ",\r
+"Sao Tome and Principe":"サントメ・プリンシペ",\r
+"Sat":"土",\r
+"Satellite Provider":"衛星プロバイダー",\r
+"Saturday":"土曜日",\r
+"Saudi Arabia":"サウジアラビア",\r
+"Search Engine":"検索エンジン",\r
+"Search Engines":"検索エンジン",\r
+"Senegal":"セネガル",\r
+"Sep":"9月",\r
+"September":"9月",\r
+"Serbia":"セルビア",\r
+"Service Unavailable":"利用できないサービスです。",\r
+"Session Duration":"Ugh, put the wrong translation here ... don't have Session Duration in my translations though ...",\r
+"Session Length":"セッション",\r
+"Sessions":"セッション",\r
+"Seychelles":"セーシェル",\r
+"Sierra Leone":"シエラレオネ",\r
+"Singapore":"シンガポール",\r
+"Slovakia":"スロバキア",\r
+"Slovenia":"スロベニア",\r
+"Solomon Islands":"ソロモン諸島",\r
+"Somalia":"ソマリア",\r
+"South Africa":"南アフリカ",\r
+"South America":"南アメリカ",\r
+"South Georgia and South Sandwich Islands":"サウスジョージア・サウスサンドウィッチ諸島",\r
+"Spain":"スペイン",\r
+"Spider":"スパイダー",\r
+"Spiders":"訪問/訪問者",\r
+"Sri Lanka":"スリランカ",\r
+"Status":"エラー",\r
+"Sudan":"スーダン",\r
+"Sun":"日",\r
+"Sunday":"日曜日",\r
+"Suriname":"スリナム",\r
+"Svalbard and Jan Mayen Islands":"スバールバル諸島・ヤンマイエン島",\r
+"Swaziland":"スワジランド",\r
+"Sweden":"スウェーデン",\r
+"Switzerland":"スイス",\r
+"Syria":"シリア",\r
+"Taiwan":"台湾",\r
+"Tajikistan":"タジキスタン",\r
+"Tanzania":"タンザニア",\r
+"Text file":"テキストファイル",\r
+"Thailand":"タイ",\r
+"There is no data to display":"表示するデータがありません。",\r
+"This Month":"今月",\r
+"Thu":"木",\r
+"Thursday":"木曜日",\r
+"Timor-Leste":"東ティモール",\r
+"Togo":"トーゴ",\r
+"Tokelau":"トケラウ",\r
+"Tonga":"トンガ",\r
+"Top 10 Referrers":"リファラー・トップ10",\r
+"Top 50 Referrers":"リファラー・トップ50",\r
+"Top Bandwidth":"トップ帯域幅の使用",\r
+"Top Entry Pages":"トップ入場数ページ",\r
+"Top Exit Pages":"トップ退出数ページ",\r
+"Top Page Views":"トップページ観覧者数",\r
+"Total":"合計",\r
+"Total Visitors":"アクセス件数の合計",\r
+"Trinidad and Tobago":"トリニダード・トバゴ",\r
+"Tue":"火",\r
+"Tuesday":"火曜日",\r
+"Tunisia":"チュニジア",\r
+"Turkey":"トルコ",\r
+"Turkmenistan":"トルクメニスタン",\r
+"Turks and Caicos Islands":"タークス・カイコス諸島",\r
+"Tuvalu":"ツバル",\r
+"Uganda":"ウガンダ",\r
+"Ukraine":"ウクライナ",\r
+"Unauthorized":"権限外",\r
+"Unique Ratio":"ユニークユーザー比率",\r
+"Unique Visitors":"ユニークユーザー数",\r
+"United Arab Emirates":"アラブ首長国連邦",\r
+"United Kingdom":"イギリス",\r
+"United States Minor Outlying Islands":"米国の領土の島",\r
+"United States of America":"アメリカ",\r
+"Unknown":"不明",\r
+"Uruguay":"ウルグアイ",\r
+"Uzbekistan":"ウズベキスタン",\r
+"Vanuatu":"バヌアツ",\r
+"Vatican City":"バチカン",\r
+"Venezuela":"ベネスエラ",\r
+"Vietnam":"ベトナム",\r
+"Virgin Islands, British":"イギリス領ヴァージン諸島",\r
+"Virgin Islands, U.S.":"アメリカ領ヴァージン諸島",\r
+"Visiting Spiders":"スパイダー",\r
+"Visitors by Continent":"大陸からの訪問者数",\r
+"Visitors by Country":"国",\r
+"Visitors from Africa":"アフリカからの訪問者数",\r
+"Visitors from Asia":"アジアからの訪問者数",\r
+"Visitors from Europe":"ヨーロッパからの訪問者数",\r
+"Visitors from North America":"北アメリカからの訪問者数",\r
+"Visitors from Oceania":"]オセアニアからの訪問者数",\r
+"Visitors from South America":"南アメリカからの訪問者数",\r
+"Visitors per Day":"1日平均アクセス件数",\r
+"Visitors this Month":"今月のアクセス件数",\r
+"Wallis and Futuna Islands":"ウォリス・ フトゥナ諸島",\r
+"Wed":"水",\r
+"Wednesday":"水曜日",\r
+"Week":"週",\r
+"Week Total":"1週間の合計",\r
+"Western Sahara":"西サハラ",\r
+"XML file":"XMLファイル",\r
+"Year":"年",\r
+"Yemen":"イエメン",\r
+"Zambia":"ザンビア",\r
+"Zimbabwe":"ジンバブエ"\r
+}
\ No newline at end of file
--- /dev/null
+// JAWStats pl translation file\r
+// Last Updated: Sunday, 25th January 2009. 04:11:26\r
+oTranslation = {\r
+"0 seconds - 30 seconds":"0 sekund - 30 sekund",\r
+"15 minutes - 30 minutes":"15 minut - 30 minut",\r
+"2 minutes - 5 minutes":"2 minuty - 5 minut",\r
+"30 minutes - 1 hour":"30 minut - 1 godzina",\r
+"30 seconds - 2 minutes":"30 sekund - 2 minuty",\r
+"5 minutes - 15 minutes":"5 minut - 15 minut",\r
+"Active Server Page":"Strona ASP",\r
+"Adobe Flash file":"Plik Adobe Flash",\r
+"Adobe Portable Document Format file":"Dokument Adobe Portable",\r
+"Afghanistan":"Afganistan",\r
+"Africa":"Afryka",\r
+"Aland Islands":"Wyspy Alandzkie",\r
+"Albania":"Albania",\r
+"Algeria":"Algieria",\r
+"All Browsers":"Wszystkie przeglądarki",\r
+"All Months":"Miesiące",\r
+"All Operating Systems":"Wszystkie systemy operacyjne",\r
+"All Referrers":"Wszystkie odnośniki",\r
+"American Samoa":"Samoa Amerykańskie",\r
+"Andorra":"Andora",\r
+"Angola":"Angola",\r
+"Anguilla":"Anguilla",\r
+"Antigua and Barbuda":"Antigua i Barbuda",\r
+"Apr":"Kw.",\r
+"April":"Kwiecień",\r
+"Argentina":"Argentyna",\r
+"Armenia":"Armenia",\r
+"Aruba":"Aruba",\r
+"Asia":"Azja",\r
+"Aug":"Sierp.",\r
+"August":"Sierpień",\r
+"Australia":"Australia",\r
+"Austria":"Austria",\r
+"Average":"Średnio",\r
+"Average Size":"Średni rozmiar",\r
+"Azerbaijan":"Azerbejdżan",\r
+"Bad Request":"Nieprawidłowe zapytanie",\r
+"Bahamas":"Bahamy",\r
+"Bahrain":"Bahrajn",\r
+"Bandwidth":"Pasmo",\r
+"Bangladesh":"Bangladesz",\r
+"Barbados":"Barbados",\r
+"Belarus":"Białoruś",\r
+"Belgium":"Belgia",\r
+"Belize":"Belize",\r
+"Benin":"Benin",\r
+"Bermuda":"Bermudy",\r
+"Bhutan":"Bhutan",\r
+"Bolivia":"Boliwia",\r
+"Bosnia and Herzegovina":"Bośnia i Hercegowina",\r
+"Botswana":"Botswana",\r
+"Bouvet Island":"Wyspa Bouveta",\r
+"Brazil":"Brazylia",\r
+"British Indian Ocean Territory":"Brytyjskie Terytorium Oceanu Indyjskiego",\r
+"Browser":"Przeglądarka",\r
+"Browser Families":"Rodziny przeglądarek",\r
+"Browser Family":"Rodzina przeglądarki",\r
+"Browsers":"Przeglądarki",\r
+"Brunei Darussalam":"Brunei",\r
+"Bulgaria":"Bułgaria",\r
+"Burkina Faso":"Burkina Faso",\r
+"Burundi":"Burundi",\r
+"BW":"Pasmo",\r
+"Calendar of Bandwidth Usage":"Kalendarz wykorzystania pasma",\r
+"Calendar of Bandwidth Usage this Month":"Kalendarz wykorzystania pasma w tym miesiącu",\r
+"Calendar of Hits":"Kalendarz żądań",\r
+"Calendar of Hits this Month":"Kalendarz żądań w tym miesiącu",\r
+"Calendar of Page Views":"Kalendarz odsłon stron",\r
+"Calendar of Page Views this Month":"Kalendarz odsłon stron w tym miesiącu",\r
+"Calendar of Visitors":"Kalendarz odwiedzających",\r
+"Calendar of Visitors this Month":"Kalendarz odwiedzających w tym miesiącu",\r
+"Cambodia":"Kambodża",\r
+"Cameroon":"Kamerun",\r
+"Canada":"Kanada",\r
+"Cape Verde":"Republika Zielonego Przylądka",\r
+"Cascading Style Sheet":"Arkusz styli CSS",\r
+"Cayman Islands":"Kajmany",\r
+"Central African Republic":"Republika Środkowoafrykańska",\r
+"CGI script":"Skrypt CGI",\r
+"Chad":"Czad",\r
+"Chile":"Chile",\r
+"China":"Chiny",\r
+"Christmas Island":"Wyspa Bożego Narodzenia",\r
+"Cocos (Keeling) Islands":"Wyspy Kokosowe",\r
+"Code":"Kod",\r
+"Coldfusion script":"Skrypt Coldfusion",\r
+"Colombia":"Kolumbia",\r
+"Comoros":"Komory",\r
+"Congo (Brazzaville)":"Kongo",\r
+"Congo (Kinshasa)":"Demokratyczna Republika Konga",\r
+"Continents":"Kontynenty",\r
+"Cook Islands":"Wyspy Cooka",\r
+"Costa Rica":"Kostaryka",\r
+"Cote d'Ivoire":"Wybrzeże Kości Słoniowej",\r
+"Countries":"Kraje",\r
+"Countries":"Kraje",\r
+"Croatia":"Chorwacja",\r
+"Cuba":"Kuba",\r
+"Cyprus":"Cypr",\r
+"Czech Republic":"Republika Czeska",\r
+"Daily Average":"Średnio dziennie",\r
+"Date":"Data",\r
+"Day":"Dzień",\r
+"Day of Week Average":"Średnia dni tygodnia",\r
+"Day of Week Total":"Podsumowanie dni tygodnia",\r
+"Dec":"Gru.",\r
+"December":"Grudzień",\r
+"Denmark":"Dania",\r
+"Description":"Opis",\r
+"Djibouti":"Dżibuti",\r
+"Dominica":"Dominika",\r
+"Dominican Republic":"Dominikana",\r
+"Ecuador":"Ekwador",\r
+"Egypt":"Egipt",\r
+"El Salvador":"Salwador",\r
+"Entry":"Wejście",\r
+"Equatorial Guinea":"Gwinea Równikowa",\r
+"Eritrea":"Erytrea",\r
+"Estonia":"Estonia",\r
+"Ethiopia":"Etiopia",\r
+"Europe":"Europa",\r
+"Exit":"Wyjście",\r
+"Falkland Islands":"Falklandy",\r
+"Faroe Islands":"Wyspy Owcze",\r
+"Feb":"Luty",\r
+"February":"Luty",\r
+"Fiji":"Fidżi",\r
+"File Archive":"Archiwum",\r
+"File Not Found":"Nie znaleziono pliku",\r
+"File Not Found URLs":"Adresy nieznalezionych plików",\r
+"Filetype":"Typ pliku",\r
+"Filetypes":"Typy plików",\r
+"Finland":"Finlandia",\r
+"Flash Video file":"Plik Flash Video",\r
+"Forbidden":"Zabroniony",\r
+"France":"Francja",\r
+"French Guiana":"Gujana Francuska",\r
+"French Polynesia":"Polinezja Francuska",\r
+"Frequency":"Częstotliwość",\r
+"Fri":"piąt.",\r
+"Friday":"Piątek",\r
+"Gabon":"Gabon",\r
+"Gambia":"Gambia",\r
+"Georgia":"Gruzja",\r
+"Germany":"Niemcy",\r
+"Ghana":"Ghana",\r
+"Gibraltar":"Gibraltar",\r
+"Greece":"Grecja",\r
+"Greenland":"Grenlandia",\r
+"Grenada":"Grenada",\r
+"Guadeloupe":"Gwadelupa",\r
+"Guam":"Guam",\r
+"Guatemala":"Gwatemala",\r
+"Guernsey":"Guernsey",\r
+"Guinea":"Gwinea",\r
+"Guinea-Bissau":"Gwinea Bissau",\r
+"Guyana":"Gujana",\r
+"Haiti":"Haiti",\r
+"Heard and McDonald Islands":"Wyspy Heard i McDonalda",\r
+"Hits":"Żądania",\r
+"Honduras":"Honduras",\r
+"Hong Kong":"Hongkong",\r
+"Hour":"Godzina",\r
+"Hours":"Godziny",\r
+"HTML or XML static page":"Strona statyczna HTML lub XML",\r
+"HTTP Status Codes":"Kody odpowiedzi HTTP",\r
+"Hungary":"Węgry",\r
+"Iceland":"Islandia",\r
+"Icon":"Ikona",\r
+"Image":"Obraz",\r
+"India":"Indie",\r
+"Indonesia":"Indonezja",\r
+"Iran":"Iran",\r
+"Iraq":"Irak",\r
+"Ireland":"Irlandia",\r
+"Isle of Man":"Wyspa Man",\r
+"Israel":"Izrael",\r
+"Italy":"Włochy",\r
+"Jamaica":"Jamajka",\r
+"Jan":"Sty",\r
+"January":"Styczeń",\r
+"Japan":"Japonia",\r
+"JavaScript File":"Plik JavaScript",\r
+"JavaServer Page":"Strona JavaServer",\r
+"Jersey":"Jersey",\r
+"Jordan":"Jordania",\r
+"Jul":"Lip.",\r
+"July":"Lipiec",\r
+"Jun":"Czr",\r
+"June":"Czerwiec",\r
+"Kazakhstan":"Kazachstan",\r
+"Kenya":"Kenia",\r
+"Keyphrase":"Frazy",\r
+"Keyphrases":"Frazy",\r
+"Keyword":"Słowo kluczowe",\r
+"Keywords":"Słowa kluczowe",\r
+"Kiribati":"Kiribati",\r
+"Korea, North":"Korea Północna",\r
+"Korea, South":"Korea Południowa",\r
+"Kuwait":"Kuwejt",\r
+"Kyrgyzstan":"Kirgistan",\r
+"Laos":"Laos",\r
+"Last Visit":"Ostatnia wizyta",\r
+"Latvia":"Łotwa",\r
+"Lebanon":"Liban",\r
+"Lesotho":"Lesotho",\r
+"Liberia":"Liberia",\r
+"Libya":"Libia",\r
+"Liechtenstein":"Liechtenstein",\r
+"Lithuania":"Litwa",\r
+"Luxembourg":"Luksemburg",\r
+"Macau":"Makau",\r
+"Macedonia":"Macedonia",\r
+"Madagascar":"Madagaskar",\r
+"Malawi":"Malawi",\r
+"Malaysia":"Malezja",\r
+"Maldives":"Malediwy",\r
+"Mali":"Mali",\r
+"Malta":"Malta",\r
+"Mar":"Mrz",\r
+"March":"Marzec",\r
+"Marshall Islands":"Wyspy Marshalla",\r
+"May":"Maj",\r
+"May":"Maj",\r
+"Mexico":"Meksyk",\r
+"Microsoft PowerPoint file":"Dokument Microsoft PowerPoint",\r
+"Mon":"pon.",\r
+"Monday":"Poniedziałek",\r
+"Month":"Miesiąc",\r
+"More than 1 hour":"Ponad 1 godzinę",\r
+"Moved Permanently (redirect)":"Trwale przeniesiony (przekierowanie)",\r
+"Moved Temporarily (redirect)":"Tymczasowe przekierowanie",\r
+"MPEG-1 Audio Layer 3 file":"Plik MPEG-1 Audio Layer 3",\r
+"MPEG-4 Audio File":"Plik audio MPEG-4",\r
+"Nigeria":"Nigeria",\r
+"North America":"Ameryka Północna",\r
+"Norway":"Norwegia",\r
+"Nov":"List.",\r
+"November":"Listopad",\r
+"Oceania":"Oceania",\r
+"Oct":"Paź.",\r
+"October":"Październik",\r
+"Oman":"Oman",\r
+"Operating System":"System operacyjny",\r
+"Operating System Families":"Rodziny systemów operacyjnych",\r
+"Operating System Family":"Rodzina systemu operacyjnego",\r
+"Operating Systems":"Systemy operacyjne",\r
+"Other":"Inne",\r
+"Other Browsers":"Inne przeglądarki",\r
+"Other Countries":"Inne kraje",\r
+"Other Filetypes":"Inne typy plików",\r
+"Other Keyphrases":"Inne frazy",\r
+"Other Keywords":"Inne słowa kluczowe",\r
+"Other Operating Systems":"Inne systemy operacyjne",\r
+"Other Referrers":"Inne odnośniki",\r
+"Other Search Engines":"Inne wyszukiwarki",\r
+"Other Spiders":"Inne roboty sieciowe",\r
+"Other Status Codes":"Inne kody HTTP",\r
+"Other URLs":"Inne adresy URL",\r
+"Other Versions":"Inne wersje",\r
+"Other Visitors":"Inny goście",\r
+"Overall":"W sumie",\r
+"Overview":"Podsumowanie",\r
+"Page Views":"Odsłony stron",\r
+"Pages":"Strony",\r
+"Pages":"Strony",\r
+"Pakistan":"Pakistan",\r
+"Panama":"Panama",\r
+"Partial Content":"Część zawartości",\r
+"per Visit":"na wizytę",\r
+"Perl script":"Skrypt Perl",\r
+"Peru":"Peru",\r
+"PHP script":"Skrypt PHP",\r
+"Poland":"Polska",\r
+"Portugal":"Portugalia",\r
+"QuickTime Movie":"Film QuickTime",\r
+"Referrer":"Odsyłacz",\r
+"Referrers":"Odnośniki",\r
+"Referring Domains":"Domeny odsyłające",\r
+"Referring Pages":"Strony odsyłające",\r
+"Referring Search Engines":"Wyszukiwarki odsyłające",\r
+"Romania":"Rumunia",\r
+"Sat":"sob.",\r
+"Saturday":"Sobota",\r
+"Search Engine":"Wyszukiwarka",\r
+"Search Engines":"Wyszukiwarki",\r
+"Sep":"Wrz.",\r
+"September":"Wrzesień",\r
+"Serbia":"Serbia",\r
+"Service Unavailable":"Usługa niedostępna",\r
+"Session Duration":"Trwanie sesji",\r
+"Session Length":"Długość sesji",\r
+"Sessions":"Czasy wizyt",\r
+"Singapore":"Singapur",\r
+"Slovakia":"Słowacja",\r
+"Slovenia":"Słowenia",\r
+"South America":"Ameryka Południowa",\r
+"Spain":"Hiszpania",\r
+"Spider":"Pająk",\r
+"Spiders":"Roboty sieciowe",\r
+"Status":"Kody HTTP",\r
+"Sun":"niedz.",\r
+"Sunday":"Niedziela",\r
+"Sweden":"Szwecja",\r
+"Switzerland":"Szwajcaria",\r
+"Syria":"Syria",\r
+"Taiwan":"Tajwan",\r
+"Text file":"Plik tekstowy",\r
+"Thailand":"Tajlandia",\r
+"The password you entered was incorrect":"Wprowadzone hasło jest niepoprawne",\r
+"There is no data to display":"Brak danych do wyświetlenia",\r
+"This Month":"Ten miesiąc",\r
+"Thu":"czw.",\r
+"Thursday":"Czwartek",\r
+"Top 10 Referrers":"10 najczęstszych odnośników",\r
+"Top 50 Referrers":"50 najczęstszych odnośników",\r
+"Total":"Razem",\r
+"Total Visitors":"Wszystkich gości",\r
+"Tue":"wt.",\r
+"Tuesday":"Wtorek",\r
+"Tunisia":"Tunezja",\r
+"Turkey":"Turcja",\r
+"Ukraine":"Ukraina",\r
+"Unauthorized":"Nieautoryzowany dostęp",\r
+"Unique Visitors":"Unikalni goście",\r
+"United Arab Emirates":"Zjednoczone Emiraty Arabskie",\r
+"United Kingdom":"Wielka Brytania",\r
+"United States of America":"Stany Zjednoczone Ameryki",\r
+"Unknown":"Nieznane",\r
+"URL":"Adres URL",\r
+"Vatican City":"Watykan",\r
+"Venezuela":"Wenezuela",\r
+"Vietnam":"Wietnam",\r
+"Visitors each Month":"Odwiedzający miesięcznie",\r
+"Visitors each Year":"Odwiedzający rocznie",\r
+"Visitors from Africa":"Goście z Afryki",\r
+"Visitors from Asia":"Goście z Azji",\r
+"Visitors from Europe":"Goście z Europy",\r
+"Visitors from North America":"Goście z Ameryki Północnej",\r
+"Visitors from Oceania":"Goście z Oceanii",\r
+"Visitors from South America":"Goście z Ameryki Południowej",\r
+"Visitors over 24 Hours":"Odwiedzający godzinowo",\r
+"Visitors per Day":"Gości dziennie",\r
+"Visitors this Month":"Odwiedzający w tym miesiącu",\r
+"Visits":"Wizyty",\r
+"Waveform Audio file":"Plik audio WAV",\r
+"Wed":"śr.",\r
+"Wednesday":"Środa",\r
+"Week":"Tydzień",\r
+"Week Total":"Tydzień łącznie",\r
+"XML file":"Plik XML",\r
+"Year":"Rok"\r
+}
\ No newline at end of file
--- /dev/null
+// JAWStats sv translation file\r
+// Last Updated: Sunday, 25th January 2009. 04:11:42\r
+oTranslation = {\r
+"0 seconds - 30 seconds":"0 sekunder - 30 sekunder",\r
+"10th":"10",\r
+"11th":"11",\r
+"12th":"12",\r
+"13th":"13",\r
+"14th":"14",\r
+"15 minutes - 30 minutes":"15 minuter - 30 minuter",\r
+"15th":"15",\r
+"16th":"16",\r
+"17th":"17",\r
+"18th":"18",\r
+"19th":"19",\r
+"1st":"1",\r
+"2 minutes - 5 minutes":"2 minuter - 5 minuter",\r
+"20th":"20",\r
+"21st":"21",\r
+"22nd":"22",\r
+"23rd":"23",\r
+"24th":"24",\r
+"25th":"25",\r
+"26th":"26",\r
+"27th":"27",\r
+"28th":"28",\r
+"29th":"29",\r
+"2nd":"2",\r
+"30 minutes - 1 hour":"30 minuter - 1 timme",\r
+"30 seconds - 2 minutes":"30 sekunder - 2 minuter",\r
+"30th":"30",\r
+"31st":"31",\r
+"3rd":"3",\r
+"4th":"4",\r
+"5 minutes - 15 minutes":"5 minuter - 15 minuter",\r
+"5th":"5",\r
+"6th":"6",\r
+"7th":"7",\r
+"8th":"8",\r
+"9th":"9",\r
+"Active Server Page":"Active Server Page",\r
+"Adobe Flash file":"Adobe Flash-fil",\r
+"Adobe Portable Document Format file":"Adobe Portable Document-fil",\r
+"Aero/Travel domains":"Aero/Travel-domäner",\r
+"Afghanistan":"Afghanistan",\r
+"Africa":"Afrika",\r
+"Aland Islands":"Åland",\r
+"Albania":"Albanien",\r
+"Algeria":"Algeriet",\r
+"All Browsers":"Alla webbläsare",\r
+"All Months":"Alla månader",\r
+"All Operating Systems":"Alla operativsystem",\r
+"All Referrers":"Alla referrers",\r
+"American Samoa":"Amerikanska Samoa",\r
+"Andorra":"Andorra",\r
+"Angola":"Angola",\r
+"Anguilla":"Anguilla",\r
+"Antarctica":"Antarktis",\r
+"Antigua and Barbuda":"Antigua och Barbuda",\r
+"Apr":"apr",\r
+"April":"april",\r
+"Argentina":"Argentina",\r
+"Armenia":"Armenien",\r
+"Aruba":"Aruba",\r
+"Asia":"Asien",\r
+"Aug":"aug",\r
+"August":"augusti",\r
+"Australia":"Australien",\r
+"Austria":"Österrike",\r
+"Average":"Genomsnitt",\r
+"Average Size":"Genomsnittlig storlek",\r
+"Azerbaijan":"Azerbajdzjan",\r
+"Bad Request":"Ogiltig förfrågan",\r
+"Bahamas":"Bahamas",\r
+"Bahrain":"Bahrain",\r
+"Bandwidth":"Trafik",\r
+"Bangladesh":"Bangladesh",\r
+"Barbados":"Barbados",\r
+"Belarus":"Vitryssland",\r
+"Belgium":"Belgien",\r
+"Belize":"Belize",\r
+"Benin":"Benin",\r
+"Bermuda":"Bermuda",\r
+"Bhutan":"Bhutan",\r
+"Bolivia":"Bolivia",\r
+"Bosnia and Herzegovina":"Bosnien-Herzegovina",\r
+"Botswana":"Botswana",\r
+"Bouvet Island":"Bouvetön",\r
+"Brazil":"Brasilien",\r
+"British Indian Ocean Territory":"Brittiska territoriet i Indiska oceanen",\r
+"Browser":"Webbläsare",\r
+"Browser Families":"Webbläsare",\r
+"Browser Family":"Webbläsare",\r
+"Browsers":"Webbläsare",\r
+"Brunei Darussalam":"Brunei",\r
+"Bulgaria":"Bulgarien",\r
+"Burkina Faso":"Burkina Faso",\r
+"Burundi":"Burundi",\r
+"BW":"BW",\r
+"Calendar of Bandwidth Usage":"Kalender över genererad trafik",\r
+"Calendar of Bandwidth Usage this Month":"Kalender över genererad trafik denna månad",\r
+"Calendar of Hits":"Kalender över träffar",\r
+"Calendar of Hits this Month":"Kalender över antalet träffar denna månad",\r
+"Calendar of Page Views":"Kalender över antalet sidvisningar",\r
+"Calendar of Page Views this Month":"Kalender över antalet sidvisningar denna månad",\r
+"Calendar of Visitors":"Kalender över antalet besökare",\r
+"Calendar of Visitors this Month":"Kalender över antalet besökare denna månad",\r
+"Cambodia":"Kambodja",\r
+"Cameroon":"Kamerun",\r
+"Canada":"Kanada",\r
+"Cape Verde":"Cape Verde",\r
+"Cascading Style Sheet":"Stilmall",\r
+"Cayman Islands":"Caymanöarna",\r
+"Central African Republic":"Centralafrikanska republiken",\r
+"CGI script":"CGI-skript",\r
+"Chad":"Tchad",\r
+"Chile":"Chile",\r
+"China":"Kina",\r
+"Christmas Island":"Julön",\r
+"Cocos (Keeling) Islands":"Kokosöarna",\r
+"Code":"Kod",\r
+"Coldfusion script":"Coldfusion-skript",\r
+"Colombia":"Colombia",\r
+"Commercial":"Kommersiellt",\r
+"Comoros":"Komorerna",\r
+"Congo (Brazzaville)":"Kongo-Brazzaville",\r
+"Congo (Kinshasa)":"Kongo-Kinshasa",\r
+"Continents":"Kontinenter",\r
+"Cook Islands":"Cooköarna",\r
+"Costa Rica":"Costa Rica",\r
+"Cote d'Ivoire":"Elfenbenskusten",\r
+"Countries":"Länder",\r
+"Countries":"Länder",\r
+"Croatia":"Kroatien",\r
+"Cuba":"Kuba",\r
+"Cyprus":"Cypern",\r
+"Czech Republic":"Tjeckien",\r
+"Daily Average":"Dagligt genomsnitt",\r
+"Date":"Datum",\r
+"Day":"Dag",\r
+"Day of Week Average":"Veckodag/genomsnitt",\r
+"Day of Week Total":"Veckodag/total",\r
+"Dec":"dec",\r
+"December":"december",\r
+"Denmark":"Danmark",\r
+"Description":"Beskrivning",\r
+"Djibouti":"Djibouti",\r
+"Dominica":"Dominica",\r
+"Dominican Republic":"Dominikanska republiken",\r
+"Ecuador":"Ecuador",\r
+"Egypt":"Egypten",\r
+"El Salvador":"El Salvador",\r
+"Entry":"Entré",\r
+"Equatorial Guinea":"Ekvatorialguinea",\r
+"Eritrea":"Eritrea",\r
+"Estonia":"Estland",\r
+"Ethiopia":"Etiopien",\r
+"Europe":"Europa",\r
+"European Union":"Europeiska unionen",\r
+"Exit":"Utgång",\r
+"Falkland Islands":"Falklandsöarna",\r
+"Faroe Islands":"Färöarna",\r
+"Feb":"feb",\r
+"February":"februari",\r
+"Fiji":"Fiji",\r
+"File Archive":"Filarkiv",\r
+"File Not Found":"Filen kunde inte hittas",\r
+"File Not Found URLs":"Filen kunde inte hittas URL",\r
+"Filetype":"Filtyp",\r
+"Filetypes":"Filtyper",\r
+"Finland":"Finland",\r
+"Flash Video file":"Flashvideo",\r
+"Forbidden":"Förbjuden",\r
+"France":"Frankrike",\r
+"French Guiana":"Franska Guyana",\r
+"French Polynesia":"Franska Polynesien",\r
+"French Southern Lands":"Franska sydterritorierna",\r
+"Frequency":"Frekvens",\r
+"Fri":"fre",\r
+"Friday":"fredag",\r
+"Gabon":"Gabon",\r
+"Gambia":"Gambia",\r
+"Georgia":"Georgien",\r
+"Germany":"Tyskland",\r
+"Ghana":"Ghana",\r
+"Gibraltar":"Gibraltar",\r
+"Greece":"Grekland",\r
+"Greenland":"Grönland",\r
+"Grenada":"Grenada",\r
+"Guadeloupe":"Guadeloupe",\r
+"Guam":"Guam",\r
+"Guatemala":"Guatemala",\r
+"Guernsey":"Guernsey",\r
+"Guinea":"Guinea",\r
+"Guinea-Bissau":"Guinea-Bissau",\r
+"Guyana":"Guyana",\r
+"Haiti":"Haiti",\r
+"Heard and McDonald Islands":"Heard- och McDonaldsöarna",\r
+"Hits":"Träffar",\r
+"Honduras":"Honduras",\r
+"Hong Kong":"Hongkong",\r
+"Hour":"Timme",\r
+"Hours":"Tidpunkter",\r
+"HTML or XML static page":"Statisk HTML- eller XML-sida",\r
+"HTTP Status Codes":"HTTP-statuskoder",\r
+"Hungary":"Ungern",\r
+"Iceland":"Island",\r
+"Icon":"Ikon",\r
+"Image":"Bild",\r
+"India":"Indien",\r
+"Indonesia":"Indonesien",\r
+"Info Domains":"Info-domäner",\r
+"Iran":"Iran",\r
+"Iraq":"Irak",\r
+"Ireland":"Irland",\r
+"Isle of Man":"Isle of Man",\r
+"Israel":"Israel",\r
+"Italy":"Italien",\r
+"Jamaica":"Jamaica",\r
+"Jan":"jan",\r
+"January":"januari",\r
+"Japan":"Japan",\r
+"JavaScript File":"JavaScript-fil",\r
+"JavaServer Page":"JavaServer-sida",\r
+"Jersey":"Jersey",\r
+"Jordan":"Jordanien",\r
+"Jul":"juli",\r
+"July":"juli",\r
+"Jun":"juni",\r
+"June":"juni",\r
+"Kazakhstan":"Kazakstan",\r
+"Kenya":"Kenya",\r
+"Keyphrase":"Sökfras",\r
+"Keyphrases":"Sökfraser",\r
+"Keyword":"Sökord",\r
+"Keywords":"Sökord",\r
+"Kiribati":"Kiribati",\r
+"Korea, North":"Nordkorea",\r
+"Korea, South":"Sydkorea",\r
+"Kuwait":"Kuwait",\r
+"Kyrgyzstan":"Kirgizistan",\r
+"Laos":"Laos",\r
+"Last Visit":"Senaste besöket",\r
+"Latvia":"Lettland",\r
+"Lebanon":"Libanon",\r
+"Lesotho":"Lesotho",\r
+"Liberia":"Liberia",\r
+"Libya":"Libyen",\r
+"Liechtenstein":"Liechtenstein",\r
+"Lithuania":"Litauen",\r
+"Local Network Host":"Lokalt nätverk",\r
+"Localhost":"Localhost",\r
+"Luxembourg":"Luxemburg",\r
+"Macau":"Macao",\r
+"Macedonia":"Makedonien",\r
+"Madagascar":"Madagaskar",\r
+"Malawi":"Malawi",\r
+"Malaysia":"Malaysia",\r
+"Maldives":"Maldiverna",\r
+"Mali":"Mali",\r
+"Malta":"Malta",\r
+"Mar":"mar",\r
+"March":"mars",\r
+"Marshall Islands":"Marshallöarna",\r
+"Martinique":"Martinique",\r
+"Mauritania":"Mauretanien",\r
+"Mauritius":"Mauritius",\r
+"May":"maj",\r
+"May":"maj",\r
+"Mayotte":"Mayotte",\r
+"Mexico":"Mexiko",\r
+"Micronesia":"Mikronesien",\r
+"Microsoft PowerPoint file":"Microsoft PowerPoint-presentation",\r
+"Moldova":"Moldavien",\r
+"Mon":"mån",\r
+"Monaco":"Monaco",\r
+"Monday":"måndag",\r
+"Mongolia":"Mongoliet",\r
+"Montenegro":"Montenegro",\r
+"Month":"Månad",\r
+"Montserrat":"Montserrat",\r
+"More than 1 hour":"Mer än en timme",\r
+"Morocco":"Marocko",\r
+"Moved Permanently (redirect)":"Permanent flyttad (omdirigering)",\r
+"Moved Temporarily (redirect)":"Tillfälligt flyttad (omdirigering)",\r
+"Mozambique":"Mozambique",\r
+"MPEG-1 Audio Layer 3 file":"MPEG-1 Audio Layer 3-fil",\r
+"MPEG-4 Audio File":"MPEG-4 ljudfil",\r
+"Myanmar":"Burma",\r
+"Name domains":"Name-domäner",\r
+"Namibia":"Namibia",\r
+"NATO":"NATO",\r
+"Nauru":"Nauru",\r
+"Nepal":"Nepal",\r
+"Netherlands":"Nederländerna",\r
+"Netherlands Antilles":"Nederländska Antillerna",\r
+"Network":"Nätverk",\r
+"New Caledonia":"Nya Kaledonien",\r
+"New Zealand":"Nya Zealand",\r
+"Nicaragua":"Nicaragua",\r
+"Niger":"Niger",\r
+"Nigeria":"Nigeria",\r
+"Niue":"Niue",\r
+"Non-Profit Organisations":"Icke-kommersiella organisationer",\r
+"Norfolk Island":"Norfolkön",\r
+"North America":"Nordamerika",\r
+"Northern Mariana Islands":"Nordmarianerna",\r
+"Norway":"Norge",\r
+"Not Viewed":"Ej visad",\r
+"Nov":"nov",\r
+"November":"november",\r
+"Oceania":"Oceanien",\r
+"Oct":"okt",\r
+"October":"oktober",\r
+"Old style Arpanet":"Arpanet",\r
+"Oman":"Oman",\r
+"Operating System":"Operativsystem",\r
+"Operating System Families":"Operativsystem",\r
+"Operating System Family":"Operativsystem",\r
+"Operating Systems":"Operativsystem",\r
+"Other":"Övrigt",\r
+"Other Browsers":"Övriga webbläsare",\r
+"Other Countries":"Övriga länder",\r
+"Other Filetypes":"Övriga filtyper",\r
+"Other Keyphrases":"Övriga sökfraser",\r
+"Other Keywords":"Övriga sökord",\r
+"Other Operating Systems":"Övriga operativsystem",\r
+"Other Referrers":"Övriga referrers",\r
+"Other Search Engines":"Övriga söktjänster",\r
+"Other Spiders":"Övriga spindlar",\r
+"Other Status Codes":"Övriga statuskoder",\r
+"Other URLs":"Övriga adresser",\r
+"Other Versions":"Övriga versioner",\r
+"Other Visitors":"Övriga besökare",\r
+"Overall":"Totalt",\r
+"Overview":"Översikt",\r
+"Page Views":"Sidvisningar",\r
+"Pages":"Sidor",\r
+"Pages":"Sidor",\r
+"Pakistan":"Pakistan",\r
+"Palau":"Palau",\r
+"Palestine":"Palestina",\r
+"Panama":"Panama",\r
+"Papua New Guinea":"Papua Nya Guinea",\r
+"Paraguay":"Paraguay",\r
+"Partial Content":"Ofullständigt innehåll",\r
+"per Visit":"per besök",\r
+"Perl script":"Perlskript",\r
+"Peru":"Peru",\r
+"Philippines":"Filippinerna",\r
+"PHP script":"PHP-skript",\r
+"Pitcairn":"Pitcairnöarna",\r
+"Poland":"Polen",\r
+"Portugal":"Portugal",\r
+"Puerto Rico":"Puerto Rico",\r
+"Qatar":"Qatar",\r
+"QuickTime Movie":"QuickTime-video",\r
+"Referrer":"Referrer",\r
+"Referrers":"Referrers",\r
+"Referring Domains":"Refererande domäner",\r
+"Referring Pages":"Refererande sidor",\r
+"Referring Search Engines":"Refererande söktjänster",\r
+"Reunion":"Réunion",\r
+"Romania":"Rumänien",\r
+"Russian Federation":"Ryssland",\r
+"Rwanda":"Rwanda",\r
+"Saint Barthelemy":"Saint-Barthélemy",\r
+"Saint Helena":"Sankta Helena",\r
+"Saint Kitts and Nevis":"Saint Kitts och Nevis",\r
+"Saint Lucia":"Saint Lucia",\r
+"Saint Martin (French part)":"Saint Martin",\r
+"Saint Pierre and Miquelon":"Saint-Pierre och Miquelon",\r
+"Saint Vincent and the Grenadines":"Saint Vincent och Grenadinerna",\r
+"Samoa":"Samoa",\r
+"San Marino":"San Marino",\r
+"Sao Tome and Principe":"São Tomé och Príncipe",\r
+"Sat":"lör",\r
+"Satellite Provider":"Satellitleverantör",\r
+"Saturday":"lördag",\r
+"Saudi Arabia":"Saudiarabien",\r
+"Search Engine":"Söktjänst",\r
+"Search Engines":"Söktjänster",\r
+"Senegal":"Senegal",\r
+"Sep":"sep",\r
+"September":"september",\r
+"Serbia":"Serbien",\r
+"Service Unavailable":"Tjänsten är otillgänglig",\r
+"Session Duration":"Sessionslängder",\r
+"Session Length":"Längd",\r
+"Sessions":"Sessioner",\r
+"Seychelles":"Seychellerna",\r
+"Sierra Leone":"Sierra Leone",\r
+"Singapore":"Singapore",\r
+"Slovakia":"Slovakien",\r
+"Slovenia":"Slovenien",\r
+"Solomon Islands":"Salomonöarna",\r
+"Somalia":"Somalia",\r
+"South Africa":"Sydafrika",\r
+"South America":"Sydamerika",\r
+"South Georgia and South Sandwich Islands":"Sydgeorgien och Sydsandwichöarna",\r
+"Spain":"Spanien",\r
+"Spider":"Spindel",\r
+"Spiders":"Spindlar",\r
+"Sri Lanka":"Sri Lanka",\r
+"Status":"Statuskoder",\r
+"Sudan":"Sudan",\r
+"Sun":"sön",\r
+"Sunday":"söndag",\r
+"Suriname":"Surinam",\r
+"Svalbard and Jan Mayen Islands":"Svalbard och Jan Mayen-öarna",\r
+"Swaziland":"Swaziland",\r
+"Sweden":"Sverige",\r
+"Switzerland":"Schweiz",\r
+"Syria":"Syrien",\r
+"Taiwan":"Taiwan",\r
+"Tajikistan":"Tadzjikistan",\r
+"Tanzania":"Tanzania",\r
+"Text file":"Textfil",\r
+"Thailand":"Thailand",\r
+"The password you entered was incorrect":"Det angivna lösenordet var felaktigt",\r
+"There is no data to display":"Det finns ingen data att visa",\r
+"This Month":"Denna månad",\r
+"Thu":"tor",\r
+"Thursday":"torsdag",\r
+"Timor-Leste":"Östtimor",\r
+"Togo":"Togo",\r
+"Tokelau":"Tokelauöarna",\r
+"Tonga":"Tonga",\r
+"Top 10 Referrers":"Referrers 10 i topp",\r
+"Top 50 Referrers":"Referrers 50 i topp",\r
+"Top Bandwidth":"Mest genererad trafik",\r
+"Top Entry Pages":"Populära entrésidor",\r
+"Top Exit Pages":"Populära utgångssidor",\r
+"Top Page Views":"Flest sidvisningar",\r
+"Total":"Totalt",\r
+"Total Visitors":"Totalt antal besökare",\r
+"Trinidad and Tobago":"Trinidad och Tobago",\r
+"Tue":"tis",\r
+"Tuesday":"tisdag",\r
+"Tunisia":"Tunisien",\r
+"Turkey":"Turkiet",\r
+"Turkmenistan":"Turkmenistan",\r
+"Turks and Caicos Islands":"Turks- och Caicosöarna",\r
+"Tuvalu":"Tuvalu",\r
+"Uganda":"Uganda",\r
+"Ukraine":"Ukraina",\r
+"Unauthorized":"Ej auktoriserad",\r
+"Unique Ratio":"Andel unika",\r
+"Unique Visitors":"Unika besökare",\r
+"United Arab Emirates":"Förenade arabemiraten",\r
+"United Kingdom":"Storbritannien",\r
+"United States Minor Outlying Islands":"Förenta staternas avlägset belägna öar",\r
+"United States of America":"USA",\r
+"Unknown":"Okänd",\r
+"URL":"URL",\r
+"Uruguay":"Uruguay",\r
+"USA Educational":"USA/utbildning",\r
+"USA Military":"USA/militär",\r
+"Uzbekistan":"Uzbekistan",\r
+"Vanuatu":"Vanuatu",\r
+"Vatican City":"Vatikanstaten",\r
+"Venezuela":"Venezuela",\r
+"Vietnam":"Vietnam",\r
+"Virgin Islands, British":"Brittiska Jungfruöarna",\r
+"Virgin Islands, U.S.":"Amerikanska Jungfruöarna",\r
+"Visiting Spiders":"Besökande spindlar",\r
+"Visitors by Continent":"Besökare per kontinent",\r
+"Visitors by Country":"Besökare per land",\r
+"Visitors each Month":"Besökare varje månad",\r
+"Visitors each Year":"Besökare varje år",\r
+"Visitors from Africa":"Besökare från Afrika",\r
+"Visitors from Asia":"Besökare från Asien",\r
+"Visitors from Europe":"Besökare från Europa",\r
+"Visitors from North America":"Besökare från Nordamerika",\r
+"Visitors from Oceania":"Besökare från Oceanien",\r
+"Visitors from South America":"Besökare från Sydamerika",\r
+"Visitors over 24 Hours":"Besökare per dygn",\r
+"Visitors per Day":"Besökare per dag",\r
+"Visitors this Month":"Besökare denna månad",\r
+"Visits":"Besök",\r
+"Wallis and Futuna Islands":"Wallis- och Futunaöarna",\r
+"Waveform Audio file":"Waveljudfil",\r
+"Wed":"ons",\r
+"Wednesday":"onsdag",\r
+"Week":"Vecka",\r
+"Week Total":"Veckototal",\r
+"Western Sahara":"Västsahara",\r
+"within Family":"inom familjen",\r
+"XML file":"XML-fil",\r
+"Year":"År",\r
+"Yemen":"Yemen",\r
+"Zambia":"Zambia",\r
+"Zimbabwe":"Zimbabwe"\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+ $g_aTranslation[] = array(\r
+ "code" => "de-de",\r
+ "name" => "Deutsch",\r
+ "translations" => array(\r
+ "[DAYS] days ago" => "Vor [DAYS] Tagen",\r
+ "[HOURS]h [MINUTES]m ago" => "Vor [HOURS]h [MINUTES]m",\r
+ "[MINUTES] mins ago" => "Vor [MINUTES] Minten",\r
+ "1 day ago" => "Vor einem Tag",\r
+ "1 min ago" => "Vor einer Minute",\r
+ "1st" => "Erster",\r
+ "2nd" => "Zweiter",\r
+ "3rd" => "Dritter",\r
+ "All Months" => "Alle Monate",\r
+ "An error has occured" => "Es ist ein Fehler aufgetreten",\r
+ "April" => "April",\r
+ "At least one file required by JAWStats has been deleted, renamed or corrupted." => "Eine Datei, die von JAWStats benötigt wird, wurde gelöscht, umbenannt oder ist beschädigt.",\r
+ "August" => "August",\r
+ "Browsers" => "Browser",\r
+ "Cancel" => "Abbrechen",\r
+ "Cannot find required file [FILENAME]" => "Die Datei [FILENAME] wurde nicht gefunden",\r
+ "Change Language" => "Sprache ändern",\r
+ "Change Month" => "Monat ändern",\r
+ "Change Site" => "Seite ändern",\r
+ "Countries" => "Länder",\r
+ "December" => "Dezember",\r
+ "February" => "Februar",\r
+ "Filetypes" => "Dateitypen",\r
+ "Friday" => "Freitag",\r
+ "Hours" => "Stunden",\r
+ "January" => "Januar",\r
+ "JAWStats cannot find it's configuration file, [CONFIG]. Did you successfully copy and rename the [CONFIGDIST] file?" => "JAWStats findet die Konfigurationsdatei [CONFIG] nicht. Haben Sie den Inhalt der Datei [CONFIGDIST] korrekt in die Datei [CONFIG] kopiert?",\r
+ "JAWStats could not open an AWStats log file" => "JAWStats kann die Log-Datei von AWStats nicht öffnen",\r
+ "July" => "Juli",\r
+ "June" => "Juni",\r
+ "Keyphrases" => "Suchaudrücke",\r
+ "Keywords" => "Stichwörter",\r
+ "Last updated [DAYNAME], [DATE] [MONTH] [YEAR] at [TIME] [ELAPSEDTIME]. A total of [TOTALVISITORS] visitors ([UNIQUEVISITORS] unique) this month, an average of [DAILYAVERAGE] per day ([DAILYUNIQUE] unique)." => "Zuletzt aktualisiert [DAYNAME], [DATE] [MONTH] [YEAR] um [TIME] [ELAPSEDTIME]. Insgesamt [TOTALVISITORS] Besuche ([UNIQUEVISITORS] individuelle Besucher) diesen Monath, durchschnittlich [DAILYAVERAGE] ([DAILYUNIQUE]) pro Tag.",\r
+ "March" => "März",\r
+ "May" => "Mai",\r
+ "Monday" => "Montag",\r
+ "No AWStats Log Files Found" => "Keine AWStats Log-Dateien gefunden",\r
+ "No individual AWStats configurations have been defined." => "Es wurde keine individuelle AWStats Konfigurationsdatei definiert.",\r
+ "November" => "November",\r
+ "October" => "Oktober",\r
+ "Operating Systems" => "Betriebssystem",\r
+ "Pages" => "Seiten",\r
+ "Please enter the password to update this site" => "Bitte geben sie das Passwort zum aktualisieren der Seite ein",\r
+ "Please refer to the [LINKSTART]installation instructions[LINKEND] for more information." => "Bitte lesen Sie die [LINKSTART]Installations Anweisungen[LINKEND] für mehr Informationen.",\r
+ "Please select the month you wish to view" => "Bitte wählen sie den Monat den sie sich ansehen möchten",\r
+ "Please select the site you wish to view" => "Bitte wählen sie die Seite die sie sich ansehen möchten",\r
+ "Please select your language" => "Bitte wählen sie ihre Sprache",\r
+ "Powered by [AWSTART]AWStats[END]. Made beautiful by [JAWSTART]JAWStats Web Statistics and Analytics[END]." => "Erstellt durch [AWSTART]AWStats[END]. Verschönert durch [JAWSTART]JAWStats Web Statistics and Analytics[END].",\r
+ "Referrers" => "Herkünfte",\r
+ "Saturday" => "Samstag",\r
+ "September" => "September",\r
+ "Sessions" => "Sitzungen",\r
+ "Spiders" => "Spiders",\r
+ "Statistics for [SITE] in [MONTH] [YEAR]" => "Statistiken für [SITE] in [MONTH] [YEAR]",\r
+ "Status" => "Status",\r
+ "Sunday" => "Sonntag",\r
+ "The variable [VARIABLE] is missing or invalid." => "Die Variable [VARIABLE] ist nicht definiert oder ist ungültig.",\r
+ "There is an error in [FILENAME]" => "Es ist ein Fehler in der Datei [FILENAME] aufgetreten.",\r
+ "This Month" => "Aktueller Monat",\r
+ "Thursday" => "Donnerstag",\r
+ "Tuesday" => "Dienstag",\r
+ "Update" => "Aktualisieren",\r
+ "Update Site" => "Seite aktualisieren",\r
+ "Wednesday" => "Mittwoch",\r
+ )\r
+ );\r
+\r
+ $g_aTranslation[] = array(\r
+ "code" => "fr",\r
+ "name" => "Français",\r
+ "translations" => array(\r
+ "[DAYS] days ago" => "Il y a [DAYS] jours",\r
+ "[HOURS]h [MINUTES]m ago" => "Il y a [HOURS]h[MINUTES]mins",\r
+ "[MINUTES] mins ago" => "Il y a [MINUTES] mins",\r
+ "1 day ago" => "Il y a un jour",\r
+ "1 min ago" => "Il y a 1 min",\r
+ "All Months" => "Tous les mois",\r
+ "An error has occured" => "Une erreur s'est produite",\r
+ "April" => "Avril",\r
+ "At least one file required by JAWStats has been deleted, renamed or corrupted." => "Au moins un fichier requis par JAWStats a été effacé, renommé ou corrompu.",\r
+ "August" => "Août",\r
+ "Browsers" => "Navigateurs",\r
+ "Cancel" => "Annuler",\r
+ "Cannot find required file [FILENAME]" => "Le fichier requis [FILENAME] n'a pu être retrouvé",\r
+ "Change Language" => "Changer de langue",\r
+ "Change Month" => "Changer de mois",\r
+ "Change Site" => "Changer de Site",\r
+ "Countries" => "Pays",\r
+ "December" => "Décembre",\r
+ "February" => "Février",\r
+ "Filetypes" => "Type de fichier",\r
+ "Friday" => "Vendredi",\r
+ "Hours" => "Heures",\r
+ "January" => "Janvier",\r
+ "JAWStats cannot find it's configuration file, [CONFIG]. Did you successfully copy and rename the [CONFIGDIST] file?" => "JAWStats ne peut retrouver son fichier de configuration [CONFIG]. Avez-vous copier ou renommer avec succès le fichier [CONFIGDIST]?",\r
+ "JAWStats could not open an AWStats log file" => "JAWStats n'a pu ouvrir un fichier log de AWStats",\r
+ "July" => "Juillet",\r
+ "June" => "Juin",\r
+ "Keyphrases" => "Phrases clés",\r
+ "Keywords" => "Mots clés",\r
+ "Last updated [DAYNAME], [DATE] [MONTH] [YEAR] at [TIME] [ELAPSEDTIME]. A total of [TOTALVISITORS] visitors ([UNIQUEVISITORS] unique) this month, an average of [DAILYAVERAGE] per day ([DAILYUNIQUE] unique)." => "Dernière mise à jour le [DAYNAME] [DATE] [MONTH] [YEAR] à [TIME] [ELAPSEDTIME].\r
+Un total de [TOTALVISITORS] visiteurs (dont [UNIQUEVISITORS] unique) ce mois, une moyenne de [DAILYAVERAGE] par jour (soit[DAILYUNIQUE] visiteurs uniques).",\r
+ "March" => "Mars",\r
+ "May" => "Mai",\r
+ "Monday" => "Lundi",\r
+ "No AWStats Log Files Found" => "Aucun fichier log d'AWStats n'a été trouvé",\r
+ "No individual AWStats configurations have been defined." => "Aucune configuration individuelle de AWStats n'a été définie",\r
+ "November" => "Novembre",\r
+ "October" => "Octobre",\r
+ "Operating Systems" => "Système d'exploitation",\r
+ "Pages" => "Pages",\r
+ "Please enter the password to update this site" => "Veuillez entrer le mot de passe pour mettre à jour le site",\r
+ "Please refer to the [LINKSTART]installation instructions[LINKEND] for more information." => "Merci de vous référer aux [LINKSTART] instructions d'installation[LINKEND] pour plus d'informations",\r
+ "Please select the month you wish to view" => "Veuillez choisir le mois que vous souhaitez consulter",\r
+ "Please select the site you wish to view" => "Veuillez choisir le site que vous souhaitez consulter",\r
+ "Please select your language" => "Veuillez choisir votre langue",\r
+ "Powered by [AWSTART]AWStats[END]. Made beautiful by [JAWSTART]JAWStats Web Statistics and Analytics[END]." => "Propulsé par [AWSTART]AWStats[END]. Embelli par [JAWSTART]JAWStats Analyses et Statistiques Web[END].",\r
+ "Referrers" => "Referrers",\r
+ "Saturday" => "Samedi",\r
+ "September" => "Septembre",\r
+ "Sessions" => "Sessions",\r
+ "Spiders" => "Robot d'indexation",\r
+ "Statistics for [SITE] in [MONTH] [YEAR]" => "Statistiques pour [SITE] du [MONTH][YEAR]",\r
+ "Status" => "Statut",\r
+ "Sunday" => "Dimanche",\r
+ "The data file being looked for is [FILE] in folder [FOLDER]" => "Le fichier de données recherché est [FILE] dans [FOLDER]",\r
+ "The problem may be the variable [VARIABLE] in your [CONFIG] file." => "Le problème peut provenir de la variable [VARIABLE] dans votre fichier [CONFIG]",\r
+ "The variable [VARIABLE] is missing or invalid." => "La variable [VARIABLE] est manquante ou invalide",\r
+ "There is an error in [FILENAME]" => "Il y a une erreur dans [FILENAME]",\r
+ "This Month" => "Ce mois",\r
+ "Thursday" => "Jeudi",\r
+ "Try changing the folder to [FOLDER]" => "Essayez en changeant le dossier par [FOLDER]",\r
+ "Tuesday" => "Mardi",\r
+ "Update" => "Mettre à jour",\r
+ "Update Site" => "Mettre à jour",\r
+ "Wednesday" => "Mercredi",\r
+ )\r
+ );\r
+\r
+ $g_aTranslation[] = array(\r
+ "code" => "pl",\r
+ "name" => "Polski",\r
+ "translations" => array(\r
+ "All Months" => "Miesiące",\r
+ "An error has occured" => "Wystąpił błąd",\r
+ "April" => "Kwiecień",\r
+ "At least one file required by JAWStats has been deleted, renamed or corrupted." => "Przynajmniej jeden plik niezbędny dla JAWStats został usunięty, przemianowany lub popsuty",\r
+ "August" => "Sierpień",\r
+ "Browsers" => "Przeglądarki",\r
+ "Cancel" => "Anuluj",\r
+ "Cannot find required file [FILENAME]" => "Brak niezbędnego pliku [FILENAME]",\r
+ "Change Language" => "Zmień język",\r
+ "Change Month" => "Zmień miesiąc",\r
+ "Change Site" => "Zmień witrynę",\r
+ "Countries" => "Kraje",\r
+ "December" => "Grudzień",\r
+ "February" => "Luty",\r
+ "Filetypes" => "Typy plików",\r
+ "Friday" => "Piątek",\r
+ "Hours" => "Godziny",\r
+ "January" => "Styczeń",\r
+ "JAWStats cannot find it's configuration file, [CONFIG]. Did you successfully copy and rename the [CONFIGDIST] file?" => "JAWStats nie może odczytać pliku konfiguracyjnego [CONFIG]. Czy plik [CONFIGDIST] został poprawnie skopiowany i przemianowany?",\r
+ "JAWStats could not open an AWStats log file" => "JAWStats nie może otworzyć plików z danymi AWStats.",\r
+ "July" => "Lipiec",\r
+ "June" => "Czerwiec",\r
+ "Keyphrases" => "Frazy",\r
+ "Keywords" => "Słowa kluczowe",\r
+ "Last updated [DAYNAME], [DATE] [MONTH] [YEAR] at [TIME] [ELAPSEDTIME]. A total of [TOTALVISITORS] visitors ([UNIQUEVISITORS] unique) this month, an average of [DAILYAVERAGE] per day ([DAILYUNIQUE] unique)." => "Ostatnia aktualizacja [DAYNAME], [DATE] [MONTH] [YEAR] o [TIME] [ELAPSEDTIME]. Łącznie [TOTALVISITORS] gości ([UNIQUEVISITORS] unikalnych) w tym miesiącu, średnio [DAILYAVERAGE] dziennie ([DAILYUNIQUE] unikalnych).",\r
+ "March" => "Marzec",\r
+ "May" => "Maj",\r
+ "Monday" => "Poniedziałek",\r
+ "No AWStats Log Files Found" => "Brak plików z danymi AWStats",\r
+ "November" => "Listopad",\r
+ "October" => "Październik",\r
+ "Operating Systems" => "Systemy operacyjne",\r
+ "Pages" => "Strony",\r
+ "Please enter the password to update this site" => "Proszę podać hasło w celu aktualizacji danych statystyk",\r
+ "Please select the month you wish to view" => "Proszę wybrać miesiąc, który chcesz zobaczyć",\r
+ "Please select the site you wish to view" => "Proszę wybrać witrynę, której statystyki chcesz zobaczyć",\r
+ "Please select your language" => "Proszę wybrać swój język",\r
+ "Powered by [AWSTART]AWStats[END]. Made beautiful by [JAWSTART]JAWStats Web Statistics and Analytics[END]." => "Statystyka generowana przez [AWSTART]AWStats[END]. Pięknie zaprezentowana przez [JAWSTART]JAWStats Web Statistics and Analytics[END].",\r
+ "Referrers" => "Odnośniki",\r
+ "Saturday" => "Sobota",\r
+ "September" => "Wrzesień",\r
+ "Sessions" => "Czasy wizyt",\r
+ "Spiders" => "Roboty sieciowe",\r
+ "Statistics for [SITE] in [MONTH] [YEAR]" => "Statystyki dla [SITE] w okresie [MONTH] [YEAR]",\r
+ "Status" => "Kody HTTP",\r
+ "Sunday" => "Niedziela",\r
+ "There is an error in [FILENAME]" => "W pliku [FILENAME] jest błąd",\r
+ "This Month" => "Ten miesiąc",\r
+ "Thursday" => "Czwartek",\r
+ "Tuesday" => "Wtorek",\r
+ "Update" => "Aktualizuj",\r
+ "Update Site" => "Aktualizuj dane",\r
+ "Wednesday" => "Środa",\r
+ )\r
+ );\r
+\r
+ $g_aTranslation[] = array(\r
+ "code" => "sv",\r
+ "name" => "Svenska",\r
+ "translations" => array(\r
+ "[DAYS] days ago" => "[DAYS] dygn sedan",\r
+ "[HOURS]h [MINUTES]m ago" => "[HOURS]h [MINUTES]m sedan",\r
+ "[MINUTES] mins ago" => "[MINUTES] min sedan",\r
+ "1 day ago" => "1 dygn sedan",\r
+ "1 min ago" => "1 min sedan",\r
+ "10th" => "10",\r
+ "11th" => "11",\r
+ "12th" => "12",\r
+ "13th" => "13",\r
+ "14th" => "14",\r
+ "15th" => "15",\r
+ "16th" => "16",\r
+ "17th" => "17",\r
+ "18th" => "18",\r
+ "19th" => "19",\r
+ "1st" => "1",\r
+ "20th" => "20",\r
+ "21st" => "21",\r
+ "22nd" => "22",\r
+ "23rd" => "23",\r
+ "24th" => "24",\r
+ "25th" => "25",\r
+ "26th" => "26",\r
+ "27th" => "27",\r
+ "28th" => "28",\r
+ "29th" => "29",\r
+ "2nd" => "2",\r
+ "30th" => "30",\r
+ "31st" => "31",\r
+ "3rd" => "3",\r
+ "4th" => "4",\r
+ "5th" => "5",\r
+ "6th" => "6",\r
+ "7th" => "7",\r
+ "8th" => "8",\r
+ "9th" => "9",\r
+ "All Months" => "Alla månader",\r
+ "An error has occured" => "Ett fel uppstod",\r
+ "April" => "april",\r
+ "At least one file required by JAWStats has been deleted, renamed or corrupted." => "En eller flera filer som JAWStats är beroende av har tagits bort, döpts om eller blivit förstörda.",\r
+ "August" => "augusti",\r
+ "Browsers" => "Webbläsare",\r
+ "Cancel" => "Avbryt",\r
+ "Cannot find required file [FILENAME]" => "Den nödvändiga filen [FILENAME] hittades inte",\r
+ "Change Language" => "Ändra språk",\r
+ "Change Month" => "Byt månad",\r
+ "Change Site" => "Byt webbplats",\r
+ "Countries" => "Länder",\r
+ "December" => "december",\r
+ "February" => "februari",\r
+ "Filetypes" => "Filtyper",\r
+ "Friday" => "fredag",\r
+ "Hours" => "Tidpunkter",\r
+ "Is the specified AWStats log file directory correct? Does it have a trailing slash?" => "Är den angivna sökvägen till mappen med AWStats loggfiler korrekt? Slutar sökvägen med ett snedstreck?",\r
+ "January" => "januari",\r
+ "JAWStats cannot find it's configuration file, [CONFIG]. Did you successfully copy and rename the [CONFIGDIST] file?" => "JAWStats kan inte hitta sin konfigurationsfil [CONFIG]. Har du verkligen kopierat och döpt om filen [CONFIGDIST]?",\r
+ "JAWStats could not open an AWStats log file" => "JAWStats kunde inte öppna en av AWStats loggfiler",\r
+ "July" => "juli",\r
+ "June" => "juni",\r
+ "Keyphrases" => "Sökfraser",\r
+ "Keywords" => "Sökord",\r
+ "Last updated [DAYNAME], [DATE] [MONTH] [YEAR] at [TIME] [ELAPSEDTIME]. A total of [TOTALVISITORS] visitors ([UNIQUEVISITORS] unique) this month, an average of [DAILYAVERAGE] per day ([DAILYUNIQUE] unique)." => "Senast uppdaterad [DAYNAME], [DATE] [MONTH] [YEAR] kl. [TIME] [ELAPSEDTIME]. Totalt [TOTALVISITORS] besökare ([UNIQUEVISITORS] unika) denna månad, genomsnittligen [DAILYAVERAGE] per dag ([DAILYUNIQUE] unika).",\r
+ "March" => "mars",\r
+ "May" => "maj",\r
+ "Monday" => "måndag",\r
+ "No AWStats Log Files Found" => "Inga loggfiler från AWStats hittades",\r
+ "No individual AWStats configurations have been defined." => "Ingen individuell konfiguration för AWStats har definierats.",\r
+ "November" => "november",\r
+ "October" => "oktober",\r
+ "Operating Systems" => "Operativsystem",\r
+ "Pages" => "Sidor",\r
+ "Please enter the password to update this site" => "Ange ditt lösenord för att uppdatera denna webbplats",\r
+ "Please refer to the [LINKSTART]installation instructions[LINKEND] for more information." => "Se [LINKSTART]installationsmanualen[LINKEND] för mer information.",\r
+ "Please select the month you wish to view" => "Välj den månad som du önskar visa",\r
+ "Please select the site you wish to view" => "Välj vilken webbplats du önskar visa",\r
+ "Please select your language" => "Välj ditt språk",\r
+ "Powered by [AWSTART]AWStats[END]. Made beautiful by [JAWSTART]JAWStats Web Statistics and Analytics[END]." => "Baserad på [AWSTART]AWStats[END]. Snyggats till av [JAWSTART]JAWStats Web Statistics and Analytics[END].",\r
+ "Referrers" => "Referrers",\r
+ "Saturday" => "lördag",\r
+ "September" => "september",\r
+ "Sessions" => "Sessioner",\r
+ "Spiders" => "Spindlar",\r
+ "Statistics for [SITE] in [MONTH] [YEAR]" => "Statistik för [SITE] [MONTH] [YEAR]",\r
+ "Status" => "Statuskoder",\r
+ "Sunday" => "söndag",\r
+ "The data file being looked for is [FILE] in folder [FOLDER]" => "Den eftersökta datafilen är [FILE] i mappen [FOLDER]",\r
+ "The problem may be the variable [VARIABLE] in your [CONFIG] file." => "Problemet kan vara variabeln [VARIABLE] i filen [CONFIG]",\r
+ "The variable [VARIABLE] is missing or invalid." => "Variabeln [VARIABLE] saknas eller är felaktig.",\r
+ "There is an error in [FILENAME]" => "[FILENAME] är felaktig",\r
+ "This Month" => "Denna månad",\r
+ "Thursday" => "torsdag",\r
+ "Try changing the folder to [FOLDER]" => "Prova att ändra mappen till [FOLDER]",\r
+ "Tuesday" => "tisdag",\r
+ "Update" => "Uppdatera",\r
+ "Update Site" => "Uppdatera webbplats",\r
+ "Wednesday" => "onsdag",\r
+ )\r
+ );\r
+\r
+ $g_aTranslation[] = array(\r
+ "code" => "jp",\r
+ "name" => "日本語",\r
+ "translations" => array(\r
+ "[DAYS] days ago" => "[DAYS]数日前",\r
+ "All Months" => "月",\r
+ "An error has occured" => "エラーが発生しました:",\r
+ "April" => "4月",\r
+ "At least one file required by JAWStats has been deleted, renamed or corrupted." => "少なくともJAWStatsに必要なファイルが削除されたか、改名されたか、破壊されました。",\r
+ "August" => "8月",\r
+ "Browsers" => "ブラウザ",\r
+ "Cancel" => "キャンセル",\r
+ "Change Month" => "月の変更",\r
+ "Change Site" => "サイトの変更",\r
+ "Countries" => "国",\r
+ "December" => "12月",\r
+ "February" => "2月",\r
+ "Filetypes" => "ファイル",\r
+ "Friday" => "金曜日",\r
+ "Hours" => "時間",\r
+ "January" => "1月",\r
+ "JAWStats could not open an AWStats log file" => "JAWStatsがAWStatsログファイルを開く事が出来ませんでした。",\r
+ "July" => "7月",\r
+ "June" => "6月",\r
+ "Keyphrases" => "キーフレーズ",\r
+ "Keywords" => "キーワード",\r
+ "March" => "3月",\r
+ "May" => "5月",\r
+ "Monday" => "月曜日",\r
+ "No AWStats Log Files Found" => "AWStatsログファイルが見つかりませんでした。",\r
+ "No individual AWStats configurations have been defined." => "特定のAWStats構成を定められませんでした。",\r
+ "November" => "11月",\r
+ "October" => "10月",\r
+ "Operating Systems" => "オペレーティングシステム",\r
+ "Please select the month you wish to view" => "参照したい月の選択",\r
+ "Referrers" => "リファラー",\r
+ "Saturday" => "土曜日",\r
+ "September" => "9月",\r
+ "Sessions" => "セッション",\r
+ "Spiders" => "訪問/訪問者",\r
+ "Statistics for [SITE] in [MONTH] [YEAR]" => "[SITE] のアクセス分析 [MONTH][YEAR]",\r
+ "Status" => "エラー",\r
+ "Sunday" => "日曜日",\r
+ "The variable [VARIABLE] is missing or invalid." => "変数 [VARIABLE] が欠けているか無効です。",\r
+ "There is an error in [FILENAME]" => "[FILENAME]にエラーが見つかりました。",\r
+ "This Month" => "今月",\r
+ "Thursday" => "木曜日",\r
+ "Tuesday" => "火曜日",\r
+ "Update Site" => "サイトの更新",\r
+ "Wednesday" => "水曜日",\r
+ )\r
+ );\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+JAWStats Installation guide can be found at:\r
+http://www.jawstats.com/documentation
\ No newline at end of file
--- /dev/null
+html, body { background: #fff; border: 0; font-family: arial, helvetica, sans-serif; font-size: 12px; height: 100%; margin: 0; padding: 0; }\r
+h1,h2,div,img,span { border: 0; margin: 0; padding: 0; }\r
+\r
+a { color: #0e1875; text-decoration: none; }\r
+a:hover { text-decoration: underline; }\r
+div, img, span { border: 0; padding: 0; margin: 0; }\r
+\r
+h1 { color: #eee; font-size: 22px; font-weight: normal; }\r
+h1 span { color: #cccc9f !important; font-size: 16px; }\r
+h1.modal { color: #33332d; font-size: 22px; font-weight: normal; }\r
+\r
+h2 { background: #fff; color: #33332d; font-size: 20px; font-weight: normal; margin-bottom: 2px; }\r
+h2 span { background: #fff; color: #345678 !important; font-size: 15px; }\r
+\r
+img.externallink { padding: 0 0 10px 2px; }\r
+\r
+input.button { border: 1px solid #999; font-size: 18px; margin: 10px 0 0 4px; line-height: 18px; padding: 3px 3px; }\r
+input.text { border: 1px solid #999; font-size: 18px; line-height: 18px; margin-top: 10px; padding: 4px 3px; width: 200px; }\r
+\r
+span.submenu { background: #fff; color: #0e1875 !important; cursor: pointer; }\r
+span.submenu:hover { background: #fff; text-decoration: underline; }\r
+span.submenuselect { background: #fff; color: #0e1875 !important; font-weight: bold; cursor: pointer; text-decoration: underline; }\r
+\r
+td.countryflag { border: 0; text-align: center; width: 16px; }\r
+td.countryflag img { height: 11px; width: 16px; }\r
+\r
+.center { text-align: center; }\r
+.change { color: #9fb4cc !important; cursor: pointer; font-size: 11px; }\r
+.change:hover { color: #fff !important; text-decoration: underline; }\r
+.changemonth { cursor: pointer; height: 9px; margin: 0 1px -1px 1px; width: 9px; }\r
+.changemonthOff { height: 9px; margin: 0 1px -1px 1px; width: 9px; }\r
+.changedivider { color: #71716c !important; font-size: 11px; }\r
+.fauxlink { color: #333 !important; cursor: pointer; }\r
+.fauxlink:hover { color: #000; text-decoration: underline; }\r
+.hidden { display: none; }\r
+.negative { color: #b00; }\r
+.positive { color: #060; }\r
+.right { text-align: right; }\r
+.tiny { font-size: 11px; }\r
+\r
+#changesitecontainer { height: 350px; overflow: auto; _overflow: none; _overflow-y: auto; padding: 0 20px 0 0; }\r
+#footer { clear: both; padding: 6px 12px 12px 0; text-align: right; }\r
+#footer span { font-size: 11px; }\r
+#main { background: #fff; clear: both; padding: 15px 0 20px 0; }\r
+#main .container { background: transparent; margin: 0 auto; max-width: 970px; padding: 0; position: relative; }\r
+#content { background: transparent; }\r
+#header { background: #33332d; }\r
+#header .container { background: #33332d; margin: 0 auto; max-width: 970px; padding: 5px 0 0 0; position: relative; }\r
+#summary { color: #cccc9f; padding: 3px 0; }\r
+#summary span { color: #fff; font-weight: bold; }\r
+#menu { padding: 4px 0 0 0; }\r
+#loading { background: #fff url('images/loading.gif'); display: none; height: 16px; overflow: hidden; padding: 0 !important; position: absolute; top: 10px; right: 10px; width: 14px; }\r
+#submenu { padding: 0 0 20px 0; }\r
+#toolmenu { background: #4e5150; color: #fc0; font-size: 11px !important; line-height: 20px; }\r
+#toolmenu .container { margin: 0 auto; max-width: 970px; text-align: right; }\r
+#toolmenu .container span { border-left: 1px solid #33332d; color: #bccbdb; cursor: pointer; margin: 0 0 0 1px; padding: 0 11px; }\r
+#toolmenu .container span:hover { color: #ffffff; }\r
+#toolmenu .container span:last-child { border-right: 1px solid #33332d; }\r
+#toolmenu .container span img { padding: 0 1px; }\r
+#toolmenu .container span span { border: 0; padding: 0 6px; }\r
+#tools { background: #bccbdb; }\r
+#tools h1 { color: #33332d; margin-bottom: 4px; }\r
+#tools .tool { display: none; padding: 0; margin: 0 auto; width: 970px; }\r
+#tools .tool div { color: #515356; padding: 10px 0 18px 0; }\r
+#tools .tool div h1 span { color: #33332d !important; cursor: pointer; font-size: 11px; padding: 0 0 0 10px; }\r
+#version { background: #ff0; border: 1px solid #9e9e7d; display: none; padding: 3px 6px; }\r
+\r
+#menu ul { margin:0; padding:0; list-style:none; }\r
+#menu li { background: #fff url("images/tab_right.gif") no-repeat right top; border-bottom: 1px solid #fff; cursor: pointer; font-weight: bold; float:left; margin: 1px 1px 0 1px; }\r
+#menu span { background: url("images/tab_left.gif") no-repeat left top; display: block; padding: 5px 5px 4px 5px; }\r
+#menu li.off { background: #33332d url("images/taboff_right.gif") no-repeat right top; border-bottom: 1px solid #33332d; cursor: pointer; float:left; font-weight: normal; margin: 1px 0 0 0; }\r
+#menu li.off span { background: url("images/taboff_left.gif") no-repeat left top; color: #012345; display: block; padding: 7px 6px 2px 6px; }\r
+\r
+#main .graph { background: #fff; height: 150px; margin: 0 0 7px 0; padding: 4px; width: 100%; }\r
+#main .pie { background: #fff; float: left; height: 380px; margin-right: 1%; padding: 4px; vertical-align: top; width: 21%; }\r
+#main .tableFull { border: 1px solid #9e9e7d; clear: both; padding: 4px; width: 100%;}\r
+#main .tablePie { border: 1px solid #9e9e7d; float: right; padding: 4px; width: 75%;}\r
+\r
+/* tools content */\r
+#datepicker { width: 100%; }\r
+#datepicker tr td { border-top: 1px solid #aab9d3; color: #444444; }\r
+#datepicker tr td:first-child { font-size: 18px; line-height: 30px; text-align: center; width: 10%; }\r
+#datepicker tr:first-child td { border-top: 0; }\r
+#datepicker td.date { cursor: pointer; text-align: center; width: 7.5%; }\r
+#datepicker td.date:hover { background: #dee5ed; text-decoration: underline; }\r
+#datepicker td.selected { background: #dee5ed; cursor: pointer; text-align: center; width: 7.5%; }\r
+#datepicker td.fade { color: #a0acba; text-align: center; width: 7.5%; }\r
+\r
+#langpicker, #sitepicker { width: 100%; }\r
+#langpicker ul, #sitepicker ul { margin: 0 12px; padding: 0; }\r
+#langpicker ul li, #sitepicker ul li { border-top: 1px solid #aab9d3; cursor: pointer; line-height: 28px; list-style: none; margin: 0; padding: 0 0 0 10px; }\r
+#langpicker ul li:first-child, #sitepicker ul li:first-child { border-top: 0; }\r
+#langpicker ul li.selected, #sitepicker ul li.selected { background: #dee5ed; }\r
+#langpicker ul li:hover, #sitepicker ul li:hover { background: #dee5ed; text-decoration: underline; }\r
+#langpicker tr td, #sitepicker tr td { border-left: 1px solid #aab9d3; vertical-align: top; width: 33%; }\r
+#langpicker tr td:first-child, #sitepicker tr td:first-child { border-left: 0; }\r
+\r
+#siteupdate { margin: 12px 0 0 0 !important; padding: 0 !important; text-align: center; }\r
+#siteupdate input[type=password] { border: 1px solid #444444; font-size: 19px; line-height: 34px; width: 300px; }\r
+#siteupdate input[type=button] { border: 1px solid #444444; font-size: 19px; line-height: 34px; }\r
+\r
+#toolLanguageButton img { padding: 0 0 0 8px !important; }\r
+\r
+/* calendar */\r
+table.calendar { width: 100%; }\r
+table.calendar td { text-align: left; vertical-align: top;}\r
+table.calendar td.labelSide { font-size: 11px; padding-right: 4px; text-align: right; vertical-align: middle; width: 1% !important; }\r
+table.calendar td.labelTop { font-size: 11px; height: 13px; text-align: center; }\r
+table.calendar td.labelTopSpacer { font-size: 11px; height: 13px; text-align: center; width: 2%; }\r
+td.calDay { background: #f5f5f2; height: 52px; width: 11%; }\r
+td.calDay div.date { color: #ccc; font-size: 15px; font-weight: bold; }\r
+td.calDayPopulated { background: #e2e2d8; height: 52px; padding: 0 2px; width: 11%;}\r
+td.calDayPopulated div.date { color: #aaa; font-size: 15px; font-weight: bold; height: 15px; }\r
+td.calDayPopulated div.value { color: #333; font-size: 15px; font-weight: bold; text-align: center; }\r
+td.calTotWk { background: #cccc9f; vertical-align: middle !important; width: 9%; }\r
+td.calTotWk div { color: #333; font-size: 15px; font-weight: bold; text-align: center; }\r
+td.calAvgWk { background: #b7bad6; vertical-align: middle !important; width: 9%; }\r
+td.calAvgWk div { color: #333; font-size: 15px; font-weight: bold; text-align: center; }\r
+td.calTotDay { background: #cccc9f; height: 40px; vertical-align: middle !important; }\r
+td.calTotDay div { color: #333; font-size: 15px; font-weight: bold; text-align: center; }\r
+td.calTotDay div span { font-size: 11px; font-weight: normal; }\r
+td.calAvgDay { background: #b7bad6; height: 40px; vertical-align: middle !important; }\r
+td.calAvgDay div { color: #333; font-size: 15px; font-weight: bold; text-align: center; }\r
+td.calAvgDay div span { font-size: 11px; font-weight: normal; }\r
+td.calGraph { height: 130px; vertical-align: bottom !important; }\r
+\r
+/* logos */\r
+td.browserlogo { text-align: center; }\r
+td.browserlogo img { height: 15px; width: 15px; }\r
+td.oslogo { text-align: center; }\r
+td.oslogo img { height: 15px; width: 15px; }\r
+td.searchenginelogo { text-align: center; }\r
+td.searchenginelogo img { height: 16px; width: 16px; }\r
+\r
+/* paging */\r
+#paging { padding: 7px 20px 3px 0; text-align: right; }\r
+#paging img { padding: 0 3px; }\r
+#paging input { border: 1px solid #333; padding: 1px 4px; text-align: right; width: 40px; }\r
+#paging span { padding: 0 7px; }\r
+#paging span:first-child { padding: 0 20px 0 0; }\r
+\r
+/* tablesorter */\r
+table.tablesorter { font-family: arial, helvetica, sans-serif; background-color: #789abc; margin: 0; font-size: 12px; text-align: left; width: 100% }\r
+table.tablesorter thead tr th { background-color: #cccc9f; border-right: 1px solid #eee; font-size: 12px; font-weight: normal; padding: 7px 30px 7px 7px; }\r
+table.tablesorter thead tr .header { background-image: url('images/tablesorter_bg.gif'); background-repeat: no-repeat; background-position: center right; cursor: pointer; }\r
+table.tablesorter tbody td { background: #f5f5f2 !important; color: #333; padding: 5px; background-color: #fff; border-right: 1px solid #eee; vertical-align: top; }\r
+table.tablesorter tbody tr.odd td { background: #e2e2d8 !important; }\r
+table.tablesorter tbody tr.saturday td { background: #d3d389 !important; }\r
+table.tablesorter tbody tr.sunday td { background: #d3d389 !important; }\r
+table.tablesorter tbody tr.highlight td { background: #fc3 !important; }\r
+table.tablesorter thead tr .headerSortUp { background-image: url('images/tablesorter_asc.gif'); }\r
+table.tablesorter thead tr .headerSortDown { background-image: url('images/tablesorter_desc.gif'); }\r
+table.tablesorter thead tr .headerSortDown,\r
+table.tablesorter thead tr .headerSortUp { background-color: #9e9e7d; color: #fff; }\r
+table.tablesorter tfoot tr td { background-color: #9fb4cc; border-right: 1px solid #eee; color: #333; font-size: 13px; font-weight: bold; padding: 7px 5px; }\r
+table.tablesorter .noborder { border: 0; }\r
+\r
+/* tag cloud */\r
+.tagcloud { margin-bottom: 20px; text-align: center; }\r
+.tagcloud span { color: #333; padding: 0 16px; white-space: nowrap; }
\ No newline at end of file
--- /dev/null
+// pie chart colours\r
+var g_sColor = "0x86b4ab,0x9e9e7d,0xab812e,0xcccc9f,0xa0acba,0x8c8c85,0xe2e2d8";\r
+var g_sShadowColor = "0xffffff";
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+/*\r
+ * JAWStats 0.7 Web Statistics\r
+ *\r
+ * Copyright (c) 2009 Jon Combe (jawstats.com)\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person\r
+ * obtaining a copy of this software and associated documentation\r
+ * files (the "Software"), to deal in the Software without\r
+ * restriction, including without limitation the rights to use,\r
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+ * copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following\r
+ * conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be\r
+ * included in all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r
+ * OTHER DEALINGS IN THE SOFTWARE.\r
+ */\r
+\r
+ // includes\r
+ require_once "config.php";\r
+ require_once "clsAWStats.php";\r
+\r
+ // external include files\r
+ if ((isset($g_aConfig["includes"]) == true) && (strlen($g_aConfig["includes"]) > 0)) {\r
+ $aIncludes = explode(",", $g_aConfig["includes"]);\r
+ foreach ($aIncludes as $sInclude) {\r
+ include $sInclude;\r
+ }\r
+ }\r
+\r
+ // select configuraton\r
+ $g_sConfig = GetConfig();\r
+ $g_aConfig = $aConfig[$g_sConfig];\r
+\r
+ // get date range and valid log file\r
+ $g_dtStatsMonth = ValidateDate($_GET["year"], $_GET["month"]);\r
+ $g_aLogFiles = GetLogList($g_sConfig,\r
+ $g_aConfig["statspath"]);\r
+\r
+ // create xml\r
+ $aXML = array();\r
+ $aXML[] = "<data>";\r
+ $iYear = date("Y", $g_aLogFiles[count($g_aLogFiles) - 1][0]);\r
+ $iMonth = date("n", $g_aLogFiles[count($g_aLogFiles) - 1][0]);\r
+ $iMaxLastUpdate = 0;\r
+ for ($iIndex = (count($g_aLogFiles) - 1); $iIndex >= 0; $iIndex--) {\r
+ $dtNextMonth = mktime (0, 0, 0, ($iMonth + 1), 0, $iYear);\r
+ $clsAWStats = new clsAWStats($g_sConfig,\r
+ $g_aConfig["statspath"],\r
+ date("Y", $g_aLogFiles[$iIndex][0]),\r
+ date("n", $g_aLogFiles[$iIndex][0]));\r
+\r
+ if ($clsAWStats->dtLastUpdate > $iMaxLastUpdate) {\r
+ $iMaxLastUpdate = $clsAWStats->dtLastUpdate;\r
+ }\r
+\r
+ // sum pages, hits & bandwidth\r
+ $aTemp = $clsAWStats->GetSection("DAY");\r
+ $iPages = 0;\r
+ $iHits = 0;\r
+ $iBW = 0;\r
+ for ($iIndexItem = 0; $iIndexItem < count($aTemp); $iIndexItem++) {\r
+ $iHits += $aTemp[$iIndexItem][2];\r
+ $iPages += $aTemp[$iIndexItem][1];\r
+ $iBW += $aTemp[$iIndexItem][3];\r
+ }\r
+\r
+ // days in month\r
+ $iDaysInMonth = date("d", $dtNextMonth);\r
+ if ($iIndex == 0) {\r
+ $iPartDay = abs(date("s", $clsAWStats->dtLastUpdate));\r
+ $iPartDay += (abs(date("i", $clsAWStats->dtLastUpdate)) * 60);\r
+ $iPartDay += (abs(date("H", $clsAWStats->dtLastUpdate)) * 60 * 60);\r
+ $iPartDay = $iPartDay / (60 * 60 * 24);\r
+ $iDaysInMonth = number_format((abs(date("d", $clsAWStats->dtLastUpdate)) - 1) + $iPartDay, 3);\r
+ }\r
+\r
+ // create xml body\r
+ if ($g_aLogFiles[$iIndex][1] == true) {\r
+ $aXML[] = "<month month=\"" . date("n", $g_aLogFiles[$iIndex][0]) . "\" " .\r
+ "year=\"" . date("Y", $g_aLogFiles[$iIndex][0]) . "\" " .\r
+ "daysinmonth=\"" . $iDaysInMonth . "\" " .\r
+ "visits=\"" . $clsAWStats->iTotalVisits . "\" " .\r
+ "uniques=\"" . $clsAWStats->iTotalUnique . "\" " .\r
+ "pages=\"" . $iPages . "\" " .\r
+ "hits=\"" . $iHits . "\" " .\r
+ "bw=\"" . $iBW . "\" " .\r
+ "/>\n";\r
+ } else {\r
+ $aXML[] = "<month month=\"" . date("n", $g_aLogFiles[$iIndex][0]) . "\" " .\r
+ "year=\"" . date("Y", $g_aLogFiles[$iIndex][0]) . "\" " .\r
+ "daysinmonth=\"" . $iDaysInMonth . "\" " .\r
+ "visits=\"0\" uniques=\"0\" pages=\"0\" hits=\"0\" bw=\"0\" />\n";\r
+ }\r
+\r
+ // increment month\r
+ $iMonth++;\r
+ }\r
+\r
+ // output\r
+ $aXML[] = "</data>";\r
+ $aXML[] = "<info lastupdate=\"" . $iMaxLastUpdate . "\" />\n";\r
+ $clsAWStats->OutputXML(implode("", $aXML));\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+/*\r
+ * JAWStats 0.7 Web Statistics\r
+ *\r
+ * Copyright (c) 2009 Jon Combe (jawstats.com)\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person\r
+ * obtaining a copy of this software and associated documentation\r
+ * files (the "Software"), to deal in the Software without\r
+ * restriction, including without limitation the rights to use,\r
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+ * copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following\r
+ * conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be\r
+ * included in all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r
+ * OTHER DEALINGS IN THE SOFTWARE.\r
+ */\r
+\r
+ // includes\r
+ require_once "config.php";\r
+ require_once "clsAWStats.php";\r
+\r
+ // external include files\r
+ if ((isset($g_aConfig["includes"]) == true) && (strlen($g_aConfig["includes"]) > 0)) {\r
+ $aIncludes = explode(",", $g_aConfig["includes"]);\r
+ foreach ($aIncludes as $sInclude) {\r
+ include $sInclude;\r
+ }\r
+ }\r
+\r
+ // select configuraton\r
+ $g_sConfig = GetConfig();\r
+ $g_aConfig = $aConfig[$g_sConfig];\r
+\r
+ // create class\r
+ $clsAWStats = new clsAWStats($g_sConfig,\r
+ $g_aConfig["statspath"],\r
+ $_GET["year"],\r
+ $_GET["month"]);\r
+\r
+ // create xml\r
+ $clsAWStats->OutputXML($clsAWStats->CreatePagesXMLString());\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+/*\r
+ * JAWStats 0.7 Web Statistics\r
+ *\r
+ * Copyright (c) 2009 Jon Combe (jawstats.com)\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person\r
+ * obtaining a copy of this software and associated documentation\r
+ * files (the "Software"), to deal in the Software without\r
+ * restriction, including without limitation the rights to use,\r
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+ * copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following\r
+ * conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be\r
+ * included in all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r
+ * OTHER DEALINGS IN THE SOFTWARE.\r
+ */\r
+\r
+ // includes\r
+ require_once "config.php";\r
+ require_once "clsAWStats.php";\r
+\r
+ // external include files\r
+ if ((isset($g_aConfig["includes"]) == true) && (strlen($g_aConfig["includes"]) > 0)) {\r
+ $aIncludes = explode(",", $g_aConfig["includes"]);\r
+ foreach ($aIncludes as $sInclude) {\r
+ include $sInclude;\r
+ }\r
+ }\r
+\r
+ // select configuraton\r
+ $g_sConfig = GetConfig();\r
+ $g_aConfig = $aConfig[$g_sConfig];\r
+\r
+ // create class\r
+ $clsAWStats = new clsAWStats($g_sConfig,\r
+ $g_aConfig["statspath"],\r
+ $_GET["year"],\r
+ $_GET["month"]);\r
+\r
+ // create xml\r
+ $sSection = strtoupper($_GET["section"]);\r
+ switch ($sSection) {\r
+ case "BROWSER":\r
+ case "DAY":\r
+ case "DOMAIN":\r
+ case "ERRORS":\r
+ case "FILETYPES":\r
+ case "KEYWORDS":\r
+ case "PAGEREFS":\r
+ case "OS":\r
+ case "ROBOT":\r
+ case "SEARCHWORDS":\r
+ case "SEREFERRALS":\r
+ case "SESSION":\r
+ case "SIDER":\r
+ case "SIDER_404":\r
+ case "TIME":\r
+ $clsAWStats->OutputXML($clsAWStats->CreateXMLString($sSection));\r
+ break;\r
+ }\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+/*\r
+ * JAWStats 0.7 Web Statistics\r
+ *\r
+ * Copyright (c) 2009 Jon Combe (jawstats.com)\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person\r
+ * obtaining a copy of this software and associated documentation\r
+ * files (the "Software"), to deal in the Software without\r
+ * restriction, including without limitation the rights to use,\r
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+ * copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following\r
+ * conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be\r
+ * included in all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r
+ * OTHER DEALINGS IN THE SOFTWARE.\r
+ */\r
+\r
+ // includes\r
+ require_once "config.php";\r
+\r
+ // external include files\r
+ if ((isset($g_aConfig["includes"]) == true) && (strlen($g_aConfig["includes"]) > 0)) {\r
+ $aIncludes = explode(",", $g_aConfig["includes"]);\r
+ foreach ($aIncludes as $sInclude) {\r
+ include $sInclude;\r
+ }\r
+ }\r
+\r
+ $sConfig = $_POST["config"];\r
+ header("content-type: text/xml");\r
+ echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";\r
+ if (isset($GLOBALS["aConfig"][$sConfig]) == true) {\r
+ if ($_POST["pass"] == md5($GLOBALS["aConfig"][$sConfig]["password"])) {\r
+ $sCommand = "export AWSTATS_DEL_GATEWAY_INTERFACE='jawstats' && " .\r
+ $GLOBALS["aConfig"][$sConfig]["updatepath"] .\r
+ "awstats.pl -config=" . $sConfig;\r
+ $sResult = shell_exec($sCommand);\r
+ echo "<xml>" .\r
+ "<result type=\"updated\" />" .\r
+ "<command><![CDATA[" . $sCommand . "]]></command>" .\r
+ "<output><![CDATA[" . $sResult . "]]></output>" .\r
+ "</xml>";\r
+ } else {\r
+ echo "<xml><result type=\"bad_password\" /></xml>";\r
+ }\r
+ } else {\r
+ echo "<xml><result type=\"bad_config\" /></xml>";\r
+ }\r
+\r
+?>\r