[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 26/46: Task #0001793: Installation mot de pas
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 26/46: Task #0001793: Installation mot de passe |
Date: |
Mon, 4 May 2020 13:38:50 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit a115102fdf0eb6f8f7233697252bf3c6a6717794
Author: Dany De Bontridder <address@hidden>
AuthorDate: Tue Mar 24 14:21:48 2020 +0100
Task #0001793: Installation mot de passe
---
html/install.php | 10 ++++++----
include/lib/config_file.php | 9 +++++++++
include/template/template_config_form.php | 9 +++++++++
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/html/install.php b/html/install.php
index c8b188d..180c3cd 100644
--- a/html/install.php
+++ b/html/install.php
@@ -194,6 +194,7 @@ $ctmp=$http->request("ctmp","string", "/tmp");
$cpath=$http->request("cpath","string", "/usr/bin");
$db_name=$http->request("cdbname", "string","");
$cadmin=$http->request("cadmin","string", "admin");
+$icpassword_admin=$http->request("icpassword_admin","string", "phpcompta");
$cadmin=strtolower($cadmin);
//-------------------------------------------------------------------------
// warn only if we can not write in include
@@ -224,11 +225,12 @@ if (isset($_POST['save_config'])) {
// -----
if ( $cnx !== false ) {
echo '<h1>'._('Important').'</h1>';
- echo '<h2 class="warning">',_("Voici l'utilisateur et mot de passe de
l'utilisateur administrateur de Noalyss , il a tous les droits et a accès à
tout."
+ echo '<h2 class="warning">',_("Voici l'utilisateur et mot de passe de
l'utilisateur administrateur de Noalyss , "
+ . " il a tous les droits et a accès à tout."
. " Connectez-vous avec ses identifiants et changer le mot de
passe dans préférence (en haut à droit)"),
"</h2>";
echo '<p style="font-size:120%">'._('Utilisateur administrateur'),'
','<span style="color:red"> ',$cadmin,'</span>','</p>';
- echo '<p style="font-size:120%">',_('Mot de passe'),'<span
style="color:red"> phpcompta </span>','</p>';
+ echo '<p style="font-size:120%">',_('Mot de passe'),'<span
style="color:red"> '.$icpassword_admin.' </span>','</p>';
// Create the db
if (is_writable(NOALYSS_INCLUDE)) {
$url=config_file_create($_POST,1,$os);
@@ -522,8 +524,8 @@ if ($account == 0 ) {
$cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/constraint.sql");
/* update name administrator */
$cadmin=NOALYSS_ADMINISTRATOR;
- $cn->exec_sql("update ac_users set use_login=$1,use_active=1 where use_id=1",
- array(strtolower($cadmin)));
+ $cn->exec_sql("update ac_users set
use_login=$1,use_password=md5($2),use_active=1 where use_id=1",
+ array(strtolower($cadmin,$icpassword_admin)));
$cn->commit($cn);
diff --git a/include/lib/config_file.php b/include/lib/config_file.php
index fcdb602..f9c89ee 100644
--- a/include/lib/config_file.php
+++ b/include/lib/config_file.php
@@ -105,6 +105,9 @@ function config_file_form($p_array=null)
}
$icdbname=new IText('cdbname');
$icdbname->value=$cdbname;
+
+ $icpassword_admin=new IText('icpassword_admin');
+
require NOALYSS_TEMPLATE.'/template_config_form.php';
}
/**
@@ -156,6 +159,12 @@ function
display_file_config($p_array,$from_setup=1,$p_os=1)
print ("\r\n");
print ( 'define ("NOALYSS_ADMINISTRATOR","'.$cadmin.'");');
print ("\r\n");
+ print ("// For changing the password of admin, go to preference or update
in db");
+ print ("\r\n");
+ print ("// this password is only used when installing ");
+ print ("\r\n");
+ print ( 'define ("NOALYSS_PASSWORD","'.$icpassword_admin.'");');
+ print ("\r\n");
print ( 'define ("LOCALE",'.$clocale.');');
print ("\r\n");
diff --git a/include/template/template_config_form.php
b/include/template/template_config_form.php
index 2e98740..39f2f19 100644
--- a/include/template/template_config_form.php
+++ b/include/template/template_config_form.php
@@ -26,6 +26,7 @@
* @brief
*
*/
+
?>
<div style="margin-left: 30">
<table>
@@ -59,6 +60,14 @@
<?php echo $icadmin->input();?>
</td>
</tr>
+<tr>
+ <td>
+ <?php echo _('Mot de passe administrateur de noalyss')?>
+ </td>
+ <td>
+ <?php echo $icpassword_admin->input();?>
+ </td>
+</tr>
<TR>
<TD><?php echo _('Adresse Serveur Postgresql');?> </TD>
<TD><?php echo $ichost->input();echo Icon_Action::infobulle(208)?></TD>
- [Noalyss-commit] [noalyss] 19/46: Task #0001704: Faciliter l'ajout de plusieurs lignes, (continued)
- [Noalyss-commit] [noalyss] 19/46: Task #0001704: Faciliter l'ajout de plusieurs lignes, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 23/46: Output_Html_Tab : cosmetic, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 24/46: Create test folder for phpunit, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 25/46: Task #0001704: Faciliter l'ajout de plusieurs lignes Fichier oublié html_input_noalyss.class.php, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 15/46: replace $_GET by httpInput, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 30/46: Task #0001793: Installation mot de passe Password cannot be empty, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 14/46: Task #0001699: Affichage PDF balance - totaux niveaux, etc'., Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 20/46: Cosmetic : Opération prédéfinie, modèle, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 17/46: Task #1756: Avertissement qcode, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 21/46: if you want to modify the accounting , it must not be used before., Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 26/46: Task #0001793: Installation mot de passe,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 32/46: Task #0001793: Installation mot de passe Empêche @mobile , doc, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 34/46: Bug #0001245: Type actif - passif pour nouvelle fiche à partir de fiche Erreur dans PARM_POSTE pour la compta française, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 35/46: Bug #0001245: Type actif - passif pour nouvelle fiche à partir de fiche Erreur dans PARM_POSTE pour la compta française, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 28/46: Task #0001793: Installation mot de passe remove debug info, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 33/46: Task #1277 : RTF conversion char accentuated, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 36/46: Merge branch 'dev7202', Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 38/46: Fiche.Test : add test cmp_name and get_row, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 40/46: Fix cosmetic and typo, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 22/46: HtmlOutput tab , add mode row, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 27/46: Task #0001793: Installation mot de passe, Dany De Bontridder, 2020/05/04