Mercurial > hg > fapweb
annotate admlogin.php @ 156:fa7f3defffd0
Comments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 25 Oct 2013 16:12:05 +0300 |
parents | aeebfedb5709 |
children | 40a4a2d3d039 |
rev | line source |
---|---|
0 | 1 <? |
136 | 2 // |
3 // FAPWeb Simple Demoparty System | |
4 // Administration interface session login handler | |
5 // (C) Copyright 2012-2013 Tecnic Software productions (TNSP) | |
6 // | |
32 | 7 $sessionType = "admin"; |
0 | 8 require "mconfig.inc.php"; |
9 require "msite.inc.php"; | |
33 | 10 require "msession.inc.php"; |
0 | 11 |
156 | 12 // |
13 // Initialize | |
14 // | |
15 stSetupCacheControl(); | |
5
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
16 stSetupCacheControl(); |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
17 |
156 | 18 |
19 // | |
20 // Authenticate | |
21 // | |
32 | 22 $password = stGetSetting("admPassword"); |
23 if (stGetRequestItem("admpass", FALSE) == $password) | |
24 { | |
51 | 25 if (!stSessionStart(SESS_ADMIN, $password, "admTimeout")) |
32 | 26 error_log("Admin session AUTH LOGIN failed (session setup)"); |
27 } | |
15
ea0f98a0bed8
Fix some issues and bugs caused by recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
28 else |
ea0f98a0bed8
Fix some issues and bugs caused by recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
29 { |
32 | 30 error_log("Admin session AUTH LOGIN failed (password)"); |
15
ea0f98a0bed8
Fix some issues and bugs caused by recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
31 } |
0 | 32 |
33 | 33 header("Location: admin"); |
0 | 34 ?> |