mirror of
https://github.com/e107inc/e107.git
synced 2025-07-09 17:16:20 +02:00
A few comments, correct last change
This commit is contained in:
@ -11,19 +11,18 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/log/consolidate.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/log/consolidate.php,v $
|
||||||
| $Revision: 1.7 $
|
| $Revision: 1.8 $
|
||||||
| $Date: 2007-01-30 21:05:46 $
|
| $Date: 2007-01-30 21:43:27 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* first thing to do is check if the log file is out of date ... */
|
/* first thing to do is check if the log file is out of date ... */
|
||||||
|
|
||||||
$pathtologs = e_PLUGIN."log/logs/";
|
$pathtologs = e_PLUGIN."log/logs/";
|
||||||
$date = date("z.Y", time());
|
$date = date("z.Y", time());
|
||||||
$yesterday = date("z.Y",(time() - 86400)); // This makes sure year wraps round OK
|
$yesterday = date("z.Y",(time() - 86400)); // This makes sure year wraps round OK
|
||||||
$date2 = date("Y-m-j", (time() -86400)); // Yesterday's date for the database summary
|
$date2 = date("Y-m-j", (time() -86400)); // Yesterday's date for the database summary
|
||||||
$date3 = date("Y-m");
|
$date3 = date("Y-m"); // Current month's date for monthly summary
|
||||||
|
|
||||||
$pfileprev = "logp_".$yesterday.".php"; // Yesterday's log file
|
$pfileprev = "logp_".$yesterday.".php"; // Yesterday's log file
|
||||||
$pfile = "logp_".$date.".php"; // Today's log file
|
$pfile = "logp_".$date.".php"; // Today's log file
|
||||||
@ -31,8 +30,7 @@ $ifileprev = "logi_".$yesterday.".php";
|
|||||||
$ifile = "logi_".$date.".php";
|
$ifile = "logi_".$date.".php";
|
||||||
|
|
||||||
if(file_exists($pathtologs.$pfile))
|
if(file_exists($pathtologs.$pfile))
|
||||||
{
|
{ /* log file is up to date, no consolidation required */
|
||||||
/* log file is up to date, no consolidation required */
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(!file_exists($pathtologs.$pfileprev))
|
else if(!file_exists($pathtologs.$pfileprev))
|
||||||
@ -55,7 +53,7 @@ if($sql -> db_Select("logstats", "*", "log_id='statBrowser' OR log_id='statOs' O
|
|||||||
$infoArray = array();
|
$infoArray = array();
|
||||||
while($row = $sql -> db_Fetch())
|
while($row = $sql -> db_Fetch())
|
||||||
{
|
{
|
||||||
$row[1] = unserialize($row[2]);
|
$$row[1] = unserialize($row[2]); // $row[1] is the stats type - save in a variable
|
||||||
if($row[1] == "statUnique") $statUnique = $row[2];
|
if($row[1] == "statUnique") $statUnique = $row[2];
|
||||||
if($row[1] == "statTotal") $statTotal = $row[2];
|
if($row[1] == "statTotal") $statTotal = $row[2];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user