add template files and compose file, fix syntax errors in template
This commit is contained in:
@@ -1,11 +1,32 @@
|
||||
<?php require('template/header.phtml') ?>
|
||||
|
||||
<h3>Welcome to the web-site </h3>
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<p><?php echo $view->dbMessage; ?></p>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<p>Current script <?php echo $_SERVER["PHP_SELF"]; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>A template for web-site development using the <i>Model-View-Controller</i> design pattern and <a href="http://www.getbootstrap.com/css"><i>Bootstrap</i></a>.</h3>
|
||||
<p>The <i>Views/template</i> directory contains a <i>header.phtl</i> and a <i>footer.phtml</i> which should be included on every new page generated.
|
||||
To add additional pages just edit the file <i>header.phtml</i> to add the extra link and then add a new <i>Controller (pageN.php)</i> and a new <i>View (pageN.phtml)</i>, for each page required.</p>
|
||||
<p>The <i>Model</i> code files are placed in the <i>Models</i> directory.</p>
|
||||
<p>Do not change any of the css files in the <i>css</> directory!<p>
|
||||
<div class="row">
|
||||
<table class="table table-bordered">
|
||||
<thead> <tr> <th>Facility ID</th> <th>Title</th> <th>Category</th> <th>Description</th> <th>Address</th> <th>Postcode</th> <th>Lat/Long</th> <th>Contributor</th> </tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($view->facilityDataSet as $facilityData) {
|
||||
echo '<tr> <td>' . $facilityData->getId() .
|
||||
'</td> <td>' . $facilityData->getTitle() .
|
||||
'</td> <td>' . $facilityData->getCategory() .
|
||||
'</td> <td>' . $facilityData->getDescription() .
|
||||
'</td> <td>' . $facilityData->getHouseNumber() . " " . $facilityData->getStreetName() . " " . $facilityData->getCounty() . " " . $facilityData->getTown() .
|
||||
'</td> <td>' . $facilityData->getPostcode() .
|
||||
'</td> <td>' . $facilityData->getLatitude() . " " . $facilityData->getLongitude() .
|
||||
'</td> <td>' . $facilityData->getContributor() .
|
||||
'</td> </td> </tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php require('template/footer.phtml') ?>
|
||||
|
||||
<?php require('template/footer.phtml') ?>
|
Reference in New Issue
Block a user