noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
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/logo10000.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<script>
160 <?php
161 include_once NOALYSS_INCLUDE.'/lib/message_javascript.php';
162 ?>
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//------------------------------------------------------------------------------
379
380/**
381 * Minimum version = 8.2 == 80200
382 */
383if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 80200) {
384
385 echo $g_failed. " ".phpversion()." ". _("Version PHP trop basse , minimum 8.2");
386 echo '<p style="color:grey;margin-left:20px">';
387 printf(_("Cette version nécessite au moins une version supérieure ou égale à 8.2"));
388 echo '</p>';
389 $fatal++;
390} else {
391 echo $g_succeed. " Version PHP ".phpversion();
392}
393//ini_set("memory_limit","200M");
394echo "<ul style=\"list-style-type: square;\">";
395foreach (array('magic_quotes_gpc','magic_quotes_runtime') as $a) {
396echo "<li>";
397 if ( ini_get($a) == false ) print $a.': '.$succeed;
398 else {
399 print $a.': '.$failed;
400 print ("<h2 class=\"error\">$a "._('a une mauvaise valeur')." !</h2>");
401 $flag_php++;
402 }
403
404echo "</li>";
405}
406
407
408//---------------------------------------------------------------------------------------
409// Check php modules
410//---------------------------------------------------------------------------------------
411$module=get_loaded_extensions();
412
413$str_error_message=_('Vous devez installer ou activer l\'extension').'<span style="font-weight:bold"> %s </span>';
414
415$a_need_module=array("mbstring","pgsql","bcmath","gettext","zip","gd","dom","xml","SimpleXML","xmlwriter","xmlreader","curl");
416
418
419for ($m=0;$m<$nb_need_module;$m++)
420{
421
422 echo "<li>";
423 if ( in_array($a_need_module[$m],$module) == false ){
424 echo 'module '.$a_need_module[$m].$failed;
425 echo '<span class="warning">',
427 ' </span>';
428 $flag_php++;
429 $fatal++;
430 } else echo 'module '.$a_need_module[$m].$succeed;
431 echo "</li>";
432}
433//---------------------------------------------------------------------------------------
434// Max_execution_time , can be overriden
435//---------------------------------------------------------------------------------------
436if ( ini_get("max_execution_time") < 60 ) {
437 echo "<li>";
438 echo _('Avertissement').' : '.$failed;
439 echo '<span class="info"> ',
440 _("max_execution_time devrait être de 60 minimum"),
441 '</span>';
442 echo "</li>";
443}
444
445if ( ini_get("register_globals") == true) {
446 echo "<li>";
447 echo _('Avertissement').' : '.$failed;
448 print '<span class="warning"> '._('register_globals doit être à off').'</span>';
449 echo "</li>";
450 $flag_php++;
451}
452echo "</li>";
453// Check for open_basedir
454if ( ini_get("open_basedir") != "") {
455 echo "<li>";
456 echo _('Avertissement').' : '.$failed;
457 print '<span class="warning"> '._('open_basedir empêche certaines fonctions de Noalyss,mettez-le à vide ').'</span>';
458 echo "</li>";
459 $flag_php++;
460 $fatal++;
461
462}
463 echo "</ul>";
464if ( $flag_php==0 ) {
465 echo '<p class="info"> '._('php.ini est bien configuré ').$succeed.'</p>';
466} else {
467 echo '<p class="warning"> '._('php mal configuré ').$failed.' </p>';
468}
469
470// Check that the module for postgres is installed before testing the version
471if (! function_exists("pg_connect")) {
472 echo _("Module php-pgsql n'est pas installé");
473 return;
474}
475/* check user */
476if ( (defined("MULTI") && MULTI==1)|| !defined("MULTI"))
477{
478
479 $cn=new Database(-1,'template');
480} else
481{
482 $cn=new Database();
483}
484
485?>
486<h2><?php echo _('Base de données')?></h2>
487<?php
488//-------------------------------------------------------------------------------------------
489// Verify Psql version
490//
491//-------------------------------------------------------------------------------------------
492
493$sql="select setting from pg_settings where name='server_version'";
494$version=$cn->get_value($sql);
495
496echo _("Version base de données :"),$version;
497$majeur=explode(".",$version);
498if ( $majeur[0] < 12 )
499 {
500?>
501 <p><?php echo $failed . _(" Vous devez utiliser au minimum une version 12 de PostgreSQL, si votre distribution n'en
502offre pas, installez-en une en la compilant. Lisez attentivement la notice sur postgresql.org pour migrer
503vos bases de données")?>
504</p>
505<?php $fatal++; //'
506} else {
507 echo " ",$g_succeed;
508}
509
510?>
511<h3><?php echo _('Paramètre base de données')?></h3>
512<?php
513// Language plsql is installed
514//--
515$sql="select lanname from pg_language where lanname='plpgsql'";
516$Res=$cn->count_sql($sql);
517if ( $Res==0) { ?>
518<p><?php echo $failed._("Vous devez installer le langage plpgsql pour permettre aux fonctions SQL de fonctionner.")?></p>
519<p><?php echo _("Pour cela, sur la ligne de commande en tant qu\'utilisateur postgres, faites createlang plpgsql template1")?>
520</p>
521
522<?php $fatal++;
523}
524
525include_once('lib/ac_common.php');
526require_once('class/dossier.class.php');
527
528// Memory setting
529//--
530$sql="select name,setting
531 from pg_settings
532 where
533 name in ('effective_cache_size','shared_buffers')";
534$cn->exec_sql($sql);
536for ($e=0;$e<$cn->size();$e++) {
537 $a=$cn->fetch($e);
538 switch ($a['name']){
539 case 'effective_cache_size':
540 if ( $a['setting'] < 1000 ){
541
542 printf ('<p class="warning">'.$failed._('Attention le paramètre effective_cache_size est de %s'.
543 " au lieu de 1000")."</p>",$a['setting']);
544 $flag++;
545 }
546 break;
547 case 'shared_buffers':
548 if ( $a['setting'] < 640 ){
549 print '<p class="warning">'.$failed;
550 printf('Attention le paramètre shared_buffer est de %s
551 au lieu de 640',$a['setting']);
552 print "</p>";
553 $flag++;
554 }
555 break;
556 }
557 }
558if ( $flag == 0 ) {
559 echo '<p class="info">'._('La base de données est bien configurée ').$succeed.'</p>';
560 } else {
561 echo '<p class="warning">'.$failed;
562 printf (_('Il y a %s param&egrave;tre qui sont trop bas'),$flag);
563 echo '</p>';
564 }
565
566if ($fatal > 0) {
567 print ( '<span class="warning">');
568 printf(_("Désolé, votre installation ne permet à NOALYSS de fonctionner"));
569 print ( '</span>');
570 return;
571}
572if ( ! isset($_POST['go']) ) {
573?>
574<span style="text-align: center">
575 <FORM METHOD="post" action="install.php?lang=<?php echo $_GET['lang']?>" onsubmit="waiting_box();return true;">
576<input type="submit" class="button" name="go" value="<?php echo _("Commencer la mise à jour ou l'installation");?>">
577</form>
578</span>
579<?php
580}
581if (!isset($_POST['go']))
582{
583 exit();
584}
585// Check if account_repository exists
586if (!defined("MULTI")||(defined("MULTI")&&MULTI==1))
587{
588 $account=$cn->count_sql("select * from pg_database where datname=lower('".domaine."account_repository')");
589}
590else
591{
592 $account=1;
593}
594
595// Create the account_repository
596if ($account == 0 ) {
597
598 echo "Creation of ".domaine."account_repository";
599 if ( DEBUGNOALYSS == 0 ) ob_start();
600 $cn->exec_sql("create database ".domaine."account_repository encoding='utf8'");
601 $repo=new Database();
602
603 $repo->start();
604 $repo->execute_script(NOALYSS_INCLUDE."/sql/account_repository/schema.sql");
605 $repo->execute_script(NOALYSS_INCLUDE."/sql/account_repository/data.sql");
606 $repo->execute_script(NOALYSS_INCLUDE."/sql/account_repository/constraint.sql");
607
608 $repo->commit($cn);
609 /* update name administrator */
610 $cadmin=NOALYSS_ADMINISTRATOR;
611 $cpassword_admin=NOALYSS_ADMIN_PASSWORD;
612 $repo->exec_sql("update public.ac_users set use_login=$1,use_pass=md5($2),use_active=1 where use_id=1",
613 array(strtolower($cadmin),$cpassword_admin));
614
615 if ( DEBUGNOALYSS == 0 )
616 {
617 ob_end_clean();
618 }
619
620 echo _("Creation of Modele 1");
621 if ( DEBUGNOALYSS == 0 )
622 {
623 ob_start();
624 }
625 $cn->exec_sql("create database ".domaine."mod1 encoding='utf8'");
626
627 $cn=new Database(1,'mod');
628
629 $cn->start();
630 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/schema.sql');
631 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/data.sql');
632 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/constraint.sql');
633
634 $cn->commit();
635 if ( DEBUGNOALYSS == 0 )
636 {
637 ob_end_clean();
638 }
639
640 echo _("Creation of Modele 2");
641 $cn->exec_sql("create database ".domaine."mod2 encoding='utf8'");
642 $cn=new Database(2,'mod');
643
644 $cn->start();
645 if ( DEBUGNOALYSS == 0 ) { ob_start(); }
646
647 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod2/schema.sql');
648 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod2/data.sql');
649 $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod2/constraint.sql');
650
651 $cn->commit();
652 if ( DEBUGNOALYSS == 0 ) ob_end_clean();
653echo '<h1>'._('Important').'</h1>';
654echo '<p>'._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'</p>';
655echo '<p>',_('Mot de passe')," ",NOALYSS_ADMIN_PASSWORD,'</p>';
656 }// end if
657// Add a french accountancy model
658//--
659$cn=new Database();
660
661echo "<h1>"._('Mise à jour du systeme')."</h1>";
662echo "<h2 >"._("Mise à jour dossier")."</h2>";
663/**
664 * Update or install MONO
665 */
666if (defined("MULTI") && MULTI == 0)
667{
668 $db = new Database();
669 if ($db->exist_table("repo_version") == false)
670 {
671 if ( DEBUGNOALYSS > 0 ) { ob_start(); }
672 $db->execute_script(NOALYSS_INCLUDE.'/sql/mono/mono.sql');
673
674 if ( DEBUGNOALYSS > 0 ) ob_end_clean();
675 }
676
677
678 if ($db->exist_table("version") == false)
679 {
680 echo '<p class="warning">' . $failed ;
681 printf (_('La base de donnée %s est vide,
682 veuillez vous y connecter
683 avec phpPgAdmin ou pgAdmin3 ou en commande en ligne
684 puis faites un seul de ces choix : '),dbname);
685 echo '<ul>';
686 echo '<li>'._("soit noalyss/contrib/mono-dossier/mono-france.sql pour la comptabilité française").'</li>';
687 echo '<li>'._("soit noalyss/contrib/mono-dossier/mono-belge.sql pour la comptabilité belge").'</li>';
688 echo '<li>'._("soit y restaurer un backup ou un modèle")."</li>
689 </ul>";
690 echo _("Puis refaites la procédure d'installation pour mettre la base de données à jour"),
691 "</p>";
692 exit();
693 }
694 echo "<h3>Patching " . dbname . '</h3>';
695 $db->apply_patch(dbname);
696 echo "<p class=\"info\">"._("Tout est installé"). $succeed;
697
698 echo "<h2>"._("Mise à jour Repository")."</h2>";
699 if ( DEBUGNOALYSS == 0 ) ob_start();
700 $MaxVersion=DBVERSIONREPO-1;
701 for ($i=4;$i<= $MaxVersion;$i++)
702 {
703 if ( $db->get_value (' select val from repo_version') <= $i ) {
704 $db->execute_script(NOALYSS_INCLUDE.'/sql/patch/ac-upgrade'.$i.'.sql');
705 }
706 }
707
708 $db->exec_sql("update ac_users set use_login=$1,use_pass=md5($2) where use_id=1",
709 array(strtolower(NOALYSS_ADMINISTRATOR),NOALYSS_ADMIN_PASSWORD));
710
711 if ( DEBUGNOALYSS == 0 ) ob_end_clean();
712
713 echo '<h1>'._('Important').'</h1>';
714 echo '<p>'._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'</p>';
715
716 echo "<h2 class=\"warning\">";
717 printf (" VOUS DEVEZ EFFACER CE FICHIER %s",__FILE__);
718 echo "</h2>";
719 ?>
720<p style="text-align: center">
721 <A style="" class="button" HREF="./index.php"><?php echo _('Connectez-vous à NOALYSS')?></A>
722 </p>
723 <?php
724 exit();
725}
726
727/*
728 * If multi folders
729 */
730define ('ALLOWED',1);
731define ('ALLOWED_ADMIN',1);
732
734if (defined("NOALYSS_ADMINISTRATOR") && defined ("NOALYSS_ADMIN_PASSWORD"))
735{
736 $rep->exec_sql("update public.ac_users set use_login=$1 ,use_pass=md5($2)
737 where use_id=1",
738 array(strtolower(NOALYSS_ADMINISTRATOR),
739 NOALYSS_ADMIN_PASSWORD));
740}
742echo '<h1>'._('Important').'</h1>';
743echo '<p>'._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'</p>';
744
745echo "<h2 class=\"warning\">";
746printf (_("VOUS DEVEZ EFFACER CE FICHIER %s"),__FILE__);
747echo "</h2>";
748
749 echo "<p class=\"info\">"._("Tout est installé")." ". $succeed;
750?>
751</p>
752<p style="text-align: center">
753<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>
754</p>
755</body>
h2($p_string, $p_class="", $raw="")
Definition ac_common.php:68
span($p_string, $p_extra='')
Definition ac_common.php:43
p($p_string, $p_extra='')
Definition ac_common.php:39
h1($p_string, $p_class="")
Definition ac_common.php:72
set_language()
set the lang thanks the _SESSION['g_lang'] var.
return false Description background color
$opd_description style
$name size
margin right
$input_from user
$from_poste name
_("actif, passif,charge,...")
$ex
$input_from type
else $card content[$j]['j_montant']
$_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)
config_file_create($p_array, $from_setup, $p_os=1)
create the config file
$os
Definition constant.php:80
const DBVERSIONREPO
Definition constant.php:37
$_POST['ac']
Definition do.php:323
for($e=0; $e< count($afiche); $e++) exit
load_all_script()
load all the javascript only one time
$majeur
Definition install.php:497
$db_host
Definition install.php:200
$version
Definition install.php:494
$db_name
Definition install.php:206
$db_password
Definition install.php:199
$db_port
Definition install.php:201
NOALYSS_ADMINISTRATOR
Definition install.php:743
$fatal
Definition install.php:375
$nb_need_module
Definition install.php:417
$cadmin
Definition install.php:207
$db_user
Definition install.php:198
$succeed
Definition install.php:183
$a_need_module
Definition install.php:415
$flag_php
Definition install.php:374
$flag
Definition install.php:535
$multi
Definition install.php:202
domaine
Definition install.php:370
foreach(array('magic_quotes_gpc', 'magic_quotes_runtime') as $a) $module
Definition install.php:411
$str_error_message
Definition install.php:413
print
Type of printing.
if( $delta< 0) elseif( $delta==0)
$desc width