<?php 

/*
 *
 * Déclaration des répertoires
 */

$dirroot     			= dirname(__FILE__); 
$config 				= $dirroot."info.inc.php";
	
if (file_exists($config)){include $config;}

/*if (empty($wwwroot) || empty($serveur_mysql) || empty($utilisateur_mysql) || empty($nom_de_la_base)) {

header("Location:installer.php");

} else {
*/
$repertoire_images 		= $wwwroot."/upload/";
$repertoire_achat 		= $dirroot."/achat";
$repertoire_modele 		= $dirroot."/modeles";
$libdir      			= $dirroot."/lib";
$liste_mots    			= $dirroot."/liste_mots.txt";
$my_max_file_size       = "102400"; # in bytes
$image_max_width        = "500";
$image_max_height       = "500";
$the_path               = $dirroot."/upload/";

$registered_types = array(
                                        /*"application/x-gzip-compressed"         => ".tar.gz, .tgz",
                                        "application/x-zip-compressed"          => ".zip",
                                        "application/x-tar"                     => ".tar",
                                        "image/bmp"                             => ".bmp, .ico",*/
                                        "image/gif"                             => ".gif",
                                        "image/pjpeg"                           => ".jpg, .jpeg",
                                        "image/jpeg"                            => ".jpg, .jpeg",
										"text/richtext"                         => ".txt, .rtf",
										"application/pdf" 						=> ".pdf",
                                        "application/msword"                    => ".doc",
										/*"application/x-shockwave-flash"         => ".swf",
                                        "application/ved.ms-excel"              => ".xls",
                                        "application/octet-stream"              => ".exe, .fla (etc)"*/
                                        ); 

$allowed_types = array("image/gif","image/pjpeg","image/jpeg", "text/richtext", "application/pdf", "application/msword");
 
//require($dirroot."/lib/class/caddie.php");

/*
 * Déclaration des sessions
 *
 * Ouverture d'une session, utilise une variable tableau SESSION 
 * pour stocker les variables à traquer 
 */


session_start();
session_register("SESSION");

// Initialisation de SESSION si nécessaire 
if (! isset($_SESSION)) { $_SESSION = array();}


include($dirroot."/mysql.inc.php");

// Initialisation de SESSION pour la couleur 
if (! empty($_GET['style'])) 

	{ $_SESSION['style'] = $_GET['style']; 
	
	} elseif 
	
	(empty($_SESSION['style'])) 
	
	{ $_SESSION['style'] = "bleu"; 
	
	}

// Recherche de la feuille de style

$stylefile = $wwwroot."/css/".$_SESSION['style'].".css";
	
// Déclaration des fonctions

$fonctionsfile = $dirroot."/fonctions.php";

if (file_exists($fonctionsfile)){
require ($fonctionsfile);
}

//}
?>