2004-01-27 15:36:40 +01:00
|
|
|
|
<?PHP
|
2004-02-02 02:41:33 +01:00
|
|
|
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
|
|
|
|
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
|
|
|
|
*
|
|
|
|
|
|
* 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$
|
|
|
|
|
|
*
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2004-01-27 15:36:40 +01:00
|
|
|
|
//
|
|
|
|
|
|
// Essaye de cr<63>er le fichier de conf
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
$conf = "../conf/conf.php";
|
|
|
|
|
|
|
|
|
|
|
|
if (file_exists($conf))
|
|
|
|
|
|
{
|
|
|
|
|
|
include ($conf);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
$fp = @fopen("$conf", "w");
|
|
|
|
|
|
if($fp)
|
|
|
|
|
|
{
|
|
|
|
|
|
@fwrite($fp, '<?PHP');
|
|
|
|
|
|
@fputs($fp,"\n");
|
|
|
|
|
|
@fputs($fp,"?>");
|
|
|
|
|
|
fclose($fp);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
?>
|
|
|
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<meta http-equiv="content-type" content="text/html; charset=iso8859-1">
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="./default.css">
|
|
|
|
|
|
<title>Dolibarr Install</title>
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
<?PHP
|
|
|
|
|
|
|
|
|
|
|
|
$docurl = '<a href="doc/dolibarr-install.html">documentation</a>';
|
|
|
|
|
|
|
|
|
|
|
|
if (!file_exists("../conf/conf.php"))
|
|
|
|
|
|
{
|
|
|
|
|
|
print '<div class="error">';
|
2004-02-02 02:41:33 +01:00
|
|
|
|
print "Le fichier <b>conf.php</b> n'existe pas, reportez-vous <20> la ".$docurl." pour cr<63>er ce fichier<br>";
|
2004-01-27 15:36:40 +01:00
|
|
|
|
|
|
|
|
|
|
print '</div>';
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (!is_writable("../conf/conf.php"))
|
|
|
|
|
|
{
|
|
|
|
|
|
print '<div class="error">';
|
|
|
|
|
|
print "Le fichier <b>conf.php</b> n'est pas accessible en <20>criture, v<>rififiez les droits sur celui-ci, reportez-vous <20> la ".$docurl."<br>";
|
|
|
|
|
|
|
|
|
|
|
|
print '</div>';
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="main">
|
|
|
|
|
|
<div class="main-inside">
|
|
|
|
|
|
<h2>Installation de Dolibarr</h2>
|
|
|
|
|
|
<form action="etape1.php" method="POST">
|
|
|
|
|
|
<input type="hidden" name="action" value="set">
|
|
|
|
|
|
<table border="0" cellpadding="4" cellspacing="0">
|
2004-02-01 21:32:41 +01:00
|
|
|
|
<tr class="bg2">
|
2004-01-27 15:36:40 +01:00
|
|
|
|
<td valign="top">
|
|
|
|
|
|
<?php print "R<EFBFBD>pertoire d'installation"; ?>
|
|
|
|
|
|
</td><td valign="top"><input type="text" size="60" value="
|
|
|
|
|
|
<?PHP
|
2004-02-01 21:32:41 +01:00
|
|
|
|
if(! isset($dolibarr_main_url_root) || strlen($dolibarr_main_url_root) == 0)
|
2004-01-27 15:36:40 +01:00
|
|
|
|
{
|
2004-02-01 21:32:41 +01:00
|
|
|
|
$dolibarr_main_document_root = substr($_SERVER["SCRIPT_FILENAME"],0,strlen($_SERVER["SCRIPT_FILENAME"])-18);
|
|
|
|
|
|
# Nettoyage du path propos<6F>
|
2004-02-05 00:11:46 +01:00
|
|
|
|
$dolibarr_main_document_root = str_replace('\\\\','/',$dolibarr_main_document_root); # Gere les chemins windows avec double "\"
|
2004-02-01 21:32:41 +01:00
|
|
|
|
$dolibarr_main_document_root = ereg_replace('[\\\\\/]$','',$dolibarr_main_document_root); # Supprime le "\" ou "/" de fin
|
2004-01-27 15:36:40 +01:00
|
|
|
|
}
|
2004-02-01 21:32:41 +01:00
|
|
|
|
print "$dolibarr_main_document_root";
|
2004-01-27 15:36:40 +01:00
|
|
|
|
?>
|
|
|
|
|
|
" name="main_dir">
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
Sans le slash "/" <EFBFBD> la fin<br>
|
2004-02-01 21:32:41 +01:00
|
|
|
|
exemples :<br>
|
|
|
|
|
|
<li>/var/www/dolibarr/htdocs</li>
|
|
|
|
|
|
<li>C:/wwwroot/dolibarr</li>
|
2004-01-27 15:36:40 +01:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr class="bg1">
|
|
|
|
|
|
<td valign="top">
|
|
|
|
|
|
URL Racine</td><td valign="top"><input type="text" size="60" name="main_url" value="
|
|
|
|
|
|
<?PHP
|
2004-02-01 21:32:41 +01:00
|
|
|
|
if(! isset($dolibarr_main_url_root) || strlen($dolibarr_main_url_root) == 0)
|
2004-01-27 15:36:40 +01:00
|
|
|
|
{
|
2004-02-01 21:32:41 +01:00
|
|
|
|
if (isset($_SERVER["SCRIPT_URI"])) { # Si d<>fini
|
|
|
|
|
|
$dolibarr_main_url_root=$_SERVER["SCRIPT_URI"];
|
|
|
|
|
|
}
|
|
|
|
|
|
else { # SCRIPT_URI n'est pas toujours d<>fini (Exemple: Apache 2.0.44 pour Windows)
|
|
|
|
|
|
$dolibarr_main_url_root="http://".$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"];
|
|
|
|
|
|
}
|
|
|
|
|
|
$dolibarr_main_url_root = substr($dolibarr_main_url_root,0,strlen($dolibarr_main_url_root)-9);
|
|
|
|
|
|
# Nettoyage de l'URL propos<6F>e
|
|
|
|
|
|
$dolibarr_main_url_root = ereg_replace('\/$','',$dolibarr_main_url_root); # Supprime le /
|
|
|
|
|
|
$dolibarr_main_url_root = ereg_replace('\/index\.php$','',$dolibarr_main_url_root); # Supprime le /index.php
|
|
|
|
|
|
$dolibarr_main_url_root = ereg_replace('\/install$','',$dolibarr_main_url_root); # Supprime le /install
|
2004-01-27 15:36:40 +01:00
|
|
|
|
}
|
2004-02-01 21:32:41 +01:00
|
|
|
|
print "$dolibarr_main_url_root";
|
2004-01-27 15:36:40 +01:00
|
|
|
|
?>">
|
|
|
|
|
|
</td><td>
|
2004-02-01 21:32:41 +01:00
|
|
|
|
exemples :<br>
|
2004-01-27 15:36:40 +01:00
|
|
|
|
<li>http://dolibarr.lafrere.net</li>
|
|
|
|
|
|
<li>http://www.lafrere.net/dolibarr</li>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
2004-01-30 12:55:53 +01:00
|
|
|
|
|
2004-02-01 21:32:41 +01:00
|
|
|
|
<tr><td colspan="3" align="center"><h2>Base de donn<EFBFBD>es - Acc<EFBFBD>s super utilisateur</h2></td></tr>
|
2004-01-27 15:36:40 +01:00
|
|
|
|
|
|
|
|
|
|
<tr class="bg1">
|
2004-02-01 21:32:41 +01:00
|
|
|
|
<td valign="top">Serveur</td><td valign="top"><input type="text" name="db_host" value="<?PHP print isset($dolibarr_main_db_host)?$dolibarr_main_db_host:'localhost' ?>"></td>
|
|
|
|
|
|
<td><div class="comment">Nom ou adresse ip du serveur de base de donn<EFBFBD>es, g<EFBFBD>n<EFBFBD>ralement 'localhost' quand le serveur est install<EFBFBD> sur la m<EFBFBD>me machine que le serveur web</div></td>
|
2004-01-27 15:36:40 +01:00
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
<tr class="bg2">
|
2004-02-05 00:11:46 +01:00
|
|
|
|
<td valign="top">Login administrateur de la base</td>
|
2004-01-27 15:36:40 +01:00
|
|
|
|
<td>
|
2004-02-01 21:32:41 +01:00
|
|
|
|
<input type="text" name="db_user_root">
|
2004-02-05 00:11:46 +01:00
|
|
|
|
</td><td><div class="comment">Login de l'utilisateur ayant les droits de cr<EFBFBD>ation de bases de donn<EFBFBD>es.<br>Si vous avez d<EFBFBD>j<EFBFBD> une base, vierge ou non, pour accueillir les tables dolibarr (exemple si vous <EFBFBD>tes chez un h<EFBFBD>bergeur), ne rien remplir. Laisser vide <EFBFBD>galement si vous vous connectez en anonymous</div>
|
2004-01-27 15:36:40 +01:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
2004-02-01 21:32:41 +01:00
|
|
|
|
<tr class="bg1">
|
2004-01-27 15:36:40 +01:00
|
|
|
|
<td valign="top">Mot de passe</td>
|
|
|
|
|
|
<td>
|
2004-02-01 21:32:41 +01:00
|
|
|
|
<input type="text" name="db_pass_root">
|
2004-01-30 12:55:53 +01:00
|
|
|
|
</td><td><div class="comment">Laisser vide si vous vous connectez en anonymous</div>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
2004-01-30 17:00:18 +01:00
|
|
|
|
|
2004-02-05 00:11:46 +01:00
|
|
|
|
<tr><td colspan="3" align="center"><h2>Base de donn<EFBFBD>es Dolibarr<h2></td></tr>
|
2004-01-30 17:00:18 +01:00
|
|
|
|
|
2004-02-01 21:32:41 +01:00
|
|
|
|
<tr class="bg2">
|
|
|
|
|
|
<td>Nom de la base de donn<EFBFBD>es</td><td valign="top"><input type="text" name="db_name" value="<?PHP print isset($dolibarr_main_db_name)?$dolibarr_main_db_name:'dolibarr' ?>"></td>
|
|
|
|
|
|
<td><div class="comment">Nom de la base de donn<EFBFBD>es Dolibarr (sera cr<EFBFBD><EFBFBD>e si n<EFBFBD>cessaire)</div></td>
|
|
|
|
|
|
</tr>
|
2004-01-30 12:55:53 +01:00
|
|
|
|
|
|
|
|
|
|
<tr class="bg1">
|
|
|
|
|
|
<td valign="top">Login</td>
|
|
|
|
|
|
<td>
|
2004-02-01 21:32:41 +01:00
|
|
|
|
<input type="text" name="db_user" value="<?PHP print isset($dolibarr_main_db_user)?$dolibarr_main_db_user:'' ?>">
|
|
|
|
|
|
</td><td><div class="comment">Login de l'administrateur de la base de donn<EFBFBD>es Dolibarr. Laisser vide si vous vous connectez en anonymous</div>
|
2004-01-27 15:36:40 +01:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
2004-01-30 12:55:53 +01:00
|
|
|
|
<tr class="bg2">
|
|
|
|
|
|
<td valign="top">Mot de passe</td>
|
|
|
|
|
|
<td>
|
2004-02-01 21:32:41 +01:00
|
|
|
|
<input type="text" name="db_pass" value="<?PHP print isset($dolibarr_main_db_pass)?$dolibarr_main_db_pass:'' ?>">
|
|
|
|
|
|
</td><td><div class="comment">Mot de passe de l'administrateur de la base de donn<EFBFBD>es Dolibarr. Laisser vide si vous vous connectez en anonymous</div>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
<tr class="bg1">
|
|
|
|
|
|
<td valign="top">Cr<EFBFBD>er l'utilisateur</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input type="checkbox" name="db_create_user">
|
|
|
|
|
|
</td><td><div class="comment">Cocher cette option si l'utilisateur doit-<EFBFBD>tre cr<EFBFBD><EFBFBD></div>
|
2004-01-30 12:55:53 +01:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-01-27 15:36:40 +01:00
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="barrebottom">
|
|
|
|
|
|
<input type="submit" value="Etape suivante ->">
|
|
|
|
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|