示例#1
0
文件: fn.php 项目: yrahman/playSMS
function flatly_hook_themes_apply($content)
{
    global $core_config, $user_config;
    $tpl = array('name' => 'themes_layout', 'vars' => array('CONTENT' => $content, 'HTTP_PATH_BASE' => $core_config['http_path']['base'], 'HTTP_PATH_THEMES' => $core_config['http_path']['themes'], 'THEMES_MODULE' => core_themes_get(), 'THEMES_MENU_TREE' => themes_get_menu_tree(), 'THEMES_SUBMENU' => themes_submenu(), 'CREDIT_SHOW_URL' => _u('index.php?app=ws&op=credit'), 'NAME' => $user_config['name'], 'USERNAME' => $user_config['username'], 'GRAVATAR' => $user_config['opt']['gravatar'], 'LAYOUT_FOOTER' => $core_config['main']['layout_footer'], 'Logout' => _('Logout')), 'ifs' => array('valid' => auth_isvalid()));
    $content = tpl_apply($tpl, array('core_config', 'user_config'));
    return $content;
}
示例#2
0
文件: fn.php 项目: 10corp/playSMS
function common_hook_themes_apply($content)
{
    global $core_config, $user_config;
    $themes_lang = strtolower(substr($user_config['language_module'], 0, 2));
    if ($themes_layout = trim($_REQUEST['_themes_layout_'])) {
        $themes_layout = 'themes_layout_' . $themes_layout;
    } else {
        $themes_layout = 'themes_layout';
    }
    $tpl = array('name' => $themes_layout, 'vars' => array('CONTENT' => $content, 'HTTP_PATH_BASE' => $core_config['http_path']['base'], 'HTTP_PATH_THEMES' => $core_config['http_path']['themes'], 'THEMES_MODULE' => core_themes_get(), 'THEMES_MENU_TREE' => themes_get_menu_tree(), 'THEMES_SUBMENU' => themes_submenu(), 'THEMES_LANG' => $themes_lang ? $themes_lang : 'en', 'CREDIT_SHOW_URL' => _u('index.php?app=ws&op=credit'), 'NAME' => $user_config['name'], 'USERNAME' => $user_config['username'], 'GRAVATAR' => $user_config['opt']['gravatar'], 'LAYOUT_FOOTER' => $core_config['main']['layout_footer'], 'Logout' => _('Logout')), 'ifs' => array('valid' => auth_isvalid()));
    $content = tpl_apply($tpl, array('core_config', 'user_config'));
    return $content;
}