NOALYSS

✖"; $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 */ } /** *@brief create correctly the htaccess file */ function create_htaccess() { global $os; /* If htaccess file doesn't exists we create them here * if os == 1 then windows, 0 means Unix */ $file='..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'.htaccess'; if (! file_exists($file)) { $hFile=@fopen($file,'w+'); if ( ! $hFile ) exit('Impossible d\'écrire dans le répertoire include'); fwrite($hFile,'order deny,allow'."\n"); fwrite($hFile,'deny from all'."\n"); fclose($hFile); } $file='..'.DIRECTORY_SEPARATOR.'.htaccess'; if (! file_exists($file)) { $hFile=@fopen($file,'w+'); if ( ! $hFile ) exit('Impossible d\'écrire dans le répertoire html'); $array=array("php_flag magic_quotes_gpc off", "php_value max_execution_time 240", "php_value memory_limit 20M", "AddDefaultCharset utf-8", "php_flag register_globals off", "php_value error_reporting 10239", "php_value post_max_size 20M", "php_flag short_open_tag on", "php_value upload_max_filesize 20M", "php_value session.use_trans_sid 1", "php_value session.use_cookies 1", "php_flag session.use_only_cookies on"); if ( $os == 0 ) fwrite($hFile,'php_value include_path .;../../include;../include;addon'."\n"); else fwrite($hFile,'php_value include_path .:../../include:../include:addon'."\n"); foreach ($array as $value ) fwrite($hFile,$value."\n"); fclose($hFile); } } /* The config file is created here */ if (isset($_POST['save_config'])) { require_once '../../include/config_file.php'; $url=config_file_create($_POST,1,$os); echo '
Les informations sont sauvées vous pouvez continuer
'; exit(); } if ( is_writable ('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'constant.php') == false ) { echo '

'._("Ecriture non possible").'

'. '

'. _("On ne peut pas écrire dans le répertoire de NOALYSS, changez-en les droits ") .'

'; exit(); } if ( ! file_exists('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php')) { echo '

'._('Entrez les informations nécessaires à noalyss').'

'; echo '
'; require_once('../../include/config_file.php'); echo config_file_form(); echo '
'; echo '

', HtmlInput::submit('save_config',_('Sauver la configuration'),"","button"), '

'; echo ""; echo '
'; exit(); } //---------------------------------------------------------------------- // End functions // //---------------------------------------------------------------------- // Verify some PHP parameters // magic_quotes_gpc = Off // magic_quotes_runtime = Off // magic_quotes_sybase = Off // include_path require_once NOALYSS_INCLUDE.'/config_file.php'; require_once NOALYSS_INCLUDE.'/class_database.php'; if ( defined ("MULTI") && MULTI==1) { create_htaccess();} echo '

'._('Configuration').'

'; ?>

Info

Vous utilisez le domaine

PHP

"; foreach (array('magic_quotes_gpc','magic_quotes_runtime') as $a) { echo "
  • "; if ( ini_get($a) == false ) print $a.': '.$succeed; else { print $a.': '.$failed; print ("

    $a a une mauvaise valeur !

    "); $flag_php++; } echo "
  • "; } $module=get_loaded_extensions(); echo "
  • "; $str_error_message=_('Vous devez installer ou activer l\'extension %s '); if ( in_array('mbstring',$module) == false ){ echo 'module mbstring '.$failed; echo '', sprintf($str_error_message, "mbstring"), ' '; $flag_php++; } else echo 'module mbstring '.$succeed; echo "
  • "; echo "
  • "; if ( in_array('pgsql',$module) == false ) { echo 'module PGSQL '.$failed; echo '', sprintf($str_error_message, "psql"), ' '; $flag_php++; } else echo 'module PGSQL '.$succeed; echo "
  • "; echo "
  • "; if ( in_array('bcmath',$module) == false ) { echo 'module BCMATH ok '.$failed; echo '', sprintf($str_error_message, "bcmath"), ' '; $flag_php++; } else echo 'module BCMATH '.$succeed; echo "
  • "; echo "
  • "; if (in_array('gettext',$module) == false ) { echo 'module GETTEXT '.$failed; echo '', sprintf($str_error_message, "gettext"), ' '; $flag_php++; } else echo 'module GETTEXT '.$succeed; echo "
  • "; echo "
  • "; if ( in_array('zip',$module) == false ) { echo 'module ZIP '.$failed; echo '', sprintf($str_error_message, "zip"), ' '; $flag_php++; } else echo 'module ZIP '.$succeed; echo "
  • "; echo "
  • "; if ( in_array('gd',$module) == false ) { echo 'module GD '.$failed; echo '', sprintf($str_error_message, "gd"), ' '; $flag_php++; } else echo 'module GD '.$succeed; echo "
  • "; if ( ini_get("max_execution_time") < 60 ) { echo "
  • "; echo _('Avertissement').' : '.$failed; echo ' ', _("max_execution_time devrait être de 60 minimum"), ''; echo "
  • "; } if ( ini_get("register_globals") == true) { echo "
  • "; echo _('Avertissement').' : '.$failed; print ' register_globals doit être à off'; echo "
  • "; $flag_php++; } if ( ini_get("session.use_trans_sid") == false ) { echo "
  • "; echo _('Avertissement').' : '.$failed; print ' avertissement session.use_trans_sid should be set to true '; echo "
  • "; } echo ""; echo ""; if ( $flag_php==0 ) { echo '

    php.ini est bien configuré '.$succeed.'

    '; } else { echo '

    php mal configuré '.$failed.'

    '; } /* check user */ if ( (defined("MULTI") && MULTI==1)|| !defined("MULTI")) { $cn=new Database(-1,'template'); } else { $cn=new Database(); } ?>

    Base de données

    get_value($sql); echo "Version base de données :",$version; if ( $version[0] < 8 || ($version[0]=='8' && $version[2]<4) ) { ?>

    Vous devez absolument utiliser au minimum une version 8.4 de PostGresql, si votre distribution n'en offre pas, installez-en une en la compilant.

    Lisez attentivement la notice sur postgresql.org pour migrer vos bases de données

    Paramètre base de données

    count_sql($sql); if ( $Res==0) { ?>

    Vous devez installer le langage plpgsql pour permettre aux fonctions SQL de fonctionner.

    Pour cela, sur la ligne de commande en tant qu\'utilisateur postgres, faites createlang plpgsql template1

    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 ){ print '

    '.$failed.'Attention le paramètre effective_cache_size est de '. $a['setting']." au lieu de 1000

    "; $flag++; } break; case 'shared_buffers': if ( $a['setting'] < 640 ){ print '

    '.$failed.'Attention le paramètre shared_buffer est de '. $a['setting']."au lieu de 640

    "; $flag++; } break; } } if ( $flag == 0 ) { echo '

    La base de données est bien configurée '.$succeed.'

    '; } else { echo '

    '.$failed.'Il y a '.$flag.' paramètre qui sont trop bas

    '; } 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("sql/account_repository/schema.sql"); $cn->execute_script("sql/account_repository/data.sql"); $cn->execute_script("sql/account_repository/constraint.sql"); $cn->commit($cn); if ( ! DEBUG) ob_end_clean(); echo "Creation of Modele1"; if ( ! DEBUG) ob_start(); $cn->exec_sql("create database ".domaine."mod1 encoding='utf8'"); $cn=new Database(1,'mod'); $cn->start(); $cn->execute_script('sql/mod1/schema.sql'); $cn->execute_script('sql/mod1/data.sql'); $cn->execute_script('sql/mod1/constraint.sql'); $cn->commit(); if ( ! DEBUG) ob_end_clean(); echo "Creation of Modele2"; $cn->exec_sql("create database ".domaine."mod2 encoding='utf8'"); $cn=new Database(2,'mod'); $cn->start(); if ( ! DEBUG) { ob_start(); } $cn->execute_script('sql/mod1/schema.sql'); $cn->execute_script('sql/mod2/data.sql'); $cn->execute_script('sql/mod1/constraint.sql'); $cn->commit(); if ( ! DEBUG) ob_end_clean(); }// end if // Add a french accountancy model //-- $cn=new Database(); echo "

    Mise a jour du systeme

    "; echo "

    Mise à jour dossier

    "; if (defined("MULTI") && MULTI == 0) { $db = new Database(); if ($db->exist_table("version") == false) { echo '

    ' . $failed . 'La base de donnée ' . dbname . ' est vide, veuillez executer noalyss/contrib/mono-dossier/mono.sql puis faites un seul de ces choix :

    '; exit(); } echo "

    Patching " . dbname . '

    '; $db->apply_patch(dbname); echo "

    Tout est installé $succeed"; echo "

    Mise à jour Repository

    "; if ( DEBUG == false ) ob_start(); $MaxVersion=DBVERSIONREPO-1; for ($i=4;$i<= $MaxVersion;$i++) { if ( $db->get_value (' select val from repo_version') <= $i ) { $db->execute_script('sql/patch/ac-upgrade'.$i.'.sql'); } } ?>

    Connectez-vous à NOALYSS

    exec_sql("select dos_id, dos_name from ac_dossier"); $MaxDossier=$cn->size($Resdossier); //---------------------------------------------------------------------- // Upgrade the folders //---------------------------------------------------------------------- for ($e=0;$e < $MaxDossier;$e++) { $db_row=Database::fetch_array($Resdossier,$e); echo "

    Patching ".$db_row['dos_name'].'

    '; $name=$cn->format_name($db_row['dos_id'],'dos'); if ( $cn->exist_database($name)> 0 ) { $db=new Database($db_row['dos_id'],'dos'); $db->apply_patch($db_row['dos_name']); Dossier::synchro_admin($db_row['dos_id']); } else { echo_warning(_("Dossier inexistant")." $name"); } } //---------------------------------------------------------------------- // Upgrade the template //---------------------------------------------------------------------- $Resdossier=$cn->exec_sql("select mod_id, mod_name from modeledef"); $MaxDossier=$cn->size(); echo "

    Mise à jour modèle

    "; for ($e=0;$e < $MaxDossier;$e++) { $db_row=Database::fetch_array($Resdossier,$e); echo "

    Patching ".$db_row['mod_name']."

    "; $name=$cn->format_name($db_row['mod_id'],'mod'); if ( $cn->exist_database($name)> 0 ) { $db=new Database($db_row['mod_id'],'mod'); $db->apply_patch($db_row['mod_name']); } else { echo_warning(_("Modèle inexistant")." $name"); } } //---------------------------------------------------------------------- // Upgrade the account_repository //---------------------------------------------------------------------- echo "

    Mise à jour Repository

    "; $cn=new Database(); if ( DEBUG == false ) ob_start(); $MaxVersion=DBVERSIONREPO-1; for ($i=4;$i<= $MaxVersion;$i++) { if ( $cn->get_version() <= $i ) { $cn->execute_script('sql/patch/ac-upgrade'.$i.'.sql'); } } if (! DEBUG) ob_end_clean(); echo "

    Tout est installé $succeed"; ?>

    Connectez-vous à NOALYSS