tests versuch 2

This commit is contained in:
2000-Trek 2023-07-28 23:30:45 +02:00
parent fdf385fe06
commit c88f7df83a
2363 changed files with 408191 additions and 0 deletions

View file

@ -0,0 +1,26 @@
<!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">
var socket = io();
var user = {{ user }}
socket.on('connect', function() {
socket.emit('addtag', {data: user});
});
socket.on("busy", function(){
document.write('<p>the nfc reader is busy at the moment. Pleas Wait ...</p>')
socket.emit('addtag', {data: user})
});
socket.on("wait", function(){
document.write('<p>Pleas hold your tag on to the nfc reader</p>')
});
socket.on("error", function(data) {
alert(data)
window.location="http://matekasse.server.c3h/"
});
socket.on("finished", function(data){
alert(data)
window.location="http://matekasse.server.c3h/"
});
</script>
</html>

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p>
<p>
Username:
<form action="/adduser/user" method="get"><input name="username"><input type="submit"></form>
</p>
</html>

View file

@ -0,0 +1,17 @@
<!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">
{% block content %} {% endblock %}
</div>
</body>
</html>

View file

@ -0,0 +1,26 @@
<!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">
var socket = io();
var change = {{change}}
socket.on('connect', function() {
socket.emit('addtag', {data: user});
});
socket.on("besetzt", function(){
document.write('<p>besetzt</p>')
socket.emit('addtag', {data: user})
});
socket.on("wait", function(){
document.write('<p>wait</p>')
});
socket.on("error", function(data) {
alert(data)
window.location="http://matekasse.server.c3h/"
});
socket.on("finished", function(data){
alert(data)
window.location="http://matekasse.server.c3h/"
});
</script>
</html>

View file

@ -0,0 +1,42 @@
body{
background-color: rgb(255, 255, 255);
font-size: 100%;
}
h1{
font-size: 10em;
color: rgb(0, 0, 0);
}
h2{
font-size: 5em;
color: rgb(0, 0, 0)
}
#Infos{
color: black;
box-shadow: 3px 3px gray ;
background-color: lightgreen;
border-style: solid;
border-radius: 40px;
padding: 5px;
border-width: 1px;
border-color:white;
margin-bottom: 50px;
}
#text_header{
color: black;
font-size: 40px;
}
#text{
text-align: center;
color: black;
background-color: gray;
border: 2px;
border-style: dashed;
border-color: white;
border-radius: 10px;
}

View file

@ -0,0 +1,46 @@
<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>
</div>
<h1 class="header"> <u>Documentation</u> </h1>
<p>&nbsp;</p>
<div id="text">
<h2>API:</h2>
<p>http://matekasse.server.c3h/api/tag_id?={tag_id}</p>
<p>Response:
{"mode":"error" "error":"{error}"} or
{"mode":"message","username":"{username}","message":"{message}"} or
{"mode":"balance", "username":"{username}", "balance":"{balance}"}
</p>
<br></br>
<p>http://matekasse.server.c3h/api/change?id={user_id}&?change={change}</p>
<p>
If change = None or NaN the change will be -1
</p>
<p>
Response:
{"mode":"error" "error":"{error}"} or
{"mode":"balance", "username":"{username}", "balance":"{balance}"}
</p>
<br></br>
<h2>Error Codes:</h2>
<p>170: Tag already exists</p>
<p>054: Tag does not exists</p>
<p>757: Usere already exists</p>
<p>043: User does not exists</p>
<p>352: Timeout</p>
<p>095: Input is not a Number</p>
<P>418: I'm a teapot</P>
</div>
</body>
</html>

View file

@ -0,0 +1,26 @@
<!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">
var socket = io();
var user = {{ user }}
socket.on('connect', function() {
socket.emit('removetag', {data: user});
});
socket.on("busy", function(){
document.write('<p>the nfc reader is busy at the moment. Pleas Wait ...</p>')
socket.emit('addtag', {data: user})
});
socket.on("wait", function(){
document.write('<p>Pleas hold your tag on to the nfc reader</p>')
});
socket.on("error", function(data) {
alert(data)
window.location="http://matekasse.server.c3h/"
});
socket.on("finished", function(data){
alert(data)
window.location="http://matekasse.server.c3h/"
});
</script>
</html>