Assuming you already have all the PHP in place to do the main page, all you would need is somthing like:
PHP Code:
eval("\$content = \"".gettemplate("mypage_{$page}")."\";");
Where $page is whats in the URL (x.php?page=rules), you need to make sure this goes above the dooutput line you'll have that would look similar to the one I posted above. In your main template, add $content where you want the content of the template to go. Note the
mypage in the above line, I'd recommend using a prefix to prevent users looking at templates they shouldn't