Mercurial > hg > fapweb
annotate admlogin.php @ 1071:76e11ae923a7
Use long tags.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 24 Jan 2017 17:44:50 +0200 |
parents | ffacd904fd1f |
children | 7da8bde9b7be |
rev | line source |
---|---|
1071 | 1 <?php |
136 | 2 // |
571
ce11ea112a65
Change the header blurb a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
565
diff
changeset
|
3 // FAPWeb - Simple Web-based Demoparty Management System |
136 | 4 // Administration interface session login handler |
1001 | 5 // (C) Copyright 2012-2015 Tecnic Software productions (TNSP) |
136 | 6 // |
32 | 7 $sessionType = "admin"; |
175
8df523e6326a
User require_once instead of require.
Matti Hamalainen <ccr@tnsp.org>
parents:
171
diff
changeset
|
8 require_once "mconfig.inc.php"; |
8df523e6326a
User require_once instead of require.
Matti Hamalainen <ccr@tnsp.org>
parents:
171
diff
changeset
|
9 require_once "msite.inc.php"; |
8df523e6326a
User require_once instead of require.
Matti Hamalainen <ccr@tnsp.org>
parents:
171
diff
changeset
|
10 require_once "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 |
156 | 17 |
18 // | |
19 // Authenticate | |
20 // | |
717
6178399820b9
Add some "security" logging.
Matti Hamalainen <ccr@tnsp.org>
parents:
571
diff
changeset
|
21 $sfrom = $_SERVER["REMOTE_ADDR"]; |
32 | 22 $password = stGetSetting("admPassword"); |
23 if (stGetRequestItem("admpass", FALSE) == $password) | |
24 { | |
51 | 25 if (!stSessionStart(SESS_ADMIN, $password, "admTimeout")) |
874 | 26 stLogError("Admin session AUTH LOGIN failed (session setup) @ ".$sfrom); |
717
6178399820b9
Add some "security" logging.
Matti Hamalainen <ccr@tnsp.org>
parents:
571
diff
changeset
|
27 else |
874 | 28 stLogError("Admin session LOGIN SUCCESS @ ".$sfrom); |
32 | 29 } |
15
ea0f98a0bed8
Fix some issues and bugs caused by recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
30 else |
ea0f98a0bed8
Fix some issues and bugs caused by recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
31 { |
874 | 32 stLogError("Admin session AUTH LOGIN failed (password) @ ".$sfrom); |
15
ea0f98a0bed8
Fix some issues and bugs caused by recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
33 } |
0 | 34 |
171
705dabdc37d4
Move administration interface page to separate layout, to make things less cramped.
Matti Hamalainen <ccr@tnsp.org>
parents:
168
diff
changeset
|
35 header("Location: admin.php"); |
0 | 36 ?> |