diff --git a/src/messenger/webim/install/whatsnew.txt b/src/messenger/webim/install/whatsnew.txt index 08138596..27d62325 100644 --- a/src/messenger/webim/install/whatsnew.txt +++ b/src/messenger/webim/install/whatsnew.txt @@ -3,9 +3,10 @@ [!] 404 installation problem [+] new permission: "Ability to modify profile" [+] new project name: Mibew Messenger - [!] fixed localization of dates for all languages + [!] fixed localization of dates for all languages, nice formatting: Today/Yesterday [!] fixed online/offline image for groups [+] ability to delete operators, confirmation dialog when deleting group/operator/blocked address + [+] Information about last activity for operators: Online, Today at 22, 01 Jan.., or Never 1.6.0 ----- diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index 4ec0094c..87496d16 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -508,6 +508,24 @@ function set_form_date($utime,$prefix) { $page["form${prefix}month"] = date("m.y", $utime); } +function date_to_text($unixtime) { + if ($unixtime < 60*60*24*30) + return getlocal("time.never"); + + $then = getdate($unixtime); + $now = getdate(); + + if ($then['yday'] == $now['yday'] && $then['year'] == $now['year']) { + $date_format = getlocal("time.today.at"); + } else if (($then['yday']+1) == $now['yday'] && $then['year'] == $now['year']) { + $date_format = getlocal("time.yesterday.at"); + } else { + $date_format = getlocal("time.dateformat"); + } + + return strftime($date_format." ".getlocal("time.timeformat"), $unixtime); +} + function webim_mail($toaddr, $reply_to, $subject, $body) { global $webim_encoding, $webim_mailbox, $mail_encoding; diff --git a/src/messenger/webim/libs/operator.php b/src/messenger/webim/libs/operator.php index 5df463ba..ac0bbfcc 100644 --- a/src/messenger/webim/libs/operator.php +++ b/src/messenger/webim/libs/operator.php @@ -46,15 +46,6 @@ function operator_by_id($id) { return $operator; } -function get_operators() { - $link = connect(); - - $query = "select * from chatoperator order by vclogin"; - $result = select_multi_assoc($query, $link); - mysql_close($link); - return $result; -} - function update_operator($operatorid,$login,$password,$localename,$commonname) { $link = connect(); $query = sprintf( diff --git a/src/messenger/webim/locales/de/properties b/src/messenger/webim/locales/de/properties index 1158ee8a..46ee18d1 100644 --- a/src/messenger/webim/locales/de/properties +++ b/src/messenger/webim/locales/de/properties @@ -285,7 +285,6 @@ page_agent.tab.groups=Gruppen page_agent.tab.main=Haupt page_agent.tab.permissions=Berechtigungen page_agent.title=Operator Details -page_agents.agent_commonname=Internationaler Name page_agents.agent_name=Name page_agents.agents=Agenten Volle Liste: page_agents.intro=Auf dieser Seite werden die Mitarbeiter Ihrer Firma angezeigt, hier können Sie auch neue Agenten anlegen oder deren Rechte ändern. @@ -423,6 +422,7 @@ thread.back_to_search=zur Suche gehen thread.chat_log=Chat Log thread.intro=Die Seite zeigt Chats an time.locale=de_DE +time.timeformat=%H:%M topMenu.admin=Administration topMenu.logoff=Logout topMenu.main=Home diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index 8c9ba8c6..d4e7486e 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -189,8 +189,8 @@ leavemessage.title=Leave your message leftMenu.client_agents=Operators leftMenu.client_gen_button=Button code leftMenu.client_settings=Settings -localeid=English (en) localedirection=ltr +localeid=English (en) mail.user.history.body=Hello, {0}!\n\nYour chat history: \n\n{1}\n--- \nKind Regards,\nMibew Messenger mail.user.history.subject=Mibew Messenger: dialog history mailthread.close=Close... @@ -286,13 +286,14 @@ page_agent.tab.groups=Groups page_agent.tab.main=General page_agent.tab.permissions=Permissions page_agent.title=Operator details -page_agents.agent_commonname=International name page_agents.agent_name=Name page_agents.agents=Full list of operators: page_agents.confirm=Are you sure that you want to delete operator "{0}"? page_agents.intro=This page displays a list of company operators. +page_agents.isonline=Online page_agents.login=Login page_agents.new_agent=Add operator... +page_agents.status=Last active page_agents.title=Operators page_analysis.full.text.search=User name or message text search: page_analysis.search.title=Chats history @@ -390,11 +391,11 @@ settings.host.description=Destination for you company name or logo link settings.host=URL of your website settings.logo.description=Enter http address of your company logo settings.logo=Your company logo -settings.popup_notification.description=Small dialog appears to attract your attention. -settings.popup_notification=Enable "Popup dialog notification of the new visitor" settings.no.title=Please enter your company title settings.onehostconnections.description=0 allows any number of connections settings.onehostconnections=Max number of threads from one address +settings.popup_notification.description=Small dialog appears to attract your attention. +settings.popup_notification=Enable "Popup dialog notification of the new visitor" settings.saved=Changes saved settings.sendmessagekey=Send messages with: settings.survey.askgroup.description=Show/hide department selection field in the survey @@ -426,7 +427,12 @@ tag.pagination.previous=previous thread.back_to_search=Go to search thread.chat_log=Chat log thread.intro=This page displays chat details and content. +time.dateformat=%B %d, %Y time.locale=en_US +time.never=Never +time.timeformat=%I:%M %p +time.today.at=Today at +time.yesterday.at=Yesterday at topMenu.admin=Home topMenu.logoff=Exit topMenu.main=Home diff --git a/src/messenger/webim/locales/fr/properties b/src/messenger/webim/locales/fr/properties index 6fdce2aa..f5a09e9f 100644 --- a/src/messenger/webim/locales/fr/properties +++ b/src/messenger/webim/locales/fr/properties @@ -285,7 +285,6 @@ page_agent.tab.groups=Groupes page_agent.tab.main=Général page_agent.tab.permissions=Autorisations page_agent.title=Détails de l'opérateur -page_agents.agent_commonname=Nom international page_agents.agent_name=Nom page_agents.agents=Liste complète des agents: page_agents.intro=Cette page affiche la liste des agents de la société, elle permet aussi d'en ajouter de nouveaux si vous y êtes autorisé @@ -423,6 +422,7 @@ thread.back_to_search=Aller rechercher thread.chat_log=Session de dialogue thread.intro=Cette page affiche la conversation time.locale=fr_FR +time.timeformat=%H:%M topMenu.admin=Administration topMenu.logoff=Sortie topMenu.main=Accueil diff --git a/src/messenger/webim/locales/he/properties b/src/messenger/webim/locales/he/properties index 6af93241..35005bd2 100644 --- a/src/messenger/webim/locales/he/properties +++ b/src/messenger/webim/locales/he/properties @@ -285,7 +285,6 @@ page_agent.tab.groups=קבוצות page_agent.tab.main=כללי page_agent.tab.permissions=יכולות page_agent.title=פרטי הנציג -page_agents.agent_commonname=שם בינלאומי page_agents.agent_name=שם page_agents.agents=רשימה מלאה של סוכנים: page_agents.intro=בעמוד זה ניתן לצפות ברשימת הסוכנים של החברה, להוסיף חדש במידת הצורך והרשאות מתאימות לכך. @@ -423,6 +422,7 @@ thread.back_to_search=עבור לחיפוש thread.chat_log=סיכום השיחה thread.intro=בעמוד נוכחי ניתן לצפות בשיחה time.locale=he_IL +time.timeformat=%H:%M topMenu.admin=תפריט של הנציגים topMenu.logoff=יציאה topMenu.main=בית diff --git a/src/messenger/webim/locales/it/properties b/src/messenger/webim/locales/it/properties index c258bce8..dd433c2a 100644 --- a/src/messenger/webim/locales/it/properties +++ b/src/messenger/webim/locales/it/properties @@ -285,7 +285,6 @@ page_agent.tab.groups=Gruppi page_agent.tab.main=Generale page_agent.tab.permissions=Permessi page_agent.title=Dettagli operatore -page_agents.agent_commonname=Nome Internazionale page_agents.agent_name=Nome page_agents.agents=Lista completa assistenti: page_agents.intro=Questa pagina visualizza elenco degli assistenti societari e permette anche di aggiungerne nuovi, se si possiedono le autorizzazioni @@ -423,6 +422,7 @@ thread.back_to_search=Ritorna a cerca thread.chat_log=Chat log thread.intro=La pagina che visualizza la chat time.locale=it_IT +time.timeformat=%H:%M topMenu.admin=Amministrazione topMenu.logoff=Uscita topMenu.main=Home diff --git a/src/messenger/webim/locales/lv/properties b/src/messenger/webim/locales/lv/properties index d04a1dfe..ffc819e8 100644 --- a/src/messenger/webim/locales/lv/properties +++ b/src/messenger/webim/locales/lv/properties @@ -151,7 +151,6 @@ page_agent.error.duplicate_login=Izvēlēties citu lietotājvārdu, jo operators page_agent.error.wrong_login=Lietotājvārdā varētu būt latiņu simboli, cipari un svītrošanas zīme. page_agent.intro=Šajā lapā Jūs varat apskatīt aģentus detaļas un raksturpazīmes, kā arī norediģēt tos page_agent.title=Operatora raksturpazīmes -page_agents.agent_commonname=Internacionālais vārds page_agents.agent_name=Vārds page_agents.agents=Operatorus pilns saraksts: page_agents.intro=Šajā lapā var pievienot uzņēmuma jauna operatora, kā arī veikt izmaiņas jau eksistējoša operatora raksturpazīmēs. @@ -196,6 +195,7 @@ tag.pagination.no_items=Nekas nav atrasts thread.back_to_search=Pāriet meklēšanā thread.chat_log=Sarunas protokols thread.intro=Šajā lapā Jūs varat apskatīt dialogu. +time.timeformat=%H:%M topMenu.admin=Operatoru izvēlne topMenu.logoff=Izeja topMenu.users=Apmeklētāji diff --git a/src/messenger/webim/locales/pl/properties b/src/messenger/webim/locales/pl/properties index e6af9db6..e783e03c 100644 --- a/src/messenger/webim/locales/pl/properties +++ b/src/messenger/webim/locales/pl/properties @@ -285,7 +285,6 @@ page_agent.tab.groups=Grupy page_agent.tab.main=Ogólne page_agent.tab.permissions=Uprawnienia page_agent.title=Szczegóły operatora -page_agents.agent_commonname=Międzynarodowa nazwa page_agents.agent_name=Nazwa page_agents.agents=Pełna lista przedstawicieli: page_agents.intro=Ta strona zawiera listę przedstawicieli firmy, jeli masz odpowiednie uprawnienia możesz również dodawać nowych przedstawicieli @@ -423,6 +422,7 @@ thread.back_to_search=Przyjedź do wyszukiwania thread.chat_log=Logi rozmowy thread.intro=Strona wyświetla rozmowę time.locale=pl_PL +time.timeformat=%H:%M topMenu.admin=Administracja topMenu.logoff=Wyloguj się topMenu.main=Strona główna diff --git a/src/messenger/webim/locales/pt-br/properties b/src/messenger/webim/locales/pt-br/properties index 2011cba6..63ab3ecc 100644 --- a/src/messenger/webim/locales/pt-br/properties +++ b/src/messenger/webim/locales/pt-br/properties @@ -220,7 +220,6 @@ page_agent.tab.avatar=Foto page_agent.tab.main=Geral page_agent.tab.permissions=Permissões page_agent.title=Detalhes do operador -page_agents.agent_commonname=Nome Internacional page_agents.agent_name=Nome page_agents.agents=Lista de todos os agentes: page_agents.intro=Esta página mostar a lista de agentes da empresa e também permite adicionar novos @@ -302,6 +301,7 @@ thread.back_to_search=Procurar thread.chat_log=Log do chat thread.intro=Está página mostra todos os chats time.locale=pt_BR +time.timeformat=%H:%M topMenu.admin=Administração topMenu.logoff=Sair topMenu.users=Visitantes diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties index 8fc073d8..8a624a5c 100644 --- a/src/messenger/webim/locales/ru/properties +++ b/src/messenger/webim/locales/ru/properties @@ -189,8 +189,8 @@ leavemessage.title= leftMenu.client_agents= leftMenu.client_gen_button= leftMenu.client_settings= -localeid=Russian (ru) localedirection=ltr +localeid=Russian (ru) mail.user.history.body=, {0}!\n\n , : \n\n{1}\n--- \n ,\nMibew mail.user.history.subject=: mailthread.close=... @@ -285,12 +285,13 @@ page_agent.tab.groups= page_agent.tab.main= page_agent.tab.permissions= page_agent.title= -page_agents.agent_commonname= page_agents.agent_name= page_agents.agents= : page_agents.intro= . +page_agents.isonline= page_agents.login= page_agents.new_agent= ... +page_agents.status= page_agents.title= page_analysis.full.text.search= : page_analysis.search.title= @@ -387,11 +388,11 @@ settings.host.description= settings.host= settings.logo.description= settings.logo= -settings.popup_notification.description= , . -settings.popup_notification= . settings.no.title= settings.onehostconnections.description=0 settings.onehostconnections= +settings.popup_notification.description= , . +settings.popup_notification= . settings.saved= settings.sendmessagekey= : settings.survey.askgroup.description=/ @@ -423,7 +424,12 @@ tag.pagination.previous= thread.back_to_search= thread.chat_log= thread.intro= . +time.dateformat=%d %B %Y, time.locale=ru_RU +time.never= +time.timeformat=%H:%M +time.today.at= +time.yesterday.at= topMenu.admin= topMenu.logoff= topMenu.main= diff --git a/src/messenger/webim/locales/sp/properties b/src/messenger/webim/locales/sp/properties index f25ea203..6beafafe 100644 --- a/src/messenger/webim/locales/sp/properties +++ b/src/messenger/webim/locales/sp/properties @@ -282,7 +282,6 @@ page_agent.tab.groups=Grupos page_agent.tab.main=General page_agent.tab.permissions=Permisos page_agent.title=Detalles de operadores -page_agents.agent_commonname=Nombre Internacional page_agents.agent_name=Nombre page_agents.agents=Lista completa de agentes: page_agents.intro=Esta pgina muestra la lista de agentes de la empresa adems permite aadir otros nuevos agentes. @@ -417,6 +416,7 @@ thread.back_to_search=Buscar thread.chat_log=conversacin log thread.intro=La pagina muestra la conversacin time.locale=es_ES +time.timeformat=%H:%M topMenu.admin=Administracin topMenu.logoff=Salir topMenu.main=Inicio diff --git a/src/messenger/webim/locales/tr/properties b/src/messenger/webim/locales/tr/properties index 65453596..e19c8a1e 100644 --- a/src/messenger/webim/locales/tr/properties +++ b/src/messenger/webim/locales/tr/properties @@ -215,7 +215,6 @@ page_agent.tab.avatar=Foto page_agent.tab.main=Genel page_agent.tab.permissions=Yetkiler page_agent.title=Operatr Bilgileri -page_agents.agent_commonname=Uluslararas Ad page_agents.agent_name=Ad page_agents.agents=Yetkili Listesi: page_agents.intro=Bu sayfa yetkili listesini gsterir @@ -268,6 +267,7 @@ thread.back_to_search=Arama yap thread.chat_log=leti Gemii thread.intro=Grme Alan time.locale=tr_TR +time.timeformat=%H:%M topMenu.admin=Yentim Paneli topMenu.logoff=k topMenu.users=Mteriler diff --git a/src/messenger/webim/locales/ua/properties b/src/messenger/webim/locales/ua/properties index cb3d0193..c864c10b 100644 --- a/src/messenger/webim/locales/ua/properties +++ b/src/messenger/webim/locales/ua/properties @@ -145,7 +145,6 @@ page_agent.create_new= page_agent.error.duplicate_login= , .. . page_agent.intro= page_agent.title= -page_agents.agent_commonname= ' page_agents.agent_name=' page_agents.agents= : page_agents.intro= , @@ -179,6 +178,8 @@ thread.back_to_search= thread.chat_log= thread.intro= . time.locale=uk_UA +time.dateformat=%d %B %Y, +time.timeformat=%H:%M topMenu.admin= topMenu.logoff= topMenu.users=³ diff --git a/src/messenger/webim/locales/zh-cn/properties b/src/messenger/webim/locales/zh-cn/properties index 5a45f2c3..ee11de91 100644 --- a/src/messenger/webim/locales/zh-cn/properties +++ b/src/messenger/webim/locales/zh-cn/properties @@ -219,7 +219,6 @@ page_agent.tab.avatar=个人图片 page_agent.tab.main=基本设定 page_agent.tab.permissions=管理权限 page_agent.title=客服人员明细 -page_agents.agent_commonname=英文名称 page_agents.agent_name=显示名称 page_agents.agents=客服人员清单: page_agents.intro=显示目前系统已建立客服人员,可在此进行新增、删除与修改。 @@ -299,6 +298,7 @@ thread.back_to_search=搜寻 thread.chat_log=对谈纪录 thread.intro=显示对谈页面 time.locale=zh_CN +time.timeformat=%H:%M topMenu.admin=管理员 topMenu.logoff=离开 topMenu.users=客服上线 diff --git a/src/messenger/webim/locales/zh-tw/properties b/src/messenger/webim/locales/zh-tw/properties index f6bacf6c..31f7ed65 100644 --- a/src/messenger/webim/locales/zh-tw/properties +++ b/src/messenger/webim/locales/zh-tw/properties @@ -259,7 +259,6 @@ page_agent.tab.avatar=個人圖片 page_agent.tab.main=基本設定 page_agent.tab.permissions=管理權限 page_agent.title=客服人員明細 -page_agents.agent_commonname=英文名稱 page_agents.agent_name=顯示名稱 page_agents.agents=客服人員清單: page_agents.intro=顯示目前系統已建立客服人員,可在此進行新增、刪除與修改。 @@ -373,6 +372,7 @@ thread.back_to_search=搜尋 thread.chat_log=對談紀錄 thread.intro=顯示對談頁面 time.locale=zh_TW +time.timeformat=%H:%M topMenu.admin=管理員 topMenu.logoff=離開 topMenu.main=首頁 diff --git a/src/messenger/webim/operator/groupmembers.php b/src/messenger/webim/operator/groupmembers.php index 058fd832..dac8e1a3 100644 --- a/src/messenger/webim/operator/groupmembers.php +++ b/src/messenger/webim/operator/groupmembers.php @@ -35,6 +35,15 @@ function update_group_members($groupid,$newvalue) { mysql_close($link); } +function get_operators() { + $link = connect(); + + $query = "select * from chatoperator order by vclogin"; + $result = select_multi_assoc($query, $link); + mysql_close($link); + return $result; +} + $groupid = verifyparam( "gid","/^\d{1,9}$/"); $page = array('groupid' => $groupid); $page['operators'] = get_operators(); diff --git a/src/messenger/webim/operator/operators.php b/src/messenger/webim/operator/operators.php index 6df45c9e..69cf95ea 100644 --- a/src/messenger/webim/operator/operators.php +++ b/src/messenger/webim/operator/operators.php @@ -52,10 +52,27 @@ if( isset($_GET['act']) && $_GET['act'] == 'del' ) { } } +function is_online($operator) { + global $settings; + return $operator['time'] < $settings['online_timeout'] ? "1" : ""; +} + +function get_operators() { + $link = connect(); + + $query = "select operatorid, vclogin, vclocalename, vccommonname, (unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time ". + "from chatoperator order by vclogin"; + $operators = select_multi_assoc($query, $link); + mysql_close($link); + return $operators; +} + $page = array(); $page['allowedAgents'] = get_operators(); $page['canmodify'] = is_capable($can_administrate, $operator); +setlocale(LC_TIME, getstring("time.locale")); + prepare_menu($operator); start_html_output(); require('../view/agents.php'); diff --git a/src/messenger/webim/view/agents.php b/src/messenger/webim/view/agents.php index a007e293..47e3c58a 100644 --- a/src/messenger/webim/view/agents.php +++ b/src/messenger/webim/view/agents.php @@ -50,7 +50,7 @@ require_once('inc_errors.php'); - + @@ -66,10 +66,14 @@ require_once('inc_errors.php'); - + / - + + + + + diff --git a/src/messenger/webim/view/blocked_visitors.php b/src/messenger/webim/view/blocked_visitors.php index 8880f159..0bc0ba21 100644 --- a/src/messenger/webim/view/blocked_visitors.php +++ b/src/messenger/webim/view/blocked_visitors.php @@ -66,7 +66,7 @@ if( $page['pagination.items'] ) { - +
- () + ()

diff --git a/src/messenger/webim/view/thread_search.php b/src/messenger/webim/view/thread_search.php index bf03d606..5a828496 100644 --- a/src/messenger/webim/view/thread_search.php +++ b/src/messenger/webim/view/thread_search.php @@ -86,7 +86,7 @@ if( $page['pagination.items'] ) { - , + , - , + ,