diff --git a/flaskserver.py b/flaskserver.py
index b389a89a..3ed520b7 100644
--- a/flaskserver.py
+++ b/flaskserver.py
@@ -3,27 +3,21 @@ from flask import Flask, render_template
app = Flask(__name__)
-@app.route("/dota/ladder")
+@app.route("/ladder")
def page_dota_ladder():
session = db.Session()
- query = session.execute("SELECT royals.username, dota.solo_mmr, dota.party_mmr, dota.wins FROM royals JOIN steam ON royals.id = steam.royal_id JOIN dota ON steam.steam_id = dota.steam_id ORDER BY dota.solo_mmr DESC;")
- return render_template("table.htm", query=query)
-
-
-@app.route("/rl/ladder")
-def page_rl_ladder():
- session = db.Session()
- query = session.execute("SELECT royals.username, rocketleague.single_mmr, rocketleague.doubles_mmr, rocketleague.standard_mmr, rocketleague.solo_std_mmr FROM royals JOIN steam ON royals.id = steam.royal_id JOIN rocketleague ON steam.steam_id = rocketleague.steam_id ORDER BY rocketleague.doubles_mmr DESC;")
- return render_template("table.htm", query=query)
-
-
-@app.route("/osu/ladder")
-def page_osu_ladder():
- session = db.Session()
- query = session.execute("SELECT royals.username, osu.std_pp, osu.taiko_pp, osu.catch_pp, osu.mania_pp FROM royals JOIN osu ON royals.id = osu.royal_id ORDER BY osu.std_pp DESC;")
- return render_template("table.htm", query=query)
-
+ dota = session.execute("SELECT royals.username, dota.solo_mmr, dota.party_mmr, dota.wins FROM royals JOIN steam ON royals.id = steam.royal_id JOIN dota ON steam.steam_id = dota.steam_id ORDER BY dota.solo_mmr DESC;")
+ rl = session.execute("SELECT royals.username, "
+ "rocketleague.single_rank, rocketleague.single_div, rocketleague.single_mmr, "
+ "rocketleague.doubles_rank, rocketleague.doubles_div, rocketleague.doubles_mmr, "
+ "rocketleague.standard_rank, rocketleague.standard_div, rocketleague.standard_mmr, "
+ "rocketleague.solo_std_rank, rocketleague.solo_std_div, rocketleague.solo_std_mmr "
+ "FROM royals JOIN steam ON royals.id = steam.royal_id "
+ "JOIN rocketleague ON steam.steam_id = rocketleague.steam_id "
+ "ORDER BY rocketleague.doubles_rank DESC;")
+ osu = session.execute("SELECT royals.username, osu.std_pp, osu.taiko_pp, osu.catch_pp, osu.mania_pp FROM royals JOIN osu ON royals.id = osu.royal_id ORDER BY osu.std_pp DESC;")
+ return render_template("main.htm", dota=dota, rl=rl, osu=osu)
if __name__ == "__main__":
- app.run()
\ No newline at end of file
+ app.run(host="0.0.0.0", port=1234)
\ No newline at end of file
diff --git a/templates/main.htm b/templates/main.htm
new file mode 100644
index 00000000..75d73d7d
--- /dev/null
+++ b/templates/main.htm
@@ -0,0 +1,51 @@
+
+
+
+
+
+ Ladders
+
+
+
+
+
+
+ Dota 2
+
+ {% with query=dota %}
+ {% include 'table.htm' %}
+ {% endwith %}
+
+ Rocket League
+
+ {% with query=rl %}
+ {% include 'rl_table.htm' %}
+ {% endwith %}
+
+ Osu!
+
+ {% with query=osu %}
+ {% include 'table.htm' %}
+ {% endwith %}
+
+
+
\ No newline at end of file
diff --git a/templates/rl_table.htm b/templates/rl_table.htm
new file mode 100644
index 00000000..a7482ef0
--- /dev/null
+++ b/templates/rl_table.htm
@@ -0,0 +1,70 @@
+