<?php
/**
 * Default page template
 * 
 * This file can be overriden. Discover logic and examples on :
 * @url http://dev.linea21.com/projects/linea21/wiki/Override
 * @url http://dev.linea21.com/projects/linea21/wiki/Personnalisation_de_l%27interface_publique
 * 
 * @package linea21\core\public
 * @author $Author$ - linea21 <info@linea21.com>
 * @version $Id$ 
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 */
?>

<?php

if( ActiveItemKey($GLOBALS['activeitem']) == 'page' && isset($_REQUEST['id'])) {

	include_once(override('../page/display.php'));
  $id= $_REQUEST['id'];

  // set HTML Title
  $result=$GLOBALS['sql_object']->DBSelect(SQL_getPageTitle($id));
  $title = formatText($result[0]['page_title'], '2HTML');
  SetHTMLTitle($title);
  setBreadcrumb(array($title => false));

  display_page($id);

} else {

	ReloadIndex('public');

}

?>