Compare commits

..

3 commits

14 changed files with 204 additions and 187 deletions

1
.gitignore vendored
View file

@ -11,3 +11,4 @@ flask_session/
/test/flask_session/
/Website/__pycache__/
/Website/.pytest_cache/
/.idea

View file

@ -1,7 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf-8">
{% extends "base.html" %}
{% block customscript %}
<script type="text/javascript" charset="utf-8">
var socket = io();
var user = {{ user }}
socket.on('connect', function() {
@ -22,5 +21,5 @@
alert(data)
window.location="http://matekasse.server.c3h/"
});
</script>
</html>
</script>
{% endblock %}

View file

@ -1,8 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<title>add user</title>
<p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p>
<p>
<form action="/adduser/user" method="post"><input name="username" type="search" placeholder="Username"><button>Add user</button></form>
</p>
</html>
{% extends "base.html" %}
{% block title %}
add user
{% endblock %}
{% block content %}
<form action="/adduser/user" method="post"><input name="username" type="search" placeholder="Username">
<button>Add user</button>
</form>
</p>
{% endblock %}

View file

@ -1,17 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>
{% block title %} {% endblock %} - FlaskApp
</title>
</head>
<body>
<nav>
<p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p>
</nav>
<hr>
<div class="conntent">
<head>
<title>{% block title %}{% endblock %}</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js"
integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA=="
crossorigin="anonymous"
></script>
<link rel="shortcut icon" type="Logo/png" href="ccc_logo.png"/>
{% block customscript %}{% endblock %}
</head>
<body>
<nav>
<p><a href="/">index page</a>
| <a href="/list">user and tag list</a>
| <a href="/documentation">Documentation</a>
</p>
</nav>
<hr>
<div class="conntent">
{% block content %} {% endblock %}
</div>
</body>
</div>
</body>
</html>

View file

@ -1,6 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
{% extends "base.html" %}
{% block customscript %}
<script type="text/javascript" charset="utf-8">
var socket = io();
var change = {{change}}
@ -23,4 +22,4 @@
window.location="http://matekasse.server.c3h/"
});
</script>
</html>
{% endblock %}

View file

@ -1,6 +1,6 @@
<html>
<script src="/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf-8">
{% extends "base.html" %}
{% block customscript %}
<script type="text/javascript" charset="utf-8">
if (confirm("{message}") == true) {
fetch("{{destination}}", {
method: "POST",
@ -9,9 +9,8 @@
"Content-type": "application/json; charset=UTF-8"
}
})
} else {
window.location = "/list"
}
else {
window.location="/list"
}
</script>
</html>
</script>
{% endblock %}

View file

@ -1,16 +1,11 @@
<html>
<head>
<title>Documentation</title>
<link rel="stylesheet" type="text/css" href="documentation.css">
<link rel="shortcut icon" type="Logo/png" href="ccc_logo.png"/>
</head>
<body>
<div id="Infos">
<p> <a href="/">index page</a> | <a href="/list">user and tag list</a></p>
<p><a href="https://hannover.ccc.de/gitlab/anton/matekasse">https://hannover.ccc.de/gitlab/anton/matekasse</a></p>
</div>
{% extends "base.html" %}
{% block title %}
Documentation
{% endblock %}
{% block customscript %}
<link rel="stylesheet" type="text/css" href="documentation.css">
{% endblock %}
{% block content %}
<h1 class="header"> <u>Documentation</u> </h1>
<p>&nbsp;</p>
@ -46,6 +41,4 @@
<p>638: Wrong Input</p>
<P>418: I'm a teapot</P>
</div>
</body>
</html>
{% endblock %}

View file

@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<title>Error</title>
<p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p>
<p>
{% extends "base.html" %}
{% block title %}Error{% endblock %}
{% block customscript %}
<p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p>
<p>
Error: {{error_code}}
</p>
</html>
</p>
{% endblock %}

View file

@ -1,11 +1,12 @@
<html>
<a href="/list">user and tag list</a>
{% extends "base.html" %}
{% block customscript %}
<script type="text/javascript" charset="utf-8">
window.location="/list"
</script>
{% endblock %}
{% block content %}
<a href="/list">user and tag list</a>
<p>The creator of this website accepts no liability for any linguistic or technical errors!</p>
<br style="line-height: 500%;"></br>
<a href="/documentation">Doumentation</a>
<script src="/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous">
</script>
<script type="text/javascript" charset="utf-8">
window.location="/list"
</script>
</html>
{% endblock %}

View file

