PHP Classes
elePHPant
Icontem

Paging Class with AJAX or HREF: Browse paginated query results using AJAX or HREF

Recommend this page to a friend!
  Info   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2010-11-10 (5 years ago) RSS 2.0 feedStarStarStar 46%Total: 5,042 All time: 504 This week: 970Down
Version License PHP version Categories
cls_db 1.0GNU General Publi...3.0HTML, PHP 5, Databases, AJAX
Description Author

This class can be used to browse database query results split between pages using AJAX to switch between the listing without page reloading.

It can execute an SQL query using the PEAR DB API and return records to be displayed in the page.

The class also generates navigation links that to go to the first, last, previous, next or any intermediate pages.

When the user clicks on the links, an AJAX request is triggered to retrieve the respective page content and update only the listing container, thus without reloading the whole page.

It is possible to configure the limit number of records and the limit of page links to show per page.

Picture of Jannerel Roche
Name: Jannerel Roche <contact>
Classes: 2 packages by
Country: Philippines Philippines

Details
README

BEFORE YOU BEGIN RUNNING THE APPLICATION:
1. Ensure that your database parameters are synchronized to use your own (see config.php)
2. Ensure that all references/file paths to required files are located (see refresher.php require declarations)
3. you are good to go...

GPL LICENSE
FOR Questions, Comments, Errors please email me at jnroche.5127@gmail.com. 

For instructions on how to use this class please open pagingindex.php 
instructions are in the files starting from pagingindex.php

Features v 1.1:
- now using jquery for ajaxification
- fixed bug with page links that did not follow pagespergroup variable
- fixed bug with html A tags in showfirst(), shownext(), showlast(), showprev() functions
- added basic styling css (main.css) and a preloader
*fully customisable to suite your needs






Features v 1.0:
-You can toggle between ajax or href types of links to implement by commenting one just line!
-you can set any number of links to show apart from the number of records per page to show
-you can add additional links like: First, Previous,Next, Last apart from the 'number' links
-you can customize the links to any string you want hence: 'first' or 'First Record'; 'Prev' or 'Previous' etc..
-you can customize a separator between the number links to show
-has an indicator of which page you are viewing (underlined page number)
-all these achievable in no time!




Thank you for using my paging class,
jannerel roche

*If you like this class please support my new AJAX-PHP Framework jaxphp and try it from google codes project hosting here -> http://code.google.com/p/jaxphp/
I am currently looking for a partner for this project hope you could be the one!! 

Cheers!

  Files folder image Files  
File Role Description
Plain text file class.database.php Class main database class layer
Accessible without login Plain text file config.php Conf. configuration file
Accessible without login Plain text file jquery-1.3.2.min.js Aux. jquery base library
Accessible without login Plain text file main.css Aux. stylesheet
Plain text file Paging.php Class MAIN CLASS FILE
Accessible without login Plain text file pagingajax.js Data js file
Accessible without login Plain text file pagingindex.php Example index main
Accessible without login Plain text file README Doc. README
Accessible without login Plain text file refresher.php Example second file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:5,042
This week:0
All time:504
This week:970Down
 User Ratings  
 
 All time
Utility:58%StarStarStar
Consistency:60%StarStarStarStar
Documentation:60%StarStarStarStar
Examples:54%StarStarStar
Tests:-
Videos:-
Overall:46%StarStarStar
Rank:2328