|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00003 $hasheading = ($PAGE->heading); 00004 $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()); 00005 $hasfooter = (empty($PAGE->layout_options['nofooter'])); 00006 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT); 00007 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT); 00008 00009 $custommenu = $OUTPUT->custom_menu(); 00010 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); 00011 00012 splash_check_colourswitch(); 00013 splash_initialise_colourswitcher($PAGE); 00014 00015 $bodyclasses = array(); 00016 $bodyclasses[] = 'splash-'.splash_get_colour(); 00017 if ($hassidepre && !$hassidepost) { 00018 $bodyclasses[] = 'side-pre-only'; 00019 } else if ($hassidepost && !$hassidepre) { 00020 $bodyclasses[] = 'side-post-only'; 00021 } else if (!$hassidepost && !$hassidepre) { 00022 $bodyclasses[] = 'content-only'; 00023 } 00024 00025 $haslogo = (!empty($PAGE->theme->settings->logo)); 00026 $hasfootnote = (!empty($PAGE->theme->settings->footnote)); 00027 $hidetagline = (!empty($PAGE->theme->settings->hide_tagline) && $PAGE->theme->settings->hide_tagline == 1); 00028 00029 if (!empty($PAGE->theme->settings->tagline)) { 00030 $tagline = $PAGE->theme->settings->tagline; 00031 } else { 00032 $tagline = get_string('defaulttagline', 'theme_splash'); 00033 } 00034 00035 echo $OUTPUT->doctype() ?> 00036 <html <?php echo $OUTPUT->htmlattributes() ?>> 00037 <head> 00038 <title><?php echo $PAGE->title ?></title> 00039 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" /> 00040 <meta name="description" content="<?php p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" /> 00041 <?php echo $OUTPUT->standard_head_html() ?> 00042 </head> 00043 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>"> 00044 <?php echo $OUTPUT->standard_top_of_body_html() ?> 00045 <div id="page"> 00046 <?php if ($hasheading || $hasnavbar) { ?> 00047 <div id="page-header"> 00048 <div id="page-header-wrapper" class="wrapper clearfix"> 00049 <?php if ($hasheading) { ?> 00050 <div id="headermenu"> 00051 <?php if (isloggedin()) { 00052 echo html_writer::start_tag('div', array('id'=>'userdetails')); 00053 echo html_writer::tag('h1', get_string('usergreeting', 'theme_splash', $USER->firstname)); 00054 echo html_writer::start_tag('p', array('class'=>'prolog')); 00055 echo html_writer::link(new moodle_url('/user/profile.php', array('id'=>$USER->id)), get_string('myprofile')).' | '; 00056 echo html_writer::link(new moodle_url('/login/logout.php', array('sesskey'=>sesskey())), get_string('logout')); 00057 echo html_writer::end_tag('p'); 00058 echo html_writer::end_tag('div'); 00059 echo html_writer::tag('div', $OUTPUT->user_picture($USER, array('size'=>55)), array('class'=>'userimg')); 00060 } else { 00061 echo html_writer::start_tag('div', array('id'=>'userdetails_loggedout')); 00062 $loginlink = html_writer::link(new moodle_url('/login/'), get_string('loginhere', 'theme_splash')); 00063 echo html_writer::tag('h1', get_string('welcome', 'theme_splash', $loginlink)); 00064 echo html_writer::end_tag('div');; 00065 } ?> 00066 <div class="clearer"></div> 00067 <div id="colourswitcher"> 00068 <ul> 00069 <li><img src="<?php echo $OUTPUT->pix_url('colour', 'theme'); ?>" alt="colour" /></li> 00070 <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'red')); ?>" class="styleswitch colour-red"><img src="<?php echo $OUTPUT->pix_url('red-theme2', 'theme'); ?>" alt="red" /></a></li> 00071 <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'green')); ?>" class="styleswitch colour-green"><img src="<?php echo $OUTPUT->pix_url('green-theme2', 'theme'); ?>" alt="green" /></a></li> 00072 <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'blue')); ?>" class="styleswitch colour-blue"><img src="<?php echo $OUTPUT->pix_url('blue-theme2', 'theme'); ?>" alt="blue" /></a></li> 00073 <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'orange')); ?>" class="styleswitch colour-orange"><img src="<?php echo $OUTPUT->pix_url('orange-theme2', 'theme'); ?>" alt="orange" /></a></li> 00074 </ul> 00075 </div> 00076 <?php echo $OUTPUT->lang_menu();?> 00077 </div> 00078 <div id="logobox"> 00079 <?php if ($haslogo) { 00080 echo html_writer::link(new moodle_url('/'), "<img src='".$PAGE->theme->settings->logo."' alt='logo' />"); 00081 } else { 00082 echo html_writer::link(new moodle_url('/'), $PAGE->heading, array('class'=>'nologoimage')); 00083 } ?> 00084 <?php if (!$hidetagline) { ?> 00085 <h4><?php echo $tagline ?></h4> 00086 <?php } ?> 00087 </div> 00088 <div class="clearer"></div> 00089 <?php if ($haslogo) { ?> 00090 <h4 class="headermain inside"> </h4> 00091 <?php } else { ?> 00092 <h4 class="headermain inside"><?php echo $PAGE->heading ?></h4> 00093 <?php } ?> 00094 <?php } // End of if ($hasheading)?> 00095 <!-- DROP DOWN MENU --> 00096 <div class="clearer"></div> 00097 <div id="dropdownmenu"> 00098 <?php if ($hascustommenu) { ?> 00099 <div id="custommenu"><?php echo $custommenu; ?></div> 00100 <?php } ?> 00101 <div class="navbar"> 00102 <div class="wrapper clearfix"> 00103 <div class="breadcrumb"><?php if ($hasnavbar) echo $OUTPUT->navbar(); ?></div> 00104 <div class="navbutton"> <?php echo $PAGE->button; ?></div> 00105 </div> 00106 </div> 00107 </div> 00108 <!-- END DROP DOWN MENU --> 00109 </div> 00110 </div> 00111 <?php } // if ($hasheading || $hasnavbar) ?> 00112 <!-- END OF HEADER --> 00113 <!-- START OF CONTENT --> 00114 <div id="page-content"> 00115 <div id="region-main-box"> 00116 <div id="region-post-box"> 00117 <div id="region-main-wrap"> 00118 <div id="region-main"> 00119 <div class="region-content"> 00120 <?php echo $OUTPUT->main_content() ?> 00121 </div> 00122 </div> 00123 </div> 00124 00125 <?php if ($hassidepre) { ?> 00126 <div id="region-pre" class="block-region"> 00127 <div class="region-content"> 00128 <?php echo $OUTPUT->blocks_for_region('side-pre') ?> 00129 </div> 00130 </div> 00131 <?php } ?> 00132 00133 <?php if ($hassidepost) { ?> 00134 <div id="region-post" class="block-region"> 00135 <div class="region-content"> 00136 <?php echo $OUTPUT->blocks_for_region('side-post') ?> 00137 </div> 00138 </div> 00139 <?php } ?> 00140 </div> 00141 </div> 00142 </div> 00143 <!-- END OF CONTENT --> 00144 <div class="clearfix"></div> 00145 <!-- END OF #Page --> 00146 </div> 00147 <!-- START OF FOOTER --> 00148 <?php if ($hasfooter) { ?> 00149 <div id="page-footer"> 00150 <div id="footer-wrapper"> 00151 <?php if ($hasfootnote) { ?> 00152 <div id="footnote"><?php echo $PAGE->theme->settings->footnote; ?></div> 00153 <?php } ?> 00154 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p> 00155 <?php 00156 echo $OUTPUT->login_info(); 00157 echo $OUTPUT->home_link(); 00158 echo $OUTPUT->standard_footer_html(); 00159 ?> 00160 </div> 00161 </div> 00162 <?php } ?> 00163 <?php echo $OUTPUT->standard_end_of_body_html() ?> 00164 </body> 00165 </html>