request("action","string", ""); $rep=new Database(); $User=new User($rep); $User->Check(); if ($User->admin != 1) { $theme=(isset($User->theme))?$User->theme:""; html_page_start($User->theme); echo "

"; echo _("Vous n'êtes pas administateur"); echo "

"; $reconnect=http_build_query(array("reconnect"=>1,"backurl"=>"admin-noalyss.php?action=upgrade")); echo ''; echo _("Connectez-vous comme administrateur"); echo ''; html_page_stop(); return; } // For a backup , we must avoid to send anything before the // dump file if ( $action== 'backup') { /* take backup */ require_once NOALYSS_INCLUDE."/backup.inc.php"; exit(); } html_page_start($_SESSION['g_theme']); load_all_script(); echo '

'._('Administration').'

'; echo '
'; echo MenuAdmin()."
"; ?>
"._("Version Noalyss").""; echo "Noalyss : ", $version_noalyss; echo "

"._('Variables').":".NOALYSS_INCLUDE.'/config.inc.php

'; echo '"; echo "

"._("Paramètre base de données")."

"; $a_option = array ("client_encoding","lc_collate","listen_addresses", "server_encoding","work_mem","shared_buffers","server_version", "hba_file","config_file","data_directory","effective_cache_size"); /* * For old version of noalyss config file */ $noalyss_user=(defined("noalyss_user"))?noalyss_user:phpcompta_user; $port=(defined("noalyss_psql_port"))?noalyss_psql_port:phpcompta_psql_port; $host=(!defined("noalyss_psql_host") )?'127.0.0.1':noalyss_psql_host; echo '"; echo "

"._('Paramètre PHP')."

"; ob_start(); echo phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_ENVIRONMENT | INFO_VARIABLES); $r=ob_get_clean(); $html=new DOMDocument(); $html->loadHTML($r); $nodelist=$html->getElementsByTagName("style"); $nodelist->item(0)->nodeValue=' .p {text-align: left;} .e {background-color: #ccccff; font-weight: bold; color: #000000;} .h {background-color: #9999cc; font-weight: bold; color: #000000;word-wrap:break-word;word-break: break-all;} .v {background-color: #cccccc; color: #000000;;word-wrap:break-word;word-break: break-all} .vr {background-color: #cccccc; text-align: right; color: #000000;word-wrap:break-word;word-break: break-all} img {float: right; border: 0px;} hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;} '; $a_table=$html->getElementsByTagName("table"); // For PHP < 7 , we must change the attribute "width" if ( substr(phpversion(),0,1) != "7" ) { for ( $i = 0 ; $i < $a_table->length;$i++) { $node=$a_table->item($i); $node->attributes->getNamedItem("width")->nodeValue="100%"; } } $a_title = $html->getElementsByTagName("title"); for ( $i = 0;$i<$a_title->length;$i++) { $a_title->item($i)->nodeValue=""; } echo $html->saveHTML(); } //------------------------------------------------------------------------------ // Upgrade //------------------------------------------------------------------------------ if ( $action == "upgrade" ) { require_once NOALYSS_INCLUDE."/upgrade.inc.php"; } ?>