1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
<?php
/*************************************************************************************/
/*
/* PEEL
/* Copyright (c) PEEL 2000 - 2007
/* email : info@peel.fr
/* web : http://www.peel.fr
/* développement d'applicatifs en php natif
/*************************************************************************************/
$dirroot = dirname(__FILE__);
/*$wwwroot = */
$config = $dirroot."/lib/setup/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";
$repertoire_upload = $dirroot."/upload";
$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(
"image/gif" => ".gif",
"image/pjpeg" => ".jpg, .jpeg",
"image/jpeg" => ".jpg, .jpeg",
"text/richtext" => ".txt, .rtf",
"application/pdf" => ".pdf",
"application/msword" => ".doc",
);
$allowed_types = array("image/gif","image/pjpeg","image/jpeg", "text/richtext", "application/pdf", "application/msword");
require($dirroot."/lib/class/caddie.php");
require($dirroot."/lib/class/mysql.php");
session_start();
session_register("SESSION");
/* Ouverture de l'objet mysql */
$db_host = $serveur_mysql;
$db_username = $utilisateur_mysql;
$db_password = $mot_de_passe_mysql;
$db_name = $nom_de_la_base;
$db_prefixe = "peel";
$db = new DBLayer($db_host, $db_username, $db_password, $db_name, $db_password);
// Initialisation de SESSION si nécessaire
if (! isset($_SESSION)) { $_SESSION = array();}
// Initialisation de l'objet caddie si nécessaire
if (! isset($_SESSION['caddie'])) {
$_SESSION['caddie'] = new Caddie;
}
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."/lib/css/".$_SESSION['style'].".css";
// Déclaration des fonctions
$fonctionsfile = $dirroot."/lib/fonctions/fonctions.php";
if (file_exists($fonctionsfile)){
require ($fonctionsfile);
}
}
?> |
Partager