noalyss Version-9
install.php
Go to the documentation of this file.
1<?php
2@session_start();
3?>
4<!doctype html>
5<HTML><HEAD>
6 <TITLE>Noalyss - Install</TITLE>
7 <META http-equiv="Content-Type" content="text/html; charset=UTF8">
8 </title>
9</HEAD>
10<link rel="icon" type="image/ico" href="favicon.ico" />
11 <META http-equiv="Content-Type" content="text/html; charset=UTF8">
12 <script type="text/javascript" charset="utf-8" language="javascript" src="js/prototype.js"></script>
13 <link type="text/css" REL="stylesheet" href="css/style-classic7.css"/>
14 <LINK id="pagestyle" REL="stylesheet" type="text/css" href="css/font/fontello/css/fontello.css" media="screen"/>
15 <style>
16 body {
17 font-size : 100%;
18 color:darkblue;
19 margin-left : 50px;
20 margin-right: 50px;
21 background-color: #F8F8FF;
22 }
23 h1 {
24 font-size: 120%;
25 text-align: center;
26 background-color: darkblue;
27 color:white;
28 text-transform: uppercase;
29 }
30 h2 {
31 font-size: 105%;
32 text-align: left;
33 text-decoration: none;
34 color:darkblue;
35 margin-bottom: 1rem;
36 margin-top: 1rem;
37
38 }
39 h3 {
40 font-size : 102%;
41 font-style: italic;
42 margin-left: 3px;
43 }
44
45 .button {
46 font-size:110%;
47 color:white;
48 font-weight: bold;
49 border: 1px;
50 text-decoration:none;
51 font-family: helvetica,arial,sans-serif;
52 background-image: url("image/bg-submit2.gif");
53 background-repeat: repeat-x;
54 background-position: left;
55 text-decoration:none;
56 font-family: helvetica,arial,sans-serif;
57 border-width:0px;
58 cursor:pointer;
59 margin:5px;
60 -moz-border-radius:2px 2px;
61 border-radius:5px;
62 padding : 2.5rem;
63 }
64 .button:hover {
65 cursor:pointer;
66
67 border-style: solid;
68 border-width: 1px;
69 font-color:blue;
70 margin:5px;
71 padding : 2.5rem;
72 background-image: url("image/bg-submit2.gif");
73 background-repeat: repeat-x;
74 background-position: left;
75 }
76 .warning,.error {
77 color:red;
78 }
79 img:hover {
80 cursor: inherit;
81 background-color: inherit;
82 color: inherit;
83}
84 </style>
85<?php
86?>
87
88</>
89<body>
90<p align="center">
91 <IMG SRC="image/logo9000.png" style="width: 30%;z-index:-1;position:fixed;top:30%;margin-left: 20%;opacity: 0.2" alt="NOALYSS">
92</p>
93<h1>NOALYSS : comptabilité - accountancy </h1>
94
95<?php
96/*
97 * This file is part of NOALYSS.
98 *
99 * NOALYSS is free software; you can redistribute it and/or modify
100 * it under the terms of the GNU General Public License as published by
101 * the Free Software Foundation; either version 2 of the License, or
102 * (at your option) any later version.
103 *
104 * NOALYSS is distributed in the hope that it will be useful,
105 * but WITHOUT ANY WARRANTY; without even the implied warranty of
106 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
107 * GNU General Public License for more details.
108 *
109 * You should have received a copy of the GNU General Public License
110 * along with NOALYSS; if not, write to the Free Software
111 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
112*/
113/* $Revision*/
114// Copyright Author Dany De Bontridder danydb@aevalys.eu
115/*!\file
116 * \brief This file permit to upgrade a version of NOALYSS , it should be
117 * used and immediately delete after an upgrade.
118 * This file is included in each release for a new upgrade
119 *
120 */
121
122if ( ! isset($_GET['lang'])){
123?>
124<p>
125 Choisissez votre langue ,pour MacOS utilisez "Not Used"
126</p>
127<p>
128 Select your language, for MacOS user please use "Not Used"
129</p>
130<form method="GET">
131 Language : <select name="lang">
132 <OPTION value="fr_FR.utf8">Français</option>
133 <OPTION value="en_US.utf8">English</option>
134 <OPTION value="none">Not Used</option>
135 </select>
136 <input type="submit" value="Continue">
137</form>
138<?php
139 exit();
140}
141require_once '../include/constant.php';
142include_once NOALYSS_INCLUDE.'/lib/ac_common.php';
143include_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
144include_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
146
147
148
149
150echo '<div id="info_div"></div>';
151if ( $_GET['lang'] == "en_US.utf8" || $_GET['lang']=='fr_FR.utf8')
152{
153 $_SESSION[SESSION_KEY.'g_lang']=$_GET['lang'];
154 set_language();
155}
156?>
157 <script type="text/javascript" charset="utf-8" language="javascript" src="js/infobulle.js">
158</script>
159 <?php
160 include_once NOALYSS_INCLUDE.'/lib/message_javascript.php';
161 ?>
162<script>
163
164content[200]="<?php echo _("Indiquez ici le répertoire où les documents temporaires peuvent être sauvés exemple c:/temp, /tmp")?>";
165content[201]="<?php echo _("Désactiver le changement de langue (requis pour MacOSX)")?>";
166content[202]="<?php echo _("Le chemin vers le repertoire contenant psql, pg_dump...")?>";
167content[203]="<?php echo _("Utilisateur de la base de donnée postgresql")?>";
168content[204]="<?php echo _("Mot de passe de l'utilisateur de Postgresql")?>";
169content[205]="<?php echo _("Port pour postgresql")?>";
170content[206]="<?php echo _("En version mono dossier, le nom de la base de données doit être mentionné")?>";
171content[207]="<?php echo _("Vous devez choisir si NOALYSS est installé sur l'un de vos servers ou sur un server mutualisé qui ne donne qu'une seule base de données")?>";
172content[208]="<?php echo _("Serveur postgresql")?>";
173content[209]="<?php echo _("Mot de passe administrateur, il peut être changé ensuite dans les préférences")?>";
174content[210]="<?php echo _("login administrateur")?>";
175
176</script>
177
178<DIV id="bulle" class="infobulle"></DIV>
179
180<?php
181
182$failed="<span style=\"font-size:18px;color:red\">&#x2716;</span>";
183$succeed="<span style=\"font-size:18px;color:green\">&#x2713;</span>";
184$inc_path=get_include_path();
185global $os;
186$inc_path=get_include_path();
187global $os;
188if ( strpos($inc_path,";") != 0 ) {
189 $new_path=$inc_path.';../../include;addon';
190 $os=0; /* $os is 0 for windoz */
191} else {
192 $new_path=$inc_path.':../../include:addon';
193 $os=1; /* $os is 1 for unix */
194}
195// Retrieve informations from the screen
196//
197$http=new HttpInput();
198$db_user=$http->request("cuser","string", "");
199$db_password=$http->request("cpasswd","string", "");
200$db_host=$http->request("chost","string", "");
201$db_port=$http->request("cport","string", "");
202$multi=$http->request("multi","string", "N");
203$locale=$http->request("clocale","string", "1");
204$ctmp=$http->request("ctmp","string", "/tmp");
205$cpath=$http->request("cpath","string", "/usr/bin");
206$db_name=$http->request("cdbname", "string","");
207$cadmin=$http->request("cadmin","string", "admin");
208$cpassword_admin=$http->request("cpassword_admin","string", "phpcompta");
209$cadmin=strtolower($cadmin);
210//-------------------------------------------------------------------------
211// warn only if we can not write in include
212//-------------------------------------------------------------------------
213if ( is_writable ('install.php') == false ) {
214 echo '<h2 class="notice"> '._("Ecriture non possible").' </h2>'.
215 '<p class="warning"> '.
216 _("On ne peut pas écrire dans le répertoire de NOALYSS, changez-en les droits ")
217 .'</p>';
218 }
219//----------------------------------------------------------------------------
220// We try to connect with the supplied information
221// If we succeed we continue the check
222// otherwise we turn back to the first screen
223// The config file is created here
224//----------------------------------------------------------------------------
225
226if (isset($_POST['save_config'])) {
227 require_once NOALYSS_INCLUDE.'/lib/config_file.php';
228 $err=0;
229 // check password and admin not empty
230 //
231 if ( strlen(trim($cpassword_admin))== 0 ||
232 strlen(trim($cadmin))== 0
233 ) {
234 echo '<h2 class="warning">';
235 echo _('Le mot de passe du super admin et le login ne peuvent être vides');
236 echo '</h2>';
237 $err++;
238
239 }
240 // check strenght password admin
241 $passw_error=check_password_strength($cpassword_admin);
242 if ( count($passw_error['msg'])>0) {
243 echo '<h2 class="warning">';
244 echo _("Mot de passe trop faible");
245 echo '</h2>';
246 echo '<ol>';
247 foreach ($passw_error['msg'] as $error) {
248 echo "<li>",$error,"</li>";
249 }
250 echo '</ol>';
251 $err++;
252 }
253 // check password and admin not containing quote or double quote
254 //
255 if ( strpos($cpassword_admin,'"') !== false
256 || strpos($cadmin,'"') !== false
257 || strpos($cpassword_admin,"'") !== false
258 || strpos($cadmin,"'") !== false
259 || strpos($cpassword_admin," ") !== false
260 || strpos($cadmin," ") !== false
261 || strpos($cadmin,"@mobile") !== false
262 ) {
263 echo '<h2 class="warning">';
264 echo _('Le mot de passe du super admin et le superadmin ne peut pas contenir des guillemets ou espaces, ni @mobile');
265 echo '</h2>';
266 $err++;
267
268 }
269
270 // Try to connect , if it doesn't work that do not create the config file
271 try {
272 if ($multi=="N") {
273 $cnx = new DatabaseCore($db_user, $db_password,'template1', $db_host, $db_port);
274 }else {
276 }
277
278 } catch (Exception $ex) {
279 $cnx=false;
280 }
281 // -----
282 // If conx successfull save the file or display it
283 // -----
284 if ( $err == 0 && $cnx !== false ) {
285 echo '<div style="border:red 1px solid">';
286 echo '<h1 style="padding-top:0px;margin-top:0px;background-color:orangered">'._('Important').'</h1>';
287 echo '<p style="padding:10px">',_("Voici l'utilisateur et mot de passe de l'utilisateur administrateur de Noalyss , "
288 . " il a tous les droits et a accès à tout."
289 . " Connectez-vous avec ses identifiants et changer le mot de passe dans préférence (en haut à droite)"),
290 "</p>";
291 echo '<p style="padding:10px;font-size:120%">'._('Utilisateur administrateur'),' ','<span style="color:red"> ',$cadmin,'</span>','</p>';
292 echo '<p style="padding:10px;font-size:120%">',_('Mot de passe'),'<span style="color:red"> '.$cpassword_admin.' </span>','</p>';
293 echo '</div>';
294 // Create the db
295 if (is_writable(NOALYSS_INCLUDE)) {
297 echo '
298 <form method="post" action="?lang='.$_GET['lang'].'" >'.
299 _('Les informations sont sauv&eacute;es vous pouvez continuer').
300 '<input type="submit" class="button" value="'._('Continuer').'">
301 </form>';
302 return;
303 } else {
304 echo '<p class="warning">';
305 echo _('Fichier non sauvé');
306 echo '</p>';
307 echo '<p>';
308 printf ( _('Créez ce fichier %s avec les informations suivantes '),
309 NOALYSS_INCLUDE.'/config.inc.php');
310 echo '</p>';
311 echo '<p>';
312 print (_('Puis cliquez sur ce lien'))." ";
313 echo '<a href="install.php?lang='.$_GET['lang'].'">'._('Installation')."</a>";
314 echo '</p>';
315
316 echo '<textarea cols="80" rows="50" style="height:auto">';
318 echo '</textarea>';
319 return;
320 }
321 } elseif ($err == 0 && $cnx == false) {
322 echo '<h2 class="warning">';
323 echo _('Impossible de se connecter à Postgresql, vérifiez les informations de connection');
324 echo '</h2>';
325 }
326 }
327
328
329//------------------------------------------------------------------------
330// Check that the file config.inc.php exists , if not then propose to
331// enter information and exit
332//
333//------------------------------------------------------------------------
334if ( ! file_exists(NOALYSS_INCLUDE.'/config.inc.php')) {
335
336 echo '<h1 class="info">'._('Entrez les informations nécessaires à noalyss').'</h1>';
337 echo '<form method="post">';
338 require_once NOALYSS_INCLUDE.'/lib/config_file.php';
339
341 echo '<div style="float:left;"></div>';
342 echo '<p style="text-align:center">',
343 HtmlInput::submit('save_config',_('Continuer'),"","button"),
344 '</p>';
345 echo "</div>";
346 echo '</form>';
347 exit();
348}
349
350//----------------------------------------------------------------------
351// End functions
352//
353//----------------------------------------------------------------------
354
355// Verify some PHP parameters
356// magic_quotes_gpc = Off
357// magic_quotes_runtime = Off
358// magic_quotes_sybase = Off
359// include_path
360require_once NOALYSS_INCLUDE.'/config.inc.php';
361require_once NOALYSS_INCLUDE.'/lib/config_file.php';
362require_once NOALYSS_INCLUDE.'/class/database.class.php';
363
364// we shouldn't use it
365// if ( defined ("MULTI") && MULTI==1) { create_htaccess();}
366
367echo '<h1>'._('Configuration').'</h1>';
368?>
369<h2>Info</h2>
370<?php echo _('Vous utilisez le domaine')," ",domaine; ?>
371<h2>PHP</h2>
372<?php
373
376//------------------------------------------------------------------------------
377// PHP Version
378//------------------------------------------------------------------------------
379if (!defined('PHP_VERSION_ID')) {
380 $version = explode('.',PHP_VERSION);
381
382 define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 ));
383}
384
385if ( PHP_VERSION_ID < 80000) {
386 echo $g_failed. " ".phpversion()." ". _("Version PHP trop basse , minimum 8.0");
387 echo '<p style="color:grey;margin-left:20px">';
388 printf(_("Cette version nécessite au moins une version supérieure ou égale à 8.0"));
389 echo '</p>';
390 $fatal++;
391} else {
392 echo $g_succeed. " Version PHP ".phpversion();
393}
394//ini_set("memory_limit","200M");
395echo "<ul style=\"list-style-type: square;\">";
396foreach (array('magic_quotes_gpc','magic_quotes_runtime') as $a) {
397echo "<li>";
398 if ( ini_get($a) == false ) print $a.': '.$succeed;
399 else {
400 print $a.': '.$failed;
401 print ("<h2 class=\"error\">$a "._('a une mauvaise valeur')." !</h2>");
402 $flag_php++;
403 }
404
405echo "</li>";
406}
407//---------------------------------------------------------------------------------------
408// Check php modules
409//---------------------------------------------------------------------------------------
410$module=get_loaded_extensions();
411
412$str_error_message=_('Vous devez installer ou activer l\'extension').'<span style="font-weight:bold"> %s </span>';
413
414$a_need_module=array("mbstring","pgsql","bcmath","gettext","zip","gd","dom","xml","SimpleXML","xmlwriter","xmlreader");
415
417
418for ($m=0;$m<$nb_need_module;$m++)
419{
420
421 echo "<li>";
422 if ( in_array($a_need_module[$m],$module) == false ){
423 echo 'module '.$a_need_module[$m].$failed;
424 echo '<span class="warning">',
426 ' </span>';
427 $flag_php++;
428 $fatal++;
429 } else echo 'module '.$a_need_module[$m].$succeed;
430 echo "</li>";
431}
432//---------------------------------------------------------------------------------------
433// Max_execution_time , can be overriden
434//---------------------------------------------------------------------------------------
435if ( ini_get("max_execution_time") < 60 ) {
436 echo "<li>";
437 echo _('Avertissement').' : '.$failed;
438 echo '<span class="info"> ',
439 _("max_execution_time devrait être de 60 minimum"),
440 '</span>';
441 echo "</li>";
442}
443
444if ( ini_get("register_globals") == true) {
445 echo "<li>";
446 echo _('Avertissement').' : '.$failed;
447 print '<span class="warning"> '._('register_globals doit être à off').'</span>';
448 echo "</li>";
449 $flag_php++;
450}
451echo "</li>";
452// Check for open_basedir
453if ( ini_get("open_basedir") != "") {
454 echo "<li>";
455 echo _('Avertissement').' : '.$failed;
456 print '<span class="warning"> '._('open_basedir empêche certaines fonctions de Noalyss,mettez-le à vide ').'</span>';
457 echo "</li>";
458 $flag_php++;
459 $fatal++;
460
461}
462 echo "</ul>";
463if ( $flag_php==0 ) {
464 echo '<p class="info"> '._('php.ini est bien configuré ').$succeed.'</p>';
465} else {
466 echo '<p class="warning"> '._('php mal configuré ').$failed.' </p>';
467}
468
469// Check that the module for postgres is installed before testing the version
470if (! function_exists("pg_connect")) {
471 echo _("Module php-pgsql n'est pas installé");
472 return;
473}
474/* check user */
475if ( (defined("MULTI") && MULTI==1)|| !defined("MULTI"))
476{
477
478 $cn=new Database(-1,'template');
479} else
480{
481 $cn=new Database();
482}
483
484?>
485<h2><?php echo _('Base de données')?></h2>
486<?php
487 // Verify Psql version
488 //--
489$sql="select setting from pg_settings where name='server_version'";
490$version=$cn->get_value($sql);
491
492echo _("Version base de données :"),$version;
493$majeur=explode(".",$version);
494if ( $majeur[0] < 10 )
495 {
496?>
497 <p><?php echo $failed . _(" Vous devez absolument utiliser au minimum une version 10 de PostGresql, si votre distribution n'en
498offre pas, installez-en une en la compilant. Lisez attentivement la notice sur postgresql.org pour migrer
499vos bases de données")?>
500</p>
501<?php $fatal++; //'
502} else {
503 echo " ",$g_succeed;
504}
505
506?>
507<h3><?php echo _('Paramètre base de données')?></h3>
508<?php
509// Language plsql is installed
510//--
511$sql="select lanname from pg_language where lanname='plpgsql'";
512$Res=$cn->count_sql($sql);
513if ( $Res==0) { ?>
514<p><?php echo $failed._("Vous devez installer le langage plpgsql pour permettre aux fonctions SQL de fonctionner.")?></p>
515<p><?php echo _("Pour cela, sur la ligne de commande en tant qu\'utilisateur postgres, faites createlang plpgsql template1")?>
516</p>
517
518<?php $fatal++;
519}
520
521include_once('lib/ac_common.php');
522require_once('class/dossier.class.php');
523
524// Memory setting
525//--
526$sql="select name,setting
527 from pg_settings
528 where
529 name in ('effective_cache_size','shared_buffers')";
530$cn->exec_sql($sql);
532for ($e=0;$e<$cn->size();$e++) {
533 $a=$cn->fetch($e);
534 switch ($a['name']){
535 case 'effective_cache_size':
536 if ( $a['setting'] < 1000 ){
537
538 printf ('<p class="warning">'.$failed._('Attention le paramètre effective_cache_size est de %s'.
539 " au lieu de 1000")."</p>",$a['setting']);
540 $flag++;
541 }
542 break;
543 case 'shared_buffers':
544 if ( $a['setting'] < 640 ){
545 print '<p class="warning">'.$failed;
546 printf('Attention le paramètre shared_buffer est de %s
547 au lieu de 640',$a['setting']);
548 print "</p>";
549 $flag++;
550 }
551 break;
552 }
553 }
554if ( $flag == 0 ) {
555 echo '<p class="info">'._('La base de données est bien configurée ').$succeed.'</p>';
556 } else {
557 echo '<p class="warning">'.$failed;
558 printf (_('Il y a %s param&egrave;tre qui sont trop bas'),$flag);
559 echo '</p>';
560 }
561
562if ($fatal > 0) {
563 print ( '<span class="warning">');
564 printf(_("Désolé, votre installation ne permet à NOALYSS de fonctionner"));
565 print ( '</span>');
566 return;
567}
568if ( ! isset($_POST['go']) ) {
569?>
570<span style="text-align: center">
571 <FORM METHOD="post" action="install.php?lang=<?php echo $_GET['lang']?>" onsubmit="waiting_box();return true;">
572<input type="submit" class="button" name="go" value="<?php echo _("Commencer la mise à jour ou l'installation");?>">
573</form>
574</span>
575<?php
576}
577if (!isset($_POST['go']))
578{
579 exit();
580}
581// Check if account_repository exists
582if (!defined("MULTI")||(defined("MULTI")&&MULTI==1))
583{
584 $account=$cn->count_sql("select * from pg_database where datname=lower('".domaine."account_repository')");
585}
586else
587{
588 $account=1;
589}
590
591// Create the account_repository
592if ($account == 0 ) {
593
594 echo "Creation of ".domaine."account_repository";
595 if ( DEBUGNOALYSS == 0 ) ob_start();
596 $cn->exec_sql("create database ".domaine."account_repository encoding='utf8'");
597 $cn=new Database();
598 $cn->start();
599 $cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/schema.sql");
600 $cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/data.sql");
601 $cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/constraint.sql");
602 /* update name administrator */
603 $cadmin=NOALYSS_ADMINISTRATOR;
604 $cpassword_admin=NOALYSS_ADMIN_PASSWORD;
605 $cn->exec_sql("update ac_users set use_login=$1,use_pass=md5($2),use_active=1 where use_id=1",
606 array(strtolower($cadmin),$cpassword_admin));
607
608 $cn->commit($cn);
609
610 if ( DEBUGNOALYSS == 0 )
611 {
612 ob_end_clean();
613 }
614
615 echo _("Creation of Modele 1");
616 if ( DEBUGNOALYSS == 0 )
617 {
618 ob_start();
619 }
620 $cn->exec_sql("create database ".domaine."mod1 encoding='utf8'");
621
622 $cn=new Database(1,'mod');
623 $cn->start();
624 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/schema.sql');
625 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/data.sql');
626 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/constraint.sql');
627 $cn->commit();
628
629 if ( DEBUGNOALYSS == 0 )
630 {
631 ob_end_clean();
632 }
633
634 echo _("Creation of Modele 2");
635 $cn->exec_sql("create database ".domaine."mod2 encoding='utf8'");
636 $cn=new Database(2,'mod');
637 $cn->start();
638 if ( DEBUGNOALYSS == 0 ) { ob_start(); }
639 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/schema.sql');
640 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod2/data.sql');
641 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/constraint.sql');
642 $cn->commit();
643
644 if ( DEBUGNOALYSS == 0 ) ob_end_clean();
645echo '<h1>'._('Important').'</h1>';
646echo '<p>'._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'</p>';
647echo '<p>',_('Mot de passe')," ",NOALYSS_ADMIN_PASSWORD,'</p>';
648 }// end if
649// Add a french accountancy model
650//--
651$cn=new Database();
652
653echo "<h1>"._('Mise à jour du systeme')."</h1>";
654echo "<h2 >"._("Mise à jour dossier")."</h2>";
655/**
656 * Update or install MONO
657 */
658if (defined("MULTI") && MULTI == 0)
659{
660 $db = new Database();
661 if ($db->exist_table("repo_version") == false)
662 {
663 if ( DEBUGNOALYSS > 0 ) { ob_start(); }
664 $db->execute_script(NOALYSS_INCLUDE.'/sql/mono/mono.sql');
665
666 if ( DEBUGNOALYSS > 0 ) ob_end_clean();
667 }
668
669
670 if ($db->exist_table("version") == false)
671 {
672 echo '<p class="warning">' . $failed ;
673 printf (_('La base de donnée %s est vide,
674 veuillez vous y connecter
675 avec phpPgAdmin ou pgAdmin3 ou en commande en ligne
676 puis faites un seul de ces choix : '),dbname);
677 echo '<ul>';
678 echo '<li>'._("soit noalyss/contrib/mono-dossier/mono-france.sql pour la comptabilité française").'</li>';
679 echo '<li>'._("soit noalyss/contrib/mono-dossier/mono-belge.sql pour la comptabilité belge").'</li>';
680 echo '<li>'._("soit y restaurer un backup ou un modèle")."</li>
681 </ul>";
682 echo _("Puis refaites la procédure d'installation pour mettre la base de données à jour"),
683 "</p>";
684 exit();
685 }
686 echo "<h3>Patching " . dbname . '</h3>';
687 $db->apply_patch(dbname);
688 echo "<p class=\"info\">"._("Tout est installé"). $succeed;
689
690 echo "<h2>"._("Mise à jour Repository")."</h2>";
691 if ( DEBUGNOALYSS == 0 ) ob_start();
692 $MaxVersion=DBVERSIONREPO-1;
693 for ($i=4;$i<= $MaxVersion;$i++)
694 {
695 if ( $db->get_value (' select val from repo_version') <= $i ) {
696 $db->execute_script(NOALYSS_INCLUDE.'/sql/patch/ac-upgrade'.$i.'.sql');
697 }
698 }
699
700 $db->exec_sql("update ac_users set use_login=$1,use_pass=md5($2) where use_id=1",
701 array(strtolower(NOALYSS_ADMINISTRATOR),NOALYSS_ADMIN_PASSWORD));
702
703 if ( DEBUGNOALYSS == 0 ) ob_end_clean();
704
705 echo '<h1>'._('Important').'</h1>';
706 echo '<p>'._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'</p>';
707
708 echo "<h2 class=\"warning\">";
709 printf (" VOUS DEVEZ EFFACER CE FICHIER %s",__FILE__);
710 echo "</h2>";
711 ?>
712<p style="text-align: center">
713 <A style="" class="button" HREF="./index.php"><?php echo _('Connectez-vous à NOALYSS')?></A>
714 </p>
715 <?php
716 exit();
717}
718
719/*
720 * If multi folders
721 */
722define ('ALLOWED',1);
723define ('ALLOWED_ADMIN',1);
724
726if (defined("NOALYSS_ADMINISTRATOR") && defined ("NOALYSS_ADMIN_PASSWORD"))
727{
728 $rep->exec_sql("update ac_users set use_login=$1 ,use_pass=md5($2)
729 where use_id=1",
730 array(strtolower(NOALYSS_ADMINISTRATOR),
731 NOALYSS_ADMIN_PASSWORD));
732}
734echo '<h1>'._('Important').'</h1>';
735echo '<p>'._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'</p>';
736
737echo "<h2 class=\"warning\">";
738printf (_("VOUS DEVEZ EFFACER CE FICHIER %s"),__FILE__);
739echo "</h2>";
740
741 echo "<p class=\"info\">"._("Tout est installé")." ". $succeed;
742?>
743</p>
744<p style="text-align: center">
745<A style="display:inline;margin:10px;padding:10px;" class="button" HREF="index.php?remove_install"><?php echo _("Essai effacement install.php et se connecter à NOALYSS")?></A>
746</p>
747</body>
h2($p_string, $p_class="", $raw="")
Definition: ac_common.php:68
span($p_string, $p_extra='')
Definition: ac_common.php:43
h1($p_string, $p_class="")
Definition: ac_common.php:72
p($p_string)
Definition: ac_common.php:39
set_language()
set the lang thanks the _SESSION['g_lang'] var.
Definition: ac_common.php:754
return false Description text align
$url
$err
$opd_description style
$name size
margin right
$input_from user
Definition: balance.inc.php:68
$from_poste name
$ex
Definition: balance.inc.php:45
$input_from type
Definition: balance.inc.php:65
else $card content[$j]['j_montant']
margin left
$_GET['qcode']
This class allow you to connect to the postgresql database, execute sql, retrieve data.
contains the class for connecting to Noalyss
static upgrade()
Upgrade check if the folder ACCOUNT_REPOSITORY needs to be upgrade thanks the variable DBVERSIONREPO ...
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
$anc_filter title
global $g_failed
global $g_succeed
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)
Definition: config_file.php:54
config_file_create($p_array, $from_setup, $p_os=1)
create the config file
const DBVERSIONREPO
Definition: constant.php:37
$_POST['ac']
Definition: do.php:310
for($e=0; $e< count($afiche); $e++) exit
load_all_script()
load all the javascript only one time
print
Type of printing.
$sql
Definition: install.php:526
$majeur
Definition: install.php:493
$db_host
Definition: install.php:200
$Res
Definition: install.php:512
$version
Definition: install.php:490
$db_name
Definition: install.php:206
global $os
Definition: install.php:185
$db_password
Definition: install.php:199
$db_port
Definition: install.php:201
NOALYSS_ADMINISTRATOR
Definition: install.php:735
$fatal
Definition: install.php:375
$nb_need_module
Definition: install.php:416
$cadmin
Definition: install.php:207
$db_user
Definition: install.php:198
$succeed
Definition: install.php:183
$a_need_module
Definition: install.php:414
$flag_php
Definition: install.php:374
$flag
Definition: install.php:531
$multi
Definition: install.php:202
domaine
Definition: install.php:370
$rep
Definition: install.php:725
foreach(array('magic_quotes_gpc', 'magic_quotes_runtime') as $a) $module
Definition: install.php:410
$str_error_message
Definition: install.php:412
if( $delta< 0) elseif( $delta==0)
$desc width