PHP Classes

File: fwphp/glomodul/z_examples/book_video/auction_wrox24h_30/content/about.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/glomodul/z_examples/book_video/auction_wrox24h_30/content/about.php  >  Download  
File: fwphp/glomodul/z_examples/book_video/auction_wrox24h_30/content/about.php
Role: Example script
Content type: text/plain
Description: Example script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change:
Date: 3 months ago
Size: 1,334 bytes


Class file image Download
 * about.php
 * Content for About us page
 * @version 1.2 2011-02-03
 * @package Smithside Auctions
 * @copyright Copyright (c) 2011 Smithside Auctions
 * @license GNU General Public License
 * @since Since Release 1.0
// Get the contact information
$items = Contact::getContacts();
$accessLevel = Contact::accessLevel();
<h1>About Us
  <?php if ($accessLevel == 'Admin') : ?>
<a class="button" href="index.php?content=contactmaint&id=0">Add</a>
  <?php endif; ?>
<p>We are all happy to be a part of this. Please contact any of us with questions.</p>

<ul class="ulfancy">
  <?php foreach ($items as $i=>$item) : ?>
<li class="row<?php echo $i % 2; ?>">
      <h2><?php echo htmlspecialchars($item->name()); ?>
<?php if ($accessLevel == 'Admin') : ?>
<a class="button"
          href="index.php?content=contactdelete&id=<?php echo $item->getId(); ?>">Delete</a>
        <a class="button"
          href="index.php?content=contactmaint&id=<?php echo $item->getId(); ?>">Edit</a>
      <?php endif; ?>
      <p>Position: <?php echo htmlspecialchars($item->getPosition()); ?><br />
      <?php echo htmlspecialchars($item->getEmail()); ?><br />
      Phone: <?php echo htmlspecialchars($item->getPhone()); ?><br /></p>
  <?php endforeach; ?>

For more information send a message to info at phpclasses dot org.