Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / theme / custom_corners / header.html
blob559aaeac09d2ebb152e82059b54106613c923790
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html<?php echo $direction ?>>
3 <head>
4 <?php echo $meta ?>
5 <meta name="keywords" content="moodle, <?php echo $title ?> " />
6 <title><?php echo $title ?></title>
7 <link rel="shortcut icon" href="<?php echo $CFG->httpsthemewww .'/'. current_theme() ?>/favicon.ico" />
9 <?php
10 include("$CFG->javascript");
11 include($CFG->themedir.'/custom_corners/js/js.php');
13 // check if page is opened within a popup window
14 if (function_exists('is_in_popup')) {
15 $inpopup = is_in_popup();
16 } else {
17 $inpopup = false;
20 // get class list
21 preg_match('/class="([^"]*)"/i', $bodytags, $classes);
22 $classlist = explode (' ', $classes[1]);
25 // add "inpopup" or "notinpopup" to class list
26 if ($inpopup) {
27 array_push($classlist, 'inpopup');
28 } else {
29 array_push($classlist, 'notinpopup');
32 //replace classlist with new one
33 $bodytags = str_replace($classes[0], 'class="'.implode(' ', $classlist).'"', $bodytags);
35 </head>
37 <body<?php
38 echo " $bodytags";
39 if ($focus) {
40 echo " onload=\"setfocus()\"";
42 ?>>
44 <?php if(!empty($infooutput)) { ?>
45 <div id="infowrapper"><div id="infooverlay"><?php echo $infooutput; ?></div></div>
46 <?php } ?>
47 <div id="page">
49 <?php if (!$inpopup) {
50 if ($home) { // This is what gets printed on the home page only
52 <?php print_container_start(true, '', 'header-home'); ?>
53 <h1 class="headermain"><?php echo $heading ?></h1>
54 <div class="headermenu"><?php echo $menu ?></div>
55 <?php print_container_end(); ?>
56 <?php } else if ($heading) { // This is what gets printed on any other page with a heading
58 <?php print_container_start(true, '', 'header'); ?>
59 <h1 class="headermain"><?php echo $heading ?></h1>
60 <div class="headermenu"><?php echo $menu ?></div>
61 <div class="navbar clearfix">
62 <?php if ($navigation) { // This is the navigation table with breadcrumbs
64 <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
65 <div class="navbutton"><?php echo $button; ?></div>
66 <?php } ?>
67 </div>
68 <?php print_container_end(); ?>
69 <?php }
72 <!-- END OF HEADER -->
73 <?php print_container_start(false, '', 'content'); ?>