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