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