dolibarr/htdocs/install/database.php

179 lines
4.5 KiB
PHP
Raw Normal View History

<?php
2004-02-11 19:08:59 +01:00
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* 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$
*
*/
$conf = "../conf/conf.php";
if (is_readable($conf))
{
include ($conf);
}
2004-02-12 15:47:09 +01:00
2004-02-11 19:08:59 +01:00
include("./inc.php");
pHeader();
if (!file_exists("../conf/conf.php"))
{
print '<div class="error">';
print "Le fichier <b>conf.php</b> n'existe pas reportez-vous <20> la ".$docurl." pour cr<63>er ce fichier<br>";
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">
<tr>
<td valign="top">
<?php print "R<EFBFBD>pertoire d'installation"; ?>
</td><td valign="top"><input type="text" size="60" value="
<?php
2004-02-11 19:08:59 +01:00
if(strlen($dolibarr_main_url_root) == 0)
{
$dolibarr_main_document_root = substr($_SERVER["SCRIPT_FILENAME"],0,strlen($_SERVER["SCRIPT_FILENAME"])-18);
}
print $dolibarr_main_document_root
?>
" name="main_dir">
</td><td>
Sans le slash "/" <EFBFBD> la fin<br>
exemple : /var/www/dolibarr/htdocs
</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-11 19:08:59 +01:00
if(strlen($dolibarr_main_url_root) == 0)
{
$dolibarr_main_url_root = substr($_SERVER["SCRIPT_URI"],0,strlen($_SERVER["SCRIPT_URI"])-9);
}
print $dolibarr_main_url_root ;
?>">
</td><td>
exemples :
<br>
<ul>
<li>http://dolibarr.lafrere.net</li>
<li>http://www.lafrere.net/dolibarr</li>
</ul>
</tr>
<tr>
<td colspan="3" align="center"><h2>Base de donn<EFBFBD>es<h2></td>
</tr>
<?php
2004-02-12 15:47:09 +01:00
if (!isset($dolibarr_main_db_host))
{
$dolibarr_main_db_host = "localhost";
}
?>
2004-02-11 19:08:59 +01:00
<tr class="bg1">
<td valign="top">Serveur</td><td valign="top"><input type="text" name="db_host" value="<?php print $dolibarr_main_db_host ?>"></td>
2004-02-11 19:08:59 +01:00
<td><div class="comment">Nom 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>
</tr>
<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 $dolibarr_main_db_name ?>"></td>
2004-02-11 19:08:59 +01:00
<td><div class="comment">Nom de votre base de donn<EFBFBD>es</div></td>
</tr>
<tr class="bg1">
<td valign="top">Login</td>
<td>
<input type="text" name="db_user" value="<?php print $dolibarr_main_db_user ?>">
2004-02-11 19:08:59 +01:00
</td><td><div class="comment">Laisser vide si vous vous connectez en anonymous</div>
</td>
</tr>
<tr class="bg2">
<td valign="top">Mot de passe</td>
<td>
<input type="text" name="db_pass" value="<?php print $dolibarr_main_db_pass ?>">
2004-02-11 19:08:59 +01:00
</td><td><div class="comment">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>
</td>
</tr>
<tr><td colspan="3" align="center"><h2>Base de donn<EFBFBD>es - Acc<EFBFBD>s super utilisateur</h2></td></tr>
<tr class="bg1">
<td valign="top">Login</td>
<td>
<input type="text" name="db_user_root">
</td><td><div class="comment">Login de l'utilisateur ayant les droits de cr<EFBFBD>ation de la base de donn<EFBFBD>es, inutile si vous <EFBFBD>tes chez un h<EFBFBD>bergeur, votre base de donn<EFBFBD>es est d<EFBFBD>j<EFBFBD> cr<EFBFBD><EFBFBD>e. Laisser vide si vous vous connectez en anonymous</div>
</td>
</tr>
<tr class="bg2">
<td valign="top">Mot de passe</td>
<td>
<input type="text" name="db_pass_root">
</td><td><div class="comment">Laisser vide si vous vous connectez en anonymous</div>
</td>
</tr>
</table>
</div>
</div>
<div class="barrebottom">
<input type="submit" value="Etape suivante ->">
</form>
</div>
</body>
</html>