From 53e75eb3aba185355db3ac1d77a113517e682cbf Mon Sep 17 00:00:00 2001
From: Simon BLANCHARD <simon.blanchard@ensiie.fr>
Date: Fri, 4 Dec 2015 07:03:43 +0100
Subject: [PATCH] encore monitored

---
 FrontEnd/js/controle.js | 10 ++++++++--
 monitored.php           |  4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/FrontEnd/js/controle.js b/FrontEnd/js/controle.js
index fa99e0f..49fef86 100644
--- a/FrontEnd/js/controle.js
+++ b/FrontEnd/js/controle.js
@@ -6,7 +6,13 @@ onkeydown = onkeyup = function detecteTouche(e){
     else
     	{nbTouches--;}
     if(nbTouches == 3)
-    	{alert("Vous allez pas bien");}
+    {
+    	header('monitored-backend.php?type=1');
+		exit;
+	}
     if(nbTouches == 1 && e.keyCode == 13)
-    	{alert("Vous allez bien");}
+    {
+    	header('monitored-backend.php?type=0');
+		exit;
+	}
 }
diff --git a/monitored.php b/monitored.php
index 781b498..4af6e87 100644
--- a/monitored.php
+++ b/monitored.php
@@ -10,8 +10,8 @@ if(! isset($_SESSION['type']) || $_SESSION['type'] == 'Supervisor')
 <div class='container'>
 <div class='row'>
 <div class='col-sm-3'></div>
-<div class='col-sm-3'><img src='bigFriendlyButton2.png' alt="Tout va bien" style='width:200px;height:200px;'/></div>
-<div class='col-sm-3'><img src='redButton.png' alt="Au secours" style='width:200px;height:200px;'/></div>
+<div class='col-sm-3'><a href="monitored-backend.php?type=0"><img src='green-button.png' alt="Tout va bien" style='width:200px;height:200px;'/></a></div>
+<div class='col-sm-3'><a href="monitored-backend.php?type=1"><img src='help-button.jpg' alt="Au secours" style='width:200px;height:200px;'/></a></div>
 <div class='col-sm-3'></div>
 </div>
 </div>
-- 
GitLab