From f5bfa5e53b361edd02b95ea0575c85b2bd359090 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 28 Feb 2014 01:13:54 +0100 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20supe?= =?UTF-8?q?rTornado.py=20=09nouveau=20fichier:=20video.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superTornado.py | 16 ++++++++-------- video.html | 12 ++++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 video.html diff --git a/superTornado.py b/superTornado.py index 36d3993..2369217 100644 --- a/superTornado.py +++ b/superTornado.py @@ -39,13 +39,6 @@ class MainHandler(BaseHandler): self.set_secure_cookie("user", iden) self.redirect("/video") else: - ficLog.enregDansLog(iden,"Unauthorized user connection","IP TO DO") - if confAveug == True: - print '->Send audio alarm unauthorized user' - print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20non%20autorisee")' - else: - print '->Send visual alarm unauthorized user' - print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")' print "->An unauthorized user try to access" self.redirect("/unauthorized") @@ -55,7 +48,7 @@ class VideoHandler(BaseHandler): self.redirect("/") return name = tornado.escape.xhtml_escape(self.current_user) - self.write("Hello, " + name) + self.render("video.html") class UnauthorizedHandler(BaseHandler): def get(self): @@ -64,6 +57,13 @@ class UnauthorizedHandler(BaseHandler): force = self.get_argument("illegalAccess","") if force == "1" : self.set_secure_cookie("user", "illegalUser") + ficLog.enregDansLog(iden,"Unauthorized user connection","IP TO DO") + if confAveug == True: + print '->Send audio alarm unauthorized user' + print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20non%20autorisee")' + else: + print '->Send visual alarm unauthorized user' + print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")' self.redirect("/video") else : self.redirect("/") diff --git a/video.html b/video.html new file mode 100644 index 0000000..4d005f2 --- /dev/null +++ b/video.html @@ -0,0 +1,12 @@ + + + + + + Acces camera + + +

Vue camera

+ + +