2007-10-10 19:15:47 +04:00
|
|
|
<?php
|
|
|
|
/*
|
2013-03-07 01:22:53 +04:00
|
|
|
* Copyright 2005-2013 the original author or authors.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
2007-10-10 19:15:47 +04:00
|
|
|
*/
|
|
|
|
|
2009-03-13 03:52:37 +03:00
|
|
|
$page['title'] = getlocal("thread.chat_log");
|
2008-09-30 02:55:18 +04:00
|
|
|
|
2012-11-22 14:28:22 +04:00
|
|
|
function tpl_header() { global $page, $webimroot; ?>
|
|
|
|
<script type="text/javascript" src="<?php echo($webimroot); ?>/js/compiled/common.js"></script>
|
|
|
|
<script type="text/javascript" src="<?php echo($webimroot); ?>/js/compiled/handlebars.js"></script>
|
|
|
|
<script type="text/javascript" src="<?php echo($webimroot); ?>/js/compiled/handlebars_helpers.js"></script>
|
|
|
|
<script type="text/javascript" src="<?php echo($webimroot); ?>/js/compiled/messageview.js"></script>
|
2012-10-11 19:44:03 +04:00
|
|
|
<script type="text/javascript" src="<?php echo($webimroot); ?>/js/templates/compiled/message.tpl.js"></script>
|
|
|
|
<script type="text/javascript"><!--
|
|
|
|
EventHelper.register(window, 'onload', function() {
|
|
|
|
var threadMessages = <?php echo($page['threadMessages']); ?>;
|
|
|
|
var messageEl = document.getElementById('message');
|
|
|
|
var messageView = new MessageView();
|
|
|
|
for (var index in threadMessages) {
|
|
|
|
if (! threadMessages.hasOwnProperty(index)) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
messageEl.innerHTML += messageView.themeMessage(threadMessages[index]);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// --></script>
|
|
|
|
<?php }
|
|
|
|
|
2009-03-13 03:52:37 +03:00
|
|
|
function tpl_content() { global $page, $webimroot, $errors;
|
2012-10-01 15:14:03 +04:00
|
|
|
$chatthreadinfo = $page['thread_info'];
|
|
|
|
$chatthread = $page['thread_info']['thread'];
|
2009-03-13 03:52:37 +03:00
|
|
|
?>
|
2008-09-30 02:55:18 +04:00
|
|
|
|
2008-05-06 15:08:21 +04:00
|
|
|
<?php echo getlocal("thread.intro") ?>
|
2007-10-10 19:15:47 +04:00
|
|
|
|
|
|
|
<br/><br/>
|
|
|
|
|
2009-03-13 03:52:37 +03:00
|
|
|
<div class="logpane">
|
|
|
|
<div class="header">
|
|
|
|
|
|
|
|
<div class="wlabel">
|
|
|
|
<?php echo getlocal("page.analysis.search.head_name") ?>:
|
|
|
|
</div>
|
|
|
|
<div class="wvalue">
|
2012-10-01 15:14:03 +04:00
|
|
|
<?php echo topage(htmlspecialchars($chatthread->userName)) ?>
|
2009-03-13 03:52:37 +03:00
|
|
|
</div>
|
|
|
|
<br clear="all"/>
|
|
|
|
|
|
|
|
<div class="wlabel">
|
|
|
|
<?php echo getlocal("page.analysis.search.head_host") ?>:
|
|
|
|
</div>
|
|
|
|
<div class="wvalue">
|
2012-10-01 15:14:03 +04:00
|
|
|
<?php echo get_user_addr(topage($chatthread->remote)) ?>
|
2009-03-13 03:52:37 +03:00
|
|
|
</div>
|
|
|
|
<br clear="all"/>
|
|
|
|
|
2009-03-28 03:29:33 +03:00
|
|
|
<div class="wlabel">
|
|
|
|
<?php echo getlocal("page.analysis.search.head_browser") ?>:
|
|
|
|
</div>
|
|
|
|
<div class="wvalue">
|
2012-10-01 15:14:03 +04:00
|
|
|
<?php echo get_useragent_version(topage($chatthread->userAgent)) ?>
|
2009-03-28 03:29:33 +03:00
|
|
|
</div>
|
|
|
|
<br clear="all"/>
|
|
|
|
|
2012-10-01 15:14:03 +04:00
|
|
|
<?php if( $chatthreadinfo['groupName'] ) { ?>
|
2009-03-28 03:29:33 +03:00
|
|
|
<div class="wlabel">
|
|
|
|
<?php echo getlocal("page.analysis.search.head_group") ?>:
|
|
|
|
</div>
|
|
|
|
<div class="wvalue">
|
2012-10-01 15:14:03 +04:00
|
|
|
<?php echo topage(htmlspecialchars($chatthreadinfo['groupName'])) ?>
|
2009-03-28 03:29:33 +03:00
|
|
|
</div>
|
|
|
|
<br clear="all"/>
|
|
|
|
<?php } ?>
|
|
|
|
|
2012-10-01 15:14:03 +04:00
|
|
|
<?php if( $chatthread->agentName ) { ?>
|
2009-03-13 03:52:37 +03:00
|
|
|
<div class="wlabel">
|
|
|
|
<?php echo getlocal("page.analysis.search.head_operator") ?>:
|
|
|
|
</div>
|
|
|
|
<div class="wvalue">
|
2012-10-01 15:14:03 +04:00
|
|
|
<?php echo topage(htmlspecialchars($chatthread->agentName)) ?>
|
2009-03-13 03:52:37 +03:00
|
|
|
</div>
|
|
|
|
<br clear="all"/>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<div class="wlabel">
|
|
|
|
<?php echo getlocal("page.analysis.search.head_time") ?>:
|
|
|
|
</div>
|
|
|
|
<div class="wvalue">
|
2012-10-01 15:14:03 +04:00
|
|
|
<?php echo date_diff_to_text($chatthread->modified-$chatthread->created) ?>
|
|
|
|
(<?php echo date_to_text($chatthread->created) ?>)
|
2009-03-13 03:52:37 +03:00
|
|
|
</div>
|
|
|
|
<br clear="all"/>
|
|
|
|
</div>
|
|
|
|
|
2012-10-11 19:44:03 +04:00
|
|
|
<div class="message" id="message">
|
2009-03-13 03:52:37 +03:00
|
|
|
<?php
|
|
|
|
foreach( $page['threadMessages'] as $message ) {
|
|
|
|
echo $message;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2007-10-10 19:15:47 +04:00
|
|
|
|
|
|
|
<br />
|
2007-10-30 15:13:04 +03:00
|
|
|
<a href="<?php echo $webimroot ?>/operator/history.php">
|
2008-05-06 15:08:21 +04:00
|
|
|
<?php echo getlocal("thread.back_to_search") ?></a>
|
2007-10-10 19:15:47 +04:00
|
|
|
<br />
|
|
|
|
|
|
|
|
|
2009-03-13 03:52:37 +03:00
|
|
|
<?php
|
|
|
|
} /* content */
|
2007-10-10 19:15:47 +04:00
|
|
|
|
2009-03-13 03:52:37 +03:00
|
|
|
require_once('inc_main.php');
|
|
|
|
?>
|