# HG changeset patch # User Matti Hamalainen # Date 1380627249 -10800 # Node ID 1844df51a55cbefeef9f313e85e63ffbfd8b4f7e # Parent 2a2ec7112df183c6897b0de3664b5e979529d0ad Improve authentication. diff -r 2a2ec7112df1 -r 1844df51a55c index.php --- a/index.php Fri Jul 19 13:30:04 2013 +0300 +++ b/index.php Tue Oct 01 14:34:09 2013 +0300 @@ -6,12 +6,14 @@ // Switch to https first, if needed -if (!stCheckHTTPS()) +if (!stCheckHTTPS() && isset($_SERVER["REQUEST_URI"]) && + array_key_exists($_SERVER["REQUEST_URI"], $securePages)) { header("Location: https://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); exit; } + // Check for cache-controlled pages if (isset($_SERVER["REQUEST_URI"]) && array_key_exists($_SERVER["REQUEST_URI"], $securePages)) @@ -24,6 +26,7 @@ // Initiate SQL database connection if (!stConnectSQLDB()) { + // Error occured, bail out early cmPrintPageFooter(); exit; } @@ -44,6 +47,9 @@ if (stGetSetting("showAttendees")) echo " Attendees\n"; +if (stGetSetting("allowSubmit")) +echo " Submit\n"; + if (stGetSetting("allowVoting")) echo " Vote\n";