From ece8ab9c3ccdc7e8cb8f7942ece374a7dad547c1 Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Thu, 2 Oct 2008 09:51:31 +0000 Subject: [PATCH] [redirect] images, link to invoke, predefined answers html, confirmation dialog to steel thread git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@134 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/messenger/webim/images/buttons/send.gif | Bin 0 -> 1274 bytes src/messenger/webim/images/tbliclread.gif | Bin 0 -> 329 bytes src/messenger/webim/images/textdiv.gif | Bin 0 -> 48 bytes src/messenger/webim/operator/agent.php | 23 +++- src/messenger/webim/view/chat_ajaxed.php | 12 ++- src/messenger/webim/view/confirm.php | 111 ++++++++++++++++++++ 6 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 src/messenger/webim/images/buttons/send.gif create mode 100644 src/messenger/webim/images/tbliclread.gif create mode 100644 src/messenger/webim/images/textdiv.gif create mode 100644 src/messenger/webim/view/confirm.php diff --git a/src/messenger/webim/images/buttons/send.gif b/src/messenger/webim/images/buttons/send.gif new file mode 100644 index 0000000000000000000000000000000000000000..1b1b510e08b11aa64fde557c066777cca52ac357 GIT binary patch literal 1274 zcmd7R{Zo<$0KoAFXl2C~TDz$AgZAE4cV>0xuD0Q%MV8_#3dR%!0ntK1BSqy+=n<2L z#5d4*2@DZmNJF$tG*U6mm#&hPy{y-{cIUM=?QZ()+F!BHU-13qd;G*t;os6W0h@q@ z`#^@MC0pLXEOGG5yK>5$MH)9<)RI}+npSA1icuS zPKv;i2X>V=dKw&~=hfZPnwvc3HEq)n{Biu=!`FjjPZKi1xU5>PtUbNR4lgahf3&CY zE%3r)_^+w)2d|=;P+DR0g@*nlo*{{6g#Vr?uIiz1RVn-{@eJk5w||ysdwaZoy2xIn z=_!KT6?%6JRruuDt9XXO(0-T5*7~2#!Tw~`Wsl7@$rS3&iVgM6BVdDvEANok^(AM@ zN2gyr|MhKrT4CDx=ENL5o?M!Erg3>0PCtM3L>efpbX6DzL~3UWMh@@`ON@vn6dLrX-H5>-WvV4+);p*#vqCky97XRMy*l6oHkJZ>??`a^89% ztG!92$&&LdjN+EEy1tg4>C-utr0i<=y$ycf9G|TR8$AUTE;9ehquJkvCtu`&os43K z&hATMNJu=Rqj$O#)RVZ7Yj8%a?TukoRax&8NNN&t8lq_BklCwi@kP;8sX6MCR8c~< zK9N;E^K{O8?-@A@oSJz<$~D3MBx~0MDMJ*ORhPsRQ_tDrG895}cQivS(zt)->tZr5 zCFh!ddH#D`R!x?y9Wvjh71_1cI||(`vva(xzAu`o;YivFDz1w(JzQCbq~<0^+CK5< zb-wC4nQtjnyIA5juC#U9|CY$AGIoqzG!DWKqhdML@PB~+fsjut5CCu=*!Q{R^AkV- z3|w8kh0tM)kZopXLqi>=+sbd)xJ~Z{hHk5{R{wnPyrL^K{Am8%q-3J)RL^!Tc!}WM zvF0N7DaMAQs3I&BZC)TfM)SS>17RlOg>36Kie(RG1QWE4;}Vhs@gc{`(8sYGb_ch3 zQ3uiWQK^!bS~+VdcEgPzu~-&39BvE@W|3w%Xrj9gFiW)v58WGVqywwAqad1HP;2VM ztjDhLd~Ix%AsAty4$aGB8Jxa3b`7Z>2;iX7mu#NUAHOJwd7lV`V>h77%I1*y(At0I5cxNgNG`eOQkZDQvsOh)*a zvp;d?H-r*1k;K;v8h&@^W literal 0 HcmV?d00001 diff --git a/src/messenger/webim/images/tbliclread.gif b/src/messenger/webim/images/tbliclread.gif new file mode 100644 index 0000000000000000000000000000000000000000..87a69519c0fda01ccedcebbbef74fab19447dfb6 GIT binary patch literal 329 zcmcJ~T`NNY9Dwm>YYoTPoD`OwlM_p8$%Tt8yVx#{mkS@j2{jg*jcXF0zl5(RV!0i1B2pE7Dfi3fDVw&0Fq%~V(;l+$^KfNi@_QI^sEVR literal 0 HcmV?d00001 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") ?> + + +"> +"> + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+

+
+
+ +
+ + + + +
+ +

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