Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kostas Aitsidis  >  TNavigator  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample TNavigator
Class: TNavigator
Query result page navigator
Author: By
Last change:
Date: 2003-03-30 21:38
Size: 719 bytes
 

Contents

Class file image Download
<?php
    
require 'TMSSQLDatabase.php';
    require 
'TNavigator.php';
    
$mis = new  TMSSQLDatabase("ITSRV","quest","asdas0902edsas022","ITS");
    
$mis->db_connect();
    
$mis->run_query("Select * from EliteUser.INI");
    
$i=0;
    
$rowsPerPage=15;

    if (
$mis->RecordCount== 0)  {
    print 
"Table is Empty ";    
    }
    elseif (
$mis->RecordCount0)  {
        
$rowsPerPage=25;
        
$fPage 0;
        
$pages = ($mis->RecordCount/$rowsPerPage);
        
$nav= new TNavigator$pages,$rowsPerPage,'/its/itm/itms.php');
        
$nav->ViewNavigator($_GET['page']);
        
# Fields to view 
            
$catalogFields = array (ABBREVIATION =>"Item Code"NAME =>"Item Description");
        
$mis->ViewPage("Item Catalog",$catalogFields,$_GET['page'],$rowsPerPage);
        }
?>