get_string('theme'); $base_href = $config->get_string('base_href'); $data_href = $config->get_string('data_href'); $contact_link = $config->get_string('contact_link'); $version = $config->get_string('version'); $header_html = ""; foreach($page->headers as $line) { $header_html .= "\t\t$line\n"; } $left_block_html = ""; $main_block_html = ""; foreach($page->blocks as $block) { switch($block->section) { case "left": $left_block_html .= $this->block_to_html($block, true); break; case "main": $main_block_html .= $this->block_to_html($block, false); break; default: print "

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

{$this->subheading}
"; } print << {$page->title} $header_html

{$page->heading}

$subheading
$main_block_html
EOD; } function block_to_html($block, $hidable=false) { $h = $block->header; $b = $block->body; $html = ""; if($hidable) { $i = str_replace(' ', '_', $h); if(!is_null($h)) $html .= "\n

$h

\n"; if(!is_null($b)) $html .= "
$b
\n"; } else { if(!is_null($h)) $html .= "\n

$h

\n"; if(!is_null($b)) $html .= "
$b
\n"; } return $html; } } ?>