Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Monday, November 23, 2026

Diff for phpWebLogAnalyzer/phpWebLogAnalyzer.inc.php between version 1.38 and 1.39

version 1.38, 2002/07/27 19:06:35 version 1.39, 2002/08/11 01:40:02
Line 164  class Web_Log {
Line 164  class Web_Log {
         var $_cache_inactive_sessions;          var $_cache_inactive_sessions;
         var $_cache_raw_log_inactive_sessions;          var $_cache_raw_log_inactive_sessions;
   
         /* $_props - properties array          /* $_props - properties array                           {{{
   
        keys:    identifiers (when user is specifing some property for some         keys:    identifiers (when user is specifing some property for some
                 special action (ingnore property or add property to list                  special action (ingnore property or add property to list
Line 347  class Web_Log {
Line 347  class Web_Log {
                                         'column' => 'session_id',                                          'column' => 'session_id',
                                         'table' => '',                                          'table' => '',
                                         'var' => '' )                                          'var' => '' )
                                 );                                  );      /* }}} */
   
         /*          /*
          * Web_Log()           * Web_Log()
Line 355  class Web_Log {
Line 355  class Web_Log {
          * Object constructor.           * Object constructor.
          */           */
   
         function Web_Log($dsn = '', $session_timeout = 0)          function Web_Log($dsn = '', $session_timeout = 0) /* {{{ */
         {          {
   
                 if (empty($session_timeout))                  if (empty($session_timeout))
Line 383  class Web_Log {
Line 383  class Web_Log {
                         $this->_props[$prop]['enabled']       = true;                          $this->_props[$prop]['enabled']       = true;
                         $this->_props[$prop]['enabled_cache'] = false;                          $this->_props[$prop]['enabled_cache'] = false;
                 }                  }
         }          } /* }}} */
   
         /*          /*
          * destroy()           * destroy()
Line 391  class Web_Log {
Line 391  class Web_Log {
          * Destructor. Must be called.           * Destructor. Must be called.
          */           */
   
         function destroy()          function destroy() /* {{{ */
         {          {
                 if (isset($this->_db)) {                  if (isset($this->_db)) {
                         $this->_db->disconnect();                          $this->_db->disconnect();
                         unset($this->_db);                          unset($this->_db);
                 }                  }
         }          } /* }}} */
   
         /*          /*
          * setSessionTimeout(), getSessionTimeout()           * setSessionTimeout(), getSessionTimeout()
Line 407  class Web_Log {
Line 407  class Web_Log {
          * one session.           * one session.
          */           */
   
         function setSessionTimeout($timeout)          function setSessionTimeout($timeout) /* {{{ */
         {          {
                 $this->_session_timeout = intval($timeout);                  $this->_session_timeout = intval($timeout);
         }          } /* }}} */
   
         function getSessionTimeout()          function getSessionTimeout() /* {{{ */
         {          {
                 return $this->_session_timeout;                  return $this->_session_timeout;
         }          } /* }}} */
   
         /*          /*
          * setSessionKeys(), getSessionKeys()           * setSessionKeys(), getSessionKeys()
Line 424  class Web_Log {
Line 424  class Web_Log {
      * If string specified, value will be appended to array.       * If string specified, value will be appended to array.
          */           */
   
         function setSessionKeys($keys)          function setSessionKeys($keys) /* {{{ */
         {          {
                 if (is_array($keys)) {                  if (is_array($keys)) {
                         $this->_session_keys = $keys;                          $this->_session_keys = $keys;
                 } elseif (is_string($keys)) {                  } elseif (is_string($keys)) {
                         array_push($this->_session_keys, $keys);                          array_push($this->_session_keys, $keys);
                 }                  }
         }          } /* }}} */
   
         function getSessionKeys()          function getSessionKeys() /* {{{ */
         {          {
                 return $this->_session_keys;                  return $this->_session_keys;
         }          } /* }}} */
   
         /*          /*
          * enableRawLog(), disableRawLog()           * enableRawLog(), disableRawLog()
Line 444  class Web_Log {
Line 444  class Web_Log {
          * Enable/disable of logging to raw acesses table.           * Enable/disable of logging to raw acesses table.
          */           */
   
         function enableRawLog()          function enableRawLog() /* {{{ */
         {          {
                 $this->_raw_log = 1;                  $this->_raw_log = 1;
         }          } /* }}} */
   
         function disableRawLog()          function disableRawLog() /* {{{ */
         {          {
                 $this->_raw_log = 0;                  $this->_raw_log = 0;
         }          } /* }}} */
   
         /*          /*
          * enableTruncateNames(), disableTruncateNames()           * enableTruncateNames(), disableTruncateNames()
Line 460  class Web_Log {
Line 460  class Web_Log {
          * Enable/disable of short IP addresses and hostnames usage.           * Enable/disable of short IP addresses and hostnames usage.
          */           */
   
         function enableTruncateNames()          function enableTruncateNames() /* {{{ */
         {          {
                 $this->_truncate_names = 1;                  $this->_truncate_names = 1;
         }          } /* }}} */
   
         function disableTruncateNames()          function disableTruncateNames() /* {{{ */
         {          {
                 $this->_truncate_names = 0;                  $this->_truncate_names = 0;
         }          } /* }}} */
   
         /*          /*
          * enableTruncateQueryStrings(), disableTruncateQueryStrings()           * enableTruncateQueryStrings(), disableTruncateQueryStrings()
Line 481  class Web_Log {
Line 481  class Web_Log {
          * will be appended to array.           * will be appended to array.
          */           */
   
         function enableTruncateQueryStrings()          function enableTruncateQueryStrings() /* {{{ */
         {          {
                 $this->_truncate_qstrings = 1;                  $this->_truncate_qstrings = 1;
         }          } /* }}} */
   
         function disableTruncateQueryStrings()          function disableTruncateQueryStrings() /* {{{ */
         {          {
                 $this->_truncate_qstrings = 1;                  $this->_truncate_qstrings = 1;
         }          } /* }}} */
   
         function setTruncateQueryStringsKeys($keys)          function setTruncateQueryStringsKeys($keys) /* {{{ */
         {          {
                 if (is_array($keys)) {                  if (is_array($keys)) {
                         $this->_truncate_qstrings_keys = $keys;                          $this->_truncate_qstrings_keys = $keys;
                 } elseif (is_string($keys)) {                  } elseif (is_string($keys)) {
                         array_push($this->_truncate_qstrings_keys, $keys);                          array_push($this->_truncate_qstrings_keys, $keys);
                 }                  }
         }          } /* }}} */
   
         function getTruncateQueryStringsKeys()          function getTruncateQueryStringsKeys() /* {{{ */
         {          {
                 return $this->_truncate_qstrings_keys;                  return $this->_truncate_qstrings_keys;
         }          } /* }}} */
   
         /*          /*
          * enablePropertyCache(), disablePropertyCache()           * enablePropertyCache(), disablePropertyCache()
Line 513  class Web_Log {
Line 513  class Web_Log {
          * Enable/disable of specific property cache.           * Enable/disable of specific property cache.
          */           */
   
         function enablePropertyCache($property)          function enablePropertyCache($property) /* {{{ */
         {          {
                 if (isset($this->_props[$property]))                  if (isset($this->_props[$property]))
                         $this->_props[$property]['enabled_cache'] = true;                          $this->_props[$property]['enabled_cache'] = true;
         }          } /* }}} */
   
         function disablePropertyCache($property)          function disablePropertyCache($property) /* {{{ */
         {          {
                 if (isset($this->_props[$property]))                  if (isset($this->_props[$property]))
                         $this->_props[$property]['enabled_cache'] = false;                          $this->_props[$property]['enabled_cache'] = false;
         }          } /* }}} */
   
         function enableAllPropertyCaches()          function enableAllPropertyCaches() /* {{{ */
         {          {
                 foreach (array_keys($this->_props) as $property) {                  foreach (array_keys($this->_props) as $property) {
                         $this->_props[$property]['enabled_cache'] = true;                          $this->_props[$property]['enabled_cache'] = true;
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         function disableAllPropertyCaches()          function disableAllPropertyCaches() /* {{{ */
         {          {
                 foreach (array_keys($this->_props) as $property) {                  foreach (array_keys($this->_props) as $property) {
                         $this->_props[$property]['enabled_cache'] = false;                          $this->_props[$property]['enabled_cache'] = false;
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         /*          /*
          * enableProperty(), disableProperty()           * enableProperty(), disableProperty()
Line 549  class Web_Log {
Line 549  class Web_Log {
          * Enable/disable loging of specific property.           * Enable/disable loging of specific property.
          */           */
   
         function enableProperty($property)          function enableProperty($property) /* {{{ */
         {          {
                 if (isset($this->_props[$property]))                  if (isset($this->_props[$property]))
                         $this->_props[$property]['enabled'] = true;                          $this->_props[$property]['enabled'] = true;
         }          } /* }}} */
   
         function disableProperty($property)          function disableProperty($property) /* {{{ */
         {          {
                 if (isset($this->_props[$property]))                  if (isset($this->_props[$property]))
                         $this->_props[$property]['enabled'] = false;                          $this->_props[$property]['enabled'] = false;
         }          } /* }}} */
   
         /*          /*
          * enableAllProperties(), disableAllProperties()           * enableAllProperties(), disableAllProperties()
Line 567  class Web_Log {
Line 567  class Web_Log {
          * Enable/disable loging of all properties.           * Enable/disable loging of all properties.
          */           */
   
         function enableAllProperties()          function enableAllProperties() /* {{{ */
         {          {
                 foreach (array_keys($this->_props) as $property) {                  foreach (array_keys($this->_props) as $property) {
                         $this->_props[$property]['enabled'] = true;                          $this->_props[$property]['enabled'] = true;
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         function disableAllProperties()          function disableAllProperties() /* {{{ */
         {          {
                 foreach (array_keys($this->_props) as $property) {                  foreach (array_keys($this->_props) as $property) {
                         $this->_props[$property]['enabled'] = false;                          $this->_props[$property]['enabled'] = false;
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         /*          /*
          * getPropertyValue(), setPropertyValue(), clearPropertyValue()           * getPropertyValue(), setPropertyValue(), clearPropertyValue()
Line 591  class Web_Log {
Line 591  class Web_Log {
          * Gets/sets specific property value. Property cannot be disabled.           * Gets/sets specific property value. Property cannot be disabled.
          */           */
   
         function getPropertyValue($prop_name)          function getPropertyValue($prop_name) /* {{{ */
         {          {
                 if (isset($this->_props[$prop_name])) {                  if (isset($this->_props[$prop_name])) {
                         if (! $this->_props[$prop_name]['enabled'])                          if (! $this->_props[$prop_name]['enabled'])
Line 601  class Web_Log {
Line 601  class Web_Log {
                 }                  }
   
                 return false;                  return false;
         }          } /* }}} */
   
         function setPropertyValue($prop_name, $value)          function setPropertyValue($prop_name, $value) /* {{{ */
         {          {
                 if (isset($this->_props[$prop_name])) {                  if (isset($this->_props[$prop_name])) {
                         $this->_props[$prop_name]['value'] = $value;                          $this->_props[$prop_name]['value'] = $value;
Line 611  class Web_Log {
Line 611  class Web_Log {
                 }                  }
   
                 return false;                  return false;
         }          } /* }}} */
   
         function clearPropertyValue($value)          function clearPropertyValue($value) /* {{{ */
         {          {
                 if (isset($this->_props[$prop_name])) {                  if (isset($this->_props[$prop_name])) {
                         if (isset($this->_props[$prop_name]['value']))                          if (isset($this->_props[$prop_name]['value']))
Line 622  class Web_Log {
Line 622  class Web_Log {
                 }                  }
   
                 return false;                  return false;
         }          } /* }}} */
   
         /*          /*
          * setAllPropertyValues(), clearAllPropertyValues()           * setAllPropertyValues(), clearAllPropertyValues()
Line 632  class Web_Log {
Line 632  class Web_Log {
          * Set/clear all properties.           * Set/clear all properties.
          */           */
   
         function setAllPropertyValues()          function setAllPropertyValues() /* {{{ */
         {          {
                 /* TODO: this should set only values, not IDs                  /* TODO: this should set only values, not IDs
                    there should exists also:                     there should exists also:
Line 641  class Web_Log {
Line 641  class Web_Log {
                  */                   */
   
                 return $this->setValues();                  return $this->setValues();
         }          } /* }}} */
   
         function clearAllPropertyValues()          function clearAllPropertyValues() /* {{{ */
         {          {
                 foreach (array_keys($this->_props) as $property) {                  foreach (array_keys($this->_props) as $property) {
                         if (isset($this->_props[$property]['value']))                          if (isset($this->_props[$property]['value']))
Line 651  class Web_Log {
Line 651  class Web_Log {
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
 /* NOT IMPLEMENTED YET, see comment above  /* NOT IMPLEMENTED YET, see comment above
   
         function setAllPropertyIDs()          function setAllPropertyIDs() /* {{{ */
         {          {
                 return $this->setValues();                  return $this->setValues();
         }          } /* }}} */
 */  */
   
         function clearAllPropertyIDs()          function clearAllPropertyIDs() /* {{{ */
         {          {
                 foreach (array_keys($this->_props) as $property) {                  foreach (array_keys($this->_props) as $property) {
                         if (isset($this->_props[$property]['id']))                          if (isset($this->_props[$property]['id']))
Line 669  class Web_Log {
Line 669  class Web_Log {
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         function setAllProperties()          function setAllProperties() /* {{{ */
         {          {
                 /* TODO: see comment above */                  /* TODO: see comment above */
                 return $this->setValues();                  return $this->setValues();
         }          } /* }}} */
   
         function clearAllProperties()          function clearAllProperties() /* {{{ */
         {          {
                 $ret  = true;                  $ret  = true;
                 $ret &= $this->clearAllPropertyValues();                  $ret &= $this->clearAllPropertyValues();
                 $ret &= $this->clearAllPropertyIDs();                  $ret &= $this->clearAllPropertyIDs();
   
                 return $ret;                  return $ret;
         }          } /* }}} */
   
         /*          /*
          * getPropertiesArray()           * getPropertiesArray()
Line 692  class Web_Log {
Line 692  class Web_Log {
          * Gets whole properties array.           * Gets whole properties array.
          */           */
   
         function getPropertiesArray()          function getPropertiesArray() /* {{{ */
         {          {
                 return $this->_props;                  return $this->_props;
         }          } /* }}} */
   
         /*          /*
          * setDSN()           * setDSN()
Line 704  class Web_Log {
Line 704  class Web_Log {
          * for database connection.           * for database connection.
          */           */
   
         function getDSN($dsn)          function getDSN($dsn) /* {{{ */
         {          {
                 return $this->_dsn;                  return $this->_dsn;
         }          } /* }}} */
   
         function setDSN($dsn)          function setDSN($dsn) /* {{{ */
         {          {
                 $this->_dsn = $dsn;                  $this->_dsn = $dsn;
         }          } /* }}} */
   
         /*          /*
          * _checkDB()           * _checkDB()
Line 721  class Web_Log {
Line 721  class Web_Log {
          * one using $this->_dsn variable.           * one using $this->_dsn variable.
          */           */
   
         function _checkDB()          function _checkDB() /* {{{ */
         {          {
         if (isset($this->_db)) {          if (isset($this->_db)) {
             if (DB::isError($this->_db))              if (DB::isError($this->_db))
Line 737  class Web_Log {
Line 737  class Web_Log {
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         /*          /*
          * _resolveIP()           * _resolveIP()
Line 745  class Web_Log {
Line 745  class Web_Log {
          * Resolves IP address to hostname.           * Resolves IP address to hostname.
          */           */
   
         function _resolveIP($addr)          function _resolveIP($addr) /* {{{ */
         {          {
                 $host     = '';                  $host     = '';
                 $addr_ar  = strchr($addr, ',') ? explode(',', $addr) : array($addr);                  $addr_ar  = strchr($addr, ',') ? explode(',', $addr) : array($addr);
Line 764  class Web_Log {
Line 764  class Web_Log {
                 }                  }
   
                 return $host;                  return $host;
         }          } /* }}} */
   
         /*          /*
          * _truncateName()           * _truncateName()
Line 772  class Web_Log {
Line 772  class Web_Log {
          * Truncates hostname or IP address.           * Truncates hostname or IP address.
          */           */
   
         function _truncateName($name)          function _truncateName($name) /* {{{ */
         {          {
                 $name_ar = explode('.', $name);                  $name_ar = explode('.', $name);
   
Line 787  class Web_Log {
Line 787  class Web_Log {
                 }                  }
   
                 return $name;                  return $name;
         }          } /* }}} */
   
         function _truncateQueryString($qstring)          function _truncateQueryString($qstring) /* {{{ */
         {          {
                 $ar_out = array();                  $ar_out = array();
                 $ar = explode('&', $qstring);                  $ar = explode('&', $qstring);
Line 809  class Web_Log {
Line 809  class Web_Log {
                 }                  }
   
                 return join('&', $ar_out);                  return join('&', $ar_out);
         }          } /* }}} */
   
         /*          /*
         * _setXxxValues()          * _setXxxValues()
Line 817  class Web_Log {
Line 817  class Web_Log {
         * Sets properties values.          * Sets properties values.
         */          */
   
         function _setBasicValues()          function _setBasicValues() /* {{{ */
         {          {
                 global $HTTP_SERVER_VARS;                  global $HTTP_SERVER_VARS;
                 global $HTTP_ENV_VARS;                  global $HTTP_ENV_VARS;
Line 873  class Web_Log {
Line 873  class Web_Log {
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         function _setHostValues()          function _setHostValues() /* {{{ */
         {          {
                 global $HTTP_SERVER_VARS;                  global $HTTP_SERVER_VARS;
   
Line 935  class Web_Log {
Line 935  class Web_Log {
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         function _setIdentValues()          function _setIdentValues() /* {{{ */
         {          {
                 global $HTTP_SERVER_VARS;                  global $HTTP_SERVER_VARS;
   
Line 976  class Web_Log {
Line 976  class Web_Log {
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         function _setValueValue($value = 0)          function _setValueValue($value = 0) /* {{{ */
         {          {
                 if ($this->_props['value']['enabled'])                  if ($this->_props['value']['enabled'])
                         $this->_props['value']['value'] = $value;                          $this->_props['value']['value'] = $value;
   
                 return true;                  return true;
         }          } /* }}} */
   
         function _setIDs()          function _setIDs() /* {{{ */
         {          {
                 /*                  /*
                  * Counting IDs according to values.                   * Counting IDs according to values.
Line 1016  class Web_Log {
Line 1016  class Web_Log {
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         function _setSessionIDValue()          function _setSessionIDValue() /* {{{ */
         {          {
                 if ($this->_props['session_id']['enabled']) {                  if ($this->_props['session_id']['enabled']) {
                         $session_id = $this->_getSessionID();                          $session_id = $this->_getSessionID();
Line 1033  class Web_Log {
Line 1033  class Web_Log {
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         function _setDatetimeValue()          function _setDatetimeValue() /* {{{ */
         {          {
                 /* TODO: make this database independent (or sysdate() is?) */                  /* TODO: make this database independent (or sysdate() is?) */
                 if ($this->_props['datetime']['enabled'])                  if ($this->_props['datetime']['enabled'])
                         $this->_props['datetime']['id'] =                          $this->_props['datetime']['id'] =
                                 $this->_props['datetime']['value'] =                                  $this->_props['datetime']['value'] =
                                 'SYSDATE()';                                  'SYSDATE()';
         }          } /* }}} */
   
   
         /*          /*
Line 1051  class Web_Log {
Line 1051  class Web_Log {
          * Set all enabled properties values.           * Set all enabled properties values.
          */           */
   
         function setValues($value = 0)          function setValues($value = 0) /* {{{ */
         {          {
                 if ($this->_checkDB() == false)                  if ($this->_checkDB() == false)
                         return $this->_db;                          return $this->_db;
Line 1083  class Web_Log {
Line 1083  class Web_Log {
                 $this->_setDatetimeValue();                  $this->_setDatetimeValue();
   
                 return true;                  return true;
         }          } /* }}} */
   
         /*          /*
          * registerAccess()           * registerAccess()
Line 1091  class Web_Log {
Line 1091  class Web_Log {
          * Register access. Set values and write them into web log.           * Register access. Set values and write them into web log.
          */           */
   
         function registerAccess($value = 0)          function registerAccess($value = 0) /* {{{ */
         {          {
                 /* NOTES: containing variable parts                  /* NOTES: containing variable parts
                    query_string, request_uri, http_referer                     query_string, request_uri, http_referer
Line 1108  class Web_Log {
Line 1108  class Web_Log {
                  * Writting values                   * Writting values
                  */                   */
                 return $this->writeValues();                  return $this->writeValues();
         }          } /* }}} */
   
         /*          /*
          * writeValues()           * writeValues()
Line 1117  class Web_Log {
Line 1117  class Web_Log {
          * Also insert records into another tables if it is neccessary.           * Also insert records into another tables if it is neccessary.
          */           */
   
         function writeValues()          function writeValues() /* {{{ */
         {          {
                 $keys = '';                  $keys = '';
                 $vals = '';                  $vals = '';
Line 1173  class Web_Log {
Line 1173  class Web_Log {
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         /*          /*
          * _getID()           * _getID()
Line 1182  class Web_Log {
Line 1182  class Web_Log {
          * If $value is not in table, record will be inserted and ID returned.           * If $value is not in table, record will be inserted and ID returned.
          */           */
   
         function _getID($property)          function _getID($property) /* {{{ */
         {          {
                 $table         = $this->_props[$property]['table'];                  $table         = $this->_props[$property]['table'];
                 $value         = $this->_props[$property]['value'];                  $value         = $this->_props[$property]['value'];
Line 1274  class Web_Log {
Line 1274  class Web_Log {
                 }                  }
   
                 return 0;                  return 0;
         }          } /* }}} */
   
         /*          /*
          * _getSessionID()           * _getSessionID()
Line 1282  class Web_Log {
Line 1282  class Web_Log {
          * Returns session_id according to session variables of object. Session           * Returns session_id according to session variables of object. Session
          * variables are $_session_timeout and $_session_keys.           * variables are $_session_timeout and $_session_keys.
          */           */
         function _getSessionID()          function _getSessionID() /* {{{ */
         {          {
                 $where = '';                  $where = '';
                 foreach ($this->_session_keys as $session_key) {                  foreach ($this->_session_keys as $session_key) {
Line 1345  class Web_Log {
Line 1345  class Web_Log {
   
                 /* Returns starting session ID with value of 1. */                  /* Returns starting session ID with value of 1. */
                 return 1;                  return 1;
         }          } /* }}} */
   
         /*          /*
          * getSessionsCount()           * getSessionsCount()
Line 1355  class Web_Log {
Line 1355  class Web_Log {
      * for defined conditions in $array.       * for defined conditions in $array.
          */           */
   
         function getSessionsCount($array = '')          function getSessionsCount($array = '') /* {{{ */
         {          {
                 return $this->_getCount($array, WEB_LOG_SESSIONS_COUNT_TYPE);                  return $this->_getCount($array, WEB_LOG_SESSIONS_COUNT_TYPE);
         }          } /* }}} */
   
         function getAccessesCount($array = '')          function getAccessesCount($array = '') /* {{{ */
         {          {
                 return $this->_getCount($array, WEB_LOG_ACCESSES_COUNT_TYPE);                  return $this->_getCount($array, WEB_LOG_ACCESSES_COUNT_TYPE);
         }          } /* }}} */
   
         function _getCount($array = '', $type)          function _getCount($array = '', $type) /* {{{ */
         {          {
                 if ($this->_checkDB() == false)                  if ($this->_checkDB() == false)
                         return $this->_db;                          return $this->_db;
Line 1426  class Web_Log {
Line 1426  class Web_Log {
                         return $count;                          return $count;
   
                 return false;                  return false;
         }          } /* }}} */
   
         /*          /*
          * getSessions()           * getSessions()
Line 1437  class Web_Log {
Line 1437  class Web_Log {
          * For $state equal 0 all sessions, -1 for inactive sessions, 1 for active.           * For $state equal 0 all sessions, -1 for inactive sessions, 1 for active.
          */           */
   
         function _getSessions($active = true)          function _getSessions($active = true) /* {{{ */
         {          {
                 if ($this->_checkDB() == false)                  if ($this->_checkDB() == false)
                         return $this->_db;                          return $this->_db;
Line 1456  class Web_Log {
Line 1456  class Web_Log {
                                 $this->_session_timeout);                                  $this->_session_timeout);
   
                 return $this->_db->getCol($query);                  return $this->_db->getCol($query);
         }          } /* }}} */
   
         /*          /*
          * getActiveSessions()           * getActiveSessions()
Line 1464  class Web_Log {
Line 1464  class Web_Log {
          * Returns array with IDs of active sessions.           * Returns array with IDs of active sessions.
          */           */
   
         function getActiveSessions()          function getActiveSessions() /* {{{ */
         {          {
                 if ($this->_raw_log) {                  if ($this->_raw_log) {
                         if (isset($this->_cache_raw_log_active_sessions))                          if (isset($this->_cache_raw_log_active_sessions))
Line 1485  class Web_Log {
Line 1485  class Web_Log {
                 }                  }
   
                 return $active_sessions;                  return $active_sessions;
         }          } /* }}} */
   
         /*          /*
          * getInactiveSessions()           * getInactiveSessions()
Line 1493  class Web_Log {
Line 1493  class Web_Log {
          * Returns array with IDs of inactive sessions.           * Returns array with IDs of inactive sessions.
          */           */
   
         function getInactiveSessions()          function getInactiveSessions() /* {{{ */
         {          {
                 if ($this->_raw_log) {                  if ($this->_raw_log) {
                         if (isset($this->_cache_raw_log_inactive_sessions))                          if (isset($this->_cache_raw_log_inactive_sessions))
Line 1514  class Web_Log {
Line 1514  class Web_Log {
                 }                  }
   
                 return $inactive_sessions;                  return $inactive_sessions;
         }          } /* }}} */
   
         /*          /*
          * Raw converting functions           * Raw converting functions
          */           */
   
         function getAccessesOfSession($session_id)          function getAccessesOfSession($session_id) /* {{{ */
         {          {
                 if ($this->_checkDB() == false)                  if ($this->_checkDB() == false)
                         return $this->_db;                          return $this->_db;
Line 1545  class Web_Log {
Line 1545  class Web_Log {
                         return $ids;                          return $ids;
   
                 return $ids;                  return $ids;
         }          } /* }}} */
   
         function readIntoValues($access_id)          function readIntoValues($access_id) /* {{{ */
         {          {
                 if (! $this->_raw_log) {                  if (! $this->_raw_log) {
                         die("readIntoValues(): not implemented for normal log\n");                          die("readIntoValues(): not implemented for normal log\n");
Line 1579  class Web_Log {
Line 1579  class Web_Log {
                 }                  }
   
                 return true;                  return true;
         }          } /* }}} */
   
         function deleteSession($session_id)          function deleteSession($session_id) /* {{{ */
         {          {
                 if ($this->_checkDB() == false)                  if ($this->_checkDB() == false)
                         return $this->_db;                          return $this->_db;
Line 1606  class Web_Log {
Line 1606  class Web_Log {
                         return $ids;                          return $ids;
   
                 return true;                  return true;
         }          } /* }}} */
   
         function convert($debug = 0)          function convert($debug = 0) /* {{{ */
         {          {
                 $this->enableRawLog();                  $this->enableRawLog();
                 $inactive_sessions = $this->getInactiveSessions();                  $inactive_sessions = $this->getInactiveSessions();
Line 1665  class Web_Log {
Line 1665  class Web_Log {
                                 echo "\n";                                  echo "\n";
                         }                          }
                 }                  }
         }          } /* }}} */
 }  }
   
   /* vim600: fdm=marker fdl=0 fdc=3
    */
 ?>  ?>

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top