From 5179ec792cb14e80edf5728d694988d8cfa32366 Mon Sep 17 00:00:00 2001
From: bton The creator of this website accepts no liability for any linguistic or technical errors! user and tag list | Documentation
- Doumentation
-
- """
+ return render_template("index.html")
@app.route("/list")
def list():
@@ -81,24 +65,7 @@ def create_app(test_config=None):
c = db.cursor()
c.execute("SELECT * FROM users")
users = c.fetchall()
- text = ""
- for i in users:
- text = text + f'
'
- return '''
-
-
-
-
- ''' + text + ''
+ return render_template("list.html", users=users, preis=preis)
@app.route("/transactionlist")
def transactionlist():
@@ -117,41 +84,18 @@ def create_app(test_config=None):
c = db.cursor()
id = request.args.get("id")
c.execute(f"SELECT * FROM users WHERE id=?", [id])
- user_list = c.fetchall()
- if user_list != []:
- user = user_list[0]
+ user = c.fetchone()
+ if user != None :
c.execute(f"SELECT * FROM tags WHERE userid={user[0]}")
tags = c.fetchall()
- text = ""
- for tag in tags:
- text = text + f'
user and tag list | Documentation
-{escape(user[1])} : {escape(user[2]/100)}€
-
- - - -Tags:
- {text} -user and tag list | Documentation
Deleted user {escape(user_name)}
return to the tags and user list' + return render_template("removeuser.html", user_name=user_name) else: return render_template("error.html", error_code="043") @@ -186,15 +129,8 @@ def create_app(test_config=None): socketio.emit("update", "update") c.execute(f"SELECT * FROM users WHERE username=?", [username]) user = c.fetchone() - log(type="adduser", userid=user[0], after=user[1]) - return """ - - -tag was sucsesfully added
- - """ + return render_template("redirect.html") + else: return render_template("error.html", error_code="757") @@ -218,13 +154,7 @@ def create_app(test_config=None): user = c.fetchone() log(type="balance", userid=user[0], before=balance_old, after=user[2]) socketio.emit("update", "update") - return """ - - - - """ + return render_template("redirect.html") else: return render_template("error.html", error_code="043") @@ -288,13 +218,7 @@ def create_app(test_config=None): db.commit() message = f"Removed {tag_id} from user {user_id}" log(type="removetag", userid=user_id, before=tag_id) - return f""" - - - - """ + return render_template("redirect.html") else: return render_template("error.html", error_code="054") diff --git a/Website/templates/adduser.html b/Website/templates/adduser.html index 7368ebe..a1a74e0 100644 --- a/Website/templates/adduser.html +++ b/Website/templates/adduser.html @@ -5,4 +5,4 @@-