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(
|
$GLOBALS["CONFIG"] = array(
|
||||||
//Config for mysql server
|
//Config for mysql server
|
||||||
"mysql" => array(
|
"mysql" => array(
|
||||||
"server" => "127.0.0.1",
|
"server" => "127.0.0.1",
|
||||||
"user" => "VisitorBoard",
|
"user" => "VisitorBoard",
|
||||||
"pass" => "Password",
|
"pass" => "Password",
|
||||||
"db" => "visitorboard"
|
"db" => "visitorboard"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
17
index.php
17
index.php
|
@ -21,11 +21,6 @@
|
||||||
//Database
|
//Database
|
||||||
$MySql = new MySql($GLOBALS["CONFIG"]["mysql"]["user"], $GLOBALS["CONFIG"]["mysql"]["pass"], $GLOBALS["CONFIG"]["mysql"]["db"], $GLOBALS["CONFIG"]["mysql"]["server"]);
|
$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
|
//Look up timezone, country and the (hopefulle) correct language for the region that requests this image
|
||||||
$ListOfTimezones = DateTimeZone::listIdentifiers(DateTimeZone::ALL);
|
$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));
|
$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))
|
if (in_array(strtolower($TimeZone), $ListOfTimezones))
|
||||||
{date_default_timezone_set($TimeZone);}
|
{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
|
//So, now lets start with requesting all required information from the visitors grids
|
||||||
$UserMem = array();
|
$UserMem = array();
|
||||||
$AllUsers = explode(";", $_GET["u"]);
|
$AllUsers = explode(";", $_GET["u"]);
|
||||||
|
|
Loading…
Reference in New Issue