function processUpdateReport()
{
    global $CM, $STATS;
    $count = 0;
    if (STATS_ACTIVE) {
        if (!empty($CM)) {
            $CM->UnsetData(117);
            $STATS = new StatisticProvider();
        }
        while (isset($_POST[POST_INTERN_PROCESS_UPDATE_REPORT . "_va_" . $count])) {
            $parts = explode("_", $_POST[POST_INTERN_PROCESS_UPDATE_REPORT . "_va_" . $count]);
            if ($parts[1] == 0) {
                $report = new StatisticYear($parts[0], 0, 0);
            } else {
                if ($parts[2] == 0) {
                    $report = new StatisticMonth($parts[0], $parts[1], 0);
                } else {
                    $report = new StatisticDay($parts[0], $parts[1], $parts[2]);
                }
            }
            $report->Update(!empty($_POST[POST_INTERN_PROCESS_UPDATE_REPORT . "_vb_" . $count]));
            $count++;
        }
    }
}
function processUpdateReport()
{
    $count = 0;
    while (isset($_POST[POST_INTERN_PROCESS_UPDATE_REPORT . "_va_" . $count])) {
        $parts = explode("_", $_POST[POST_INTERN_PROCESS_UPDATE_REPORT . "_va_" . $count]);
        if ($parts[1] == 0) {
            $report = new StatisticYear($parts[0], 0, 0);
        } else {
            if ($parts[2] == 0) {
                $report = new StatisticMonth($parts[0], $parts[1], 0);
            } else {
                $report = new StatisticDay($parts[0], $parts[1], $parts[2]);
            }
        }
        $report->Update(!empty($_POST[POST_INTERN_PROCESS_UPDATE_REPORT . "_vb_" . $count]));
        $count++;
    }
}
function processUpdateReport()
{
    $count = 0;
    if (STATS_ACTIVE) {
        CacheManager::FlushKey(DATA_CACHE_KEY_STATS);
        Server::$Statistic = new StatisticProvider();
        while (isset($_POST[POST_INTERN_PROCESS_UPDATE_REPORT . "_va_" . $count])) {
            $parts = explode("_", $_POST[POST_INTERN_PROCESS_UPDATE_REPORT . "_va_" . $count]);
            if ($parts[1] == 0) {
                $report = new StatisticYear($parts[0], 0, 0, 0, 0);
            } else {
                if ($parts[2] == 0) {
                    $report = new StatisticMonth($parts[0], $parts[1], 0, 0, 0);
                } else {
                    $report = new StatisticDay($parts[0], $parts[1], $parts[2], 0, 0);
                }
            }
            $report->Update(!empty($_POST[POST_INTERN_PROCESS_UPDATE_REPORT . "_vb_" . $count]));
            $count++;
        }
    }
}