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

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

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

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

//Institutional
try{

	//Defining the object to template
	$template->OBJ_INSTITUTIONAL	= SearchController::byId( 'institutional-customer' );

}catch( Exception $e ){}

//Customers
try{

	//Defining
	$records	= ListController::orderly( 'customer', 'name' );

	//Listing
	foreach( $records as $record ){

		//Defining the object to template
		$template->OBJ_CUSTOMER	= $record;

		//Showing the block
		$template->block( 'CUSTOMER' );

	}

}catch( Exception $e ){}

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

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