Mercurial > hg > fapweb
changeset 39:1844df51a55c
Improve authentication.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 01 Oct 2013 14:34:09 +0300 |
parents | 2a2ec7112df1 |
children | 8c3d425c0560 |
files | index.php |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 " <a href=\"attendees\">Attendees</a>\n"; +if (stGetSetting("allowSubmit")) +echo " <a href=\"entry\">Submit</a>\n"; + if (stGetSetting("allowVoting")) echo " <a href=\"vote\">Vote</a>\n";