- Impact
- 11,392
Code:
function paginate($numresults, $page, $orderby = NULL, $catid = NULL, $search = NULL)
{
//Generate image path according to calling script
if(substr($_SERVER[REQUEST_URI],-13,-1)=='portfolio.ph'){
$_navigationimg='./templates/default/images';
}else{
$_navigationimg='../templates/admin/images';
}
I'm having a problem with my pagination images not displaying. My admin pagination is working (shows images) but my default pagination (doesn't show images). When I look at the code generated by the page, it's showing the admin pagination location on the default pages (which is presumably why it isn't showing the images). The same images are in both locations.
What I understand (rightly or wrongly) is because portfolio.ph doesn't exist, that is why it's defaulting to the admin location for the images. How should I re-write this code so that default images are displayed and admin images are displayed depending upon whether it's a visitor or me logged in as administrator.
Is this even the correct code to be tinkering with?
Last edited: