Mercurial > hg > fapweb
annotate admlogin.php @ 51:7bdf89601ba0
Work on session stuff.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 05 Oct 2013 06:55:58 +0300 |
parents | 5bf22431176c |
children | aeebfedb5709 |
rev | line source |
---|---|
0 | 1 <? |
32 | 2 $sessionType = "admin"; |
0 | 3 require "mconfig.inc.php"; |
4 require "msite.inc.php"; | |
33 | 5 require "msession.inc.php"; |
0 | 6 |
5
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
7 stSetupCacheControl(); |
76c3b89d7b11
Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
8 |
32 | 9 $password = stGetSetting("admPassword"); |
10 if (stGetRequestItem("admpass", FALSE) == $password) | |
11 { | |
51 | 12 if (!stSessionStart(SESS_ADMIN, $password, "admTimeout")) |
32 | 13 error_log("Admin session AUTH LOGIN failed (session setup)"); |
14 } | |
15
ea0f98a0bed8
Fix some issues and bugs caused by recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
15 else |
ea0f98a0bed8
Fix some issues and bugs caused by recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
16 { |
32 | 17 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
|
18 } |
0 | 19 |
33 | 20 header("Location: admin"); |
0 | 21 ?> |