diff -urN lmsgit-lms-a2d7c26/lib/locale/pl/strings.php lmsgit-lms-a2d7c26.new/lib/locale/pl/strings.php
--- lmsgit-lms-a2d7c26/lib/locale/pl/strings.php	2012-04-20 01:49:30.000000000 +0200
+++ lmsgit-lms-a2d7c26.new/lib/locale/pl/strings.php	2012-04-20 11:34:22.775104344 +0200
@@ -1094,6 +1094,8 @@
 $_LANG['Registration ID:'] = 'Nr rejestracyjny:';
 $_LANG['Registration info:'] = 'Informacje o rejestracji:';
 $_LANG['Reload'] = 'Przeładowanie';
+$_LANG['Reload configuration in:'] = "Przeładowanie konfiguracji za:";
+$_LANG['Reload timer. If set to 1 it will display remaining time to configuration reload. If using more than one host, remember to sync time between them.'] = 'Odliczanie przeładowania. Jeżeli ustawione na 1, wyświetli czas pozostały do przeładowania konfiguracji. Jeżeli używasz więcej niż jednego hosta, należy pamiętać aby czas między nim i był synchronizowany.';
 $_LANG['Reload type. Allowed values: exec - call some command (most often with sudo, some script or something else, configurable below); sql - writes down to SQL (multiple queries separated with semicolon may be setup).'] = 'Typ przeładowania. Dostępne opcje: exec - wykonanie komendy (najczęściej jakiego skryptu lub innego programu przy użyciu sudo - konfigurowalne dalej); sql - zapisuje zlecenie w bazie danych SQL (konkretne zapytanie sql również może być zdefiniowane).';
 $_LANG['Remove'] = 'Usuń';
 $_LANG['Remove customer from group'] = 'Usuń klienta z grupy';
diff -urN lmsgit-lms-a2d7c26/lib/upgradedb/mysql.2012042000.php lmsgit-lms-a2d7c26.new/lib/upgradedb/mysql.2012042000.php
--- lmsgit-lms-a2d7c26/lib/upgradedb/mysql.2012042000.php	1970-01-01 01:00:00.000000000 +0100
+++ lmsgit-lms-a2d7c26.new/lib/upgradedb/mysql.2012042000.php	2012-04-20 11:37:16.182968533 +0200
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * LMS version 1.11-git
+ *
+ *  (C) Copyright 2001-2012 LMS Developers
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License Version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ *  USA.
+ *
+ */
+
+$DB->BeginTrans();
+
+$DB->Execute("INSERT INTO uiconfig (section, var, value, description, disabled) VALUES ('phpui', 'reload_timer', '0', '', '0')");
+
+$DB->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012042000', 'dbversion'));
+
+$DB->CommitTrans();
+
+?>
diff -urN lmsgit-lms-a2d7c26/lib/upgradedb/postgres.2012042000.php lmsgit-lms-a2d7c26.new/lib/upgradedb/postgres.2012042000.php
--- lmsgit-lms-a2d7c26/lib/upgradedb/postgres.2012042000.php	1970-01-01 01:00:00.000000000 +0100
+++ lmsgit-lms-a2d7c26.new/lib/upgradedb/postgres.2012042000.php	2012-04-20 11:37:16.186302018 +0200
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * LMS version 1.11-git
+ *
+ *  (C) Copyright 2001-2012 LMS Developers
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License Version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ *  USA.
+ *
+ */
+
+$DB->BeginTrans();
+
+$DB->Execute("INSERT INTO uiconfig (section, var, value, description, disabled) VALUES ('phpui', 'reload_timer', '0', '', '0')");
+
+$DB->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2012042000', 'dbversion'));
+
+$DB->CommitTrans();
+
+?>
diff -urN lmsgit-lms-a2d7c26/lib/upgradedb.php lmsgit-lms-a2d7c26.new/lib/upgradedb.php
--- lmsgit-lms-a2d7c26/lib/upgradedb.php	2012-04-20 01:49:30.000000000 +0200
+++ lmsgit-lms-a2d7c26.new/lib/upgradedb.php	2012-04-20 11:36:53.511940384 +0200
@@ -24,7 +24,7 @@
  *  $Id$
  */
 
