Location: PHPKode > projects > Charray's CMS > ccms/template/default.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--
// Charray's CMS (CCMS) Version 0.9.1
//
// Copyright (c) 2007, Kinson Chan
// charray[at]gmail.com / kchan[at]cs.hku.hk
// All rights reserved.
//
// Please refer to LICENSE.txt coming with this package for
// terms and conditions for redistribution and reuse.
-->

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?php echo htmlentities($ccms_title, ENT_COMPAT, 'UTF-8'); ?></title>
    <style type="text/css">
      html {
        height: 100%;
      }

      body {
        margin-top: 0px;
        margin-bottom: 0px;
        margin-left: 0px;
        margin-right: 0px;
        background-color: #808080;
        width: 100%;
        height: 100%;
      }

      img {
        border: none;
      }

      h1 {
        font-size: 24px;
        color: #0000C0;
        border-bottom: 1px solid #8080C0;
        font-family: sans-serif, helvetica, arial, verdana;
      }

      h2 {
        font-size: 20px;
        color: #4040C0;
        border-bottom: 1px solid #8080C0;
        font-family: sans-serif, verdana, arial, helvetica;
      }

      h3 {
        font-size: 18px;
        color: #8080C0;
        border-bottom: 1px solid #8080C0;
        font-family: sans-serif, verdana, arial, helvetica;
      }

      h4 {
        font-size: 16px;
        color: #8080C0;
        border-bottom: 1px solid #8080C0;
        font-family: sans-serif, verdana, arial, helvetica;
      }

      h5 {
        font-size: 14px;
        color: #8080C0;
        font-family: sans-serif, verdana, arial, helvetica;
      }

      h6 {
        font-size: 12px;
        color: #8080C0;
        font-family: sans-serif, verdana, arial, helvetica;
      }

      a {
        text-decoration: none;
        color: #0000FF;
      }

      a:visited {
        color: #0000C0;
      }

      p {
        text-align: justify;
        font-family: times;
      }

      table {
        border: 1px solid black;
      }

      thead {
        border: 1px solid black;
        background-color: #C0C0FF;
      }

      td, th {
        padding: 5px;
	font-family: times;
      }

      .ccms_overall {
        margin: 10px;
        width: 780px;
        height: 100%;
        text-align: left;
        border-collapse: collapse;
        background-color: #FFFFFF;
      }

      .ccms_header {
        background-image: url("<?php echo $ccms_images_url; ?>/banner.png");
        background-repeat: no-repeat;
        height: 60px;
        padding: 0px;
      }

      .ccms_left {
        vertical-align: top;
        background-color: #CCCCCC;
        width: 150px;
        padding: 0px;
      }

      .ccms_right {
        vertical-align: top;
        background-color: #CCCCCC;
        width: 150px;
        padding: 0px;
      }

      .ccms_content {
        font-size: 12pt;
        min-height: 100%;
        vertical-align: top;
        padding: 0px 5px;
      }

      .ccms_top {
        vertical-align: top;
        width: 480px;
        height: 1px;
        padding: 0px;
      }

      .ccms_bottom {
        vertical-align: top;
        width: 480px;
        height: 10px;
        padding: 0px;
      }

      .ccms_module {
        font-size: 10pt;
      }

      .ccms_module_title {
        background-color: #8080FF;
        padding: 4px;
        text-align: center;
        color: #FFFFFF;
        font-family: sans-serif, verdana, arial, helvetica;
      }

      .ccms_module_content {
        font-family: times;
      }
    </style>
  </head>

  <body>
    <table class="ccms_overall" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="3" class="ccms_header">
        </td>
      </tr>

      <tr>
        <td rowspan="3" class="ccms_left">
<?php print_modules($ccms_left_content); ?>

        </td>

        <td class="ccms_top">
<?php print_modules($ccms_top_content); ?>
        </td>

        <td rowspan="3" class="ccms_right">
<?php print_modules($ccms_right_content); ?>

        </td>
      </tr>

      <tr>
        <td class="ccms_content">
<?php echo $ccms_content; ?>
        </td>
      </tr>
      
      <tr>
        <td class="ccms_bottom">
<?php print_modules($ccms_bottom_content); ?>

        </td>
      </tr>
    </table>
<!-- Please try your best to keep the following. -->
<p style="text-align: center; font-size: 9pt;" >Powered by
<a href="http://sourceforge.net/projects/charray-cms">Charray's CMS</a>.</p>
  </body>
</html>

<?php

function print_modules($content) {
        foreach ($content as $part) {
        	if (is_array($part)) {
        		echo "<div class=\"ccms_module\">\n";
        		echo "<div class=\"ccms_module_title\">\n";
        		echo "$part[title]</div>\n";
        		echo "<div class=\"ccms_module_content\">\n";
        		echo "$part[content]</div>\n";
        		echo "</div>";
        	} else if ($part) {
        		echo "<div class=\"ccms_module\">$part</div>\n";
        	}
        }
}

?>
Return current item: Charray's CMS