110 lines
4.1 KiB
HTML
Raw Normal View History

2007-05-09 14:26:59 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html<?php echo $direction ?>>
<head>
<?php echo $meta ?>
<meta name="keywords" content="moodle, <?php echo $title ?> " />
<title><?php echo $title ?></title>
<link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
<?php include('ui/chameleon.php'); ?>
2007-05-09 14:26:59 +00:00
<?php include("$CFG->javascript"); ?>
<?php include('js/jquery.php'); ?>
2007-05-09 14:26:59 +00:00
<?php require_once($CFG->dirroot.'/lib/custom_corners_lib.php'); ?>
2007-05-09 14:26:59 +00:00
<?php
2007-05-09 14:26:59 +00:00
global $PAGE;
if (function_exists('get_in_popup')) {
$inpopup = get_in_popup();
} else {
$inpopup = false;
}
2007-05-09 14:26:59 +00:00
// handle pages which get displayed wrong
// either no custom corners or too much
2007-05-09 14:26:59 +00:00
// all admin pages are build with the layout-table: sideblocks and content
if (!empty($PAGE) && ($PAGE->type == 'admin') && (strpos($bodytags, ' nocoursepage'))) {
2007-05-09 14:26:59 +00:00
$bodytags = str_replace(' nocoursepage', '', $bodytags);
}
2007-05-09 14:26:59 +00:00
// list of pages using the layout-table to be able to view sideblocks
$excludelist = array('mod-chat-view', 'mod-data-view', 'mod-quiz-view',
'my-index');
if (!empty($PAGE) && (in_array($PAGE->type, $excludelist)) &&
(strpos($bodytags, ' nocoursepage'))) {
2007-05-09 14:26:59 +00:00
$bodytags = str_replace(' nocoursepage', '', $bodytags);
}
// add 'nocoursepage' to the list of CLASSes on several pages
if (strpos($bodytags, 'nocoursepage') === false) {
$includelist = array('admin-roles-assign', 'admin-roles-override',
'mod-data-view');
preg_match('/id="([^"]*)"/i', $bodytags, $ids);
if (in_array($ids[1], $includelist)) {
// exclude roles called from the admin area (courseid 1)
// include user roles for the Moodle user settings called
// from the start page
if (($COURSE->id > 1) || ($_GET['contextid'] == 30)) {
preg_match('/class="([^"]*)"/i', $bodytags, $classes);
$classlist = explode (' ', $classes[1]);
if (!in_array('nocoursepage', $classlist)) {
array_push($classlist, 'nocoursepage');
$bodytags = str_replace($classes[0],
'class="'.implode(' ', $classlist).'"', $bodytags);
}
2007-05-09 14:26:59 +00:00
}
}
}
2007-05-09 14:26:59 +00:00
?>
</head>
<body<?php
echo " $bodytags";
if ($focus) {
echo " onload=\"setfocus()\"";
};
?>>
<?php if(!empty($infooutput)) { ?>
2007-05-09 14:26:59 +00:00
<div id="infowrapper"><div id="infooverlay"><?php echo $infooutput; ?></div></div>
<?php } ?>
<div id="page"<?php echo (' class="'.(($inpopup) ? 'inpopup' : 'notinpopup').'"'); ?>>
<?php if (!$inpopup) {
if ($home) { // This is what gets printed on the home page only
2007-05-09 14:26:59 +00:00
?>
<div id="header-home" class="clearfix">
<?php print_custom_corners_start(); ?>
<div class="wraphome clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
2007-05-09 14:26:59 +00:00
<?php print_custom_corners_end(); ?>
</div>
<?php } else if ($heading) { // This is what gets printed on any other page with a heading
2007-05-09 14:26:59 +00:00
?>
<div id="header" class="clearfix">
<?php print_custom_corners_start(); ?>
2007-05-09 14:26:59 +00:00
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
<div class="navbar clearfix">
2007-05-09 14:26:59 +00:00
<?php if ($navigation) { // This is the navigation table with breadcrumbs
?>
2007-08-24 12:45:16 +00:00
<div class="breadcrumb"><?php print_navigation($navigation); ?></div>
2007-05-09 14:26:59 +00:00
<div class="navbutton"><?php echo $button; ?></div>
<?php } ?>
</div>
<?php print_custom_corners_end(); ?>
</div>
<?php }
}
?>
2007-05-09 14:26:59 +00:00
<!-- END OF HEADER -->
<div id="content">
<?php print_custom_corners_start(true, false, 'content'); ?>