From dc539fda0108dc724693fbdd7599bd86980f0de0 Mon Sep 17 00:00:00 2001 From: clyhtsuriva Date: Sun, 29 Mar 2020 19:53:38 +0200 Subject: some web changes --- www/html/index.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 www/html/index.py (limited to 'www/html/index.py') diff --git a/www/html/index.py b/www/html/index.py new file mode 100755 index 0000000..010ed2d --- /dev/null +++ b/www/html/index.py @@ -0,0 +1,39 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +import mod_python +from fonctions import baseHTML, connexionBD + +def index(req): + req.content_type="text/html" + + content=str() + +#sql part + conn=connexionBD() + cur=conn.cursor() + sql="select * from trame;" + cur.execute(sql) + conn.commit() + data=cur.fetchall() + conn.close() +#sql part + + for i in data : + content+=("""""" + +"""""" + str(i[1]) + """""" + +"""""" + str(i[2]) + """""" + +"""""" + str(i[3]) + """""" + +"""""" + str(i[4]) + """""" + +"""""") + + req.write(baseHTML("ATS-Project",""" +

ATS-Project

+ + +""" ++ content + +""" +
HeureProtocoleSourceDestination
+""")) #tableheads to change so it takes the output of the select + -- cgit v1.2.3