forked from science-ation/science-ation
Move session stuff up so it can be set before its used to determine the conference
This commit is contained in:
parent
e0efe11f03
commit
ba20d1b974
@ -195,6 +195,14 @@ if(get_magic_quotes_gpc()) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($config['SFIABDIRECTORY'] == '') {
|
||||||
|
session_name("SFIABSESSID");
|
||||||
|
session_set_cookie_params(0,'/');
|
||||||
|
} else {
|
||||||
|
session_name("SFIABSESSID".ereg_replace("[^A-Za-z]","_",$config['SFIABDIRECTORY']));
|
||||||
|
session_set_cookie_params(0,$config['SFIABDIRECTORY']);
|
||||||
|
}
|
||||||
|
session_start();
|
||||||
|
|
||||||
//move the conference stuff before the configuration loading, so we can load the right configuration for the conference :)
|
//move the conference stuff before the configuration loading, so we can load the right configuration for the conference :)
|
||||||
if(isset($_GET['switchconference'])) {
|
if(isset($_GET['switchconference'])) {
|
||||||
@ -223,8 +231,6 @@ else {
|
|||||||
$conference['type']="sciencefair";
|
$conference['type']="sciencefair";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//now pull the rest of the configuration
|
//now pull the rest of the configuration
|
||||||
$q=mysql_query("SELECT * FROM config WHERE year='".$config['FAIRYEAR']."'");
|
$q=mysql_query("SELECT * FROM config WHERE year='".$config['FAIRYEAR']."'");
|
||||||
while($r=mysql_fetch_object($q))
|
while($r=mysql_fetch_object($q))
|
||||||
@ -248,15 +254,6 @@ require_once("theme/{$config['theme_icons']}/icons.php");
|
|||||||
|
|
||||||
require_once("committee.inc.php");
|
require_once("committee.inc.php");
|
||||||
|
|
||||||
if($config['SFIABDIRECTORY'] == '') {
|
|
||||||
session_name("SFIABSESSID");
|
|
||||||
session_set_cookie_params(0,'/');
|
|
||||||
} else {
|
|
||||||
session_name("SFIABSESSID".ereg_replace("[^A-Za-z]","_",$config['SFIABDIRECTORY']));
|
|
||||||
session_set_cookie_params(0,$config['SFIABDIRECTORY']);
|
|
||||||
}
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
//detect the browser first, so we know what icons to use - we store this in the config array as well
|
//detect the browser first, so we know what icons to use - we store this in the config array as well
|
||||||
//even though its not configurable by the fair
|
//even though its not configurable by the fair
|
||||||
if(stristr($_SERVER['HTTP_USER_AGENT'],"MSIE"))
|
if(stristr($_SERVER['HTTP_USER_AGENT'],"MSIE"))
|
||||||
|
Loading…
Reference in New Issue
Block a user