aboutsummaryrefslogtreecommitdiff
path: root/web/website
diff options
context:
space:
mode:
Diffstat (limited to 'web/website')
-rwxr-xr-xweb/website/.htaccess4
-rwxr-xr-xweb/website/fonctions.py23
-rwxr-xr-xweb/website/index.html9
-rwxr-xr-xweb/website/index.py39
-rwxr-xr-xweb/website/init-bd.sql12
-rwxr-xr-xweb/website/style.css12
-rwxr-xr-xweb/website/test.html8
-rwxr-xr-xweb/website/test.py11
8 files changed, 0 insertions, 118 deletions
diff --git a/web/website/.htaccess b/web/website/.htaccess
deleted file mode 100755
index 825c08d..0000000
--- a/web/website/.htaccess
+++ /dev/null
@@ -1,4 +0,0 @@
-AuthType Basic
-AuthName "restricted area"
-AuthUserFile /var/www/html/ATS-Project/web/.htpasswd
-require valid-user
diff --git a/web/website/fonctions.py b/web/website/fonctions.py
deleted file mode 100755
index c1566af..0000000
--- a/web/website/fonctions.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/python3
-# -*- coding: utf-8 -*-
-import psycopg2
-
-def baseHTML(title,body):
- content=("""<!DOCTYPE html>
-<html>
- <head>
- <title>"""+ title +"""</title>
- <meta charset="UTF-8">
- <link rel="stylesheet" type="text/css" href="style.css">
- </head>
- <body>"""+ body +"""</body>
-</html>
-
- """)
- return content
-
-
-def connexionBD():
- connexion=psycopg2.connect ("host='localhost' dbname='atsdb' user='atsuser' password='123456'")
- return connexion
-
diff --git a/web/website/index.html b/web/website/index.html
deleted file mode 100755
index 27f4dda..0000000
--- a/web/website/index.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Just here to redirect you...</title>
- <meta charset="UTF-8">
- <meta http-equiv='refresh' content='0; URL=index.py'>
- </head>
- <body></body>
-</html>
diff --git a/web/website/index.py b/web/website/index.py
deleted file mode 100755
index 010ed2d..0000000
--- a/web/website/index.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/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+=("""<tr>""" +
-"""<td>""" + str(i[1]) + """</td>""" +
-"""<td>""" + str(i[2]) + """</td>""" +
-"""<td>""" + str(i[3]) + """</td>""" +
-"""<td>""" + str(i[4]) + """</td>""" +
-"""</tr>""")
-
- req.write(baseHTML("ATS-Project","""
-<center><h1>ATS-Project</h1></center>
-<table>
-<tr><th>Heure</th><th>Protocole</th><th>Source</th><th>Destination</th></tr>
-"""
-+ content +
-"""
-</table>
-""")) #tableheads to change so it takes the output of the select
-
diff --git a/web/website/init-bd.sql b/web/website/init-bd.sql
deleted file mode 100755
index f1a4f2b..0000000
--- a/web/website/init-bd.sql
+++ /dev/null
@@ -1,12 +0,0 @@
---Creation of the main table
-drop table if exists trame cascade;
-
-create table trame(
- id_trame serial primary key,
- heure varchar(100),
- protocole varchar(100),
- source varchar(100),
- destination varchar(100)
-);
-
-
diff --git a/web/website/style.css b/web/website/style.css
deleted file mode 100755
index 6d0bd42..0000000
--- a/web/website/style.css
+++ /dev/null
@@ -1,12 +0,0 @@
-body {
- background-color:#000000;
-}
-
-*{
- color: white;
-}
-
-table,th,td {
- border: 2px solid red;
- text-align: center;
-}
diff --git a/web/website/test.html b/web/website/test.html
deleted file mode 100755
index b789672..0000000
--- a/web/website/test.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Test</title>
- <meta charset="UTF-8">
- </head>
- <body>This is a test page</body>
-</html>
diff --git a/web/website/test.py b/web/website/test.py
deleted file mode 100755
index 6ff289c..0000000
--- a/web/website/test.py
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/python3
-# -*- coding: utf-8 -*-
-
-import mod_python
-import fonctions
-
-def index(req):
- req.content_type="text/html"
- req.write(fonctions.baseHTML("Test","""
-This is a test page.</p>
-"""))