mirror of
https://github.com/Mibew/design.git
synced 2025-01-23 02:20:34 +03:00
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
This commit is contained in:
parent
cca33d1d79
commit
e409810a0f
@ -189,7 +189,9 @@ my_settings.error.password_match=Entered passwords do not match
|
|||||||
no_such_operator=No such operator
|
no_such_operator=No such operator
|
||||||
operator.groups.title=Operator groups
|
operator.groups.title=Operator groups
|
||||||
operator.groups.intro=Choose groups according to operator skills.
|
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_host=Visitor's address
|
||||||
page.analysis.search.head_messages=Visitor's messages
|
page.analysis.search.head_messages=Visitor's messages
|
||||||
page.analysis.search.head_name=Name
|
page.analysis.search.head_name=Name
|
||||||
|
@ -26,11 +26,20 @@ $query = isset($_GET['q']) ? myiconv(getoutputenc(), $webim_encoding, $_GET['q']
|
|||||||
|
|
||||||
if($query !== false) {
|
if($query !== false) {
|
||||||
$link = connect();
|
$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(
|
$result = mysql_query(
|
||||||
"select DISTINCT unix_timestamp(chatthread.dtmcreated) as created, ".
|
"select DISTINCT unix_timestamp(chatthread.dtmcreated) as created, ".
|
||||||
"unix_timestamp(chatthread.dtmmodified) as modified, chatthread.threadid, ".
|
"unix_timestamp(chatthread.dtmmodified) as modified, chatthread.threadid, ".
|
||||||
"chatthread.remote, chatthread.agentName, chatthread.userName, ".
|
"chatthread.remote, chatthread.agentName, chatthread.userName, groupid, ".
|
||||||
"messageCount as size ".
|
"messageCount as size ".
|
||||||
"from chatthread, chatmessage ".
|
"from chatthread, chatmessage ".
|
||||||
"where chatmessage.threadid = chatthread.threadid and ".
|
"where chatmessage.threadid = chatthread.threadid and ".
|
||||||
|
@ -21,11 +21,23 @@ $operator = check_login();
|
|||||||
|
|
||||||
$page = array();
|
$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'])) {
|
if( isset($_GET['threadid'])) {
|
||||||
$threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", "");
|
$threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", "");
|
||||||
$lastid = -1;
|
$lastid = -1;
|
||||||
$page['threadMessages'] = get_messages($threadid,"html",false,$lastid);
|
$page['threadMessages'] = get_messages($threadid,"html",false,$lastid);
|
||||||
$page['thread'] = thread_by_id($threadid);
|
$page['thread'] = thread_info($threadid);
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_menu($operator, false);
|
prepare_menu($operator, false);
|
||||||
|
@ -41,6 +41,24 @@ $chatthread = $page['thread'];
|
|||||||
</div>
|
</div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
|
|
||||||
|
<div class="wlabel">
|
||||||
|
<?php echo getlocal("page.analysis.search.head_browser") ?>:
|
||||||
|
</div>
|
||||||
|
<div class="wvalue">
|
||||||
|
<?php echo get_useragent_version(topage($chatthread['userAgent'])) ?>
|
||||||
|
</div>
|
||||||
|
<br clear="all"/>
|
||||||
|
|
||||||
|
<?php if( $chatthread['groupName'] ) { ?>
|
||||||
|
<div class="wlabel">
|
||||||
|
<?php echo getlocal("page.analysis.search.head_group") ?>:
|
||||||
|
</div>
|
||||||
|
<div class="wvalue">
|
||||||
|
<?php echo topage(htmlspecialchars($chatthread['groupName'])) ?>
|
||||||
|
</div>
|
||||||
|
<br clear="all"/>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php if( $chatthread['agentName'] ) { ?>
|
<?php if( $chatthread['agentName'] ) { ?>
|
||||||
<div class="wlabel">
|
<div class="wlabel">
|
||||||
<?php echo getlocal("page.analysis.search.head_operator") ?>:
|
<?php echo getlocal("page.analysis.search.head_operator") ?>:
|
||||||
|
@ -75,7 +75,12 @@ if( $page['pagination.items'] ) {
|
|||||||
<?php echo get_user_addr(topage($chatthread['remote'])) ?>
|
<?php echo get_user_addr(topage($chatthread['remote'])) ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php if( $chatthread['agentName'] ) { ?><?php echo topage(htmlspecialchars($chatthread['agentName'])) ?><?php } ?>
|
<?php if( $chatthread['agentName'] ) {
|
||||||
|
echo topage(htmlspecialchars($chatthread['agentName']));
|
||||||
|
} else if($chatthread['groupid'] && $chatthread['groupid'] != 0 && isset($page['groupName'][$chatthread['groupid']])) {
|
||||||
|
echo "- ".topage(htmlspecialchars($page['groupName'][$chatthread['groupid']]))." -";
|
||||||
|
}
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php echo topage(htmlspecialchars($chatthread['size'])) ?>
|
<?php echo topage(htmlspecialchars($chatthread['size'])) ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user