61 Zeilen
2,2 KiB
PHP
61 Zeilen
2,2 KiB
PHP
<?php
|
|
/**
|
|
* Project:
|
|
* Contenido Content Management System
|
|
*
|
|
* Description:
|
|
* Cron Job to move old statistics into the stat_archive table
|
|
*
|
|
* @package Backend
|
|
* @subpackage Cronjobs
|
|
* @version $Rev: 306 $
|
|
* @author Timo A. Hummel
|
|
* @copyright four for business AG <www.4fb.de>
|
|
* @license http://www.contenido.org/license/LIZENZ.txt
|
|
* @link http://www.4fb.de
|
|
* @link http://www.contenido.org
|
|
*
|
|
* $Id: move_old_stats.php 306 2014-03-13 23:03:26Z oldperl $:
|
|
*/
|
|
|
|
if (!defined("CON_FRAMEWORK")) {
|
|
define("CON_FRAMEWORK", true);
|
|
}
|
|
|
|
// Contenido startup process
|
|
include_once ('../includes/startup.php');
|
|
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.user.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.xml.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.navigation.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'template/class.template.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.backend.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.table.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.notification.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.area.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.layout.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.client.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.cat.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.treeitem.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_language_de.inc.php');
|
|
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'functions.stat.php');
|
|
|
|
if (!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs")
|
|
{
|
|
|
|
$db = new DB_ConLite;
|
|
$year = date("Y");
|
|
$month = date("m");
|
|
|
|
if ($month == 1)
|
|
{
|
|
$month = 12;
|
|
$year = $year -1;
|
|
} else {
|
|
$month = $month -1;
|
|
}
|
|
|
|
statsArchive(sprintf("%04d%02d",$year,$month));
|
|
|
|
}
|
|
?>
|