statistik

This commit is contained in:
fingadumbledore 2023-01-22 16:43:43 +01:00
parent d618747288
commit b3fa2f5e91
2 changed files with 24 additions and 0 deletions

View File

@ -575,6 +575,14 @@ def server():
log_server("called /controll")
return render_template("controll.html")
@app.route("/statistik", methods=['POST'])
def statistik():
sessionId = request.form['id']
game = request.form['game']
createChart(sessionId, game)
log_server("called /statistik")
return render_template("controll.html")
@app.route("/game")

View File

@ -294,7 +294,23 @@
<p>Creator: Host</p>
{% endblock %}
<form class="modal-content animate" action="/drink" method="POST">
<div class="container" style="margin-top: 2em">
<input type="text" placeholder="NFSU2" name="game" required>
<input id="statisk_id" type="hidden" placeholder="SessionID" name="id" required>
<script type="text/javascript">
var sid = sessionStorage.getItem("sessionID")
document.getElementById('statisk_id').value = sid;
</script>
</br>
<button type="submit">
Statistik
</button>
</div>
</form>
<details>
<summary id="QR">
<h1>QR-Code</h1>