comparison usrlogin.php @ 156:fa7f3defffd0

Comments.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 25 Oct 2013 16:12:05 +0300
parents 5b92f130ba87
children 8df523e6326a
comparison
equal deleted inserted replaced
155:5b92f130ba87 156:fa7f3defffd0
7 $sessionType = "user"; 7 $sessionType = "user";
8 require "mconfig.inc.php"; 8 require "mconfig.inc.php";
9 require "msite.inc.php"; 9 require "msite.inc.php";
10 require "msession.inc.php"; 10 require "msession.inc.php";
11 11
12 //
13 // Initialize
14 //
12 stSetupCacheControl(); 15 stSetupCacheControl();
13 16
14 // Initiate SQL database connection
15 if (!stConnectSQLDB()) 17 if (!stConnectSQLDB())
16 die("Could not connect to SQL database."); 18 die("Could not connect to SQL database.");
17 19
18 // Fetch non-"hardcoded" settings from SQL database
19 stReloadSettings(); 20 stReloadSettings();
20 21
21 22
23 //
24 // Authenticate
25 //
22 $gotoPage = stGetRequestItem("goto", FALSE); 26 $gotoPage = stGetRequestItem("goto", FALSE);
23 $password = stGetRequestItem("key", FALSE); 27 $password = stGetRequestItem("key", FALSE);
24 28
25 $sql = stPrepareSQL("SELECT id FROM votekeys WHERE key=%s", $password); 29 $sql = stPrepareSQL("SELECT id FROM votekeys WHERE key=%s", $password);
26 if (($votekey_id = stFetchSQLColumn($sql)) !== false) 30 if (($votekey_id = stFetchSQLColumn($sql)) !== false)