annotate admlogin.php @ 168:40a4a2d3d039

Oops, 100L.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 27 Oct 2013 06:21:11 +0200
parents fa7f3defffd0
children 705dabdc37d4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 <?
136
aeebfedb5709 Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents: 51
diff changeset
2 //
aeebfedb5709 Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents: 51
diff changeset
3 // FAPWeb Simple Demoparty System
aeebfedb5709 Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents: 51
diff changeset
4 // Administration interface session login handler
aeebfedb5709 Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents: 51
diff changeset
5 // (C) Copyright 2012-2013 Tecnic Software productions (TNSP)
aeebfedb5709 Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents: 51
diff changeset
6 //
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
7 $sessionType = "admin";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 require "mconfig.inc.php";
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 require "msite.inc.php";
33
5bf22431176c Modularize.
Matti Hamalainen <ccr@tnsp.org>
parents: 32
diff changeset
10 require "msession.inc.php";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
156
fa7f3defffd0 Comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
12 //
fa7f3defffd0 Comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
13 // Initialize
fa7f3defffd0 Comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
14 //
fa7f3defffd0 Comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
15 stSetupCacheControl();
5
76c3b89d7b11 Improve voting, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
16
156
fa7f3defffd0 Comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
17
fa7f3defffd0 Comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
18 //
fa7f3defffd0 Comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
19 // Authenticate
fa7f3defffd0 Comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
20 //
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
21 $password = stGetSetting("admPassword");
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
22 if (stGetRequestItem("admpass", FALSE) == $password)
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
23 {
51
7bdf89601ba0 Work on session stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
24 if (!stSessionStart(SESS_ADMIN, $password, "admTimeout"))
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
25 error_log("Admin session AUTH LOGIN failed (session setup)");
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
26 }
15
ea0f98a0bed8 Fix some issues and bugs caused by recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
27 else
ea0f98a0bed8 Fix some issues and bugs caused by recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
28 {
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
29 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
30 }
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
33
5bf22431176c Modularize.
Matti Hamalainen <ccr@tnsp.org>
parents: 32
diff changeset
32 header("Location: admin");
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 ?>