Mercurial > hg > fapweb
view admlogin.php @ 1006:cb23b23a2d8b
Improve commandline parsing, fix some potential bug situations.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 05 Apr 2015 15:35:55 +0300 |
parents | ffacd904fd1f |
children | 76e11ae923a7 |
line wrap: on
line source
<? // // FAPWeb - Simple Web-based Demoparty Management System // Administration interface session login handler // (C) Copyright 2012-2015 Tecnic Software productions (TNSP) // $sessionType = "admin"; require_once "mconfig.inc.php"; require_once "msite.inc.php"; require_once "msession.inc.php"; // // Initialize // stSetupCacheControl(); // // Authenticate // $sfrom = $_SERVER["REMOTE_ADDR"]; $password = stGetSetting("admPassword"); if (stGetRequestItem("admpass", FALSE) == $password) { if (!stSessionStart(SESS_ADMIN, $password, "admTimeout")) stLogError("Admin session AUTH LOGIN failed (session setup) @ ".$sfrom); else stLogError("Admin session LOGIN SUCCESS @ ".$sfrom); } else { stLogError("Admin session AUTH LOGIN failed (password) @ ".$sfrom); } header("Location: admin.php"); ?>