Exemple #1
0
    }
    $display .= '<html>' . LB;
    $display .= '<head>' . LB;
    $display .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$LANG_CHARSET}\"" . XHTML . ">" . LB;
    $display .= '<meta name="robots" content="NOINDEX"' . XHTML . '>' . LB;
    $display .= '<title>Forum Preview</title>' . LB;
    if (version_compare($_CONF['supported_version_theme'], '2.0.0', '>=')) {
        $func = "theme_css_" . $_CONF['theme'];
        if (function_exists($func)) {
            $FORUM_SCRIPTS = new scripts();
            foreach ($func() as $info) {
                $file = $info['file'];
                $name = md5($file);
                $constant = !empty($info['constant']) ? $info['constant'] : true;
                $attributes = !empty($info['attributes']) ? $info['attributes'] : array();
                $FORUM_SCRIPTS->setCssFile($name, $file, $constant, $attributes);
            }
            $display .= $FORUM_SCRIPTS->getHeader();
        }
        $display .= '</head>' . LB;
    } else {
        $display .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"{$_CONF['site_url']}/layout/{$_CONF['theme']}/style.css\"></head>\n";
    }
    $display .= '<body class="sitebody">';
} else {
    //Check is anonymous users can access
    forum_chkUsercanAccess();
    // Debug Code to show variables
    $display .= gf_showVariables();
    if ($msg == 1) {
        $display .= COM_showMessageText($LANG_GF02['msg19']);
    $LANG_DIRECTION = 'ltr';
}
COM_switchLocaleSettings();
if (setlocale(LC_ALL, $_CONF['locale']) === false) {
    setlocale(LC_TIME, $_CONF['locale']);
}
/* Include scripts on behalf of the theme */
$func = "theme_css_" . $_CONF['theme'];
if (function_exists($func)) {
    foreach ($func() as $info) {
        $file = !empty($info['file']) ? $info['file'] : '';
        $name = !empty($info['name']) ? $info['name'] : md5(!empty($file) ? $file : strval(time()));
        $constant = !empty($info['constant']) ? $info['constant'] : true;
        $attributes = !empty($info['attributes']) ? $info['attributes'] : array();
        $priority = !empty($info['priority']) ? $info['priority'] : 100;
        $_SCRIPTS->setCssFile($name, $file, $constant, $attributes, $priority, 'theme');
    }
}
$func = "theme_js_libs_" . $_CONF['theme'];
if (function_exists($func)) {
    foreach ($func() as $info) {
        $footer = true;
        if (isset($info['footer']) && !$info['footer']) {
            $footer = false;
        }
        $_SCRIPTS->setJavaScriptLibrary($info['library'], $footer);
    }
}
$func = "theme_js_files_" . $_CONF['theme'];
if (function_exists($func)) {
    foreach ($func() as $info) {