mirror of
				https://github.com/Mibew/java.git
				synced 2025-11-04 04:15:11 +03:00 
			
		
		
		
	"you are offline" notification box
This commit is contained in:
		
							parent
							
								
									2dd0839f0d
								
							
						
					
					
						commit
						00e9c651d5
					
				@ -400,10 +400,27 @@ input.formauth {
 | 
			
		||||
	font-size: 0.85em;
 | 
			
		||||
	font-weight:bold;
 | 
			
		||||
	max-width: 700px;
 | 
			
		||||
	margin: 0px 2px 10px;
 | 
			
		||||
	margin: -10px 2px 10px;
 | 
			
		||||
	color: #515151;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#offwarn {
 | 
			
		||||
	border: 1px solid #4CD496;
 | 
			
		||||
	background-color: #E7F9F1;
 | 
			
		||||
	color: #515151;
 | 
			
		||||
	padding: 8px 11px;
 | 
			
		||||
	font-size: 0.85em;
 | 
			
		||||
	font-weight:bold;
 | 
			
		||||
	line-height: 140%;
 | 
			
		||||
	margin: 0px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#offwarn img {
 | 
			
		||||
	margin-top: .4em;
 | 
			
		||||
	float: left;
 | 
			
		||||
	padding-right: 10px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.asterisk {
 | 
			
		||||
	padding: 10px 20px;
 | 
			
		||||
}
 | 
			
		||||
@ -821,7 +838,7 @@ table.awaiting td.visitor {
 | 
			
		||||
 | 
			
		||||
/* rtl rules */
 | 
			
		||||
 | 
			
		||||
.lrtl .dashitem img, .lrtl #dashlocalesPopup h2 img {
 | 
			
		||||
.lrtl .dashitem img, .lrtl #dashlocalesPopup h2 img, .lrtl #offwarn img {
 | 
			
		||||
	float: right;
 | 
			
		||||
	padding-right:0px;
 | 
			
		||||
	padding-left:10px;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								src/messenger/webim/images/dash/warn.gif
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/messenger/webim/images/dash/warn.gif
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.1 KiB  | 
@ -158,6 +158,15 @@ function has_online_operators($groupid="") {
 | 
			
		||||
	return $row['time'] < $settings['online_timeout'] && $row['total'] > 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function is_operator_online($operatorid, $link) {
 | 
			
		||||
	global $settings;
 | 
			
		||||
	loadsettings_($link);
 | 
			
		||||
	$query = "select count(*) as total, min(unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time ".
 | 
			
		||||
			 "from chatoperator where operatorid = $operatorid";
 | 
			
		||||
	$row = select_one_row($query,$link);
 | 
			
		||||
	return $row['time'] < $settings['online_timeout'] && $row['total'] == 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function get_operator_name($operator) {
 | 
			
		||||
	global $home_locale, $current_locale;
 | 
			
		||||
	if( $home_locale == $current_locale )
 | 
			
		||||
 | 
			
		||||
@ -213,6 +213,7 @@ mailthread.title=Send chat history<br/>by mail
 | 
			
		||||
menu.agents=Operators list
 | 
			
		||||
menu.blocked=Blocked visitors
 | 
			
		||||
menu.canned=Canned Messages
 | 
			
		||||
menu.goonline=You are Offline.<br/><a href="{0}">Connect..</a>
 | 
			
		||||
menu.groups.content=Department or skill based operator groups.
 | 
			
		||||
menu.groups=Groups
 | 
			
		||||
menu.locale.content=Change locale.
 | 
			
		||||
 | 
			
		||||
@ -182,6 +182,7 @@ install.kill_tables.notice=
 | 
			
		||||
install.kill_tables=Удалить существующие таблицы
 | 
			
		||||
install.license=Лицензионное соглашение о программном обеспечении
 | 
			
		||||
install.message=Следуйте указаниям мастера для правильной настройки базы данных.
 | 
			
		||||
install.newfeatures=Поздравляем! Вы успешно установили Mibew Веб Мессенджер {1}. Посетите <a href="{0}">страницу Расширений</a>, чтобы подключить больше функций.
 | 
			
		||||
install.next=Следующий шаг:
 | 
			
		||||
install.title=Установка
 | 
			
		||||
install.updatedb=Пожалуйста, запустите <a href="{0}">Мастер обновления базы данных</a>.
 | 
			
		||||
@ -212,6 +213,7 @@ mailthread.title=
 | 
			
		||||
menu.agents=Список операторов
 | 
			
		||||
menu.blocked=Нежелательные посетители
 | 
			
		||||
menu.canned=Шаблоны ответов
 | 
			
		||||
menu.goonline=Вы Оффлайн.<br/><a href="{0}">Подключиться..</a>
 | 
			
		||||
menu.groups.content=Объединения операторов на основе отделов или областей знаний.
 | 
			
		||||
menu.groups=Группы
 | 
			
		||||
menu.locale.content=Выбрать язык системы.
 | 
			
		||||
 | 
			
		||||
@ -23,7 +23,11 @@ require_once('../libs/common.php');
 | 
			
		||||
require_once('../libs/operator.php');
 | 
			
		||||
 | 
			
		||||
$operator = check_login();
 | 
			
		||||
loadsettings();
 | 
			
		||||
 | 
			
		||||
$link = connect();
 | 
			
		||||
loadsettings_($link);
 | 
			
		||||
$isonline = is_operator_online($operator['operatorid'], $link);
 | 
			
		||||
mysql_close($link);
 | 
			
		||||
 | 
			
		||||
$page = array(
 | 
			
		||||
	'version' => $version,
 | 
			
		||||
@ -32,6 +36,7 @@ $page = array(
 | 
			
		||||
	'updateWizard' => "$webimroot/install/",
 | 
			
		||||
	'newFeatures' => $settings['featuresversion'] != $featuresversion,
 | 
			
		||||
	'featuresPage' => "$webimroot/operator/features.php",
 | 
			
		||||
	'isOnline' => $isonline
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
prepare_menu($operator);
 | 
			
		||||
 | 
			
		||||
@ -28,6 +28,12 @@ function menuli($name) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function tpl_menu() { global $page, $webimroot, $errors;
 | 
			
		||||
	if(isset($page['isOnline']) && !$page['isOnline']) { ?>
 | 
			
		||||
			<li id="offwarn">
 | 
			
		||||
				<img src="<?php echo $webimroot ?>/images/dash/warn.gif" alt="" width="24" height="24"/>
 | 
			
		||||
				<p><?php echo getlocal2("menu.goonline",array($webimroot."/operator/users.php?nomenu")) ?></p>
 | 
			
		||||
			</li>		
 | 
			
		||||
<?php }
 | 
			
		||||
	if(isset($page['operator'])) { ?>
 | 
			
		||||
			<li>
 | 
			
		||||
				<h2><?php echo getlocal('right.main') ?></h2>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user