include('coneczion.inc'); include('connect.inc'); $today=date("F j, Y"); if (!($limit)){ $limit = 40;} // Default results per-page. if (!($page)){ $page = 0;} // Default page value. $sqltod="Select * from testy where approve='1' order by real_date DESC LIMIT $page, $limit"; $resulttod=mysql_query($sqltod,$db2); $rowtod=mysql_fetch_array($resulttod); $sqltod2="Select * from testy where approve='1' order by real_date DESC "; $resulttod2=mysql_query($sqltod2,$db2); $numrows=mysql_num_rows($resulttod2); //pagination////////////////////////////////////////////////////// $pages = intval($numrows/$limit); // Number of results pages. // $pages now contains int of pages, unless there is a remainder from division. if ($numrows % $limit) { $pages++;} // has remainder so add one page $current = ($page/$limit) + 1; // Current page number. if (($pages < 1) || ($pages == 0)) { $total = 1;} // If $pages is less than one or equal to 0, total pages is 1. else { $total = $pages;} // Else total pages is $pages value. $first = $page + 1; // The first result. if (!((($page + $limit) / $limit) >= $pages) && $pages != 1) { $last = $page + $limit;} //If not last results page, last result equals $page plus $limit. else{ $last = $numrows;} // If last results page, last result equals total number of results. /////////////////////////////////////////////////////////////////// ?>
![]() |
|||||||
|
|
|
||||||
|
|
|
|
|
|
|
|
|
Here's What Our Happy
Customers CLICK HERE TO ADD YOUR TESTIMONIAL Testimonials - Page
=$current?>
of
=$total?>
if ($page != 0) { // Don't show back link if current page is first page.
$back_page = $page - $limit;
echo(" |
||
Page
=$current?>
of
=$total?>
if ($page != 0) { // Don't show back link if current page is first page.
$back_page = $page - $limit;
echo(" |
|
|