A l'installation permet de choisir le nom de l'administrateur, dans

les versions précédentes c'était phpcompta
This commit is contained in:
Dany De Bontridder 2016-01-30 22:32:56 +01:00
parent 2a06df770e
commit 30f84ace56
8 changed files with 78 additions and 34 deletions

View file

@ -3245,7 +3245,7 @@ class Acc_Ledger extends jrn_def_sql
echo Acc_Reconciliation::$javascript;
html_page_start();
$cn = Dossier::connect();
$_SESSION['g_user'] = 'phpcompta';
$_SESSION['g_user'] = NOALYSS_ADMINISTRATOR ;
$_SESSION['g_pass'] = 'phpcompta';
$id = (isset($_REQUEST['p_jrn'])) ? $_REQUEST['p_jrn'] : -1;
@ -3335,7 +3335,7 @@ class Acc_Ledger extends jrn_def_sql
html_page_start();
$cn = Dossier::connect();
$ledger = new Acc_Ledger($cn, 0);
$_SESSION['g_user'] = 'phpcompta';
$_SESSION['g_user'] = NOALYSS_ADMINISTRATOR;
$_SESSION['g_pass'] = 'phpcompta';
echo $ledger->search_form('ALL');
}

View file

@ -576,7 +576,7 @@ class Acc_Operation
}
static function test_me()
{
$_SESSION['g_user']='phpcompta';
$_SESSION['g_user']=NOALYSS_ADMINISTRATOR;
$_SESSION['g_pass']='dany';
global $g_user;
$cn=Dossier::connect();

View file

@ -151,11 +151,11 @@ class Dossier
join jnt_use_dos as jt on (jt.dos_id=ds.dos_id)
group by jt.use_id) as dossier_name on (jt_use_id=ac.use_id)
where
use_login!='phpcompta'
use_login!=$1
$sql
";
$res=$this->cn->get_array($sql);
$res=$this->cn->get_array($sql,array(NOALYSS_ADMINISTRATOR));
return $res;
}

View file

@ -384,7 +384,7 @@ class User
function Admin()
{
$this->admin = 0;
if ($this->login != 'phpcompta')
if ($this->login != NOALYSS_ADMINISTRATOR )
{
$pass5 = md5($this->pass);
$sql = "select use_admin from ac_users where use_login=$1

View file

@ -47,6 +47,10 @@ if ( !defined("NOALYSS_TEMPLATE")) define ("NOALYSS_TEMPLATE",$g_template_dir);
// with convert
if ( !defined("FIX_BROKEN_PDF")) define ("FIX_BROKEN_PDF",'NO');
if ( !defined('NOALYSS_ADMINISTRATOR')) {
define ('NOALYSS_ADMINISTRATOR','phpcompta');
}
require_once NOALYSS_INCLUDE.'/constant.security.php';
if ( strpos($inc_path,";") != 0 ) {

View file

@ -69,6 +69,7 @@ function config_file_form($p_array=null)
$multi="N";
$cdbname="";
$chost="localhost";
$cadmin='admin';
}
else extract ($p_array);
@ -77,32 +78,34 @@ function config_file_form($p_array=null)
$ictmp->size=25;
$iclocale=new ISelect('clocale');
$iclocale->value=array(
array("value"=>1,"label"=>"Activé"),
array("value"=>0,"label"=>"Désactivé")
);
$iclocale->selected=1;
$iclocale->value=array(
array("value"=>1,"label"=>"Activé"),
array("value"=>0,"label"=>"Désactivé")
);
$iclocale->selected=1;
$icpath=new IText("cpath",$cpath);
$icpath->size=30;
$icpath=new IText("cpath",$cpath);
$icpath->size=30;
$icuser=new IText('cuser',$cuser);
$icpasswd=new IText('cpasswd',$cpasswd);
$icport=new IText("cport",$cport);
$ichost=new IText("chost",$chost);
$icadmin=new IText('cadmin',$cadmin);
/*
* For version MONO
*/
$smulti=new ICheckBox('multi');
$smulti->javascript=' onchange="show_dbname(this)" ';
$smulti->value = 'Y';
if ( $multi == 'Y') {
$smulti->selected=true;
$icuser=new IText('cuser',$cuser);
$icpasswd=new IText('cpasswd',$cpasswd);
$icport=new IText("cport",$cport);
$ichost=new IText("chost",$chost);
/*
* For version MONO
*/
$smulti=new ICheckBox('multi');
$smulti->javascript=' onchange="show_dbname(this)" ';
$smulti->value = 'Y';
if ( $multi == 'Y') {
$smulti->selected=true;
}
$icdbname=new IText('cdbname');
$icdbname->value=$cdbname;
require NOALYSS_TEMPLATE.'/template_config_form.php';
}
$icdbname=new IText('cdbname');
$icdbname->value=$cdbname;
require NOALYSS_TEMPLATE.'/template_config_form.php';
}
/**
* Display the content of the config.inc.php with variables
@ -146,7 +149,9 @@ function display_file_config($p_array,$from_setup=1,$p_os=1)
print ("\r\n");
print ( 'define ("noalyss_psql_host","'.$chost.'");');
print ("\r\n");
print ( 'define ("NOALYSS_ADMINISTRATOR","'.$cadmin.'");');
print ("\r\n");
print ( 'define ("LOCALE",'.$clocale.');');
print ("\r\n");
@ -187,12 +192,11 @@ function display_file_config($p_array,$from_setup=1,$p_os=1)
print ( '// define ("NOALYSS_INCLUDE","");');
print ("\r\n");
print ( '// define ("NOALYSS_TEMPLATE","");');
print ("\r\n");
print ( "// Fix an issue with PDF when exporting receipt in PDF in ANCGL"."\r\n");
print ( '// define ("FIX_BROKEN_PDF","NO");');
print ("\r\n");
print ("\r\n");
print ("\r\n");
print ("\r\n");
print ( "// Uncomment if you don't want "."\r\n");
print ( "// to be informed when a new release is "."\r\n");
print ( "// published"."\r\n");

View file

@ -51,6 +51,14 @@
<TD><?php echo _('Mot de passe de l\'utilisateur Postgresql');?> </TD>
<TD><?php echo $icpasswd->input();echo HtmlInput::infobulle(204)?></TD>
</TR>
<tr>
<td>
<?php echo _('Administrateur de noalyss')?>
</td>
<td>
<?php echo $icadmin->input();?>
</td>
</tr>
<TR>
<TD><?php echo _('Adresse Serveur Postgresql');?> </TD>
<TD><?php echo $ichost->input();echo HtmlInput::infobulle(208)?></TD>