All pastes #1656303 Raw Edit

Stuff

public text v1 · immutable
#1656303 ·published 2009-11-04 08:38 UTC
rendered paste body
<?php
class ui_page {
  var $main_path_;
  var $title_;
  var $body_id_;
  
  function ui_page($title, $body = '') {
    $this->main_path_ = 'tournament';
    $this->title_     = $title;
    $this->body_id_   = $body;
  }

  function formal_html() {
?><?php header('Content-type: text/html;charset=utf-8');
/*<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">*/
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo htmlspecialchars($this->title_); ?></title>
<link rel="icon" type="image/x-icon" href="/<?php echo htmlspecialchars($this->main_path_); ?>/resources/favicon.ico" />
<link rel="shortcut icon" type="image/x-icon" href="/<?php echo htmlspecialchars($this->main_path_); ?>/resources/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/<?php echo htmlspecialchars($this->main_path_); ?>/resources/theme.css" charset="utf-8" />
</head>
<?php
  }
  
  function body_start() {
    if (isset($this->body_id_) && $this->body_id_ !== '')
      echo '<body id="' . $this->body_id_ . '">';
    else
      echo '<body>';
  }

  function header() {
?><div id="body_helper">
<div id="header">
</div><div class="clear"></div>
<div id="content">
<?php
  }

  function footer() {
?></div>
<div class="clear"></div>
<div id="footer">
  <span><a rel="license" href="<?php /*http://creativecommons.org/licenses/by-sa/3.0/*/ ?>"><img alt="Creative Commons License" src="/<?php echo htmlspecialchars($this->main_path_); ?>/resources/cc.png" /></a></span>
  <span class="note">Saya 2009</span>
</div>
</div>
<?php
  }

  function body_end() {
?></body>
</html>
<?php
  }

  function start() {
    $this->body_start();
    $this->header();
  }

  function end() {
    $this->footer();
    $this->body_end();
  }

} ?>