2
0
forked from Wavyzz/dolibarr

Modif suite a retour test

This commit is contained in:
Laurent Destailleur
2005-11-02 23:13:13 +00:00
parent 43e141629d
commit 8acd1fa23e
2 changed files with 54 additions and 50 deletions

View File

@@ -43,8 +43,8 @@ pHeader($langs->trans("DolibarrWelcome"),""); // Etape suivante = license
print $langs->trans("InstallEasy")."<br>";
// Si fichier pr<70>sent et lisible
if (is_readable($conffile))
// Si fichier pr<70>sent et lisible et renseign<67>
if (is_readable($conffile) && sizeof($conffile) > 8)
{
$confexists=1;
include_once($conffile);
@@ -73,30 +73,31 @@ else
// Si fichier absent et n'a pu etre cr<63><72>
if (!file_exists($conffile))
{
print "<br /><br />";
print "Le fichier de configuration <b>conf.php</b> n'existe pas !";
print "<br />";
print "Vous devez cr<63>er un fichier <b>htdocs/conf/conf.php</b> et donner les droits d'<27>criture dans celui-ci au serveur web durant le processus d'installation.";
print "<br /><br />";
print 'Corrigez le probl<62>me et <a href="index.php">rechargez la page</a>.';
$err++;
print "<br /><br />";
print $langs->trans("ConfFileDoesNotExists",'conf.php');
print "<br />";
print $langs->trans("YouMustCreateWithPermission",'htdocs/conf/conf.php');
print "<br /><br />";
print $langs->trans("CorrectProblemAndReloadPage");
$err++;
}
else
{
print "<br />\n";
// Si ficiher pr<70>sent mais ne peut etre modifi<66>
// Si fichier pr<70>sent mais ne peut etre modifi<66>
if (!is_writable($conffile))
{
if ($confexists) {
print $langs->trans("ConfFileExists");
if ($confexists)
{
print $langs->trans("ConfFileExists",'conf.php');
}
else {
print $langs->trans("ConfFileCouldBeCreated");
else
{
print $langs->trans("ConfFileCouldBeCreated",'conf.php');
}
print "<br />";
print $langs->trans("ConfFileIsNotWritable");
print $langs->trans("ConfFileIsNotWritable",'htdocs/conf/conf.php');
print "<br />";
$allowinstall=0;
@@ -104,14 +105,16 @@ else
// Si fichier pr<70>sent et peut etre modifi<66>
else
{
if ($confexists) {
print $langs->trans("ConfFileExists");
if ($confexists)
{
print $langs->trans("ConfFileExists",'conf.php');
}
else {
print $langs->trans("ConfFileCouldBeCreated");
else
{
print $langs->trans("ConfFileCouldBeCreated",'conf.php');
}
print "<br />";
print $langs->trans("ConfFileIsWritable");
print $langs->trans("ConfFileIsWritable",'conf.php');
print "<br />";
$allowinstall=1;

View File

@@ -54,26 +54,27 @@ print "</td>";
if(! isset($dolibarr_main_url_root) || strlen($dolibarr_main_url_root) == 0)
{
// Si le php fonctionne en CGI, alors SCRIPT_FILENAME vaut le path du php et
// ce n'est pas ce qu'on veut. Dans ce cas, on propose $_SERVER["DOCUMENT_ROOT"]
if (eregi('php$',$_SERVER["SCRIPT_FILENAME"]) || eregi('php\.exe$',$_SERVER["SCRIPT_FILENAME"])) {
$dolibarr_main_document_root=$_SERVER["DOCUMENT_ROOT"];
if (! eregi('\/dolibarr/htdocs$',$dolibarr_main_document_root))
{
$dolibarr_main_document_root.="/dolibarr/htdocs";
}
}
else
// Si le php fonctionne en CGI, alors SCRIPT_FILENAME vaut le path du php et
// ce n'est pas ce qu'on veut. Dans ce cas, on propose $_SERVER["DOCUMENT_ROOT"]
if (eregi('php$',$_SERVER["SCRIPT_FILENAME"]) || eregi('php\.exe$',$_SERVER["SCRIPT_FILENAME"]))
{
$dolibarr_main_document_root = substr($_SERVER["SCRIPT_FILENAME"],0,strlen($_SERVER["SCRIPT_FILENAME"])- 21 );
// Nettoyage du path propos<6F>
// Gere les chemins windows avec double "\"
$dolibarr_main_document_root = str_replace('\\\\','/',$dolibarr_main_document_root);
// Supprime le slash ou antislash final
$dolibarr_main_document_root = ereg_replace('[\\\\\/]$','',$dolibarr_main_document_root);
}
$dolibarr_main_document_root=$_SERVER["DOCUMENT_ROOT"];
if (! eregi('[\/\\]dolibarr[\/\\]htdocs$',$dolibarr_main_document_root))
{
$dolibarr_main_document_root.="/dolibarr/htdocs";
}
}
else
{
$dolibarr_main_document_root = substr($_SERVER["SCRIPT_FILENAME"],0,strlen($_SERVER["SCRIPT_FILENAME"]) - 21);
// Nettoyage du path propose
// Gere les chemins windows avec double "\"
$dolibarr_main_document_root = str_replace('\\\\','/',$dolibarr_main_document_root);
// Supprime les slash ou antislash de fins
$dolibarr_main_document_root = ereg_replace('[\\\/]+$','',$dolibarr_main_document_root);
}
}
?>
@@ -162,8 +163,8 @@ $dolibarr_main_db_host = "localhost";
</td>
<td class="label"><select name='db_type'>
<option value='mysql'<?php echo (!$dolibarr_main_db_type||$dolibarr_main_db_type=='mysql')?" selected":"" ?>>MySql</option>
<option value='pgsql'<?php echo ($dolibarr_main_db_type=='pgsql')?" selected":"" ?>>PostgreSQL <?php echo $langs->trans("Experimental"); ?></option>
<option value='mysql'<?php echo (! isset($dolibarr_main_db_type) || $dolibarr_main_db_type=='mysql')?" selected":"" ?>>MySql</option>
<option value='pgsql'<?php echo (isset($dolibarr_main_db_type) && $dolibarr_main_db_type=='pgsql')?" selected":"" ?>>PostgreSQL <?php echo $langs->trans("Experimental"); ?></option>
</select>
&nbsp;
</td>
@@ -178,8 +179,8 @@ $dolibarr_main_db_host = "localhost";
<td valign="top" class="label">
<?php echo $langs->trans("Server"); ?>
</td>
<td valign="top" class="label"><input type="text" name="db_host" value="<?php print $dolibarr_main_db_host ?>">
<input type="hidden" name="base" value="<?php print $test_base?>">
<td valign="top" class="label"><input type="text" name="db_host" value="<?php print isset($dolibarr_main_db_host)?$dolibarr_main_db_host:''; ?>">
<input type="hidden" name="base" value="">
</td>
<td class="comment">
Nom ou adresse ip du serveur de base de donn<6E>es, g<>n<EFBFBD>ralement 'localhost' quand le serveur est install<6C> sur la m<>me machine que le serveur web
@@ -192,7 +193,7 @@ Nom ou adresse ip du serveur de base de donn
<?php echo $langs->trans("DatabaseName"); ?>
</td>
<td class="label" valign="top"><input type="text" name="db_name" value="<?php echo $dolibarr_main_db_name ?>"></td>
<td class="label" valign="top"><input type="text" name="db_name" value="<?php echo isset($dolibarr_main_db_name)?$dolibarr_main_db_name:''; ?>"></td>
<td class="comment">
<?php echo $langs->trans("DatabaseName"); ?>
</td>
@@ -213,7 +214,7 @@ Nom ou adresse ip du serveur de base de donn
<td class="label" valign="top">
<?php echo $langs->trans("Login"); ?>
</td>
<td class="label" valign="top"><input type="text" name="db_user" value="<?php print isset($dolibarr_main_db_user)?$dolibarr_main_db_user:'' ?>"></td>
<td class="label" valign="top"><input type="text" name="db_user" value="<?php print isset($dolibarr_main_db_user)?$dolibarr_main_db_user:''; ?>"></td>
<td class="comment">
<?php echo $langs->trans("AdminLogin"); ?>
</td>
@@ -223,7 +224,7 @@ Nom ou adresse ip du serveur de base de donn
<td class="label" valign="top">
<?php echo $langs->trans("Password"); ?>
</td>
<td class="label" valign="top"><input type="text" name="db_pass" value="<?php print isset($dolibarr_main_db_pass)?$dolibarr_main_db_pass:'' ?>"></td>
<td class="label" valign="top"><input type="text" name="db_pass" value="<?php print isset($dolibarr_main_db_pass)?$dolibarr_main_db_pass:''; ?>"></td>
<td class="comment">
<?php echo $langs->trans("AdminPassword"); ?>
</td>
@@ -249,7 +250,7 @@ Nom ou adresse ip du serveur de base de donn
<td class="label" valign="top">
<?php echo $langs->trans("Login"); ?>
</td>
<td class="label" valign="top"><input type="text" name="db_user_root" value="<?php if(isset($db_user_root)) print $db_user_root; ?>"></td>
<td class="label" valign="top"><input type="text" name="db_user_root" value="<?php if (isset($db_user_root)) print $db_user_root; ?>"></td>
<td class="label"><div class="comment">Login de l'utilisateur ayant les droits de cr<63>ation de la base de donn<6E>es, inutile si votre base est d<>j<EFBFBD> cr<63><72>e (comme lorsque vous <20>tes chez un h<>bergeur). Laisser vide si vous vous connectez en anonymous</div>
</td>
</tr>
@@ -258,7 +259,7 @@ Nom ou adresse ip du serveur de base de donn
<td class="label" valign="top">
<?php echo $langs->trans("Password"); ?>
</td>
<td class="label" valign="top"><input type="text" name="db_pass_root" value="<?php if(isset($db_pass_root)) print $db_pass_root; ?>"></td>
<td class="label" valign="top"><input type="text" name="db_pass_root" value="<?php if (isset($db_pass_root)) print $db_pass_root; ?>"></td>
<td class="label"><div class="comment">
<?php echo $langs->trans("KeepEmptyIfNoPassword"); ?>
</div>