From e409810a0f1c482ec4eaad6952f4360329c6280d Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Sat, 28 Mar 2009 00:29:33 +0000 Subject: [PATCH] show group in thread log, show group in history for threads w/o agent git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@442 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/messenger/webim/locales/en/properties | 4 +++- src/messenger/webim/operator/history.php | 11 ++++++++++- .../webim/operator/threadprocessor.php | 14 +++++++++++++- src/messenger/webim/view/thread_log.php | 18 ++++++++++++++++++ src/messenger/webim/view/thread_search.php | 7 ++++++- 5 files changed, 50 insertions(+), 4 deletions(-) diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index 07ca1acb..b316c015 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -189,7 +189,9 @@ my_settings.error.password_match=Entered passwords do not match no_such_operator=No such operator operator.groups.title=Operator groups operator.groups.intro=Choose groups according to operator skills. -operator.group.no_description=<no description> +operator.group.no_description=<no description> +page.analysis.search.head_browser=Browser +page.analysis.search.head_group=Group page.analysis.search.head_host=Visitor's address page.analysis.search.head_messages=Visitor's messages page.analysis.search.head_name=Name diff --git a/src/messenger/webim/operator/history.php b/src/messenger/webim/operator/history.php index fc96c4cb..f83d23bf 100644 --- a/src/messenger/webim/operator/history.php +++ b/src/messenger/webim/operator/history.php @@ -26,11 +26,20 @@ $query = isset($_GET['q']) ? myiconv(getoutputenc(), $webim_encoding, $_GET['q'] if($query !== false) { $link = connect(); + + $result = mysql_query("select chatgroup.groupid as groupid, vclocalname ". + "from chatgroup order by vclocalname", $link); + $groupName = array(); + while ($group = mysql_fetch_array($result, MYSQL_ASSOC)) { + $groupName[$group['groupid']] = $group['vclocalname']; + } + $page['groupName'] = $groupName; + mysql_free_result($result); $result = mysql_query( "select DISTINCT unix_timestamp(chatthread.dtmcreated) as created, ". "unix_timestamp(chatthread.dtmmodified) as modified, chatthread.threadid, ". - "chatthread.remote, chatthread.agentName, chatthread.userName, ". + "chatthread.remote, chatthread.agentName, chatthread.userName, groupid, ". "messageCount as size ". "from chatthread, chatmessage ". "where chatmessage.threadid = chatthread.threadid and ". diff --git a/src/messenger/webim/operator/threadprocessor.php b/src/messenger/webim/operator/threadprocessor.php index 772bacbd..fed5c555 100644 --- a/src/messenger/webim/operator/threadprocessor.php +++ b/src/messenger/webim/operator/threadprocessor.php @@ -21,11 +21,23 @@ $operator = check_login(); $page = array(); +function thread_info($id) { + $link = connect(); + $thread = select_one_row("select userName,agentName,remote,userAgent,". + "unix_timestamp(dtmmodified) as modified, unix_timestamp(dtmcreated) as created,". + "vclocalname as groupName ". + "from chatthread left join chatgroup on chatthread.groupid = chatgroup.groupid ". + "where threadid = ". $id, $link ); + mysql_close($link); + return $thread; +} + + if( isset($_GET['threadid'])) { $threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", ""); $lastid = -1; $page['threadMessages'] = get_messages($threadid,"html",false,$lastid); - $page['thread'] = thread_by_id($threadid); + $page['thread'] = thread_info($threadid); } prepare_menu($operator, false); diff --git a/src/messenger/webim/view/thread_log.php b/src/messenger/webim/view/thread_log.php index 4c5ca278..750ee3cf 100644 --- a/src/messenger/webim/view/thread_log.php +++ b/src/messenger/webim/view/thread_log.php @@ -41,6 +41,24 @@ $chatthread = $page['thread'];
+
+ : +
+
+ +
+
+ + +
+ : +
+
+ +
+
+ +
: diff --git a/src/messenger/webim/view/thread_search.php b/src/messenger/webim/view/thread_search.php index cc6b537e..e38a757b 100644 --- a/src/messenger/webim/view/thread_search.php +++ b/src/messenger/webim/view/thread_search.php @@ -75,7 +75,12 @@ if( $page['pagination.items'] ) { - +