No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 486B

12345678910111213141516
  1. <?php
  2. function active_page() {
  3. if (!empty($_GET['page'])) return trim(preg_replace('/[^a-zA-Z0-9\/-_]+/', '', $_GET['page']));
  4. return 'mainpage';
  5. }
  6. function content($name) {
  7. $filename = "public_html/pages/{$name}";
  8. $ext = file_exists("{$filename}.html.php") ? 'html.php' : 'html';
  9. if (!file_exists("{$filename}.{$ext}")) include('public_html/pages/error_404.html');
  10. include("{$filename}.{$ext}");
  11. }
  12. // Go for it!
  13. include('public_html/pages/layout.html.php');