|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00003 defined('MOODLE_INTERNAL') || die(); 00004 00005 $hasheading = $PAGE->heading; 00006 $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()); 00007 $hasfooter = (empty($PAGE->layout_options['nofooter'])); 00008 00009 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT); 00010 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT); 00011 00012 $showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT); 00013 $showsidepost = $hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT); 00014 00015 $custommenu = $OUTPUT->custom_menu(); 00016 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); 00017 00018 $bodyclasses = array(); 00019 if ($showsidepre && !$showsidepost) { 00020 $bodyclasses[] = 'side-pre-only'; 00021 } else if ($showsidepost && !$showsidepre) { 00022 $bodyclasses[] = 'side-post-only'; 00023 } else if (!$showsidepost && !$showsidepre) { 00024 $bodyclasses[] = 'content-only'; 00025 } 00026 00027 if ($hascustommenu) { 00028 $bodyclasses[] = 'has_custom_menu'; 00029 } 00030 00031 /************************************************************************************************/ 00032 if (!empty($PAGE->theme->settings->frontpagelogo)) { 00033 $logourl = $PAGE->theme->settings->frontpagelogo; 00034 } else if (!empty($PAGE->theme->settings->logo)) { 00035 $logourl = $PAGE->theme->settings->logo; 00036 } else { 00037 $logourl = $OUTPUT->pix_url('logo', 'theme'); 00038 } 00039 00040 $hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe; 00041 00042 $displaylogo = !isset($PAGE->theme->settings->displaylogo) || $PAGE->theme->settings->displaylogo; 00043 /************************************************************************************************/ 00044 00045 echo $OUTPUT->doctype() ?> 00046 <html <?php echo $OUTPUT->htmlattributes() ?>> 00047 <head> 00048 <title><?php echo $PAGE->title ?></title> 00049 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" /> 00050 <?php echo $OUTPUT->standard_head_html() ?> 00051 </head> 00052 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>"> 00053 <?php echo $OUTPUT->standard_top_of_body_html(); 00054 00055 if ($hasframe) { ?> 00056 <div id="frametop"> 00057 <div id="framebottom"> 00058 <div id="frametopright"> 00059 <div> </div> 00060 </div> 00061 <div id="frameleft"> 00062 <div id="frameright"> 00063 <div id="wrapper"> 00064 <?php } ?> 00065 00066 <!-- begin of page-header --> 00067 <?php if ($hasheading) { ?> 00068 <div id="page-header"> 00069 <?php if ($displaylogo) { ?> 00070 <div id="headerlogo"> 00071 <img src="<?php echo $logourl ?>" alt="Custom logo here" /> 00072 </div> 00073 <?php } else { ?> 00074 <h1 class="headerheading"><?php echo $PAGE->heading ?></h1> 00075 <?php } ?> 00076 00077 <div class="headermenu"> 00078 <?php 00079 echo $OUTPUT->login_info(); 00080 if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) { 00081 echo $OUTPUT->lang_menu(); 00082 } 00083 echo $PAGE->headingmenu; 00084 ?> 00085 </div> 00086 </div> 00087 <?php } ?> 00088 <!-- end of page-header --> 00089 00090 <!-- begin of custom menu --> 00091 <?php if ($hascustommenu) { ?> 00092 <div id="custommenu"><?php echo $custommenu; ?></div> 00093 <?php } ?> 00094 <!-- end of custom menu --> 00095 00096 <!-- begin of navigation bar --> 00097 <?php if ($hasnavbar) { ?> 00098 <div class="navbar clearfix"> 00099 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div> 00100 <div class="navbutton"><?php echo $PAGE->button; ?></div> 00101 </div> 00102 <?php } ?> 00103 <!-- end of navigation bar --> 00104 00105 <!-- start of moodle content --> 00106 <div id="page-content"> 00107 <div id="region-main-box"> 00108 <div id="region-post-box"> 00109 00110 <!-- main mandatory content of the moodle page --> 00111 <div id="region-main-wrap"> 00112 <div id="region-main"> 00113 <div class="region-content"> 00114 <?php echo $OUTPUT->main_content() ?> 00115 </div> 00116 </div> 00117 </div> 00118 <!-- end of main mandatory content of the moodle page --> 00119 00120 00121 <!-- left column block - diplayed only if... --> 00122 <?php if ($hassidepre) { ?> 00123 <div id="region-pre" class="block-region"> 00124 <div class="region-content"> 00125 <?php echo $OUTPUT->blocks_for_region('side-pre') ?> 00126 </div> 00127 </div> 00128 <?php } ?> 00129 <!-- end of left column block - diplayed only if... --> 00130 00131 <!-- right column block - diplayed only if... --> 00132 <?php if ($hassidepost) { ?> 00133 <div id="region-post" class="block-region"> 00134 <div class="region-content"> 00135 <?php echo $OUTPUT->blocks_for_region('side-post') ?> 00136 </div> 00137 </div> 00138 <?php } ?> 00139 <!-- end of right column block - diplayed only if... --> 00140 00141 </div> 00142 </div> 00143 </div> 00144 <!-- end of moodle content --> 00145 00146 <div class="clearfix"></div> 00147 00148 <?php if ($hasframe) { ?> 00149 </div> <!-- end of wrapper --> 00150 </div> <!-- </frameright> --> 00151 </div> <!-- </frameleft> --> 00152 <div id="framebottomright"> 00153 <div> </div> 00154 </div> 00155 </div> <!-- </framebottom> --> 00156 </div> <!-- </frametop> --> 00157 00158 <?php } 00159 00160 if ($hasfooter) { 00161 if ($hasframe) { ?> 00162 00163 <!-- START OF FOOTER --> 00164 <div id="page-footer"> 00165 <?php if (!empty($PAGE->theme->settings->footnote)) { ?> 00166 <div id="footerframetop"> 00167 <div id="footerframebottom"> 00168 <div id="footerframetopright"> 00169 <div> </div> 00170 </div> 00171 <div id="footerframeleft"> 00172 <div id="footerframeright"> 00173 <!-- the content to show --> 00174 <div id="footerwrapper"> 00175 <?php echo $PAGE->theme->settings->footnote; ?> 00176 </div> <!-- end of footerwrapper --> 00177 </div> 00178 </div> <!-- </footerframeright></footerframeleft> --> 00179 <div id="footerframebottomright"> 00180 <div> </div> 00181 </div> 00182 </div> 00183 </div> <!-- </footerframebottom></footerframetop> --> 00184 <?php } 00185 //one more div is waiting to be closed 00186 00187 } else { ?> 00188 00189 <!-- START OF FOOTER --> 00190 <div id="page-footer" class="noframefooter"> 00191 <?php if (!empty($PAGE->theme->settings->footnote)) { ?> 00192 <div id="page-footer-content"> 00193 00194 <!-- the content to show --> 00195 <div id="footerwrapper"> 00196 <?php echo $PAGE->theme->settings->footnote; ?> 00197 </div> <!-- end of footerwrapper --> 00198 00199 </div> <!-- end of page-footer_noframe-content --> 00200 <?php } 00201 //one more div is waiting to be closed 00202 } ?> 00203 <div class="moodledocsleft"> 00204 <?php 00205 echo $OUTPUT->login_info(); 00206 if ($PAGE->theme->settings->creditstomoodleorg) { 00207 echo $OUTPUT->home_link(); 00208 } 00209 echo $OUTPUT->standard_footer_html(); 00210 ?> 00211 </div> 00212 <div class="moodledocs"> 00213 <?php echo page_doc_link(get_string('moodledocslink')); ?> 00214 </div> 00215 </div> <!-- end of page-footer or page-footer_noframe --> 00216 <?php //the waiting div has been closed 00217 } 00218 echo $OUTPUT->standard_end_of_body_html(); ?> 00219 </body> 00220 </html>