Example #1
0
// stop hackers
defined('YACS') or exit('Script must be included');
// add language information, if known
if (isset($context['page_language'])) {
    $language = ' lang="' . $context['page_language'] . '" xml:lang="' . $context['page_language'] . '" ';
} else {
    $language = '';
}
// xml prefix
echo '<' . '?xml version="1.0" encoding="' . $context['charset'] . '"?' . '>' . "\n" . '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n" . '<html ' . $language . ' xmlns="http://www.w3.org/1999/xhtml">' . "\n" . '<head>' . "\n";
// give the charset to the w3c validator...
echo "\t" . '<meta http-equiv="Content-Type" content="' . $context['content_type'] . '; charset=' . $context['charset'] . '" />' . "\n";
// we have one style sheet for everything -- media="all" means it is not loaded by Netscape Navigator 4
echo "\t" . '<link rel="stylesheet" href="' . $context['url_to_root'] . 'skins/joi/joi.css" type="text/css" media="all" />' . "\n";
// other head directives
Page::meta();
// end of the header
echo '</head>' . "\n";
// start the body
Page::body();
// limit the horizontal size of everything, and center it in the page
echo '<div id="wrapper">' . "\n";
// the header panel comes before everything
echo '<div id="header_panel">' . "\n";
// the site name -- can be replaced, through CSS, by an image -- access key 1
if ($context['site_name'] && is_callable(array('i18n', 's'))) {
    echo "\t" . '<p id="header_title"><a href="' . $context['url_to_root'] . '" title="' . encode_field(i18n::s('Front page')) . '" accesskey="1">' . $context['site_name'] . '</a></p>' . "\n";
}
// site slogan
if ($context['site_slogan']) {
    echo "\t" . '<p id="header_slogan">' . $context['site_slogan'] . '</p>' . "\n";