Created
April 15, 2014 15:34
-
-
Save c01nd01r/10742133 to your computer and use it in GitHub Desktop.
Next and prev page. ImageCMS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!function_exists('next_page')) | |
{ | |
function next_page($page_id) | |
{ | |
$data = get_page($page_id+1); | |
if ($data) { | |
return $data; | |
} else { | |
return false; | |
} | |
} | |
} | |
if (!function_exists('prev_page')) | |
{ | |
function prev_page($page_id) | |
{ | |
$data = get_page($page_id-1); | |
if ($data) { | |
return $data; | |
} else { | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment