<?php 
// Include main file
include_once('libs/main.php');
$pagesObj = new pages();
$newsObj = new news();
$testimonialObj = new testimonial();
if(isset($_REQUEST['page_slug']) && $_REQUEST['page_slug']!=''){
	$pagesDetail = $pagesObj->getpagesDetailsFromName($_REQUEST['page_slug']);
	$pageTitle = $pagesDetail->page_title;
	$pageDesc = $pagesDetail->page_desc;
}else{
	$pagesDetail = $pagesObj->fromId('1');
	$pageTitle = 'Welcome to GoPilgrim';
	$pageDesc = $pagesDetail->page_desc;
}
$newsList = $newsObj->getAllRecords("*"," news_status = '1'"," ORDER BY news_date DESC"); 
$testimonialList = $testimonialObj->getAllRecords("*"," testimonial_status = '1'"," ORDER BY testimonial_id DESC", "LIMIT 0,3"); 

$meta_title 		= ($pagesDetail->page_meta_title!='') ? $pagesDetail->page_meta_title : DEFAULT_META_TITLE;
$meta_ketwords 		= ($pagesDetail->page_meta_keywords) ? $pagesDetail->page_meta_keywords : DEFAULT_META_KEYWORD;
$meta_descriptions 	= ($pagesDetail->page_meta_desc) ? $pagesDetail->page_meta_desc : DEFAULT_META_DESCRIPTION;
// Include Template 

include_once('libs/routs.php')
?>