25if ( ! defined (
'ALLOWED')) { die (_(
'Non autorisé'));}
26if ( ! defined (
'ALLOWED_ADMIN')) { die (_(
'Non autorisé'));}
28include_once NOALYSS_INCLUDE .
"/class/noalyss_user.class.php";
29require_once NOALYSS_INCLUDE.
"/lib/user_common.php";
30include_once NOALYSS_INCLUDE.
"/lib/ac_common.php";
31require_once NOALYSS_INCLUDE.
"/lib/user_menu.php";
44 echo
"<h2 class=\"warning\">";
45 echo _(
"Vous n'êtes pas administateur");
47 $reconnect=http_build_query(array(
"reconnect"=>1,
"backurl"=>
"admin-noalyss.php?action=upgrade"));
48 echo
'<a href="'.NOALYSS_URL.
'/index.php?'.$reconnect.
'">';
49 echo _(
"Connectez-vous comme administrateur");
58 require_once NOALYSS_INCLUDE.
"/backup.inc.php";
63echo
'<H2 class="info w100"> '._(
'Administration').
'</H2>';
64echo
'<div class="topmenu">';
77 require_once NOALYSS_INCLUDE.
"/user.inc.php";
85 require_once NOALYSS_INCLUDE.
"/dossier.inc.php";
92 require_once NOALYSS_INCLUDE.
"/modele.inc.php";
97 require_once NOALYSS_INCLUDE.
"/restore.inc.php";
102 require_once NOALYSS_INCLUDE.
"/audit_log.php";
107if (
$action ==
"info" && SYSINFO_DISPLAY ==
true) {
109 echo
"<h2>"._(
"Version Noalyss").
"</h2>";
112 echo
"<h2>"._(
'Variables').
":".NOALYSS_INCLUDE.
'/config.inc.php </h2>';
113 echo
'<ul style="list-style:square">';
114 echo
"<li>".
"NOALYSS_HOME".
": ".NOALYSS_HOME.
"</li>";
115 echo
"<li>".
"NOALYSS_INCLUDE".
": ".NOALYSS_INCLUDE.
"</li>";
116 echo
"<li>".
"NOALYSS_TEMPLATE".
": ".NOALYSS_TEMPLATE.
"</li>";
117 echo
"<li>".
"DEBUG".
": ".DEBUGNOALYSS.
"</li>";
118 echo
"<li>".
"LOGINPUT".
": ".LOGINPUT.
"</li>";
119 echo
"<li>".
"LOCALE".
": ".LOCALE.
"</li>";
120 echo
"<li>".
"MULTI".
": ".MULTI.
"</li>";
121 echo
"<li>".
"DOMAINE".
": ".domaine.
"</li>";
122 echo
"<li>".
"PG_PATH".
": ".PG_PATH.
"</li>";
123 echo
"<li>".
"PG_DUMP".
": ".PG_DUMP.
"</li>";
124 echo
"<li>".
"PG_RESTORE".
": ".PG_RESTORE.
"</li>";
125 echo
"<li>".
"PSQL".
": ".PSQL.
"</li>";
127 echo
"<h2>"._(
"Paramètre base de données").
"</h2>";
128 $a_option = array (
"client_encoding",
"lc_collate",
"listen_addresses",
129 "server_encoding",
"work_mem",
"shared_buffers",
"server_version",
130 "hba_file",
"config_file",
"data_directory",
"effective_cache_size");
134 $noalyss_user=(defined(
"noalyss_user"))?noalyss_user:phpcompta_user;
135 $port=(defined(
"noalyss_psql_port"))?noalyss_psql_port:phpcompta_psql_port;
136 $host=(!defined(
"noalyss_psql_host") )?
'127.0.0.1':noalyss_psql_host;
138 echo
'<ul style="list-style:square">';
140 echo _(
'Hôte').
" = ".$host;
143 echo _(
'Port').
" = ".$port;
146 echo _(
'Utilisateur').
" = ".$noalyss_user;
149 for (
$i = 0 ;
$i < count($a_option);
$i++) {
152 $sql=
"select setting from pg_settings where name=$1";
154 echo
"<li> ".$name.
" = ".
$value.
"</li>";
159 echo
"<h2>"._(
'Paramètre PHP').
"</h2>";
161 echo phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_ENVIRONMENT | INFO_VARIABLES);
163 $html=
new DOMDocument();
164 libxml_use_internal_errors(
true);
166 $nodelist=
$html->getElementsByTagName(
"style");
167 $nodelist->item(0)->nodeValue=
'
168.p {text-align: left;}
169.e {background-color: #ccccff; font-weight: bold; color: #000000;}
170.h {background-color: #9999cc; font-weight: bold; color: #000000;word-wrap:break-word;word-break: break-all;}
171.v {background-color: #cccccc; color: #000000;;word-wrap:break-word;word-break: break-all}
172.vr {background-color: #cccccc; text-align: right; color: #000000;word-wrap:break-word;word-break: break-all}
173img {float: right; border: 0px;}
174hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
176 $a_table=
$html->getElementsByTagName(
"table");
179 if ( substr(phpversion(),0,1) < 7 )
181 for (
$i = 0 ;
$i < $a_table->length;
$i++) {
182 $node=$a_table->item(
$i);
183 $node_width = $node->attributes->getNamedItem(
"width");
184 if ( $node_width !=
null ) $node_width->nodeValue=
"100%";
188 $a_title =
$html->getElementsByTagName(
"title");
189 for (
$i = 0;
$i<$a_title->length;
$i++) {
190 $a_title->item(
$i)->nodeValue=
"";
192 echo
$html->saveHTML();
201 require_once NOALYSS_INCLUDE.
"/upgrade.inc.php";
html_page_start($p_theme="", $p_script="", $p_script2="")
Default page header for each page.
if(headers_sent() &&DEBUGNOALYSS > 0) $html
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
contains the class for connecting to Noalyss
static echo_file($msg, $print=true)
display the file
for($e=0; $e< count($afiche); $e++) exit
load_all_script()
load all the javascript only one time
js_include($p_string)
create the HTML for including of a javascript file if a file is included twice, the second time it wi...