-define('DBVERSION', '2012041102'); // here should be always the newest version of database!
+define('DBVERSION', '2012042000'); // here should be always the newest version of database!
 				 // it placed here to avoid read disk every time when we call this file.
 
 /*
diff -urN lmsgit-lms-a2d7c26/lib/upgradedb.php~ lmsgit-lms-a2d7c26.new/lib/upgradedb.php~
--- lmsgit-lms-a2d7c26/lib/upgradedb.php~	1970-01-01 01:00:00.000000000 +0100
+++ lmsgit-lms-a2d7c26.new/lib/upgradedb.php~	2012-04-20 01:49:30.000000000 +0200
@@ -0,0 +1,80 @@
+<?php
+
+/*
+ * LMS version 1.11-git
+ *
+ *  (C) Copyright 2001-2012 LMS Developers
+ *
+ *  Please, see the doc/AUTHORS for more information about authors!
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License Version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ *  USA.
+ *
+ *  $Id$
+ */
+
+define('DBVERSION', '2012041102'); // here should be always the newest version of database!
+				 // it placed here to avoid read disk every time when we call this file.
+
+/*
+ * This file contains procedures for upgradeing automagicly database.
+ */
+
+function getdir($pwd = './', $pattern = '^.*$')
+{
+	if ($handle = @opendir($pwd))
+	{
+		while (($file = readdir($handle)) !== FALSE)
+			if(preg_match('/'.$pattern.'/',$file))
+				$files[] = $file;
+		closedir($handle);
+	}
+	return $files;
+}
+
+if($dbversion = $DB->GetOne('SELECT keyvalue FROM dbinfo WHERE keytype = ?',array('dbversion'))) {
+	if(DBVERSION > $dbversion)
+	{
+		set_time_limit(0);
+		$lastupgrade = $dbversion;
+		$_dbtype = $CONFIG['database']['type'] == 'mysqli' ? 'mysql' : $CONFIG['database']['type'];
+
+		$upgradelist = getdir(LIB_DIR.'/upgradedb/', '^'.$_dbtype.'.[0-9]{10}.php$');
+		if(sizeof($upgradelist))
+			foreach($upgradelist as $upgrade)
+			{
+				$upgradeversion = preg_replace('/^'.$_dbtype.'\.([0-9]{10})\.php$/','\1',$upgrade);
+
+				if($upgradeversion > $dbversion && $upgradeversion <= DBVERSION)
+					$pendingupgrades[] = $upgradeversion;
+			}
+
+		if(sizeof($pendingupgrades))
+		{
+			sort($pendingupgrades);
+			foreach($pendingupgrades as $upgrade)
+			{
+				include(LIB_DIR.'/upgradedb/'.$_dbtype.'.'.$upgrade.'.php');
+				if(!sizeof($DB->errors))
+					$lastupgrade = $upgrade;
+				else
+					break;
+			}
+		}
+	}
+}
+
+$layout['dbschversion'] = isset($lastupgrade) ? $lastupgrade : DBVERSION;
+
+?>
diff -urN lmsgit-lms-a2d7c26/modules/configlist.php lmsgit-lms-a2d7c26.new/modules/configlist.php
--- lmsgit-lms-a2d7c26/modules/configlist.php	2012-04-20 01:49:30.000000000 +0200
+++ lmsgit-lms-a2d7c26.new/modules/configlist.php	2012-04-20 11:34:59.920122233 +0200
@@ -130,6 +130,10 @@
 				case 'force_ssl':
 					$config[$idx]['description'] = trans('SSL Enforcing. Setting this option to 1 will effect with that LMS will enforce SSL connection with redirect to \'https://\'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI] at every request without SSL. Default: 0 (off).');
 				break;
