noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 27/65: Better debugging : add a button to sho


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 27/65: Better debugging : add a button to show the request $_POST and $_GET
Date: Wed, 09 Sep 2015 08:27:15 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 089e5936a6ebd6ddcd8f0d8cfe1a42ad6ae03dd7
Author: Dany De Bontridder <address@hidden>
Date:   Tue Sep 1 01:26:42 2015 +0200

    Better debugging : add a button to show the request $_POST and $_GET
---
 html/do.php |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/html/do.php b/html/do.php
index 5bd759f..a8ceef2 100644
--- a/html/do.php
+++ b/html/do.php
@@ -51,7 +51,35 @@ if ( ! isset ($_SESSION['g_theme']))
 $style_user=HtmlInput::default_value_post("style_user",$_SESSION['g_theme']);
 
 html_page_start($style_user);
+if ( DEBUG ) {
+    ?>
+<div id="debug_div" style="border:slategray solid 
1px;position:absolute;background:white;display:fixed;top:2px;left:50px;z-index:1000;display:none">
+    <h2>$_POST</h2>
+    <?php        
+    var_dump($_POST);
+    ?>
+    <h2>$_GET</h2>
+    <?php        
+    var_dump($_GET);
+    ?>
+</div>
+<script>
+    function show_debug_request() {
+        var visible=document.getElementById('debug_div').style.display;
+        console.log(visible);
+        var new_state="";
+        if ( visible == 'block') { new_state='none';}
+        else
+        if ( visible == 'none') { new_state='block';}
+        else 
+            console.log('erreur');
+        document.getElementById('debug_div').style.display=new_state;
+    }
+</script>
+<input type="button" class="tinybutton" 
style="position:absolute;display:fixed;top:40px;margin-left:580px;z-index:1000" 
value="show request" onclick="show_debug_request()">
 
+<?php
+}
 global $g_user, $cn,$g_parameter;
 
 



reply via email to

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