security issues with dangerous template
[moodle.git] / theme / chameleon / header.html
CommitLineData
b1cdbbf9 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
2<html<?php echo $direction ?>>\r
3<head>\r
4 <?php echo $meta ?>\r
5 <meta name="keywords" content="moodle, <?php echo $title ?> " />\r
6 <title><?php echo $title ?></title>\r
7 <link rel="shortcut icon" href="<?php echo "$CFG->wwwroot/theme/$CFG->theme" ?>/favicon.ico" />\r
8 \r
9 <?php\r
10 \r
11 \r
12 if (isset($THEME->chameleonenabled) && $THEME->chameleonenabled) {\r
13 $chameleon_isadmin = isadmin();\r
14 $chameleon_isteacher = false;\r
15 if (isset($course->id)) {\r
16 $chameleon_courseparam = '?id=' . $course->id;\r
17 if (!$chameleon_isadmin) {\r
18 $chameleon_isteacher = (isteacher($course->id) && isset($CFG->coursetheme));\r
19 }\r
20 } else {\r
21 $chameleon_courseparam = '';\r
22 }\r
23\r
24 if ($chameleon_isadmin || $chameleon_isteacher) { \r
25 // either we're an admin or we're a teacher and this is being used as the course theme\r
26 // if we're on a page using a course theme edit that, otherwise edit the main chameleon theme\r
27 $chameleon_theme = (isset($CFG->coursetheme)) ? $CFG->coursetheme : $CFG->theme;\r
28 \r
29 \r
30 ?>\r
31 \r
32 <style type="text/css"> @import '<?php echo "$CFG->wwwroot/theme/$chameleon_theme" ?>/ui/chameleon_ui.css'; </style>\r
33 \r
34 <script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/css_query.js" ?>"> </script>\r
35 <script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/sarissa.js" ?>"> </script>\r
36 <script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/chameleon_js.php$chameleon_courseparam" ?>"> </script>\r
37 \r
38 <?php\r
39 \r
40 }\r
41 }\r
42 \r
43 ?>\r
44\r
45\r
46 <?php include("$CFG->javascript"); ?>\r
47 \r
48\r
49 \r
50 \r
51</head>\r
52\r
53<body<?php\r
54 echo " $bodytags";\r
55 if ($focus) {\r
56 echo " onload=\"setfocus()\"";\r
57 };\r
58 ?>>\r
59 \r
60<div id="page">\r
61 \r
62<?php if ($home) { // This is what gets printed on the home page only \r
63?>\r
64 <div id="header-home">\r
65 <div class="headermain"><?php echo $heading ?></div>\r
66 <div class="headermenu"><?php echo $menu ?></div>\r
67 </div>\r
68 <div class="navbar">\r
69 </div>\r
70<?php } else if ($heading) { // This is what gets printed on any other page with a heading \r
71?>\r
72 <div id="header">\r
73 <div class="headermain"><?php echo $heading ?></div>\r
74 <div class="headermenu"><?php echo $menu ?></div>\r
75 <!-- <div class="headermenu"><div id="new-menu"><?php echo $navmenulist ?></div></div> -->\r
76 </div>\r
77<?php } ?>\r
78<?php if ($navigation) { // This is the navigation table with breadcrumbs ?>\r
79 <div class="navbar">\r
80 <div class="breadcrumb"><?php print_navigation("$navigation"); ?></div>\r
81 <div class="navbutton"><?php echo $button; ?></div>\r
82 </div>\r
83<?php } ?>\r
84 <!-- END OF HEADER -->\r
85<div id="content">