From 8525aaabfa0dfd2b18cbd531339a5d8f94d54f09 Mon Sep 17 00:00:00 2001 From: JamesJDillon Date: Sun, 28 Aug 2016 23:33:23 +0100 Subject: [PATCH] Added a better 'not banned' response if a user navigates to banned.php whilst not being banned. --- banned.php | 22 ++++++++++++++++------ templates/notbanned.html | 6 ++++++ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 templates/notbanned.html diff --git a/banned.php b/banned.php index 1bee9115..93e8929e 100644 --- a/banned.php +++ b/banned.php @@ -1,8 +1,18 @@ "._("Banned?").""; - print "

"._("You are not banned.")."

"; - print ""; + require_once 'inc/functions.php'; + require_once 'inc/bans.php'; + checkBan(); + print ""._("Banned?").""; + + //If the user is not banned, show the "not banned" page. + die( + Element('page.html', array( + 'title' => _('Not banned!'), + 'config' => $config, + 'nojavascript' => true, + 'body' => Element('notbanned.html', array() + )) + )); + + print ""; ?> diff --git a/templates/notbanned.html b/templates/notbanned.html new file mode 100644 index 00000000..41d81db0 --- /dev/null +++ b/templates/notbanned.html @@ -0,0 +1,6 @@ +{% filter remove_whitespace %} +{# Automatically removes unnecessary whitespace #} +
+

You are not banned! Well done on not being terrible!

+
+{% endfilter %}