diff --git a/src/messenger/webim/images/buttons/send.gif b/src/messenger/webim/images/buttons/send.gif new file mode 100644 index 00000000..1b1b510e Binary files /dev/null and b/src/messenger/webim/images/buttons/send.gif differ diff --git a/src/messenger/webim/images/tbliclread.gif b/src/messenger/webim/images/tbliclread.gif new file mode 100644 index 00000000..87a69519 Binary files /dev/null and b/src/messenger/webim/images/tbliclread.gif differ diff --git a/src/messenger/webim/images/textdiv.gif b/src/messenger/webim/images/textdiv.gif new file mode 100644 index 00000000..dc6158ae Binary files /dev/null and b/src/messenger/webim/images/textdiv.gif differ diff --git a/src/messenger/webim/operator/agent.php b/src/messenger/webim/operator/agent.php index 23f414c8..c314a3ec 100644 --- a/src/messenger/webim/operator/agent.php +++ b/src/messenger/webim/operator/agent.php @@ -15,6 +15,7 @@ require_once('../libs/common.php'); require_once('../libs/chat.php'); require_once('../libs/operator.php'); +require_once('../libs/pagination.php'); $operator = check_login(); @@ -32,7 +33,19 @@ if( !isset($_GET['token']) ) { die("wrong thread"); } - take_thread($thread,$operator); + $viewonly = verifyparam( "viewonly", "/^true$/", false); + + $forcetake = verifyparam("force", "/^true$/", false); + if( !$viewonly && $thread['istate'] == $state_chatting && $operator['operatorid'] != $thread['agentId'] && $forcetake == false ) { + $page = array( + 'user' => topage($thread['userName']), 'agent' => topage($thread['agentName']), 'link' => $_SERVER['PHP_SELF']."?thread=$threadid&force=true" + ); + require('../view/confirm.php'); + exit; + } + + if (!$viewonly) + take_thread($thread,$operator); $token = $thread['ltoken']; header("Location: $webimroot/operator/agent.php?thread=$threadid&token=$token&level=$remote_level"); @@ -50,6 +63,14 @@ setup_chatview_for_operator($thread, $operator); start_html_output(); +$pparam = verifyparam( "act", "/^(redirect)$/", "default"); +if( $pparam == "redirect" ) { + $found = get_operators(); + setup_pagination($found); + $page['params'] = array('thread' => $threadid, 'token' => $token); + require('../view/redirect.php'); +} else { require('../view/chat_ajaxed.php'); +} ?> \ No newline at end of file diff --git a/src/messenger/webim/view/chat_ajaxed.php b/src/messenger/webim/view/chat_ajaxed.php index 08d3cb4f..441789b4 100644 --- a/src/messenger/webim/view/chat_ajaxed.php +++ b/src/messenger/webim/view/chat_ajaxed.php @@ -145,6 +145,9 @@ var threadParams = { servl:"/thread.php",wroot:" " onclick="this.newWindow = window.open('&act=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=254,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;">Mail  + + "> + Redirect  "> @@ -237,7 +240,14 @@ var threadParams = { servl:"/thread.php",wroot:" - + + + + + diff --git a/src/messenger/webim/view/confirm.php b/src/messenger/webim/view/confirm.php new file mode 100644 index 00000000..59605b34 --- /dev/null +++ b/src/messenger/webim/view/confirm.php @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + <?php echo getlocal("app.title") ?> - <?php echo getlocal("page_agent.title") ?> + + +"> +"> + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+

+
+
+ +
+ + + + +
+ +

+
+ + + + + +
+ + + + + +
+
+
+
+
+ + + + + +
+
+
+
+ +
+
+ +
+ +
+ + + +