94 lines
3.5 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;
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') && (strstr($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)) &&
2007-05-09 14:26:59 +00:00
(strstr($bodytags, ' nocoursepage'))) {
$bodytags = str_replace(' nocoursepage', '', $bodytags);
}
2007-05-09 14:26:59 +00:00
// add 'nocoursepage' to the list of CLASSes on the admin-roles pages
preg_match('/id="([^"]*)"/i', $bodytags, $ids);
if (($ids[1] == 'admin-roles-assign') || ($ids[1] == 'admin-roles-override')) {
// exclude roles called from the admin area (courseid 1)
// include user roles for the Moodle user settings called
2007-05-09 14:26:59 +00:00
// 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],
2007-05-09 14:26:59 +00:00
'class="'.implode(' ', $classlist).'"', $bodytags);
}
}
}
?>
</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 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(TRUE); ?>
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
<?php print_custom_corners_end(); ?>
</div>
<?php } else { // 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(); ?>
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
<div class="navbar clearfix">
<?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 } ?>
<!-- END OF HEADER -->
<div id="content">
<?php print_custom_corners_start(TRUE); ?>