diff --git a/code/web/private_php/ams/autoload/dblayer.php b/code/web/private_php/ams/autoload/dblayer.php index d14e48e84..f7871ebcb 100644 --- a/code/web/private_php/ams/autoload/dblayer.php +++ b/code/web/private_php/ams/autoload/dblayer.php @@ -214,7 +214,7 @@ class DBLayer { } $field_option_values = ltrim($field_option_values, ','); try { - $sth = $this->PDO->prepare("UPDATE $tb_name SET $field_option_values WHERE $where "); + $sth = $this->PDO->prepare("UPDATE `$tb_name` SET $field_option_values WHERE $where "); foreach ($data as $key => $value) { $sth->bindValue(":$key", $value); diff --git a/code/web/private_php/ams/autoload/helpers.php b/code/web/private_php/ams/autoload/helpers.php index 0ebc6d8fc..bcfde1c02 100644 --- a/code/web/private_php/ams/autoload/helpers.php +++ b/code/web/private_php/ams/autoload/helpers.php @@ -23,7 +23,7 @@ class Helpers { global $AMS_TRANS; global $INGAME_LAYOUT; global $AMS_CACHEDIR; - global $AMS_PLUGINS; + global $AMS_PLUGINS; // define('SMARTY_SPL_AUTOLOAD',1); require_once $AMS_LIB . '/smarty/libs/Smarty.class.php'; @@ -34,7 +34,7 @@ class Helpers { $smarty -> setCacheDir( $AMS_CACHEDIR ); $smarty -> setConfigDir( $SITEBASE . '/configs/' ); // turn smarty debugging on/off - $smarty -> debugging = false; + $smarty -> debugging = true; // caching must be disabled for multi-language support $smarty -> caching = false; $smarty -> cache_lifetime = 300; @@ -89,6 +89,14 @@ class Helpers { $id = session_id(); $smarty -> assign( "sessionid", $id ); + + $dbl = new DBLayer("lib"); + $statement = $dbl->executeWithoutParams("SELECT * FROM settings"); + $rows = $statement->fetchAll(); + + foreach ($rows as &$value) { + $smarty -> assign( $value['Setting'], $value['Value'] ); + } // smarty inheritance for loading the matching wrapper layout (with the matching menu bar) if ( isset( $vars['permission'] ) && $vars['permission'] == 3 ) { diff --git a/code/web/private_php/ams/ingame_templates/register.tpl b/code/web/private_php/ams/ingame_templates/register.tpl index 9fa8fef32..7f34e8639 100644 --- a/code/web/private_php/ams/ingame_templates/register.tpl +++ b/code/web/private_php/ams/ingame_templates/register.tpl @@ -7,6 +7,8 @@ {$welcome_message} + {if $userRegistration == '0'|| $userRegistration == '1'} +
+ + {/if}