require_once("listing.php"); if (isset($_GET['p'])) { $code = $_GET['p']; } if (isset($_GET['ref'])) { $code = $_GET['ref']; } $ID = $articles[$code]; $keys = array_keys($articles); $position = array_search($code, $keys); if (isset($keys[$position + 1])) { $next_page = "/ms/$issue/" . $keys[$position + 1]; } else { $next_page = "/ms/$issue/"; } if (isset($keys[$position - 1])) { $last_page = "/ms/$issue/" . $keys[$position - 1]; } else { $last_page = "/ms/$issue/"; } $this_post = get_post($ID); $page_title = $this_post->post_title; $page_content = apply_filters('the_content', $this_post->post_content); ?>