<?php if(!defined('master_script')) die();

/**
 * Default settings
 *
 * @category   Module (include-page)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2009-05-16
 */
		
	global $system_data, $page_info;
	
	if(!isset($module_settings['include-page']['page name'])) $module_settings['include-page']['page name'] = '';

/**
 * Languages
 *
 * @category   Module (include-page)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2010-07-28
 */

	$modules['include-page']['key'] = 'include-page';
	include_txt($modules['include-page']['key'], $system_data['folder']['modules'] . $modules['include-page']['key'] . '/languages/');
	include_txt($modules['include-page']['key'], $system_data['folder']['settings'] . 'modules/' . $modules['include-page']['key'] . '/languages/');

/**
 * Simulate active page data
 *
 * @category   Module (include-page)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2009-05-16
 */

	$this_page = $page_info;
	
	$page_info = get_page_info(trim($module_settings['include-page']['page name'], '/'));
	$page_info->index = $system_data['folder']['pages'] . $page_info->alias . '/' . $system_data['file']['index page'];
	$page_info->href = $system_data['frontend']['href attribute'] . $page_info->alias;
	
/**
 * Include module frontend template
 *
 * @category   Module (include-page)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2009-05-16
 */

	if($module_settings['include-page']['page name'] != '') include_template('include-page');

/**
 * Restore real active page data
 *
 * @category   Module (include-page)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2009-05-16
 */

	$page_info = $this_page;

?>