From dec15d7b6335874155b65770ea4a0c6dc5c75395 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Wed, 14 Sep 2022 16:43:06 +0000 Subject: [PATCH] Give an error when connection dies --- app/server/conn.php | 23 ++++++++++------------- css/main.css | 24 ++++++++++++------------ css/scss/_body.scss | 4 ++-- error.php | 26 ++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 27 deletions(-) create mode 100644 error.php diff --git a/app/server/conn.php b/app/server/conn.php index c764677..08cedde 100644 --- a/app/server/conn.php +++ b/app/server/conn.php @@ -1,21 +1,18 @@ connect_error) { - ?> - - * { +.error-root > * { margin-top: 0; margin-bottom: 0.5rem; } -.search-root h1, -.search-root h2, -.search-root h3, -.search-root h4, -.search-root h5 { +.error-root h1, +.error-root h2, +.error-root h3, +.error-root h4, +.error-root h5 { font-family: "Lexend Deca", sans-serif; } -.search-root p, -.search-root a, -.search-root button, -.search-root input { +.error-root p, +.error-root a, +.error-root button, +.error-root input { font-family: "Secular One", sans-serif; } diff --git a/css/scss/_body.scss b/css/scss/_body.scss index 5474a9f..4f22d6e 100644 --- a/css/scss/_body.scss +++ b/css/scss/_body.scss @@ -416,10 +416,10 @@ /* |------------------------------------------------------------- - | SEARCH + | ERROR PAGE |------------------------------------------------------------- */ -.search-root { +.error-root { @include defaultDecoration($page-accent); @include defaultFont(); } \ No newline at end of file diff --git a/error.php b/error.php new file mode 100644 index 0000000..576a58e --- /dev/null +++ b/error.php @@ -0,0 +1,26 @@ + + + + + + + + + +
+ +
+

Woops...

+ An error occured while connecting to the server. If you're an admin, check the database configuration and/or make sure the database is alive

"; + } else { + echo "

An error occured! But no description was provided.

"; + } + ?> +
+ + + + + \ No newline at end of file