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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1071
76e11ae923a7 Use long tags.
Matti Hamalainen <ccr@tnsp.org>
parents: 1001
diff changeset
1 <?php
136
aeebfedb5709 Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents: 51
diff changeset
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
aeebfedb5709 Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents: 51
diff changeset
4 // Administration interface session login handler
1001
ffacd904fd1f Update copyrights.
Matti Hamalainen <ccr@tnsp.org>
parents: 874
diff changeset
5 // (C) Copyright 2012-2015 Tecnic Software productions (TNSP)
136
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";
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
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 //
717
6178399820b9 Add some "security" logging.
Matti Hamalainen <ccr@tnsp.org>
parents: 571
diff changeset
21 $sfrom = $_SERVER["REMOTE_ADDR"];
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
22 $password = stGetSetting("admPassword");
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
23 if (stGetRequestItem("admpass", FALSE) == $password)
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
24 {
51
7bdf89601ba0 Work on session stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 33
diff changeset
25 if (!stSessionStart(SESS_ADMIN, $password, "admTimeout"))
874
ffb5643eff4f Rename functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 861
diff changeset
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
ffb5643eff4f Rename functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 861
diff changeset
28 stLogError("Admin session LOGIN SUCCESS @ ".$sfrom);
32
36392d1d6b5f Moar work.
Matti Hamalainen <ccr@tnsp.org>
parents: 28
diff changeset
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
ffb5643eff4f Rename functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 861
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 ?>