diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php
index b4a47e1c2..16331c5ef 100644
--- a/e107_admin/prefs.php
+++ b/e107_admin/prefs.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/prefs.php,v $
-| $Revision: 1.16 $
-| $Date: 2008-08-17 15:18:05 $
+| $Revision: 1.17 $
+| $Date: 2008-11-23 22:49:42 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -1031,36 +1031,44 @@ $text .= "";
//Advanced Features
$text .= "
+
+
+
+
".PRFLAN_149." |
";
$text .= "
-
-
+
-
-
+
-
-
+
+
-
-
+
+
+
+
+
+
diff --git a/e107_files/def_e107_prefs.php b/e107_files/def_e107_prefs.php
index 1fe49555a..072a388c1 100644
--- a/e107_files/def_e107_prefs.php
+++ b/e107_files/def_e107_prefs.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_files/def_e107_prefs.php,v $
-| $Revision: 1.16 $
-| $Date: 2008-10-30 20:40:22 $
+| $Revision: 1.17 $
+| $Date: 2008-11-23 22:49:42 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -154,6 +154,7 @@ City, State, Country
'admincss' => 'style.css',
'developer' => '0',
'download_email' => '0',
+ 'log_page_accesses' => '0',
'comments_disabled' => '0',
'memberlist_access' => '253',
'check_updates' => '0',
diff --git a/e107_languages/English/admin/lan_prefs.php b/e107_languages/English/admin/lan_prefs.php
index e4077a1f3..e0f2bad30 100644
--- a/e107_languages/English/admin/lan_prefs.php
+++ b/e107_languages/English/admin/lan_prefs.php
@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_prefs.php,v $
-| $Revision: 1.13 $
-| $Date: 2008-08-17 15:18:14 $
+| $Revision: 1.14 $
+| $Date: 2008-11-23 22:49:47 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -204,7 +204,7 @@ define('PRFLAN_192', 'Generate random predefined login names according to a patt
define('PRFLAN_193', 'To allow users to set their own login names, leave blank');
define('PRFLAN_194', '# - alpha
. - numeric
* - alphanumeric
Other chars used as entered');
define('PRFLAN_195', 'Changed values:');
-define('PRFLAN_196', '');
+define('PRFLAN_196', 'Log all page accesses to the '.e_FILE_ABS.'logs/ directory');
define('PRFLAN_197', '');
diff --git a/e107_themes/templates/footer_default.php b/e107_themes/templates/footer_default.php
index 50ba113b7..67a11f0f4 100644
--- a/e107_themes/templates/footer_default.php
+++ b/e107_themes/templates/footer_default.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/footer_default.php,v $
-| $Revision: 1.11 $
-| $Date: 2008-01-05 20:49:06 $
+| $Revision: 1.12 $
+| $Date: 2008-11-23 22:49:52 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -21,6 +21,12 @@ $In_e107_Footer = TRUE; // For registered shutdown function
global $eTraffic, $error_handler, $db_time, $sql, $mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb, $FOOTER, $e107;
+$pref['accessLog'] = '0'; // Temporary flag to determine log format
+ // 1 - text format
+ // 2 - CSV format
+ // 5 - extended text format
+ // 6 - extended CSV format
+
//
// SHUTDOWN SEQUENCE
//
@@ -46,17 +52,20 @@ global $eTraffic, $error_handler, $db_time, $sql, $mySQLserver, $mySQLuser, $myS
// A Ensure sql and traffic objects exist
//
-if(!is_object($sql)){
+if(!is_object($sql))
+{
// reinstigate db connection if another connection from third-party script closed it ...
$sql = new db;
$sql -> db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
}
-if (!is_object($eTraffic)) {
+if (!is_object($eTraffic))
+{
$eTraffic = new e107_traffic;
$eTraffic->Bump('Lost Traffic Counters');
}
-if(varset($e107_popup)!=1){
+if(varset($e107_popup)!=1)
+{
//
// B.1 Clear cache (admin-only)
//
@@ -76,6 +85,11 @@ if(varset($e107_popup)!=1){
$dbPercent = number_format($dbPercent,0); // DB as percent of clock
$memuse = $e107->get_memory_usage(); // Memory at end, in B/KB/MB/GB ;)
$rinfo = '';
+ $logLine = '';
+ if ($pref['log_page_accesses'])
+ { // Collect the first batch of data to log
+ $logLine.= "'".($now = time())."','".gmstrftime('%y-%m-%d %H:%M:%S',$now)."','".e_PAGE.'?'.e_QUERY."','".$rendertime."','".$db_time."','".$memuse."'";
+ }
if ( function_exists( 'getrusage' ) )
{
@@ -117,6 +131,14 @@ if(varset($e107_popup)!=1){
if(isset($pref['display_memory_usage']) && $pref['display_memory_usage']){ $rinfo .= CORE_LAN16.$memuse; }
if(isset($pref['displaycacheinfo']) && $pref['displaycacheinfo']){ $rinfo .= $cachestring."."; }
+ if ($pref['log_page_accesses'])
+ { // Need to log the page info to a text file as CSV data
+ $logname = e_FILE."logs/logd_".date("z.Y", time()).".csv";
+ $logfp = fopen($logname, 'a+');
+ fwrite($logfp, $logLine."\n");
+ fclose($logfp);
+ }
+
if (function_exists('theme_renderinfo'))
{
theme_renderinfo($rinfo);