Your IP : 216.73.216.201


Current Path : /home/balossw/www/temp/common/cms/includes/
Upload File :
Current File : /home/balossw/www/temp/common/cms/includes/high.inc.php

<?php
/*---------------------------------------------------------------------------
		File name ............ includes/high.inc.php
		Project .............. Owebia CMS
		Author ............... Antoine Lemoine
		Creation date ........ 09.09.2009
		Modification date .... 01.07.2010
---------------------------------------------------------------------------*/


include_once $global->realpath('common/cms/includes/common.high.inc.php');

checkLibraries('dewplayer','fpdf','id3tagreader','jquery-1.4.2');
loadModule('form');

include_once $global->realpath('common/cms/includes/classes/template.class.php');
$global->tpl_manager = new TemplateManager($global->path('common/cms/media'),'fr-fr');

// Inclusion des fonctions
include_once $global->realpath('common/cms/includes/css_elements.inc.php');

$global->config['default_page'] = 'home';
$global->section = isset($_GET['section']) ? $_GET['section'] : '';
$global->page = isset($_GET['page']) ? $_GET['page'] : $global->config['default_page'];

function checkPage()
{
	global $global;

	$args = func_get_args();
	
	$found = false;
	foreach ($args as $path) {
		if ($global->section!='') {
			$sections_array = array();
			listDirectory($path,$sections_array,true,false);
			if (in_array($global->section,$sections_array)) {
				$pages_array = array();
				listDirectory($path.'/'.$global->section,$pages_array);
				if (in_array($global->page.'.php',$pages_array)) {
					$found = true;
					break;
				}
			}
		}
		else {
			$pages_array = array();
			listDirectory($path,$pages_array);
			if (in_array($global->page.'.php',$pages_array)) {
				$found = true;
				break;
			}
		}
	}
	if (!$found) { throwError404(); }
}

checkPage($global->path('common/cms/pages'),$global->path('content/user'));
$global->data['cms']['is_home_page'] = ($global->section==''&& $global->page=='home');

$global->head->meta->charset = $global->config['cms']['charset'];

?>