示例#1
0
文件: commsy.php 项目: a2call/commsy
                if ($theme == $key or $key == 'individual') {
                    $shown_sheme = $key;
                }
            }
        }
        if ($theme == 'individual') {
            $shown_sheme = $theme;
        }
    }
    $smarty = new cs_smarty($environment, $shown_sheme);
    global $c_smarty_caching;
    if (isset($c_smarty_caching) && $c_smarty_caching === true) {
        $smarty->caching = Smarty::CACHING_LIFETIME_CURRENT;
    }
    // set smarty in environment
    $environment->setTemplateEngine($smarty);
    // set output mode
    if (isset($_GET['mode'])) {
        $environment->setOutputMode($_GET['mode']);
    }
}
/*********** PAGE ***********/
$context_item = $environment->getCurrentContextItem();
if (isset($_GET['smarty'])) {
    if ($_GET['smarty'] === 'off') {
        $session->setValue('smarty_off', true);
    } elseif ($_GET['smarty'] === 'on') {
        $session->setValue('smarty_off', false);
    }
}
if (isset($_GET['smarty']) || $session->issetValue('smarty_off')) {