PHP Classes

File: pageDemo.php

Recommend this page to a friend!
  Classes of Prakash Khanchandani  >  List processor  >  pageDemo.php  >  Download  
File: pageDemo.php
Role: Example script
Content type: text/plain
Description: pagination example
Class: List processor
List data from arrays in HTML tables
Author: By
Last change: removed html code and made it available in an include file
Date: 9 years ago
Size: 1,458 bytes


Class file image Download

 * @author Prakash Khanchandani
 * @copyright 2013
 * @program pageDemo.php
 * demonstrate the page by page listing thru the list processor

require_once "listPrcsr.php"; // the list processor class
require_once "getData.php"; // functions to generate data for the demo

$data = getFullData(); // get the data to be displayed

create a descriptive array for the data. Consult basicDemo.php for the
description of this array. */

the following descriptive array will display all elements of each row of the list. */
$des[] = array("Branch", "L", "Y", "N", "");
$des[] = array("Product Type", "L", "Y", "N", "");
$des[] = array("Account No", "L", "Y", "N", "");
$des[] = array("Title", "L", "Y", "N", "");
$des[] = array("Available Balance", "R", "Y", "N", "", 2);
$des[] = array("Ledger Balance", "R", "Y", "N", "", 2);

$lp = new listPrcsr(); // instantiate the class
$lp->data = $data; // put in the data to be displayed
$lp->des = $des; // supply the descriptor for the data
$lp->opt = "N"; // this is a plain display, without any hyperlinks
$lp->max = 20; // display the full list, without any pagination
$lp->moneyFormat = "R";
/* "R" is for ruppee type formatting as in 1,23,456.78. The other option
is "T" for thousands formatting as in 123,456.78 */
$out = $lp->gnrtOutput(); // generate the output

include 'inc1.php';

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