direction == "ltr") { $fpImgUrl= getImagePath('nav_first.gif'); $ppImgUrl= getImagePath('nav_prev.gif'); $npImgUrl= getImagePath('nav_next.gif'); $lpImgUrl= getImagePath('nav_last.gif'); } else { $fpImgUrl= getImagePath('nav_last.gif'); $ppImgUrl= getImagePath('nav_next.gif'); $npImgUrl= getImagePath('nav_prev.gif'); $lpImgUrl= getImagePath('nav_first.gif'); } $current = $navigator["page"]; $prevPage = $current -1; $nextPage = $current +1; $maxPages = $navigator["maxPages"]; #-- 'first' and 'previous button cell --- if ($navigator["page"] != 1) { $fpContent =''; $fpContent .=''; $fpContent .=''; $ppContent =''; $ppContent .=''; $ppContent .=''; $pClass='borderright'; } else { $fpContent=' '; $ppContent=' '; $pClass=''; } #-- 'page numbers' cell --- if ($begin != $end) { $ndlUrl=getImagePath('nav_dot_left.gif'); $ndrUrl=getImagePath('nav_dot_right.gif'); $ndUrl=getImagePath('nav_dot.gif'); $mpContent = "\n\t\t"; for ($i = $begin; $i <= $end; $i++) { if ($i == $current) { $number = "$i"; $leftdot = ''; } else { $number = ''. $i .''; if ( $i-1 == $current) { $leftdot = ''; } else { $leftdot = ''; } } $mpContent .= " $leftdot $number\n\t\t"; } if ($end == $current) { $rightdot = ''; } else { $rightdot = ''; } $mpContent .=" $rightdot "; } else { $mpContent =''; } #-- 'next' and 'last' button cell --- if ($current < $maxPages) { $npContent =''; $npContent .=''; $npContent .=''; $lpContent =''; $lpContent .=''; $lpContent .=''; $nClass='borderleft'; } else { $npContent=' '; $lpContent=' '; $nClass =''; } ?>