Choisissez votre langue ,pour MacOS utilisez "Not Used"
Select your language, for MacOS user please use "Not Used"
✖"; $succeed="✓"; $inc_path=get_include_path(); global $os; $inc_path=get_include_path(); global $os; if ( strpos($inc_path,";") != 0 ) { $new_path=$inc_path.';../../include;addon'; $os=0; /* $os is 0 for windoz */ } else { $new_path=$inc_path.':../../include:addon'; $os=1; /* $os is 1 for unix */ } // Retrieve informations from the very screen // $http=new HttpInput(); $db_user=$http->request("cuser","string", ""); $db_password=$http->request("cpasswd","string", ""); $db_host=$http->request("chost","string", ""); $db_port=$http->request("cport","string", ""); $multi=$http->request("multi","string", "N"); $locale=$http->request("clocale","string", "1"); $ctmp=$http->request("ctmp","string", "/tmp"); $cpath=$http->request("cpath","string", "/usr/bin"); $db_name=$http->request("cdbname", "string",""); $cadmin=$http->request("cadmin","string", "admin"); $cadmin=strtolower($cadmin); //------------------------------------------------------------------------- // warn only if we can not write in include //------------------------------------------------------------------------- if ( is_writable ('install.php') == false ) { echo ''. _("On ne peut pas écrire dans le répertoire de NOALYSS, changez-en les droits ") .'
'; } //---------------------------------------------------------------------------- // We try to connect with the supplied information // If we succeed we continue the check // otherwise we turn back to the first screen // The config file is created here //---------------------------------------------------------------------------- if (isset($_POST['save_config'])) { require_once NOALYSS_INCLUDE.'/lib/config_file.php'; // Try to connect , if it doesn't work that do not create the config file if ($multi=="N") { $cnx = Database::connect($db_user, $db_password,'template1', $db_host, $db_port); }else { $cnx = Database::connect($db_user, $db_password,$db_name, $db_host, $db_port); } // ----- // If conx successfull save the file or display it // ----- if ( $cnx !== false ) { echo ''._('Utilisateur administrateur'),' ',' ',$cadmin,'','
'; echo '',_('Mot de passe'),' phpcompta ','
'; // Create the db if (is_writable(NOALYSS_INCLUDE)) { $url=config_file_create($_POST,1,$os); echo ' '; return; } else { echo ''; echo _('Fichier non sauvé'); echo '
'; echo ''; printf ( _('Créez ce fichier %s avec les informations suivantes '), NOALYSS_INCLUDE.'/config.inc.php'); echo '
'; echo ''; print (_('Puis cliquez sur ce lien'))." "; echo ''._('Installation').""; echo '
'; echo ''; return; } } else { echo ''._('php.ini est bien configuré ').$succeed.'
'; } else { echo ''._('php mal configuré ').$failed.'
'; } // Check that the module for postgres is installed before testing the version if (! function_exists("pg_connect")) { echo _("Module php-pgsql n'est pas installé"); return; } /* check user */ if ( (defined("MULTI") && MULTI==1)|| !defined("MULTI")) { $cn=new Database(-1,'template'); } else { $cn=new Database(); } ?> get_value($sql); echo _("Version base de données :"),$version; $majeur=explode(".",$version); if ( $majeur[0] < 9 ) { ?>count_sql($sql); if ( $Res==0) { ?>
exec_sql($sql); $flag=0; for ($e=0;$e<$cn->size();$e++) { $a=$cn->fetch($e); switch ($a['name']){ case 'effective_cache_size': if ( $a['setting'] < 1000 ){ printf ('
'.$failed._('Attention le paramètre effective_cache_size est de %s'. " au lieu de 1000")."
",$a['setting']); $flag++; } break; case 'shared_buffers': if ( $a['setting'] < 640 ){ print ''.$failed; printf('Attention le paramètre shared_buffer est de %s au lieu de 640',$a['setting']); print "
"; $flag++; } break; } } if ( $flag == 0 ) { echo ''._('La base de données est bien configurée ').$succeed.'
'; } else { echo ''.$failed; printf (_('Il y a %s paramètre qui sont trop bas'),$flag); echo '
'; } if ( ! isset($_POST['go']) ) { ?> count_sql("select * from pg_database where datname=lower('".domaine."account_repository')"); } else { $account=1; } // Create the account_repository if ($account == 0 ) { echo "Creation of ".domaine."account_repository"; if ( ! DEBUG) ob_start(); $cn->exec_sql("create database ".domaine."account_repository encoding='utf8'"); $cn=new Database(); $cn->start(); $cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/schema.sql"); $cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/data.sql"); $cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/constraint.sql"); /* update name administrator */ $cadmin=NOALYSS_ADMINISTRATOR; $cn->exec_sql("update ac_users set use_login=$1,use_active=1 where use_id=1", array(strtolower($cadmin))); $cn->commit($cn); if (!DEBUG) { ob_end_clean(); } echo _("Creation of Modele 1"); if (!DEBUG) { ob_start(); } $cn->exec_sql("create database ".domaine."mod1 encoding='utf8'"); $cn=new Database(1,'mod'); $cn->start(); $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/schema.sql'); $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/data.sql'); $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/constraint.sql'); $cn->commit(); if (!DEBUG) { ob_end_clean(); } echo _("Creation of Modele 2"); $cn->exec_sql("create database ".domaine."mod2 encoding='utf8'"); $cn=new Database(2,'mod'); $cn->start(); if ( ! DEBUG) { ob_start(); } $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/schema.sql'); $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod2/data.sql'); $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/constraint.sql'); $cn->commit(); if ( ! DEBUG) ob_end_clean(); echo ''._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'
'; echo '',_('Mot de passe'),' phpcompta','
'; }// end if // Add a french accountancy model //-- $cn=new Database(); echo "' . $failed ; printf (_('La base de donnée %s est vide, veuillez vous y connecter avec phpPgAdmin ou pgAdmin3 ou en commande en ligne puis faites un seul de ces choix : '),dbname); echo '
"._("Tout est installé"). $succeed; echo "
'._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'
'; echo '',_('Mot de passe par défaut à l\'installation'),' phpcompta','
'; echo "'._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'
'; echo ""._("Tout est installé")." ". $succeed; ?>