Trad: Traductions manquantes dans étape install

This commit is contained in:
Laurent Destailleur 2005-06-11 11:35:58 +00:00
parent 1274840619
commit d3d047990c
3 changed files with 72 additions and 58 deletions

View File

@ -70,15 +70,12 @@ div.main-inside {
margin-top: 10px; margin-top: 10px;
} }
div.error { div.error {
font-size: 1.3em; color: #550000; font-weight: bold;
padding: 10px; padding: 0.2em 0.2em 0.2em 0.2em;
margin-top: 10px; margin: 0.5em 0em 0.5em 0em;
border: 1px solid red; border: 1px solid #6C7C8B;
} }
div.barrebottom { div.barrebottom {
text-align: right; text-align: right;

View File

@ -1,7 +1,8 @@
<?php <?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -24,7 +25,7 @@
/** /**
\file htdocs/install/etape4.php \file htdocs/install/etape4.php
\brief Demande le login et mode de passe de l'administrateur Dolibarr \brief Demande le login et mot de passe de l'administrateur Dolibarr
\version $Revision$ \version $Revision$
*/ */
@ -52,7 +53,7 @@ else
require ($dolibarr_main_document_root . "/conf/conf.class.php"); require ($dolibarr_main_document_root . "/conf/conf.class.php");
print '<table cellspacing="0" cellpadding="4" border="1" width="100%">'; print '<table cellspacing="0" cellpadding="2" width="100%">';
$err=0; $err=0;
@ -78,11 +79,13 @@ if ($db->ok == 1)
if (isset($_GET["error"]) && $_GET["error"] == 1) if (isset($_GET["error"]) && $_GET["error"] == 1)
{ {
print '<br>';
print '<div class="error">'.$langs->trans("PasswordsMismatch").'</div>'; print '<div class="error">'.$langs->trans("PasswordsMismatch").'</div>';
} }
if (isset($_GET["error"]) && $_GET["error"] == 2) if (isset($_GET["error"]) && $_GET["error"] == 2)
{ {
print '<br>';
print '<div class="error">'; print '<div class="error">';
print $langs->trans("PleaseTypePassword"); print $langs->trans("PleaseTypePassword");
print '</div>'; print '</div>';
@ -90,6 +93,7 @@ if ($db->ok == 1)
if (isset($_GET["error"]) && $_GET["error"] == 3) if (isset($_GET["error"]) && $_GET["error"] == 3)
{ {
print '<br>';
print '<div class="error">'.$langs->trans("PleaseTypeALogin").'</div>'; print '<div class="error">'.$langs->trans("PleaseTypeALogin").'</div>';
} }

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org>
@ -20,10 +20,10 @@
* *
* $Id$ * $Id$
* $Source$ * $Source$
*
*/ */
/** \file htdocs/install/etape5.php /**
\file htdocs/install/etape5.php
\brief Page de fin d'installation \brief Page de fin d'installation
\version $Revision$ \version $Revision$
*/ */
@ -39,76 +39,89 @@ $success=0;
if (file_exists($conffile)) if (file_exists($conffile))
{ {
include($conffile); include($conffile);
} }
if($dolibarr_main_db_type == "mysql") if($dolibarr_main_db_type == "mysql")
require ($dolibarr_main_document_root . "/lib/mysql.lib.php"); require ($dolibarr_main_document_root . "/lib/mysql.lib.php");
else else
require ($dolibarr_main_document_root . "/lib/pgsql.lib.php"); require ($dolibarr_main_document_root . "/lib/pgsql.lib.php");
require ($dolibarr_main_document_root . "/conf/conf.class.php"); require ($dolibarr_main_document_root . "/conf/conf.class.php");
if ($_POST["action"] == "set") if ($_POST["action"] == "set")
{ {
if ($_POST["pass"] <> $_POST["pass_verif"]) if ($_POST["pass"] <> $_POST["pass_verif"])
{ {
Header("Location: etape4.php?error=1&selectlang=$setuplang"); Header("Location: etape4.php?error=1&selectlang=$setuplang");
} }
if (strlen(trim($_POST["pass"])) == 0) if (strlen(trim($_POST["pass"])) == 0)
{ {
Header("Location: etape4.php?error=2&selectlang=$setuplang"); Header("Location: etape4.php?error=2&selectlang=$setuplang");
} }
if (strlen(trim($_POST["login"])) == 0) if (strlen(trim($_POST["login"])) == 0)
{ {
Header("Location: etape4.php?error=3&selectlang=$setuplang"); Header("Location: etape4.php?error=3&selectlang=$setuplang");
} }
pHeader($langs->trans("SetupEnd"),"etape5"); pHeader($langs->trans("SetupEnd"),"etape5");
print '<table cellspacing="0" cellpadding="4" border="1" width="100%">'; print '<table cellspacing="0" cellpadding="2" width="100%">';
$error=0; $error=0;
$conf = new Conf(); $conf = new Conf();
$conf->db->type = $dolibarr_main_db_type; $conf->db->type = $dolibarr_main_db_type;
$conf->db->host = $dolibarr_main_db_host; $conf->db->host = $dolibarr_main_db_host;
$conf->db->name = $dolibarr_main_db_name; $conf->db->name = $dolibarr_main_db_name;
$conf->db->user = $dolibarr_main_db_user; $conf->db->user = $dolibarr_main_db_user;
$conf->db->pass = $dolibarr_main_db_pass; $conf->db->pass = $dolibarr_main_db_pass;
$db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name); $db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name);
$ok = 0; $ok = 0;
if ($db->connected == 1) if ($db->connected == 1)
{ {
$sql = "INSERT INTO llx_user(datec,login,pass,admin,name,code) VALUES (now()"; $sql = "INSERT INTO llx_user(datec,login,pass,admin,name,code) VALUES (now()";
$sql .= ",'".$_POST["login"]."'"; $sql .= ",'".$_POST["login"]."'";
$sql .= ",'".$_POST["pass"]."'"; $sql .= ",'".$_POST["pass"]."'";
$sql .= ",1,'Administrateur','ADM')"; $sql .= ",1,'Administrateur','ADM')";
} }
if ($db->query($sql) || $db->errno() == 1062)
{
$db->query("DELETE FROM llx_const WHERE name='MAIN_NOT_INSTALLED'");
print $langs->trans("AdminLoginCreatedSuccessfuly")."<br>";
$success = 1;
}
else
{
print "Echec de la création du compte administrateur<br>";
}
print '</table>';
$db->close(); $resql=$db->query($sql);
if ($resql)
{
$db->query("DELETE FROM llx_const WHERE name='MAIN_NOT_INSTALLED'");
print $langs->trans("AdminLoginCreatedSuccessfuly")."<br>";
$success = 1;
}
else
{
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
print $langs->trans("AdminLoginAlreadyExists",$_POST["login"])."<br>";
}
else {
print $langs->trans("FailedToCreateAdminLogin")."<br>";
}
}
// Si install non Français, on configure pour fonctionner en mode internationnal
if ($langs->defaultlang != "fr_FR") {
$db->query("INSERT INTO llx_const(name,value,type,visible) values ('COMPANY_CREATE_TWO_STEPS','1','yesno',0)");
}
print '</table>';
$db->close();
} }
?> print "<br>";
<br>
<?php
print $langs->trans("SystemIsInstalled")."<br>"; print $langs->trans("SystemIsInstalled")."<br>";
print $langs->trans("YouNeedToPersonalizeSetup")."<br>"; print $langs->trans("YouNeedToPersonalizeSetup")."<br>";