Login   Register  
PHP Classes

File: QP_Default.mod

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Daniel Kushner  >  QueryPrint  >  QP_Default.mod  >  Download  
File: QP_Default.mod
Role: ???
Content type: text/plain
Description: The default printing module
Class: QueryPrint
Author: By
Last change:
Date: 13 years ago
Size: 1,193 bytes


Class file image Download
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 .= '&nbsp';
            echo "<td>$val</td>";
        echo '</tr>';
    function EmptyQuery() {
        echo '<i>Query is empty!</i>';
    function NextLink($from) {
        global $PHP_SELF;
        echo "&nbsp;<a href=\"$PHP_SELF?QP_From=$from\">Next</a>&nbsp;";
    function PreviousLink($from) {
        global $PHP_SELF;
        echo "&nbsp;<a href=\"$PHP_SELF?QP_From=$from\">Previous</a>&nbsp;";