modified: app.py
modified: templates/user_giveaways.html
This commit is contained in:
7
app.py
7
app.py
@@ -510,10 +510,15 @@ def user_giveaways(guild_id):
|
||||
""", (user_id, guild_id))
|
||||
won_giveaways = cursor.fetchall()
|
||||
|
||||
# Hole den Servernamen aus der guilds-Tabelle
|
||||
cursor.execute("SELECT name FROM guilds WHERE guild_id = %s", (guild_id,))
|
||||
guild_name_result = cursor.fetchone()
|
||||
guild_name = guild_name_result["name"] if guild_name_result else f"Server {guild_id}"
|
||||
|
||||
cursor.close()
|
||||
connection.close()
|
||||
|
||||
return render_template("user_giveaways.html", won_giveaways=won_giveaways, guild_id=guild_id)
|
||||
return render_template("user_giveaways.html", won_giveaways=won_giveaways, guild_id=guild_id, guild_name=guild_name)
|
||||
|
||||
return redirect(url_for("landing_page"))
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Your Won Giveaways</title>
|
||||
<title>Your Won Giveaways - {{ guild_name }}</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
.table-container {
|
||||
@@ -28,7 +28,7 @@
|
||||
<body>
|
||||
{% include 'navigation.html' %}
|
||||
<div class="container mt-5">
|
||||
<h2 class="text-center">Your Won Giveaways on Server {{ guild_id }}</h2>
|
||||
<h2 class="text-center">Your Won Giveaways on {{ guild_name }}</h2>
|
||||
<p class="text-center text-muted">Here you can view all the giveaways you've won on this server.</p>
|
||||
|
||||
<div class="table-container mt-4">
|
||||
|
||||
Reference in New Issue
Block a user