aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/html/analyse.py27
-rwxr-xr-xwww/html/fonctions.py1
2 files changed, 28 insertions, 0 deletions
diff --git a/www/html/analyse.py b/www/html/analyse.py
new file mode 100644
index 0000000..de55e47
--- /dev/null
+++ b/www/html/analyse.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python3
+# -*- coding: utf-8 -*-
+
+import mod_python
+from fonctions import baseHTML, connexionBD, lien
+
+def index(req):
+ req.content_type="text/html"
+ content=str()
+'''
+#sql part
+ conn=connexionBD()
+ cur=conn.cursor()
+ sql="select * from paquet;"
+ cur.execute(sql)
+ conn.commit()
+ data=cur.fetchall()
+ conn.close()
+#sql part
+'''
+
+#write the html page
+ req.write(baseHTML("ATS-Project","""
+<center><h1>Analyse</h1></center>
+"""
++ content
+))
diff --git a/www/html/fonctions.py b/www/html/fonctions.py
index b9efce1..a8d4c8b 100755
--- a/www/html/fonctions.py
+++ b/www/html/fonctions.py
@@ -15,6 +15,7 @@ def baseHTML(title,body):
<a href="/">Index</a>
<a href="/filtrage.py">Filtrage</a>
<a href="/syntaxe.py">Syntaxe</a>
+ <a href="/analyse.py">Analyse</a>
</nav>
"""+ body +"""</body>
</html>