@ -1,29 +1,35 @@
<!DOCTYPE html>
<html lang="en-150">
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf-8">
{% extends "base.html" %}
{% block title %}
Strichliste
{% endblock %}
{% block customscript %}
<script type="text/javascript" charset="utf-8">
var socket = io();
socket.on("update", function(){
window.location="http://matekasse.server.c3h/list"
socket.on("update", function () {
window.location = "http://matekasse.server.c3h/list"
});
</script>
<title>Strichliste</title>
<p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p>
<form action="/list/user" method="get"><input name="user" type="search" placeholder="Search for user"><button>Search</button></form>
<form action="/adduser" method="post"><button type="submit">Add User</button></form>
<br></br>
{% for i in users %}
<form action="/change" method="post" style="display: inline;">
</script>
{% endblock %}
{% block content %}
<form action="/list/user" method="get"><input name="user" type="search" placeholder="Search for user">
<button>Search</button>
</form>
<form action="/adduser" method="post">
<button type="submit">Add User</button>
</form>
<br></br>
{% for i in users %}
<form action="/change" method="post" style="display: inline;">
<p style="display: inline;">
<a href="list/user?id={{i[0]}}">{{i[1]|safe}}</a>: {{i[2]/100}}€
</p>
<input name="id" type="hidden" value="{{i[0]}}">
<input name="change" type="number" lang="nb" step="0.01" placeholder="add to balance">
</form>
<form action="/change" method="post" style="display: inline">
</form>
<form action="/change" method="post" style="display: inline">
<input name="id" type="hidden" value="{{i[0]}}">
<button type="submit" name="change" value=-{{preis}}>-{{preis}}€</button>
</form>
<br style="line-height: 50%;"></br>
{% endfor %}
</html>
</form>
<br style="line-height: 50%;"></br>
{% endfor %}
{% endblock %}

View file

@ -1,8 +1,12 @@
<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf-8">
window.location="/list";
</script>
<p>redirekting</p>
<a href="/list">destination</a>
</html>
{% extends "base.html" %}
{% block title %}
{% endblock %}
{% block content %}
<p>redirekting</p>
<a href="/list">destination</a>
{% endblock %}
{% block customscript %}
<script type="text/javascript" charset="utf-8">
window.location = "/list";
</script>
{% endblock %}

View file

@ -1,7 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf-8">
{% extends "base.html" %}
{% block customscript %}
<script type="text/javascript" charset="utf-8">
var socket = io();
var user = {{ user }}
socket.on('connect', function() {
@ -23,4 +22,4 @@
window.location="http://matekasse.server.c3h/"
});
</script>
</html>
{% endblock %}

View file

@ -1,9 +1,10 @@
<html>
<title>remove user</title>
{% extends "base.html" %}
{% block title %}
remove user
{% endblock %}
{% block content %}
<p>
<p>
<a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a>
</p>
<p>Deleted user {{user_name|safe}}</p>
<a href="/list">return to the tags and user list</a>
</p>
{% endblock %}

View file

@ -1,39 +1,45 @@
<!DOCTYPE html>
<html lang="en-150">
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf-8">
{% extends "base.html" %}
{% block customscript %}
<script type="text/javascript" charset="utf-8">
var socket = io();
socket.on("update", function(){ window.location="/list/user?id={{user[0]}}"});
</script>
<title>{{user[1]|safe}}</title>
<p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p>
<p> {{user[1]|safe}} : {{user[2]/100}}€ <p>
<form action="/addtag" method="post">
socket.on("update", function () {
window.location = "/list/user?id={{user[0]}}"
});
</script>
{% endblock %}
{% block title %}
{{user[1]|safe}}
{% endblock %}
{% block content %}
<p> {{user[1]|safe}} : {{user[2]/100}}€ <p>
<form action="/addtag" method="post">
<input name="id" type="hidden" value="{{user[0]}}">
<button type="submit">Add Tag</button>
</form>
<form action="/removetag" method="post">
</form>
<form action="/removetag" method="post">
<input name="id" type="hidden" value="{{user[0]}}">
<button type="submit">Remove Tag</button>
</form>
</p>
<form action="/change" method="post">
</form>
</p>
<form action="/change" method="post">
<input name="id" type="hidden" value="{{user[0]}}">
<input name="change" type="number" lang="nb" step="0.01" placeholder="change balance">
</form>
</p>
<br></br>
<p>Tags:</p>
{% for tag in tags %}
<p>
</form>
</p>
<br></br>
<p>Tags:</p>
{% for tag in tags %}
<p>
<form action="/removetag" method="post">
<label for="removetag">{{tag[0]}} </label>
<input name="id" type="hidden" value="{{user[0]}}">
<input name="tagid" type="hidden" value="{{tag[0]}}">
<button id="removetag" type="submit">Remove Tag</button>
</form>
</p>
{% endfor %}
<br></br>
<form action="/removeuser" method="post"><input name="id" type="hidden" value="{{user[0]}}"><button type="submit">Remove User</button></form>
</html>
</p>
{% endfor %}
<br></br>
<form action="/removeuser" method="post"><input name="id" type="hidden" value="{{user[0]}}">
<button type="submit">Remove User</button>
</form>
{% endblock %}