noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 05/16: Administration : add information about


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 05/16: Administration : add information about system
Date: Tue, 20 Oct 2015 14:26:29 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit a8f22675a3a876c151c606ebfd174bdafbfaab5e
Author: Dany De Bontridder <address@hidden>
Date:   Mon Oct 19 14:35:09 2015 +0200

    Administration : add information about system
---
 include/admin_repo.inc.php |   58 +++++++++++++++++++++++++++++++++++++++++--
 include/lib/ac_common.php  |    4 +-
 include/lib/user_menu.php  |    4 ++-
 3 files changed, 60 insertions(+), 6 deletions(-)

diff --git a/include/admin_repo.inc.php b/include/admin_repo.inc.php
index 175b8c4..dd3ea03 100644
--- a/include/admin_repo.inc.php
+++ b/include/admin_repo.inc.php
@@ -91,11 +91,63 @@ if ( $action== 'restore')
 }
 if ($action== 'audit_log')
 {
-    /* List the connexion successuf and failed */
+    /* List the connexion successfull and failed */
     require_once NOALYSS_INCLUDE."/audit_log.php";
 }
-if ( $action == "logout") {
-     require_once 'logout.php';
+if ( $action == "info") {
+    
+    echo "<h2>"._("Paramètre base de données")."</h2>";
+    $a_option = array ("client_encoding","lc_collate","listen_addresses",
+        "server_encoding","work_mem","shared_buffers","server_version",
+        "hba_file","config_file","data_directory");
+    echo '<ul style="list-style:square">';
+    echo "<li>";
+    echo _('Hôte')." = ".noalyss_psql_host;
+    echo "</li>";
+    echo "<li>";
+    echo _('Port')." = ".noalyss_psql_port;
+    echo "</li>";
+    echo "<li>";
+    echo _('Utilisateur')." = ".noalyss_user;
+    echo "</li>";
+    
+    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 "<li> ".$name." = ".$value."</li>";
+    }
+    
+    echo "</ul>";
+    
+    echo "<h2>"._('Paramètre PHP')."</h2>";
+    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 ( $i = 0 ; $i < $a_table->length;$i++) {
+        
$a_table->item($i)->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();
+    
 }
 ?>
 </DIV>
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index 73fec90..cb84e82 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -298,8 +298,7 @@ function html_page_start($p_theme="", $p_script="", 
$p_script2="")
     {
         echo '<!doctype html>';
         printf("\n");
-        echo '<meta name="viewport" content="width=device-width, 
initial-scale=1.0">';
-        printf("\n");
+ 
     }
     else {
         echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN" >';
@@ -316,6 +315,7 @@ function html_page_start($p_theme="", $p_script="", 
$p_script2="")
     <TITLE>$title</TITLE>
        <link rel=\"icon\" type=\"image/ico\" href=\"favicon.ico\" />
     <META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">
+    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
     <LINK REL=\"stylesheet\" type=\"text/css\" 
href=\"".$style."?version=".SVNINFO."\" media=\"screen\"/>
     <link rel=\"stylesheet\" type=\"text/css\" 
href=\"./style-print.css?version=".SVNINFO."\" media=\"print\"/>" .
     $p_script2 . "
diff --git a/include/lib/user_menu.php b/include/lib/user_menu.php
index dcd1807..82134f7 100644
--- a/include/lib/user_menu.php
+++ b/include/lib/user_menu.php
@@ -112,7 +112,9 @@ function MenuAdmin()
                  
array("admin-noalyss.php?action=modele_mgt",_("Modèles"),_('Gestion des 
modèles'),2),
                  
array("admin-noalyss.php?action=restore",_("Restaure"),_("Restaure une base de 
données"),3),
                  
array("admin-noalyss.php?action=audit_log",_("Audit"),_("Utilisateurs qui se 
sont connectés"),4),
-                 array("login.php",_("Accueil"))
+                 array("admin-noalyss.php?action=info",_("Information 
système")),
+                 array("login.php",_("Accueil")),
+                 array("logout.php",_("Sortie"))
                 );
        }
        else



reply via email to

[Prev in Thread] Current Thread [Next in Thread]