set_page($path_query); } else { $query = "SELECT id FROM static_pages WHERE page_name = '$path_query'; "; $record = $db->query_fetch_row($query); if (is_numeric($record['id'])) { $pages->set_page($record['id']); } } // 404 if (empty($pages->page_data)) { header("HTTP/1.0 404 Not Found"); page_header(); print "

Page Not Found!

\n"; print "

The page you requested could not be found on our Web site.

\n"; page_footer(); exit; } // Hide if draft $page_status = $pages->field('page_status'); if ($page_status == 'draft') { if (!$auth->has_perm('admin')) { header("HTTP/1.0 404 Not Found"); page_header(); print "

Page Not Found!

\n"; print "

The page you requested is not available on our Web site.

\n"; page_footer(); exit; } $is_draft = true; } // Check page permissions $page_perms = unserialize($pages->field('page_perms')); if (!empty($page_perms)) { $_SESSION['auth_url'] = '/page/' . $pages->field('page_name'); // Missing Cart Permissions if ( in_array('cart', $page_perms) && !$auth->has_perm('cart') ) { header('Location: /login.php',TRUE,307); exit; } // Missing Dealer Permissions if ( in_array('dealer', $page_perms) && !$auth->has_perm('dealer') ) { header('Location: /login.php',TRUE,307); exit; } // Missing RHED Permissions if ( in_array('rhed', $page_perms) && !$auth->has_perm('rhed') ) { $page_title = 'Access Denied'; page_header(); print '

You cannot access this page

Certain sections of our site are only available to our customers located within Tennessee, Kentucky and Georgia and are Registered Honda Engine Dealers (RHED). Please contact customer service for assistance.

'; page_footer(); exit; } // Missing GATNKY Permissons if ( in_array('gatnky', $page_perms) && !$auth->has_perm('gatnky') ) { $page_title = 'Access Denied'; page_header(); print '

You cannot access this page

Certain sections of our site are only available to our customers located within Tennessee, Kentucky and Georgia. Please contact customer service for assistance.

'; page_footer(); exit; } } $site_info['navigation'] = $pages->get_navigation_breadcrumb(); $page_title = $pages->field('page_title'); $page_navigation = $pages->field('page_navigation'); page_header(); // Draft if ($is_draft == true) { print '

This page is in "draft" status and is not available on the site.

'; } // Navigation Block if (!empty($page_navigation)) { print '' . "\n"; } print '

' . iso_htmlentities($page_title) . '

' . "\n"; print $pages->field('page_content'); print ''; if ($auth->has_perm('admin')) { print "

page_id . "\">Edit This Page

"; } page_footer(); essential_footer();