mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
push context into the chat
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@347 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
b87223a3ee
commit
4cefe08272
@ -20,6 +20,7 @@ require_once('libs/expand.php');
|
|||||||
if( !isset($_GET['token']) || !isset($_GET['thread']) ) {
|
if( !isset($_GET['token']) || !isset($_GET['thread']) ) {
|
||||||
|
|
||||||
$chatstyle = verifyparam( "style", "/^\w+$/", "");
|
$chatstyle = verifyparam( "style", "/^\w+$/", "");
|
||||||
|
$info = isset($_GET['info']) ? $_GET['info'] : "";
|
||||||
$thread = NULL;
|
$thread = NULL;
|
||||||
if( isset($_SESSION['threadid']) ) {
|
if( isset($_SESSION['threadid']) ) {
|
||||||
$thread = reopen_thread($_SESSION['threadid']);
|
$thread = reopen_thread($_SESSION['threadid']);
|
||||||
@ -28,6 +29,7 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) {
|
|||||||
if( !$thread ) {
|
if( !$thread ) {
|
||||||
if(!has_online_operators()) {
|
if(!has_online_operators()) {
|
||||||
setup_logo();
|
setup_logo();
|
||||||
|
$page['info'] = topage($info);
|
||||||
expand("styles", getchatstyle(), "leavemessage.tpl");
|
expand("styles", getchatstyle(), "leavemessage.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -51,6 +53,9 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) {
|
|||||||
post_message($thread['threadid'],$kind_for_agent,getstring2('chat.came.from',array($referer)));
|
post_message($thread['threadid'],$kind_for_agent,getstring2('chat.came.from',array($referer)));
|
||||||
}
|
}
|
||||||
post_message($thread['threadid'],$kind_info,getstring('chat.wait'));
|
post_message($thread['threadid'],$kind_info,getstring('chat.wait'));
|
||||||
|
if($info) {
|
||||||
|
post_message($thread['threadid'],$kind_for_agent,getstring2('chat.visitor.info',array($info)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$threadid = $thread['threadid'];
|
$threadid = $thread['threadid'];
|
||||||
$token = $thread['ltoken'];
|
$token = $thread['ltoken'];
|
||||||
|
@ -22,6 +22,7 @@ $page = array();
|
|||||||
$email = getparam('email');
|
$email = getparam('email');
|
||||||
$visitor_name = getparam('name');
|
$visitor_name = getparam('name');
|
||||||
$message = getparam('message');
|
$message = getparam('message');
|
||||||
|
$info = getparam('info');
|
||||||
|
|
||||||
if( !$email ) {
|
if( !$email ) {
|
||||||
$errors[] = no_field("form.field.email");
|
$errors[] = no_field("form.field.email");
|
||||||
@ -39,13 +40,14 @@ if( count($errors) > 0 ) {
|
|||||||
$page['formname'] = topage($visitor_name);
|
$page['formname'] = topage($visitor_name);
|
||||||
$page['formemail'] = $email;
|
$page['formemail'] = $email;
|
||||||
$page['formmessage'] = topage($message);
|
$page['formmessage'] = topage($message);
|
||||||
|
$page['info'] = $info;
|
||||||
setup_logo();
|
setup_logo();
|
||||||
expand("styles", getchatstyle(), "leavemessage.tpl");
|
expand("styles", getchatstyle(), "leavemessage.tpl");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = getstring2_("leavemail.subject", array($visitor_name), $webim_messages_locale);
|
$subject = getstring2_("leavemail.subject", array($visitor_name), $webim_messages_locale);
|
||||||
$body = getstring2_("leavemail.body", array($visitor_name,$email,$message), $webim_messages_locale);
|
$body = getstring2_("leavemail.body", array($visitor_name,$email,$message,$info ? "$info\n" : ""), $webim_messages_locale);
|
||||||
|
|
||||||
loadsettings();
|
loadsettings();
|
||||||
$inbox_mail = $settings['email'];
|
$inbox_mail = $settings['email'];
|
||||||
|
@ -46,6 +46,7 @@ chat.thread.state_closed=Closed
|
|||||||
chat.thread.state_loading=Loading
|
chat.thread.state_loading=Loading
|
||||||
chat.thread.state_wait=In queue
|
chat.thread.state_wait=In queue
|
||||||
chat.thread.state_wait_for_another_agent=Waiting for operator
|
chat.thread.state_wait_for_another_agent=Waiting for operator
|
||||||
|
chat.visitor.info=Info: {0}
|
||||||
chat.wait=Thank you for contacting us. An operator will be with you shortly...
|
chat.wait=Thank you for contacting us. An operator will be with you shortly...
|
||||||
chat.window.chatting_with=You chat with:
|
chat.window.chatting_with=You chat with:
|
||||||
chat.window.close_title=Close chat
|
chat.window.close_title=Close chat
|
||||||
@ -144,7 +145,7 @@ install.updatedb=Please, run <a href="{0}">Update wizard</a> to adjust your data
|
|||||||
installed.login_link=Proceed to login page
|
installed.login_link=Proceed to login page
|
||||||
installed.message=<b>Application installed successfully.</b>
|
installed.message=<b>Application installed successfully.</b>
|
||||||
installed.notice=You can logon as admin with empty password.<br/><br/><font color="#c13030"><b>!!! For security reasons, please change your password immediately and remove /webim/install folder from your server.</b></font>
|
installed.notice=You can logon as admin with empty password.<br/><br/><font color="#c13030"><b>!!! For security reasons, please change your password immediately and remove /webim/install folder from your server.</b></font>
|
||||||
leavemail.body=Your have a message from {0}:\n\n{2}\n\nHis email: {1}\n\n--- \nYours site messenger
|
leavemail.body=Your have a message from {0}:\n\n{2}\n\nHis email: {1}\n{3}\n--- \nYours site messenger
|
||||||
leavemail.subject=Question from {0}
|
leavemail.subject=Question from {0}
|
||||||
leavemessage.close=Close
|
leavemessage.close=Close
|
||||||
leavemessage.descr=Sorry, no operator is available at the moment. Please, try again later or ask your question in this form.
|
leavemessage.descr=Sorry, no operator is available at the moment. Please, try again later or ask your question in this form.
|
||||||
|
@ -18,6 +18,7 @@ chat.status.user.changedname
|
|||||||
chat.status.user.dead
|
chat.status.user.dead
|
||||||
chat.status.user.left
|
chat.status.user.left
|
||||||
chat.status.user.reopenedthread
|
chat.status.user.reopenedthread
|
||||||
|
chat.visitor.info
|
||||||
chat.wait
|
chat.wait
|
||||||
chat.window.chatting_with
|
chat.window.chatting_with
|
||||||
chat.window.close_title
|
chat.window.close_title
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
|
|
||||||
<form name="leaveMessageForm" method="post" action="${webimroot}/leavemessage.php">
|
<form name="leaveMessageForm" method="post" action="${webimroot}/leavemessage.php">
|
||||||
<input type="hidden" name="style" value="${styleid}"/>
|
<input type="hidden" name="style" value="${styleid}"/>
|
||||||
|
<input type="hidden" name="info" value="${page:info}"/>
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" height="150" style="padding:5px">
|
<td valign="top" height="150" style="padding:5px">
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
<form name="leaveMessageForm" method="post" action="${webimroot}/leavemessage.php">
|
<form name="leaveMessageForm" method="post" action="${webimroot}/leavemessage.php">
|
||||||
<input type="hidden" name="style" value="${styleid}"/>
|
<input type="hidden" name="style" value="${styleid}"/>
|
||||||
|
<input type="hidden" name="info" value="${page:info}"/>
|
||||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||||
<tr><td colspan="3" height="15"></td></tr>
|
<tr><td colspan="3" height="15"></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user