Qual: Amlioration messages a l'install
New: Si logo entreprise defini, on utilise celui la sur logon
This commit is contained in:
parent
bfc3703f99
commit
2c77d49aef
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2007 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
|
||||
@ -37,62 +37,70 @@ if (!$user->admin)
|
||||
if ( (isset($_POST["action"]) && $_POST["action"] == 'update')
|
||||
|| (isset($_POST["action"]) && $_POST["action"] == 'updateedit') )
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS",$_POST["pays_id"]);
|
||||
dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX",$_POST["fax"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL",$_POST["mail"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB",$_POST["web"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE",$_POST["note"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD",$_POST["gencod"]);
|
||||
if ($_FILES["logo"]["tmp_name"])
|
||||
{
|
||||
if (eregi('([^\\\/:]+)$',$_FILES["logo"]["name"],$reg))
|
||||
{
|
||||
$original_file=$reg[1];
|
||||
|
||||
dolibarr_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->societe->dir_logos.'/'.$original_file);
|
||||
if (! is_dir($conf->societe->dir_logos))
|
||||
{
|
||||
create_exdir($conf->societe->dir_logos);
|
||||
}
|
||||
if (doliMoveFileUpload($_FILES["logo"]["tmp_name"],$conf->societe->dir_logos.'/'.$original_file))
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
$message .= '<div class="error">'.$langs->trans("ErrorFailedToSaveFile").'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS",$_POST["pays_id"]);
|
||||
dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX",$_POST["fax"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL",$_POST["mail"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB",$_POST["web"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE",$_POST["note"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD",$_POST["gencod"]);
|
||||
if ($_FILES["logo"]["tmp_name"])
|
||||
{
|
||||
if (eregi('([^\\\/:]+)$',$_FILES["logo"]["name"],$reg))
|
||||
{
|
||||
$original_file=$reg[1];
|
||||
|
||||
if (eregi('(\.png|\.jpg|\.jpeg)$',$original_file))
|
||||
{
|
||||
dolibarr_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->societe->dir_logos.'/'.$original_file);
|
||||
if (! is_dir($conf->societe->dir_logos))
|
||||
{
|
||||
create_exdir($conf->societe->dir_logos);
|
||||
}
|
||||
if (doliMoveFileUpload($_FILES["logo"]["tmp_name"],$conf->societe->dir_logos.'/'.$original_file))
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
$message .= '<div class="error">'.$langs->trans("ErrorFailedToSaveFile").'</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message .= '<div class="error">'.$langs->trans("ErrorOnlyPngJpgSupported").'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE",$_POST["forme_juridique_code"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIREN",$_POST["siren"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIRET",$_POST["siret"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_APE",$_POST["ape"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_RCS",$_POST["rcs"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$_POST["tva"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE",$_POST["forme_juridique_code"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIREN",$_POST["siren"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIRET",$_POST["siret"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_APE",$_POST["ape"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_RCS",$_POST["rcs"]);
|
||||
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$_POST["tva"]);
|
||||
|
||||
dolibarr_set_const($db, "FACTURE_TVAOPTION",$_POST["optiontva"]);
|
||||
dolibarr_set_const($db, "FACTURE_TVAOPTION",$_POST["optiontva"]);
|
||||
|
||||
if ($_POST['action'] != 'updateedit')
|
||||
{
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
if ($_POST['action'] != 'updateedit' && ! $message)
|
||||
{
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if ($_GET["action"] == 'removelogo')
|
||||
{
|
||||
$logofile=$conf->societe->dir_logos.'/'.$mysoc->logo;
|
||||
@unlink($logofile);
|
||||
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO");
|
||||
$logofile=$conf->societe->dir_logos.'/'.$mysoc->logo;
|
||||
@unlink($logofile);
|
||||
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO");
|
||||
$mysoc->logo='';
|
||||
}
|
||||
|
||||
/*
|
||||
@ -183,7 +191,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
||||
print ' ';
|
||||
print '<img height="30" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.$mysoc->logo.'">';
|
||||
print '<img height="30" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($mysoc->logo).'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -55,6 +55,14 @@ border-right: 1px solid #8CACBB;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
inputdisabled
|
||||
{
|
||||
background: #FDFDFD;
|
||||
border: 1px solid #ACBCBB;
|
||||
padding: 0px 0px 0px 0px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
table.main {
|
||||
background: #dcdcd3;
|
||||
text-align: left;
|
||||
@ -62,8 +70,8 @@ border: 1px solid #8CACBB;
|
||||
}
|
||||
|
||||
table.main-inside {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@ -150,7 +158,7 @@ background-color: #B5C5C5;
|
||||
td.label {
|
||||
background: #dcdcd3;
|
||||
color: #5945A3;
|
||||
padding: 0.5em 0.5em 0.5em;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0em 0em 0em 0em;
|
||||
border-bottom: 1px solid #8CACBB;
|
||||
}
|
||||
@ -158,7 +166,7 @@ border-bottom: 1px solid #8CACBB;
|
||||
td.comment {
|
||||
background: #dcdcd3;
|
||||
color: black;
|
||||
padding: 0.5em 0.5em 0.5em;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 0em 0em 0em 0em;
|
||||
text-decoration:none;
|
||||
font-size: 13px;
|
||||
@ -166,11 +174,11 @@ border-bottom: 1px solid #8CACBB;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 13px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.install
|
||||
{
|
||||
border: 1px solid #8CACBB;
|
||||
padding: 4px 4px 4px 4px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ while (($file = readdir($handle))!==false)
|
||||
<?php echo $langs->trans("CreateDatabase"); ?>
|
||||
</td>
|
||||
|
||||
<td class="label"><input type="checkbox" name="db_create_database"></td>
|
||||
<td class="label" valign="top"><input type="checkbox" name="db_create_database"></td>
|
||||
<td class="comment">
|
||||
<?php echo $langs->trans("CheckToCreateDatabase"); ?>
|
||||
</td>
|
||||
@ -302,7 +302,7 @@ while (($file = readdir($handle))!==false)
|
||||
<?php echo $langs->trans("CreateUser"); ?>
|
||||
</td>
|
||||
|
||||
<td class="label"><input type="checkbox" name="db_create_user"></td>
|
||||
<td class="label" valign="top"><input type="checkbox" name="db_create_user"></td>
|
||||
<td class="comment">
|
||||
<?php echo $langs->trans("CheckToCreateUser"); ?>
|
||||
</td>
|
||||
|
||||
@ -134,26 +134,26 @@ function pHeader($soutitre,$next,$action='set')
|
||||
header("Content-type: text/html; charset=".$conf->character_set_client);
|
||||
|
||||
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'."\n";
|
||||
print '<html>';
|
||||
print '<head>';
|
||||
print '<meta http-equiv="content-type" content="text/html; charset='.$conf->character_set_client.'">';
|
||||
print '<link rel="stylesheet" type="text/css" href="./default.css">';
|
||||
print '<title>'.$langs->trans("DolibarrSetup").'</title>';
|
||||
print '</head>';
|
||||
print '<body>';
|
||||
print '<html>'."\n";
|
||||
print '<head>'."\n";
|
||||
print '<meta http-equiv="content-type" content="text/html; charset='.$conf->character_set_client.'">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="./default.css">'."\n";
|
||||
print '<title>'.$langs->trans("DolibarrSetup").'</title>'."\n";
|
||||
print '</head>'."\n";
|
||||
print '<body>'."\n";
|
||||
print '<span class="titre">'.$langs->trans("DolibarrSetup");
|
||||
if ($soutitre) {
|
||||
print ' - '.$soutitre;
|
||||
}
|
||||
print '</span>';
|
||||
print '</span>'."\n";
|
||||
|
||||
print '<form action="'.$next.'.php" method="POST">';
|
||||
print '<input type="hidden" name="testpost" value="ok">';
|
||||
print '<input type="hidden" name="action" value="'.$action.'">';
|
||||
print '<form action="'.$next.'.php" method="POST">'."\n";
|
||||
print '<input type="hidden" name="testpost" value="ok">'."\n";
|
||||
print '<input type="hidden" name="action" value="'.$action.'">'."\n";
|
||||
|
||||
print '<table class="main" width="100%"><tr><td>';
|
||||
print '<table class="main" width="100%"><tr><td>'."\n";
|
||||
|
||||
print '<table class="main-inside" width="100%"><tr><td>';
|
||||
print '<table class="main-inside" width="100%"><tr><td>'."\n";
|
||||
}
|
||||
|
||||
function pFooter($nonext=0,$setuplang='')
|
||||
@ -162,8 +162,8 @@ function pFooter($nonext=0,$setuplang='')
|
||||
$langs->load("main");
|
||||
$langs->load("admin");
|
||||
|
||||
print '</td></tr></table>';
|
||||
print '</td></tr></table>';
|
||||
print '</td></tr></table>'."\n";
|
||||
print '</td></tr></table>'."\n";
|
||||
|
||||
if (! $nonext)
|
||||
{
|
||||
@ -174,9 +174,9 @@ function pFooter($nonext=0,$setuplang='')
|
||||
print '<input type="hidden" name="selectlang" value="'.$setuplang.'">';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
print '</body>';
|
||||
print '</html>';
|
||||
print '</form>'."\n";
|
||||
print '</body>'."\n";
|
||||
print '</html>'."\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2007 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
|
||||
@ -18,7 +18,6 @@
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -40,9 +39,13 @@ dolibarr_install_syslog("licence: Entering licence.php page");
|
||||
|
||||
pHeader($langs->trans("License"),"fileconf");
|
||||
|
||||
print '<pre style="align: center; font-size: 12px">';
|
||||
print '<center>'."\n";
|
||||
//print '<pre style="align: center; font-size: 12px">';
|
||||
print '<textarea readonly="1" rows="26" cols="80">';
|
||||
$langs->print_file("html/gpl.txt",1);
|
||||
print '</pre>';
|
||||
//print '</pre>';
|
||||
print '</textarea>';
|
||||
print '</center>'."\n";
|
||||
|
||||
pFooter(0,$setuplang);
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ PHPVersion=PHP Version
|
||||
YouCanContinue=You can continue...
|
||||
License=Using license
|
||||
ConfigurationFile=Configuration file
|
||||
WebPagesDirectory=Directory to store web pages
|
||||
WebPagesDirectory=Directory where web pages are stored
|
||||
DocumentsDirectory=Directory to store uploaded and generated documents
|
||||
URLRoot=URL Root
|
||||
DolibarrDatabase=Dolibarr Database
|
||||
@ -44,10 +44,10 @@ AdminPassword=Password for Dolibarr database administrator. Keep empty if you co
|
||||
CreateDatabase=Create database
|
||||
CreateUser=Create user
|
||||
DatabaseSuperUserAccess=Database - Superuser access
|
||||
CheckToCreateDatabase=Check box if database does not exist and must be created
|
||||
CheckToCreateUser=Check box if login does not exist and must be created
|
||||
CheckToCreateDatabase=Check box if database does not exist and must be created.<br>In this case, you must fill the login/password for superuser account at the bottom of this page.
|
||||
CheckToCreateUser=Check box if login does not exist and must be created.<br>In this case, you must fill the login/password for superuser account at the bottom of this page.
|
||||
Experimental=(experimental, non operationnal)
|
||||
DatabaseRootLoginDescription=Login for user user allowed to create new databases, useless if your database is already created (like when you are hosted by an web hosting provider).
|
||||
DatabaseRootLoginDescription=Login for the user allowed to create new databases or new users, useless if your database and your database login already exists (like when you're hosted by a web hosting provider).
|
||||
KeepEmptyIfNoPassword=Keep empty if user has no password
|
||||
SaveConfigurationFile=Save values
|
||||
ConfigurationSaving=Configuration file saving
|
||||
@ -101,11 +101,11 @@ AlreadyDone=Already migrated
|
||||
DatabaseVersion=Database version
|
||||
ServerVersion=Database server version
|
||||
YouMustCreateItAndAllowServerToWrite=You must create this directory and grant web server to write into.
|
||||
CharsetChoice=Ccharacter set choice
|
||||
CharacterSetClient=Character set used for generating web pages
|
||||
CharsetChoice=Character set choice
|
||||
CharacterSetClient=Character set used for generated HTML web pages
|
||||
CharacterSetClientComment=Choose character set for web display.<br/> Default proposed character set is the one of your database.
|
||||
CollationConnection=Collation used for the database
|
||||
CollationConnectionComment=Choose collation wanted for creating database.<br/>This parameter can't be defined if database already exists.
|
||||
CollationConnection=Character sorting order
|
||||
CollationConnectionComment=Choose page code that defines character's sorting order used by database. This parameter is also called 'collation' by some databases.<br/>This parameter can't be defined if database already exists.
|
||||
CharacterSetDatabase=Character set for database
|
||||
CharacterSetDatabaseComment=Choose character set wanted for database creation.<br/>This parameter can't be defined if database already exists.
|
||||
YouAskDatabaseCreationSoDolibarrNeedToConnect=You ask to create database login <b>%s</b>, but for this, Dolibarr need to connect to server <b>%s</b> with super user <b>%s</b> permissions.
|
||||
|
||||
@ -33,6 +33,8 @@ ErrorSomeErrorWereFoundRollbackIsDone=Some errors were found. We rollback change
|
||||
ErrorConfigParameterNotDefined=Parameter <b>%s</b> is not defined inside Dolibarr config file <b>conf.php</b>.
|
||||
ErrorCantLoadUserFromDolibarrDatabase=Failed to find user <b>%s</b> in Dolibarr database.
|
||||
ErrorNoVATRateDefinedForSellerCountry=Error, no vat rates defined for country '%s'.
|
||||
ErrorFailedToSaveFile=Error, failed to save file.
|
||||
ErrorOnlyPngJpgSupported=Error, only .png and .jpg image format file are supported.
|
||||
DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr authentication mode is setup to <b>%s</b> in configuration file <b>conf.php</b>.<br>This means that password database is extern to Dolibarr, so changing this field may have no effects.
|
||||
Undefined=Undefined
|
||||
PasswordForgotten=Password forgotten ?
|
||||
|
||||
@ -74,7 +74,6 @@ LoginAccountDisable=Account disabled, put a new login to activate it.
|
||||
LoginAccountDisableInDolibarr=Account disabled in Dolibarr.
|
||||
LoginAccountDisableInLdap=Account disabled in the domain.
|
||||
UsePersonalValue=Use personal value
|
||||
ErrorFailedToSaveFile=Error - Failed to save file
|
||||
GuiLanguage=Interface language
|
||||
InternalUser=Internal user
|
||||
MyInformations=My data
|
||||
|
||||
@ -25,8 +25,8 @@ PHPVersion=Version PHP
|
||||
YouCanContinue=Vous pouvez continuer...
|
||||
License=Licence d'utilisation
|
||||
ConfigurationFile=Fichier de configuration
|
||||
WebPagesDirectory=Répertoire d'installation des pages web
|
||||
DocumentsDirectory=Répertoire contenant les documents générés (PDF, etc.)
|
||||
WebPagesDirectory=Répertoire contenat les pages web
|
||||
DocumentsDirectory=Répertoire devant contenir les documents générés (PDF, etc.)
|
||||
URLRoot=URL Racine
|
||||
DolibarrDatabase=Base de données Dolibarr
|
||||
DatabaseChoice=Choix de la base de données
|
||||
@ -44,10 +44,10 @@ AdminPassword=Mot de passe de l'administrateur de la base de donn
|
||||
CreateDatabase=Créer la base de donnée
|
||||
CreateUser=Créer l'utilisateur
|
||||
DatabaseSuperUserAccess=Base de données - Accès super utilisateur
|
||||
CheckToCreateDatabase=Cochez cette option si la base de données n'existe pas et doit être créée
|
||||
CheckToCreateUser=Cochez cette option si le login n'existe pas et doit être créé
|
||||
CheckToCreateDatabase=Cochez cette option si la base de données n'existe pas et doit être créée.<br>Dans ce cas, il faut renseigner le login/mot de passe du superutilisateur au bas de cette page.
|
||||
CheckToCreateUser=Cochez cette option si le login n'existe pas et doit être créé.<br>Dans ce cas, il faut renseigner le login/mot de passe du superutilisateur au bas de cette page.
|
||||
Experimental=(expérimental, non opérationnel)
|
||||
DatabaseRootLoginDescription=Login de l'utilisateur ayant les droits de création de la base de données, inutile si votre base est déjà créée (comme lorsque vous êtes chez un hébergeur).
|
||||
DatabaseRootLoginDescription=Login de l'utilisateur de la base ayant les droits de création de base de données ou de compte pour la base, inutile si la base et son compte d'accès existe déjà (comme lorsque vous êtes chez un hébergeur).
|
||||
KeepEmptyIfNoPassword=Laissez vide si l'utilisateur n'a pas de mot de passe
|
||||
SaveConfigurationFile=Enregistrement du fichier de configuration
|
||||
ConfigurationSaving=Enregistrement du fichier de configuration
|
||||
@ -104,8 +104,8 @@ YouMustCreateItAndAllowServerToWrite=Vous devez cr
|
||||
CharsetChoice=Choix du codage des caractères
|
||||
CharacterSetClient=Codage utilisé pour l'affichage des pages
|
||||
CharacterSetClientComment=Veuillez choisir le codage que vous souhaitez pour l'affichage des pages.<br/> Le codage proposé par défaut est celui de votres base de donnée par défaut.
|
||||
CollationConnection=Collation utilisée pour la base de données
|
||||
CollationConnectionComment=Veuillez choisir la collation que vous désirez choisir pour la création de la base de données.<br/> Ce paramètre n'est pas sélectionnable si votre base est déjà créée.
|
||||
CollationConnection=Ordre de tri utilisé pour la base de données
|
||||
CollationConnectionComment=Veuillez choisir la page de code définissant l'ordre de tri des caractères utilisé par la base de donnée. Ce paramètre est aussi appelé 'collation' par certaines bases de données.<br/> Ce paramètre n'est pas sélectionnable si votre base est déjà créée.
|
||||
CharacterSetDatabase=Codage utilisé pour la base de données
|
||||
CharacterSetDatabaseComment=Veuillez choisir le codage que vous désirez choisir pour la création de la base de données.<br/> Ce paramètre n'est pas sélectionnable si votre base est déjà créée.
|
||||
YouAskDatabaseCreationSoDolibarrNeedToConnect=Vous avez demandé la création du login de base de donnée <b>%s</b>, mais pour cela, Dolibarr doit se connecter sur le serveur <b>%s</b> via le super utilisateur <b>%s</b>.
|
||||
|
||||
@ -33,6 +33,8 @@ ErrorSomeErrorWereFoundRollbackIsDone=Des erreurs ont
|
||||
ErrorConfigParameterNotDefined=Le parametre <b>%s</b> n'est pas défini dans le fichier de configuration Dolibarr <b>conf.php</b>.
|
||||
ErrorCantLoadUserFromDolibarrDatabase=Impossible de trouver l'utilisateur <b>%s</b> dans la base Dolibarr.
|
||||
ErrorNoVATRateDefinedForSellerCountry=Erreur, aucun taux tva défini pour le pays '%s'.
|
||||
ErrorFailedToSaveFile=Erreur, l'enregistrement du fichier a échoué.
|
||||
ErrorOnlyPngJpgSupported=Erreur, seuls les formats images .jpg et .png sont supportés.
|
||||
DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr est configuré en mode authentification <b>%s</b> dans son fichier de configuration <b>conf.php</b>.<br>Cela signifie que la base des mots de passe est externe à Dolibarr, aussi toute modification de ce champ peut s'avérer sans effet.
|
||||
Undefined=Non défini
|
||||
PasswordForgotten=Mot de passe oublié ?
|
||||
|
||||
@ -74,7 +74,6 @@ LoginAccountDisable=Le compte est d
|
||||
LoginAccountDisableInDolibarr=Le compte est désactivé sur Dolibarr.
|
||||
LoginAccountDisableInLdap=Le compte est désactivé sur le domaine.
|
||||
UsePersonalValue=Utiliser valeur personalisée
|
||||
ErrorFailedToSaveFile=Erreur - l'enregistrement du fichier a échoué
|
||||
GuiLanguage=Langage de l'interface
|
||||
InternalUser=Utilisateur interne
|
||||
MyInformations=Mes informations
|
||||
|
||||
@ -1124,77 +1124,78 @@ function info_admin($texte)
|
||||
*/
|
||||
function dol_loginfunction($notused,$pearstatus)
|
||||
{
|
||||
global $langs,$conf;
|
||||
$langs->load("main");
|
||||
$langs->load("other");
|
||||
global $langs,$conf,$mysoc;
|
||||
$langs->load("main");
|
||||
$langs->load("other");
|
||||
|
||||
$conf->css = "theme/".$conf->theme."/".$conf->theme.".css";
|
||||
// Si feuille de style en php existe
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/'.$conf->css.".php")) $conf->css.=".php";
|
||||
$conf->css = "theme/".$conf->theme."/".$conf->theme.".css";
|
||||
// Si feuille de style en php existe
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/'.$conf->css.".php")) $conf->css.=".php";
|
||||
|
||||
// Ce DTD est KO car inhibe document.body.scrollTop
|
||||
//print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
|
||||
// Ce DTD est OK
|
||||
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'."\n";
|
||||
// Ce DTD est KO car inhibe document.body.scrollTop
|
||||
//print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
|
||||
// Ce DTD est OK
|
||||
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'."\n";
|
||||
|
||||
// En tete html
|
||||
print "<html>\n";
|
||||
print "<head>\n";
|
||||
print '<meta name="robots" content="noindex,nofollow">'."\n"; // Evite indexation par robots
|
||||
print "<html>\n";
|
||||
print "<head>\n";
|
||||
print '<meta name="robots" content="noindex,nofollow">'."\n"; // Evite indexation par robots
|
||||
print "<title>Dolibarr Authentification</title>\n";
|
||||
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/'.$conf->css.'">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/'.$conf->css.'">'."\n";
|
||||
|
||||
print '<style type="text/css">'."\n";
|
||||
print '<!--'."\n";
|
||||
print '#login {';
|
||||
print ' margin-top: 70px;';
|
||||
print ' margin-bottom: 30px;';
|
||||
print ' text-align: center;';
|
||||
print ' font: 12px arial,helvetica;';
|
||||
print '}'."\n";
|
||||
print '#login table {';
|
||||
print ' border: 1px solid #C0C0C0;';
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/login_background.png'))
|
||||
{
|
||||
print 'background: #F0F0F0 url('.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/login_background.png) repeat-x;';
|
||||
}
|
||||
else
|
||||
{
|
||||
print 'background: #F0F0F0 url('.DOL_URL_ROOT.'/theme/login_background.png) repeat-x;';
|
||||
}
|
||||
print 'font-size: 12px;';
|
||||
print '}'."\n";
|
||||
print '-->'."\n";
|
||||
print '</style>'."\n";
|
||||
print '<script language="javascript" type="text/javascript">'."\n";
|
||||
print "function donnefocus() {\n";
|
||||
print "document.getElementsByTagName('INPUT')[0].focus();";
|
||||
print "}\n";
|
||||
print '</script>'."\n";
|
||||
print '</head>'."\n";
|
||||
print '<style type="text/css">'."\n";
|
||||
print '<!--'."\n";
|
||||
print '#login {';
|
||||
print ' margin-top: 70px;';
|
||||
print ' margin-bottom: 30px;';
|
||||
print ' text-align: center;';
|
||||
print ' font: 12px arial,helvetica;';
|
||||
print '}'."\n";
|
||||
print '#login table {';
|
||||
print ' border: 1px solid #C0C0C0;';
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/login_background.png'))
|
||||
{
|
||||
print 'background: #F0F0F0 url('.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/login_background.png) repeat-x;';
|
||||
}
|
||||
else
|
||||
{
|
||||
print 'background: #F0F0F0 url('.DOL_URL_ROOT.'/theme/login_background.png) repeat-x;';
|
||||
}
|
||||
print 'font-size: 12px;';
|
||||
print '}'."\n";
|
||||
print '-->'."\n";
|
||||
print '</style>'."\n";
|
||||
print '<script language="javascript" type="text/javascript">'."\n";
|
||||
print "function donnefocus() {\n";
|
||||
print "document.getElementsByTagName('INPUT')[0].focus();";
|
||||
print "}\n";
|
||||
print '</script>'."\n";
|
||||
print '</head>'."\n";
|
||||
|
||||
// Body
|
||||
// Body
|
||||
print '<body class="body" onload="donnefocus();">';
|
||||
|
||||
// Start Form
|
||||
print '<form id="login" name="login" method="post" action="';
|
||||
print $_SERVER['PHP_SELF'];
|
||||
print $_SERVER["QUERY_STRING"]?'?'.$_SERVER["QUERY_STRING"]:'';
|
||||
print '">';
|
||||
print '<form id="login" name="login" method="post" action="';
|
||||
print $_SERVER['PHP_SELF'];
|
||||
print $_SERVER["QUERY_STRING"]?'?'.$_SERVER["QUERY_STRING"]:'';
|
||||
print '">';
|
||||
|
||||
// Table 1
|
||||
print '<table cellpadding="0" cellspacing="0" border="0" align="center" width="400">';
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/logo.png'))
|
||||
{
|
||||
print '<tr><td colspan="3" style="text-align:center;">';
|
||||
print '<img src="/logo.png"></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr class="vmenu"><td align="center">Dolibarr '.DOL_VERSION.'</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '<table cellpadding="0" cellspacing="0" border="0" align="center" width="400">';
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/logo.png'))
|
||||
{
|
||||
// Cas qui ne devrait pas arriver (pour compatibilité)
|
||||
print '<tr><td colspan="3" style="text-align:center;">';
|
||||
print '<img src="/logo.png"></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr class="vmenu"><td align="center">Dolibarr '.DOL_VERSION.'</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
// Table 2
|
||||
@ -1205,41 +1206,45 @@ function dol_loginfunction($notused,$pearstatus)
|
||||
print '<tr><td align="left"><br> <b>'.$langs->trans("Login").'</b> </td>';
|
||||
print '<td><input name="username" class="flat" size="15" maxlength="25" value="" tabindex="1" /></td>';
|
||||
|
||||
// Affiche logo du theme si existe, sinon logo commun
|
||||
if ($conf->main_authentication) $title.=$langs->trans("AuthenticationMode").': '.$conf->main_authentication;
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/login_logo.png'))
|
||||
{
|
||||
print '<td rowspan="2"><img title="'.$title.'" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/login_logo.png"></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td rowspan="2"><img title="'.$title.'" src="'.DOL_URL_ROOT.'/theme/login_logo.png"></td>';
|
||||
}
|
||||
if ($conf->main_authentication) $title.=$langs->trans("AuthenticationMode").': '.$conf->main_authentication;
|
||||
// Affiche logo du theme si existe, sinon logo commun
|
||||
$urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
|
||||
if (is_readable($conf->societe->dir_logos.'/'.$mysoc->logo))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($mysoc->logo);
|
||||
$height=100; // \TODO Forcer la hauteur uniquement si hauteur > 100 ou largeur > 100
|
||||
}
|
||||
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/login_logo.png'))
|
||||
{
|
||||
$urllogo=DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/login_logo.png';
|
||||
$height=80;
|
||||
}
|
||||
print '<td rowspan="2"><img title="'.$title.'" height="'.$height.'" src="'.$urllogo.'"></td>';
|
||||
|
||||
print '</tr>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td align="left" valign="top"> <b>'.$langs->trans("Password").'</b> </td>';
|
||||
print '<td valign="top" nowrap="nowrap"><input name="password" class="flat" type="password" size="15" maxlength="30" tabindex="2">';
|
||||
print '<tr><td align="left" valign="top"> <b>'.$langs->trans("Password").'</b> </td>';
|
||||
print '<td valign="top" nowrap="nowrap"><input name="password" class="flat" type="password" size="15" maxlength="30" tabindex="2">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td colspan="3" style="text-align:center;"><br>';
|
||||
print '<input type="submit" class="button" value=" '.$langs->trans("Connection").' " tabindex="4" />';
|
||||
print '</td></tr>';
|
||||
print '<tr><td colspan="3" style="text-align:center;"><br>';
|
||||
print '<input type="submit" class="button" value=" '.$langs->trans("Connection").' " tabindex="4" />';
|
||||
print '</td></tr>';
|
||||
|
||||
if (! $conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)
|
||||
{
|
||||
print '<tr><td colspan="3" align="center"><a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php">('.$langs->trans("PasswordForgotten").')</a></td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '<input type="hidden" name="loginfunction" value="loginfunction" />';
|
||||
print '</table>';
|
||||
print '<input type="hidden" name="loginfunction" value="loginfunction" />';
|
||||
|
||||
print '</form>';
|
||||
print '</form>';
|
||||
|
||||
// Message
|
||||
if ($_SESSION["loginmesg"] || ! empty($pearstatus))
|
||||
{
|
||||
print '<center><table width="60%"><tr><td align="center" class="small"><div class="error">';
|
||||
if ($_SESSION["loginmesg"] || ! empty($pearstatus))
|
||||
{
|
||||
print '<center><table width="60%"><tr><td align="center" class="small"><div class="error">';
|
||||
if ($pearstatus == AUTH_EXPIRED) print "<i>Your session expired. Please login again!</i>\n";
|
||||
elseif ($pearstatus == AUTH_IDLED) print "<i>You have been idle for too long. Please login again!</i>\n";
|
||||
elseif ($pearstatus == AUTH_WRONG_LOGIN) print $langs->trans("ErrorBadLoginPassword");
|
||||
@ -1252,11 +1257,11 @@ function dol_loginfunction($notused,$pearstatus)
|
||||
}
|
||||
if ($conf->global->MAIN_HOME)
|
||||
{
|
||||
print '<center><table cellpadding="0" cellspacing="0" border="0" align="center" width="750"><tr><td align="center">';
|
||||
print nl2br($conf->global->MAIN_HOME);
|
||||
print '</td></tr></table></center><br>';
|
||||
print '<center><table cellpadding="0" cellspacing="0" border="0" align="center" width="750"><tr><td align="center">';
|
||||
print nl2br($conf->global->MAIN_HOME);
|
||||
print '</td></tr></table></center><br>';
|
||||
}
|
||||
|
||||
|
||||
// Fin entete html
|
||||
print "\n</body>\n</html>";
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2007 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
|
||||
@ -28,18 +28,31 @@
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require_once("main.inc.php");
|
||||
|
||||
|
||||
// C'est un wrapper, donc header vierge
|
||||
function llxHeader() { }
|
||||
|
||||
|
||||
|
||||
$original_file = urldecode($_GET["file"]);
|
||||
$modulepart = urldecode($_GET["modulepart"]);
|
||||
$type = urldecode($_GET["type"]);
|
||||
|
||||
// Protection, on interdit les .. dans les chemins
|
||||
$original_file = eregi_replace('\.\.','',$original_file);
|
||||
|
||||
|
||||
if ($modulepart == 'companylogo')
|
||||
{
|
||||
// Pour companylogo, on charge juste environnement sans logon qui charge le user
|
||||
require_once("master.inc.php");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
||||
require_once("main.inc.php");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$accessallowed=0;
|
||||
if ($modulepart)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user