* Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien DiCintio * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ */ /** \file htdocs/install/inc.php \brief Fichier include du programme d'installation \version $Revision$ */ require_once('../translate.class.php'); require_once('../lib/functions.inc.php'); $docurl = 'documentation'; $conffile = "../conf/conf.php"; define('DOL_DOCUMENT_ROOT','../'); // Forcage du log pour les install et mises a jour $conf->syslog->enabled=1; define('SYSLOG_FILE','/tmp/dolibarr_install.log'); define('SYSLOG_FILE_NO_ERROR',1); // Forcage du parametrage PHP magic_quots_gpc (Sinon il faudrait a chaque POST, conditionner // la lecture de variable par stripslashes selon etat de get_magic_quotes). // En mode off (recommande il faut juste faire addslashes au moment d'un insert/update. function stripslashes_deep($value) { return (is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value)); } if (get_magic_quotes_gpc()) { $_GET = array_map('stripslashes_deep', $_GET); $_POST = array_map('stripslashes_deep', $_POST); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); $_REQUEST = array_map('stripslashes_deep', $_REQUEST); } @set_magic_quotes_runtime(0); // Defini objet langs $langs = new Translate('../langs'); $langs->setDefaultLang('auto'); $langs->setPhpLang(); $bc[false]=' class="bg1"'; $bc[true]=' class="bg2"'; function pHeader($soutitre,$next,$action='set') { global $langs; $langs->load("main"); $langs->load("admin"); // On force contenu en ISO-8859-1 header("Content-type: text/html; charset=iso-8859-1"); //header("Content-type: text/html; charset=UTF-8"); print ''."\n"; print ''; print ''; print ''; print ''; print ''.$langs->trans("DolibarrSetup").''; print ''; print ''; print ''.$langs->trans("DolibarrSetup").''; print '
'; print ''; print '
'; if ($soutitre) { print '
'.$soutitre.'
'; } print '
'; } function pFooter($nonext=0,$setuplang='') { global $langs; $langs->load("main"); $langs->load("admin"); print '
'; if (! $nonext) { print '
">
'; } if ($setuplang) { print ''; } print '
'; print ''; print ''; } function dolibarr_install_syslog($message) { dolibarr_syslog($message); } ?>