X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/59d032c86464658baee13fad479403f411c2c56e..ea90b321a4b3768028d841b307c362af97a5e6e1:/login/index.php diff --git a/login/index.php b/login/index.php index 178b1ee..aa5609b 100644 --- a/login/index.php +++ b/login/index.php @@ -4,15 +4,15 @@ require_once "../common.php"; $logout = false; -$redirect = BASE_URL; +$redirect = get_config("base_url"); if (!empty($_GET['redirect'])) { $str = urldecode($_GET['redirect']); - if (str_starts_with($str, BASE_URL)) // prevent redirects to like https://othersite/ + if (str_starts_with($str, get_config("base_url"))) // prevent redirects to like https://othersite/ $redirect = $_GET['redirect']; } -$redirect = (isset($_GET['redirect'])) ? $_GET['redirect'] : BASE_URL; +$redirect = (isset($_GET['redirect'])) ? $_GET['redirect'] : get_config("base_url"); if (!empty($_GET['logout'])) { if (!isset($_SESSION['id'])) @@ -23,6 +23,12 @@ if (!empty($_GET['logout'])) $logout = true; } } +if (!empty($_GET['timeout'])) +{ + $failmsg = "Your session has timed out. Please login again to continue"; + $_SESSION = NULL; + session_destroy(); +} if (!empty($_POST)) { if ($_POST['username'] && $_POST['password']) @@ -57,8 +63,8 @@ if (!empty($_POST)) ?> - - +css/unrealircd-admin.css" rel="stylesheet"> + @@ -74,7 +80,7 @@ if (!empty($_POST)) - +img/favicon.ico"> UnrealIRCd Panel
@@ -83,8 +89,8 @@ if (!empty($_POST))
-
-

Log in to use Admin Panel

+ +

img/favicon.ico"> Log in to use Admin Panel

-
+
-
+
+
+ Username cannot be empty. +
+
-
+
-
+
+
+ Password cannot be empty. +
+
@@ -111,4 +125,31 @@ if (!empty($_POST))
+ + +