annotate admlogin.php @ 120:2c594958050e

Make test vote keys "testN" where N >= 1
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 22 Oct 2013 14:22:26 +0300
parents 7bdf89601ba0
children aeebfedb5709
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 <?
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
2 $sessionType = "admin";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 require "mconfig.inc.php";
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 require "msite.inc.php";
33
5bf22431176c Modularize.
Matti Hamalainen <ccr@tnsp.org>
parents: 32
diff changeset
5 require "msession.inc.php";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
9 $password = stGetSetting("admPassword");
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
10 if (stGetRequestItem("admpass", FALSE) == $password)
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
11 {
51
7bdf89601ba0 Work on session stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
12 if (!stSessionStart(SESS_ADMIN, $password, "admTimeout"))
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
13 error_log("Admin session AUTH LOGIN failed (session setup)");
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
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
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19
33
5bf22431176c Modularize.
Matti Hamalainen <ccr@tnsp.org>
parents: 32
diff changeset
20 header("Location: admin");
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 ?>