PHP Classes

File: demo/templates/home.tpl.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   H2OTpl   demo/templates/home.tpl.php   Download  
File: demo/templates/home.tpl.php
Role: Auxiliary script
Content type: text/plain
Description: Example script
Class: H2OTpl
Process and output PHP template scripts
Author: By
Last change: Update of demo/templates/home.tpl.php
Date: 8 months ago
Size: 752 bytes
 

Contents

Class file image Download
<? include('inc/header.tpl.php') ?>

<h1><?= strtoupper($this->sH1) ?></h1>
<p><strong><?= $this->sDesc ?></strong></p>
<p>&nbsp;</p>

<? if(is_array($this->aBooks)): ?>

    <!-- A table of some books. -->
    <table>
        <tr>
            <th>Author</th>
            <th>Title</th>
        </tr>

        <? foreach($this->aBooks as $sKey => $sVal): ?>
<tr>
                <td><?= $this->escape($sVal['author']) ?></td>
                <td><?= $this->escape($sVal['title']) ?></td>
            </tr>
        <? endforeach ?>

    </table>

    <? else: ?>

        <p>There are no books to display.</p>

    <? endif ?>

    <p>&nbsp;</p>
    <div id="html5" title="Validated for HTML5"></div>

<?php include('inc/footer.tpl.php') ?>