+
+				case 'reload_timer':
+					$config[$idx]['description'] = trans('Reload timer. If set to 1 it will display remaining time to configuration reload. If using more than one host, remember to sync time between them.');
+				break;
 				
 				case 'reload_type':
 					$config[$idx]['description'] = trans('Reload type. Allowed values: exec - call some command (most often with sudo, some script or something else, configurable below); sql - writes down to SQL (multiple queries separated with semicolon may be setup).');
diff -urN lmsgit-lms-a2d7c26/modules/reload.php lmsgit-lms-a2d7c26.new/modules/reload.php
--- lmsgit-lms-a2d7c26/modules/reload.php	2012-04-20 01:49:30.000000000 +0200
+++ lmsgit-lms-a2d7c26.new/modules/reload.php	2012-04-20 11:35:21.014412212 +0200
@@ -29,6 +29,12 @@
 $_RELOAD_TYPE = $CONFIG['phpui']['reload_type'];
 $_EXECCMD = $CONFIG['phpui']['reload_execcmd'];
 
+$serverTime = date("r");
+
+if (!empty($CONFIG['phpui']['reload_timer']) && ($CONFIG['phpui']['reload_timer'] == 1))
+	$SMARTY->assign('serverTime', $serverTime);
+else
+	$SMARTY->assign('serverTime', 'false');
 switch($_RELOAD_TYPE)
 {
 	case 'exec':
diff -urN lmsgit-lms-a2d7c26/templates/reload.html lmsgit-lms-a2d7c26.new/templates/reload.html
--- lmsgit-lms-a2d7c26/templates/reload.html	2012-04-20 01:49:30.000000000 +0200
+++ lmsgit-lms-a2d7c26.new/templates/reload.html	2012-04-20 11:35:40.575299314 +0200
@@ -5,7 +5,8 @@
 <TABLE WIDTH="100%" CELLPADDING="3">
 	<TR CLASS="DARK">
 		<TD class="fall">
-			<B>{trans("Select hosts for configuration reload:")}</B>
+		<div style="float:left">
+			<B>{trans("Select hosts for configuration reload:")} </div> <div id="reloadtxt" style="display:none; float:right">{trans("Reload configuration in:")} <span id="reloadtimer"></span> </div> </B>
 		</TD>
 	</TR>
 	<TR>
@@ -54,3 +55,39 @@
 </TABLE>
 </FORM>
 </P>
+{literal}
+<SCRIPT type="text/javascript">
+        <!--
+
+{/literal}
+	if ('{$serverTime}' != 'false')
+		var serverTime = new Date("{$serverTime}");
+	var timerOn = false;
+{section name=hosts loop=$hosts}
+	{if $hosts[hosts].reload==1}timerOn=true;{/if}
+{/section}
+{literal}
+	var timer;
+	var userDate = new Date();
+
+	function ShowSeconds()
+	{
+		var serverTimeMinute = new Date(serverTime.getFullYear(),serverTime.getMonth(),serverTime.getDate(),serverTime.getHours(),serverTime.getMinutes(),Math.floor((serverTime.getSeconds()+59)/60)*60);
+		var serverTimeDiff = serverTimeMinute-serverTime;
+		serverTimeDiff=Math.round((serverTimeDiff+(userDate-(new Date())))/1000);
+		if (serverTimeDiff>=0)
+		{
+			document.getElementById("reloadtxt").style.display='inline';
+			document.getElementById("reloadtimer").innerHTML=" "+serverTimeDiff+" s";
+			timer=setTimeout("ShowSeconds()",1000);
+		}
+		else
+			window.location.reload();
+	}
+
+	if (timerOn && typeof(serverTime) != 'undefined')
+		ShowSeconds();
+
+	//-->
+</SCRIPT>
+{/literal}
