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 "
"._("Version Noalyss")."";
echo "Noalyss : ", $version_noalyss;
echo "
"._('Variables').":".NOALYSS_INCLUDE.'/config.inc.php
';
echo '
';
echo "- ". "NOALYSS_HOME".": ".NOALYSS_HOME."
";
echo "- "."NOALYSS_INCLUDE".": ".NOALYSS_INCLUDE."
";
echo "- "."NOALYSS_TEMPLATE".": ".NOALYSS_TEMPLATE."
";
echo "- "."DEBUG".": ".DEBUG."
";
echo "- "."LOGINPUT".": ".LOGINPUT."
";
echo "- "."LOCALE".": ".LOCALE."
";
echo "- "."MULTI".": ".MULTI."
";
echo "- "."DOMAINE".": ".domaine."
";
echo "- "."PG_PATH".": ".PG_PATH."
";
echo "- "."PG_DUMP".": ".PG_DUMP."
";
echo "- "."PG_RESTORE".": ".PG_RESTORE."
";
echo "- "."PSQL".": ".PSQL."
";
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 "- ";
echo _('Hôte')." = ".$host;
echo "
";
echo "- ";
echo _('Port')." = ".$port;
echo "
";
echo "- ";
echo _('Utilisateur')." = ".$noalyss_user;
echo "
";
for ( $i = 0 ; $i < count($a_option); $i++) {
$name=$a_option[$i];
$sql="select setting from pg_settings where name=$1";
$value=$rep->get_value($sql,array($name));
echo "- ".$name." = ".$value."
";
}
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";
}
?>