diff admlogin.php @ 32:36392d1d6b5f

Moar work.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 10 Dec 2012 11:14:05 +0200
parents login.php@bf567e6402bf
children 5bf22431176c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admlogin.php	Mon Dec 10 11:14:05 2012 +0200
@@ -0,0 +1,24 @@
+<?
+$sessionType = "admin";
+require "mconfig.inc.php";
+require "msite.inc.php";
+
+stSetupCacheControl();
+
+$target = stGetRequestItem("goto", FALSE);
+if (!stCheckHTTPS() || $target === FALSE || $target == "" || strpos($target, "login.php") !== FALSE)
+  exit;
+
+$password = stGetSetting("admPassword");
+if (stGetRequestItem("admpass", FALSE) == $password)
+{
+  if (!stSessionStart($password, "admTimeout"))
+    error_log("Admin session AUTH LOGIN failed (session setup)");
+}
+else
+{
+  error_log("Admin session AUTH LOGIN failed (password)");
+}
+
+header("Location: ".$target);
+?>
\ No newline at end of file