PHP Classes

File: Exemple.php

Recommend this page to a friend!
  Classes of tuhin   paging.inc.php   Exemple.php   Download  
File: Exemple.php
Role: Example script
Content type: text/plain
Description: This is an exemple
Class: paging.inc.php
Display links to browse listings split in pages
Author: By
Last change: changed
Date: 16 years ago
Size: 1,002 bytes
 

Contents

Class file image Download
<?

/** Created on : 2008/08/14
 * Created by : K.S. AREFIN TUHIN
 * Mail to Creator : ks_arefin@yahoo.com
 *
 * This file is freely distributable
 * You can change the file as you need or wish but developer does not responsable for that
 **/

include_once("Paging.inc.php");


$q_string= $_SERVER[QUERY_STRING];

$split_q_string = split("-",$q_string);

$current_page = $split_q_string[1]?$split_q_string[1]:1;

$hitNumber = 102; // DataBase hitNumber
$un = 10; // Unit number for display in one page
$category_id = 105; // Category number
$md = ""; // choice data

$CP = new categoryPaging($hitNumber,$un,$category_id,$md,$current_page);

$page = $CP->DisPage();
$prv = $CP->prev_p();
$nxt = $CP->next_p();

echo
"<h1><font size=\"18\">";
if(
$prv){
    echo
$prv."--";
}
print_r($page);
if(
$nxt){
    print(
"--");echo $nxt;
}
echo
"</h1>";
$page_number = $CP->page_number_t();

//echo "<br>".$page_number."<br>";


?>