<?php
///////////////////////////////////////////////
//                @lex Guestbook             //
//      by Soulard Alexis (c) 2002 - 2006    //
//         http://www.alexphpteam.com/       //
//             all right reserved            //
///////////////////////////////////////////////

/**
 * NE PAS MODIFIER CE PARAMÉTRAGE, le script ne fonctionnerait pas correctement.
 */
error_reporting(E_ALL ^ E_NOTICE);
set_magic_quotes_runtime(0);

if (!defined('AGUEST'))
	die("Safety error.");

if (phpversion() < "4.1.0"){
	$_GET   =& $HTTP_GET_VARS;
	$_POST  =& $HTTP_POST_VARS;
	$_SERVER =& $HTTP_SERVER_VARS;
}

if (isset($_POST['no_connect']) || isset($_GET['no_connect']))
	die("Safety error.");

if (file_exists($chem_absolu."config/config.".$alex_livre_ext)){
	include($chem_absolu."config/config.".$alex_livre_ext);
	include($chem_absolu."config/config_base.".$alex_livre_ext);
}

include($chem_absolu."include/version.inc.".$alex_livre_ext);

if (!isset($no_connect)){
	if (isset($_GET['lang']) && $_GET['lang'] && file_exists($chem_absolu."languages/".$_GET['lang'].".".$alex_livre_ext))
		$f_language = $_GET['lang'];
		
	include($chem_absolu."languages/".$f_language.".".$alex_livre_ext);
}
else if (isset($_GET['language_setup']))
	include($chem_absolu."languages/".$_GET['language_setup'].".".$alex_livre_ext);

include($chem_absolu."include/funct_utiles.".$alex_livre_ext);
set_options();
include($chem_absolu."include/funct_sql_admin.".$alex_livre_ext);

if (!isset($no_connect))
	include($chem_absolu."db/".$database_type.".".$alex_livre_ext);

include($chem_modelixe."ModeliXe.".$alex_livre_ext);

if (file_exists($chem_absolu."languages/flags/".$f_language.".".$alex_livre_ext))
	include($chem_absolu."languages/flags/".$f_language.".".$alex_livre_ext);
else
	include($chem_absolu."languages/flags/english.".$alex_livre_ext);

// gestion de magic_quotes_gpc
nettoyer_var_post();

/* connexion à la base de données */
if (!isset($no_connect)){
	$f_db_connexion = new alex_livre_sql($f_mysql_host, $f_mysql_user, $f_mysql_pass, $f_mysql_base, false);

	if (!$f_db_connexion -> db_connect_id){
	   die($f_lang['erreur_mysql_connect']);
	}
}
?>