Example #1
0
    /**
     * Woohoo! This serializes your entire CS198 page into a string.
     *
     * Only call this when you've added everything you want to add to your page.
     * Go ahead and echo it!
     */
    public function fullPageHTML()
    {
        // HEAD with TITLE, JAVASCRIPT
        $text = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">';
        $text .= "\n<html>\n\t<head>\n\t\t<title>";
        $text .= $this->pageTitle ? $this->pageTitle . " | BAWK" : "BAWK";
        $text .= "</title>\n";
        $text .= render_required_js();
        $text .= render_required_css();
        if (Session::isMobile()) {
            $text .= <<<EOT
        <meta name="viewport"
          content="width=device-width,
          minimum-scale=1.0, maximum-scale=1.0" />
EOT;
        }
        // BREADCRUMB/NAVIGATION
        $navigation = $this->getNavigationHTML();
        $text .= "\t</head>\n\t<body>";
        $text .= "<link rel=\"shortcut icon\" href=\"images/site/favicon.png\" />";
        $text .= "<link rel=\"apple-touch-icon\" href=\"images/site/touch-icon.png\" />";
        $text .= "<table border=0 cellspacing=0 cellpadding=0 width=100%>";
        $text .= <<<EOT
<tr class=header><td class=headerside></td>
<td class=header><div class="navigation">{$navigation}</div></td>
<td class=headerside></td></tr>
<tr><td class=bodyside>&nbsp;</td><td class=body>
EOT;
        $text .= "<div class=notifications>";
        $text .= render_all_notifications();
        // NOTIFICATIONS
        $text .= "</div>";
        $text .= parent::fullHTML(1);
        // ELEMENTS
        // FOOTER
        $year = date('Y');
        $text .= <<<EOT
</td><td class=bodyside>&nbsp;</td></tr>
EOT;
        $text .= <<<EOT
<tr><td colspan=3 class=footer>&nbsp;<br />&nbsp;<br />
  &copy; {$year}. All Rights Reserved.<br />&nbsp;
</td></tr>
EOT;
        $text .= <<<EOT
</table>
</body>
</html>
EOT;
        return $text;
    }
Example #2
0
 protected function html()
 {
     $text = "<form method=\"" . $this->method . "\" action=\"" . $this->action . "\"" . $this->encoding . " name=\"" . $this->name . "\" onSubmit=\"return validate(document." . $this->name . ")\" >";
     $text .= parent::html();
     return $text . "</form>";
 }