<?php
class QP_Printer {
/*
The number of records to be shown on each page.
Set the value to 0 in order to show the whole query on one page.
*/
var $RecordsPerPage = 10;
function OpenTable() {
echo '<table border="1" cellspacing="1" cellpadding="1">';
}
function CloseTable() {
echo '</table><p>';
}
function PrintHead($arr) {
echo '<tr>';
foreach($arr as $title) {
echo "<td><b>$title</b></td>";
}
echo '</tr>';
}
function PrintRow($arr) {
echo '<tr>';
foreach($arr as $title => $val) {
$val .= ' ';
echo "<td>$val</td>";
}
echo '</tr>';
}
function EmptyQuery() {
echo '<i>Query is empty!</i>';
}
function NextLink($from) {
global $PHP_SELF;
echo " <a href=\"$PHP_SELF?QP_From=$from\">Next</a> ";
}
function PreviousLink($from) {
global $PHP_SELF;
echo " <a href=\"$PHP_SELF?QP_From=$from\">Previous</a> ";
}
}
?> |