PHP Classes

File: fwphp/01mater/fw_popel/lnktbl.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/01mater/fw_popel/lnktbl.php  >  Download  
File: fwphp/01mater/fw_popel/lnktbl.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,059 bytes


Class file image Download
// J:\awww\www\fwphp\01mater\fw_popel\lnktbl.php
* Page lists all borrowed books (products in invoice items rows)
showHdr('Lended Books (products in invoice items rows)');
// Get all lended books list
$brs = Model::getBorrowers();
$totalBooks = Model::getBorrowerCount();

// display table
Total borrowed books: <?=$totalBooks?>
<table width="100%" border="1" cellpadding="3">
<tr style="font-weight: bold">
<td>Title</td><td>Author</td><td>Borrowed by</td><td>Borrowed on</td><td>Return</td>
// Iterate over every row and display it
while($br = $brs->fetch())
$b = $br->getDetailByID();
$a = $b->getAuthor();
  <td><?=htmlspecialchars("$a->firstName $a->lastName")?></td>
  <td><?=date('Y.m.d', $br->dt)?></td>
  <a href="lnktbl_delrec.php?borrower=<?=$br->id?>">Return</a>
// Display footer

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