62 $cpath=(
$os==1)?
'/usr/bin':
'c:/noalyss/postgresql/bin';
80 $iclocale=
new ISelect(
'clocale');
81 $iclocale->value=array(
82 array(
"value"=>1,
"label"=>
"Activé"),
83 array(
"value"=>0,
"label"=>
"Désactivé")
85 $iclocale->selected=1;
90 $icuser=
new IText(
'cuser',$cuser);
91 $icpasswd=
new IText(
'cpasswd',$cpasswd);
92 $icport=
new IText(
"cport",$cport);
93 $ichost=
new IText(
"chost",$chost);
96 $icadmin->set_require(
true);
101 $smulti->javascript=
' onchange="show_dbname(this)" ';
102 $smulti->value =
'Y';
104 $smulti->selected=
true;
107 $icdbname=
new IText(
'cdbname');
108 $icdbname->value=$cdbname;
110 $icpassword_admin=
new IText(
'cpassword_admin');
112 $icpassword_admin->set_require(
true);
114 require NOALYSS_TEMPLATE.
'/template_config_form.php';
127 print (
'date_default_timezone_set (\'Europe/Brussels\');');
134 print (
'define("PG_RESTORE","' .
$cpath . DIRECTORY_SEPARATOR .
'pg_restore ");');
136 print (
'define("PG_DUMP","' .
$cpath . DIRECTORY_SEPARATOR .
'pg_dump ");');
138 print (
'define ("PSQL","' .
$cpath . DIRECTORY_SEPARATOR .
'psql");');
140 print (
'define("PG_RESTORE","pg_restore.exe");');
142 print (
'define("PG_DUMP","pg_dump.exe");');
144 print (
'define ("PSQL","psql.exe");');
147 print (
'define ("noalyss_user","' . $cuser .
'");');
149 print (
'define ("noalyss_password","' . $cpasswd .
'");');
151 print (
'define ("noalyss_psql_port","' . $cport .
'");');
153 print (
'define ("noalyss_psql_host","' . $chost .
'");');
156 print (
"// If you change the NOALYSS_ADMINISTRATOR , you will need to rerun http://..../noalyss/html/install.php");
158 print (
"// But it doesn't change the password");
160 print (
'define ("NOALYSS_ADMINISTRATOR","' .
$cadmin .
'");');
162 print (
"// For changing the password of admin, go to preference or update in db");
164 print (
"// this password is only used when executing install.php ");
169 print (
'define ("LOCALE",' . $clocale .
');');
173 * DEBUGNOALYSS let you see more information when you develop.
175 * 1 = display all errors
176 * 2 = display all errors + more information
181 print (
'define ("DEBUGNOALYSS",0);');
184 print (
'define ("domaine","");');
187 print (
'define ("MULTI",0);');
190 print (
'define ("MULTI",1);');
193 print (
'define ("dbname","' . $cdbname .
'");');
196 print (
' // Uncomment to log your input');
198 print (
'// define ("LOGINPUT",TRUE);');
202 print (
' // Do not change below !!!');
204 print (
' // These variable are computed but could be changed in ');
206 print (
' // very special configuration');
208 print (
'// define ("NOALYSS_HOME","");');
210 print (
'// define ("NOALYSS_PLUGIN","");');
212 print (
'// define ("NOALYSS_INCLUDE","");');
214 print (
'// define ("NOALYSS_TEMPLATE","");');
216 print (
'// define ("NOALYSS_INCLUDE","");');
218 print (
'// define ("NOALYSS_TEMPLATE","");');
220 print (
"// Fix an issue with PDF when exporting receipt in PDF in ANCGL");
221 print (
'// define ("FIX_BROKEN_PDF","NO");');
223 print (
"// Uncomment if you want to convert to PDF");
225 print (
"// With the unoconv tool");
227 print (
"//define ('OFFICE','HOME=/tmp unoconv ');");
229 print (
"//define ('GENERATE_PDF','YES');");
231 print (
"// Uncomment if you don't want ");
233 print (
"// to be informed when a new release is ");
235 print (
"// published");
237 print (
'// define ("SITE_UPDATE","");');
239 print (
'// define ("SITE_UPDATE_PLUGIN","");');
241 print (
'// To allow to access the Info system');
243 print (
'// define ("SYSINFO_DISPLAY",true);');
245 print (
'// For developpement');
247 print (
'// define ("NOALYSS VERSION",9999);');
249 print (
' // If you want to override the parameters you have to define OVERRIDE_PARAM');
251 print (
'// and give your own parameters for max_execution_time and memory_limit');
253 print (
"// define ('OVERRIDE_PARAM',1);");
255 print (
"// ini_set ('max_execution_time',240);");
257 print (
"// ini_set ('memory_limit','256M');");
259 print (
"// In recent distribution linux, pdftk is a snap, you should set the path");
261 print (
"// for exporting document in PDF");
263 print (
"// \$pdftk = /usr/bin/pdftk ");
265 print (
"// \$pdftk = /snap/bin/pdftk ");
267 print (
"// uncomment to activate the captcha on login page");
269 print (
"// define('NOALYSS_CAPTCHA',true);");
271 print (
"// Uncomment if you want to activate the possibility to reinitialize;");
273 print (
"// password by email");
275 print (
"// define ('RECOVER','1');");
277 print (
"// Uncomment and define if you want to Name of the sender of the email ");
279 print (
"// if you activate the possibility to reinitialize password by email");
281 print (
"// define('ADMIN_WEB', 'www-data@localhost');");
283 print (
"// Define a random session key if you work with different version of NOALYSS");
287 printf(
"// When sending an email , the domain of this email must be in comma separated list ,");
289 print (
"// if the list is an empty string then all the domain are allowed");
291 printf(
"// define ('ALLOWED_EMAIL_DOMAIN','');");
301 $hFile= fopen(NOALYSS_INCLUDE.
'/config.inc.php',
'w');
generate_random_string($p_length, $special=1)
Create randomly a string.
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
display_file_config($p_array, $from_setup=1, $p_os=1)
Display the content of the config.inc.php with variables.
config_file_form($p_array=null)
config_file_create($p_array, $from_setup, $p_os=1)
create the config file