예제 #1
0
if ($auto->config['block_dimanic_allow']) {
    $blocks->BlockDinamic();
}
if ($auto->config['block_last_allow']) {
    if (!$auto->config['general_cache'] || !($cache = Cache::GetHTMLCache('BlockLast'))) {
        $blocks->BlockLast();
        if ($auto->config['general_cache']) {
            Cache::SetHTMLCache('BlockLast', $template->block_last_auto);
        }
    } else {
        $template->block_last_auto = $cache;
    }
}
if ($auto->config['block_hot_allow']) {
    if (!$auto->config['general_cache'] || !($cache = Cache::GetHTMLCache('BlockHot', $auto->config['block_hot_auto_time'] * 60))) {
        $blocks->BlockHot();
        if ($auto->config['general_cache']) {
            Cache::SetHTMLCache('BlockHot', $template->block_hot_auto);
        }
    } else {
        $template->block_hot_auto = $cache;
    }
}
if ($auto->config['general_allow_block_statistic']) {
    if (!$auto->config['general_cache'] || !($cache = Cache::GetHTMLCache('block_stats'))) {
        $auto_on_site = $base->SelectOne('auto_autos', array('count' => 'COUNT(*)'), array('allow_site' => 1));
        $auto_reg = $base->SelectOne('auto_autos', array('max' => 'MAX(id)'));
        $base->SetWhere('add_date', $base->timer->cur_time - 24 * 60 * 60, ">");
        $today = $base->SelectOne('auto_autos', array('count' => 'COUNT(*)'));
        $template->load('block_stats');
        $template->Set($auto_on_site['count'], "{auto_now}");