|
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->logo)) { 00033 $logourl = $PAGE->theme->settings->logo; 00034 } else { 00035 $logourl = $OUTPUT->pix_url('logo_small', 'theme'); 00036 } 00037 00038 $hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe; 00039 00040 $displaylogo = !isset($PAGE->theme->settings->displaylogo) || $PAGE->theme->settings->displaylogo; 00041 /************************************************************************************************/ 00042 00043 echo $OUTPUT->doctype() ?> 00044 <html <?php echo $OUTPUT->htmlattributes() ?>> 00045 <head> 00046 <title><?php echo $PAGE->title ?></title> 00047 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" /> 00048 <?php echo $OUTPUT->standard_head_html() ?> 00049 </head> 00050 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>"> 00051 <?php echo $OUTPUT->standard_top_of_body_html(); 00052 00053 if ($hasframe) { ?> 00054 <div id="frametop"> 00055 <div id="framebottom"> 00056 <div id="frametopright"> 00057 <div> </div> 00058 </div> 00059 <div id="frameleft"> 00060 <div id="frameright"> 00061 <div id="wrapper"> 00062 <?php } ?> 00063 00064 <!-- begin of page-header --> 00065 <?php if ($hasheading) { ?> 00066 <div id="page-header"> 00067 <?php if ($displaylogo) { ?> 00068 <div id="headerlogo"> 00069 <img src="<?php echo $logourl ?>" alt="Custom logo here" /> 00070 </div> 00071 <?php } else { ?> 00072 <h1 class="headerheading"><?php echo $PAGE->heading ?></h1> 00073 <?php } ?> 00074 00075 <div class="headermenu"> 00076 <?php 00077 echo $OUTPUT->login_info(); 00078 if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) { 00079 echo $OUTPUT->lang_menu(); 00080 } 00081 echo $PAGE->headingmenu; 00082 ?> 00083 </div> 00084 </div> 00085 <?php } ?> 00086 <!-- end of page-header --> 00087 00088 <!-- begin of custom menu --> 00089 <?php if ($hascustommenu) { ?> 00090 <div id="custommenu"><?php echo $custommenu; ?></div> 00091 <?php } ?> 00092 <!-- end of custom menu --> 00093 00094 <!-- begin of navigation bar --> 00095 <?php if ($hasnavbar) { ?> 00096 <div class="navbar clearfix"> 00097 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div> 00098 <div class="navbutton"><?php echo $PAGE->button; ?></div> 00099 </div> 00100 <?php } ?> 00101 <!-- end of navigation bar --> 00102 00103 <!-- start of moodle content --> 00104 <div id="page-content"> 00105 <div id="region-main-box"> 00106 <div id="region-post-box"> 00107 00108 <!-- main mandatory content of the moodle page --> 00109 <div id="region-main-wrap"> 00110 <div id="region-main"> 00111 <div class="region-content"> 00112 <?php echo $OUTPUT->main_content() ?> 00113 </div> 00114 </div> 00115 </div> 00116 <!-- end of main mandatory content of the moodle page --> 00117 00118 00119 <!-- left column block - diplayed only if... --> 00120 <?php if ($hassidepre) { ?> 00121 <div id="region-pre" class="block-region"> 00122 <div class="region-content"> 00123 <?php echo $OUTPUT->blocks_for_region('side-pre') ?> 00124 </div> 00125 </div> 00126 <?php } ?> 00127 <!-- end of left column block - diplayed only if... --> 00128 00129 <!-- right column block - diplayed only if... --> 00130 <?php if ($hassidepost) { ?> 00131 <div id="region-post" class="block-region"> 00132 <div class="region-content"> 00133 <?php echo $OUTPUT->blocks_for_region('side-post') ?> 00134 </div> 00135 </div> 00136 <?php } ?> 00137 <!-- end of right column block - diplayed only if... --> 00138 00139 </div> 00140 </div> 00141 </div> 00142 <!-- end of moodle content --> 00143 00144 <div class="clearfix"></div> 00145 00146 <?php if ($hasframe) { ?> 00147 </div> <!-- end of wrapper --> 00148 </div> <!-- </frameright> --> 00149 </div> <!-- </frameleft> --> 00150 <div id="framebottomright"> 00151 <div> </div> 00152 </div> 00153 </div> <!-- </framebottom> --> 00154 </div> <!-- </frametop> --> 00155 00156 <?php } 00157 00158 if ($hasfooter) { 00159 if ($hasframe) { ?> 00160 00161 <!-- START OF FOOTER --> 00162 <div id="page-footer"> 00163 <?php if (!empty($PAGE->theme->settings->footnote)) { ?> 00164 <div id="footerframetop"> 00165 <div id="footerframebottom"> 00166 <div id="footerframetopright"> 00167 <div> </div> 00168 </div> 00169 <div id="footerframeleft"> 00170 <div id="footerframeright"> 00171 <!-- the content to show --> 00172 <div id="footerwrapper"> 00173 <?php echo $PAGE->theme->settings->footnote; ?> 00174 </div> <!-- end of footerwrapper --> 00175 </div> 00176 </div> <!-- </footerframeright></footerframeleft> --> 00177 <div id="footerframebottomright"> 00178 <div> </div> 00179 </div> 00180 </div> 00181 </div> <!-- </footerframebottom></footerframetop> --> 00182 <?php } 00183 //one more div is waiting to be closed 00184 00185 } else { ?> 00186 00187 <!-- START OF FOOTER --> 00188 <div id="page-footer" class="noframefooter"> 00189 <?php if (!empty($PAGE->theme->settings->footnote)) { ?> 00190 <div id="page-footer-content"> 00191 <!-- the content to show --> 00192 <div id="footerwrapper"> 00193 <?php echo $PAGE->theme->settings->footnote; ?> 00194 </div> <!-- end of footerwrapper --> 00195 </div> <!-- end of page-footer_noframe-content --> 00196 <?php } 00197 //one more div is waiting to be closed 00198 } ?> 00199 <div class="moodledocsleft"> 00200 <?php 00201 echo $OUTPUT->login_info(); 00202 //echo $OUTPUT->home_link(); 00203 ?> 00204 <div class="moodledocs"> 00205 <?php echo page_doc_link(get_string('moodledocslink')); ?> 00206 </div> 00207 <?php 00208 if ($PAGE->theme->settings->creditstomoodleorg == 2) { 00209 // can not use $OUTPUT->home_link() here because whether $OUTPUT->page->pagetype != 'site-index' 00210 // the output of the function is not the classic nice moodle logo $this->pix_url('moodlelogo') 00211 ?> 00212 <div class="sitelink"> 00213 <a title="Moodle" href="http://moodle.org/"> 00214 <img style="width:100px;height:30px" src="<?php echo $this->pix_url('moodlelogo') ?>" alt="moodlelogo" /> 00215 </a> 00216 </div> 00217 <?php 00218 } 00219 ?> 00220 <?php 00221 echo $OUTPUT->standard_footer_html(); 00222 ?> 00223 </div> 00224 </div> <!-- end of page-footer or page-footer_noframe --> 00225 <?php //the waiting div has been closed 00226 } 00227 echo $OUTPUT->standard_end_of_body_html(); ?> 00228 </body> 00229 </html>