<?php
/**
 * Showing the page
 */

//Defining the template
$template	= new Template( $page );

//Defining the meta
$meta		= ( defined( 'METADATA_SERVICO' ) ) ? METADATA_SERVICO : null;

//Including the template's variables
require( BASE_DIR . '/include/variables.php' );

//Services
try{

	//Defining
	$object					= SearchController::bySlug( 'service', $page->slug );

	//Defining the object to template
	$template->OBJ_SERVICE	= $object;

	//Checking
	if( !is_null( $object->maintenance ) && $object->maintenance != '' )
		//Showing the block
		$template->block( 'MAINTENANCE' );

	//Defining
	$records				= ListController::notActiveOrderly( 'service', $object->id );

	//Checking
	if( !is_null( $records ) )
		//Listing
		foreach( $records as $record ){

			//Defining
			$template->OBJ_OTHER_SERVICE	= $record;

			//Showing
			$template->block( 'OTHER_SERVICE' );

		}

}catch( Exception $e ){}

//Defining some variables
$template->BASE_URL_REPOSITORY	= BASE_URL_REPOSITORY;
$template->SOURCE_SITE_INTERNAL	= SOURCE_SITE_INTERNAL;

//Showing the page
$template->show();