|
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 = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT)); 00007 $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT)); 00008 $haslogininfo = (empty($PAGE->layout_options['nologininfo'])); 00009 00010 $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT)); 00011 $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT)); 00012 00013 $custommenu = $OUTPUT->custom_menu(); 00014 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); 00015 00016 $bodyclasses = array(); 00017 if ($showsidepre && !$showsidepost) { 00018 $bodyclasses[] = 'side-pre-only'; 00019 } else if ($showsidepost && !$showsidepre) { 00020 $bodyclasses[] = 'side-post-only'; 00021 } else if (!$showsidepost && !$showsidepre) { 00022 $bodyclasses[] = 'content-only'; 00023 } 00024 if ($hascustommenu) { 00025 $bodyclasses[] = 'has_custom_menu'; 00026 } 00027 00028 echo $OUTPUT->doctype() ?> 00029 <html <?php echo $OUTPUT->htmlattributes() ?>> 00030 <head> 00031 <title><?php echo $PAGE->title ?></title> 00032 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" /> 00033 <?php echo $OUTPUT->standard_head_html() ?> 00034 </head> 00035 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>"> 00036 <?php echo $OUTPUT->standard_top_of_body_html() ?> 00037 <div id="page"> 00038 <?php if ($hasheading || $hasnavbar) { ?> 00039 <div id="page-header"> 00040 <?php if ($hasheading) { ?> 00041 <h1 class="headermain"><?php echo $PAGE->heading ?></h1> 00042 <div class="headermenu"><?php 00043 if ($haslogininfo) { 00044 echo $OUTPUT->login_info(); 00045 } 00046 if (!empty($PAGE->layout_options['langmenu'])) { 00047 echo $OUTPUT->lang_menu(); 00048 } 00049 echo $PAGE->headingmenu 00050 ?></div><?php } ?> 00051 <?php if ($hascustommenu) { ?> 00052 <div id="custommenu"><?php echo $custommenu; ?></div> 00053 <?php } ?> 00054 <?php if ($hasnavbar) { ?> 00055 <div class="navbar clearfix"> 00056 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div> 00057 <div class="navbutton"> <?php echo $PAGE->button; ?></div> 00058 </div> 00059 <?php } ?> 00060 </div> 00061 <?php } ?> 00062 <!-- END OF HEADER --> 00063 00064 <div id="page-content"> 00065 <div id="region-main-box"> 00066 <div id="region-post-box"> 00067 00068 <div id="region-main-wrap"> 00069 <div id="region-main"> 00070 <div class="region-content"> 00071 <?php echo $OUTPUT->main_content() ?> 00072 </div> 00073 </div> 00074 </div> 00075 00076 <?php if ($hassidepre) { ?> 00077 <div id="region-pre" class="block-region"> 00078 <div class="region-content"> 00079 <?php echo $OUTPUT->blocks_for_region('side-pre') ?> 00080 </div> 00081 </div> 00082 <?php } ?> 00083 00084 <?php if ($hassidepost) { ?> 00085 <div id="region-post" class="block-region"> 00086 <div class="region-content"> 00087 <?php echo $OUTPUT->blocks_for_region('side-post') ?> 00088 </div> 00089 </div> 00090 <?php } ?> 00091 </div> 00092 </div> 00093 </div> 00094 00095 <!-- START OF FOOTER --> 00096 <?php if ($hasfooter) { ?> 00097 <div id="page-footer" class="clearfix"> 00098 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p> 00099 <?php 00100 echo $OUTPUT->login_info(); 00101 echo $OUTPUT->home_link(); 00102 echo $OUTPUT->standard_footer_html(); 00103 ?> 00104 </div> 00105 <?php } ?> 00106 </div> 00107 <?php echo $OUTPUT->standard_end_of_body_html() ?> 00108 </body> 00109 </html>