Example #1
0
<?php

// any new page must start with the page_header, it will include the correct files
// so that the rezgo parser classes and functions will be available to your templates
require 'rezgo/include/page_header.php';
// start a new instance of RezgoSite
$site = new RezgoSite($_REQUEST['sec']);
// remove the 'mode=page_type' from the query string we want to pass on
$_SERVER['QUERY_STRING'] = preg_replace("/([&|?])?mode=([a-zA-Z_]+)/", "", $_SERVER['QUERY_STRING']);
$site->setPageTitle($_REQUEST['title'] ? $_REQUEST['title'] : ucwords(str_replace("page_", "", $_REQUEST['mode'])));
if ($_REQUEST['mode'] == 'page_details') {
    /*
    	this query searches for an item based on a com id (limit 1 since we only want one response)
    	then adds a $f (filter) option by uid in case there is an option id, and adds a date in case there is a date set	
    */
    $item = $site->getTours('t=com&q=' . $_REQUEST['com'] . '&f[uid]=' . $_REQUEST['option'] . '&d=' . $_REQUEST['date'] . '&limit=1', 0);
    // if the item does not exist, we want to generate an error message and change the page accordingly
    if (!$item) {
        $item->unavailable = 1;
        $item->name = 'Item Not Available';
    }
    if ($item->seo->seo_title != '') {
        $site->setPageTitle($item->seo->seo_title);
    } else {
        $site->setPageTitle($item->item);
    }
    $site->setMetaTags('
			<meta name="description" content="' . $item->seo->introduction . '" /> 
			<meta property="og:title" content="' . $item->seo->seo_title . '" /> 
			<meta property="og:description" content="' . $item->seo->introduction . '" /> 
			<meta property="og:image" content="' . $item->media->image[0]->path . '" /> 
Example #2
0
	</url>
	<url>
		<loc>http://<?php 
echo $_SERVER[HTTP_HOST];
?>
/contact</loc>
		<lastmod><?php 
echo $now;
?>
</lastmod>
		<changefreq>weekly</changefreq>
		<priority>0.6</priority>
	</url>
	
	<?php 
foreach ($site->getTours() as $item) {
    ?>
	
	<url>
		<loc>http://<?php 
    echo $_SERVER[HTTP_HOST];
    ?>
/details/<?php 
    echo $item->uid;
    ?>
/<?php 
    echo $site->seoEncode($item->item);
    ?>
</loc>
		<lastmod><?php 
    echo date("c", (int) $item->updated);