Small bugfixes
parent
87d3b4405e
commit
d9d6161fa9
BIN
Boards.iar
BIN
Boards.iar
Binary file not shown.
12
Config.php
12
Config.php
|
@ -9,12 +9,12 @@
|
|||
|
||||
$GLOBALS["CONFIG"] = array(
|
||||
//Config for mysql server
|
||||
"mysql" => array(
|
||||
"server" => "127.0.0.1",
|
||||
"user" => "VisitorBoard",
|
||||
"pass" => "Password",
|
||||
"db" => "visitorboard"
|
||||
)
|
||||
"mysql" => array(
|
||||
"server" => "127.0.0.1",
|
||||
"user" => "VisitorBoard",
|
||||
"pass" => "Password",
|
||||
"db" => "visitorboard"
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
17
index.php
17
index.php
|
@ -21,11 +21,6 @@
|
|||
//Database
|
||||
$MySql = new MySql($GLOBALS["CONFIG"]["mysql"]["user"], $GLOBALS["CONFIG"]["mysql"]["pass"], $GLOBALS["CONFIG"]["mysql"]["db"], $GLOBALS["CONFIG"]["mysql"]["server"]);
|
||||
|
||||
//Handle languagefile
|
||||
LoadLanguages();
|
||||
$SelLang = strtolower($_GET["l"]);
|
||||
if (!isset($GLOBALS["LanguageData"][$SelLang])) {$SelLang = "en";}
|
||||
|
||||
//Look up timezone, country and the (hopefulle) correct language for the region that requests this image
|
||||
$ListOfTimezones = DateTimeZone::listIdentifiers(DateTimeZone::ALL);
|
||||
$MySql->query("DELETE FROM ip_timezones WHERE unix < {0} OR (unix < {1} AND country = '')", array(time() - 86400 * 60, time() - 86400));
|
||||
|
@ -52,6 +47,18 @@
|
|||
if (in_array(strtolower($TimeZone), $ListOfTimezones))
|
||||
{date_default_timezone_set($TimeZone);}
|
||||
|
||||
//Handle languagefile
|
||||
LoadLanguages();
|
||||
$SelLang = strtolower($_GET["l"]);
|
||||
if (empty($SelLang))
|
||||
{
|
||||
//If no prefered language is sent to the script, use the clients ip address to detect display language
|
||||
$Exists = $MySql->query("SELECT * FROM countries_lang WHERE country = {0} LIMIT 1", array(strtolower($Country)))->fetch();
|
||||
if (!empty($Exists["lang"]))
|
||||
{$SelLang = strtolower($Exists["lang"]);}
|
||||
}
|
||||
if (!isset($GLOBALS["LanguageData"][$SelLang])) {$SelLang = "en";}
|
||||
|
||||
//So, now lets start with requesting all required information from the visitors grids
|
||||
$UserMem = array();
|
||||
$AllUsers = explode(";", $_GET["u"]);
|
||||
|
|
Loading…
Reference in New Issue