title; $date = $data_index->pubDate; $metak = $data_index->meta; $metad = $data_index->metad; $url = $data_index->url; $content = $data_index->content; $parent = $data_index->parent; $template_file = $data_index->template; $private = $data_index->private; # if page is private, check user if ($private == 'Y') { redirect('404'); } # if page does not exist, throw 404 error if ($url == '404') { header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); } # check for correctly formed url if (defined('GSCANONICAL')) { if ($_SERVER['REQUEST_URI'] != find_url($url, $parent, 'relative')) { redirect(find_url($url, $parent)); } } # include the functions.php page if it exists within the theme if ( file_exists(GSTHEMESPATH .$TEMPLATE."/functions.php") ) { include(GSTHEMESPATH .$TEMPLATE."/functions.php"); } # call pretemplate Hook exec_action('index-pretemplate'); # include the template and template file set within theme.php and each page if ( (!file_exists(GSTHEMESPATH .$TEMPLATE."/".$template_file)) || ($template_file == '') ) { $template_file = "template.php"; } include(GSTHEMESPATH .$TEMPLATE."/".$template_file); # call posttemplate Hook exec_action('index-posttemplate'); ?>