changeset 614:7987aa59c2a0

Clean up admin login a bit, and add some DOM elements.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 01 Nov 2014 02:49:03 +0200
parents 6fc379f4033d
children 8840026c931d
files admin.php
diffstat 1 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/admin.php	Sat Nov 01 01:47:06 2014 +0200
+++ b/admin.php	Sat Nov 01 02:49:03 2014 +0200
@@ -10,6 +10,7 @@
 require_once "msession.inc.php";
 require_once "majax.inc.php";
 
+
 function stCreateSettingsData()
 {
   $args = array();
@@ -39,11 +40,19 @@
   "}\n";
 }
 
-function stAdminContent()
+
+function stLoginContent()
 {
-  echo "<div id=\"adminContent\">\n";
+  echo "<div id=\"adminContent\">\n<div id=\"adminLogin\">";
 }
 
+function stLoginFooter()
+{
+  echo "</div>\n";
+  cmPrintPageFooter();
+}
+
+
 // Switch to https first, if needed
 if (!stCheckHTTPS())
 {
@@ -72,18 +81,18 @@
 // Check if sessions are enabled
 if (!stChkSetting("admPassword"))
 {
-  stAdminContent();
+  stLoginContent();
   echo
     "<h1>Oh noes, admin configuration not done!</h1>\n".
     "<p>Better go and prod that, so you get to use the fine admin interface.</p>\n";
-  cmPrintPageFooter();
+  stLoginFooter();
   exit;
 }
 else
 if (!stAdmSessionAuth(FALSE))
 {
   // Perform authentication if we are not in session already
-  stAdminContent();
+  stLoginContent();
   echo
     "<h1>Party admin login</h1>\n".
     "<p>Please use illegal telepathy over HTTP to provide a ".
@@ -96,7 +105,7 @@
     " </form>\n".
     "\n".
     "<p>[<a href=\"".stGetSetting("defaultPage")."\">Return to the main page</a>].</p>\n";
-  cmPrintPageFooter();
+  stLoginFooter();
   exit;
 }
 else