get_string('theme', 'default'); $site_name = $config->get_string('title'); $data_href = get_base_href(); $main_page = $config->get_string('main_page'); $contact_link = $config->get_string('contact_link'); $header_html = ""; ksort($page->html_headers); foreach($page->html_headers as $line) { $header_html .= "\t\t$line\n"; } $left_block_html = ""; $main_block_html = ""; $head_block_html = ""; $sub_block_html = ""; foreach($page->blocks as $block) { switch($block->section) { case "left": $left_block_html .= $block->get_html(true); break; case "head": $head_block_html .= "".$block->get_html(false).""; break; case "main": $main_block_html .= $block->get_html(false); break; case "subheading": $sub_block_html .= $block->body; // $this->block_to_html($block, true); break; default: print "

error: {$block->header} using an unknown section ({$block->section})"; break; } } $debug = get_debug_info(); $contact = empty($contact_link) ? "" : "
Contact"; /*$subheading = empty($page->subheading) ? "" : "

{$page->subheading}
"; $wrapper = ""; if(strlen($page->heading) > 100) { $wrapper = ' style="height: 3em; overflow: auto;"'; } */ $flash = get_prefixed_cookie("flash_message"); $flash_html = ""; if($flash) { $flash_html = "".nl2br(html_escape($flash))." [X]"; set_prefixed_cookie("flash_message", "", -1, "/"); } print << {$page->title} $header_html
$head_block_html $sub_block_html
$flash_html $main_block_html
EOD; } }