fixes for chat

git-svn-id: svn://192.168.202.10@2429 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2015-12-14 03:39:36 +00:00
parent 8952589d00
commit 8d6cd5192f
4 changed files with 91 additions and 3 deletions
+2
View File
@@ -52,3 +52,5 @@ Chat Timeout -This is where you can set how long a customer chat can stay alive
Chat URL -This is the location where you have placed the chat web pages for customer use.
NOTE: You will need to Allow Chat on the campaign that you want agents to handle Chat InGroups from
@@ -0,0 +1,79 @@
.vertical-text {
writing-mode:tb-rl;
-webkit-transform:rotate(90deg);
-moz-transform:rotate(90deg);
-o-transform: rotate(90deg);
white-space:nowrap;
display:block;
top:0;
width:20px;
height:20px;
}
input.tiny_red_btn{
color:#FFFFFF;
font-size:9px;
font-weight:bold;
background-color:#993333;
border:1px solid;
border-top-color:#FFCCCC;
border-left-color:#FFCCCC;
border-right-color:#660000;
border-bottom-color:#660000;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#00ffffff',EndColorStr='#ff660000');}
input.tiny_blue_btn{
color:#FFFFFF;
font-size:9px;
font-weight:bold;
background-color:#3333FF;
border:1px solid;
border-top-color:#CCCCFF;
border-left-color:#CCCCFF;
border-right-color:#000066;
border-bottom-color:#000066;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#00ffffff',EndColorStr='#ff000066');}
input.tiny_yellow_btn{
color:#000000;
font-size:9px;
font-weight:bold;
background-color:#FFFF00;
border:1px solid;
border-top-color:#FFFFCC;
border-left-color:#FFFFCC;
border-right-color:#333300;
border-bottom-color:#333300;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#00ffffff',EndColorStr='#ffFFFF00');}
input.tiny_green_btn{
color:#FFFFFF;
font-size:9px;
font-weight:bold;
background-color:#009900;
border:1px solid;
border-top-color:#CCFFCC;
border-left-color:#CCFFCC;
border-right-color:#003300;
border-bottom-color:#003300;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#00ffffff',EndColorStr='#FF003300');}
div.scrolling {
height: 77px;
width: 320px;
overflow: auto;
border: 1px solid #666;
background-color: #FFF;
padding: 2px;
}
textarea.chat_box {
font-family: Arial, Sans-Serif;
font-size: 10px;
margin-bottom: 3px;
padding: 2px;
border: solid 1px #000066;
}
.cust_form {
font-family: Sans-Serif;
font-size: 10px;
overflow: hidden;
}
+7 -2
View File
@@ -68,6 +68,10 @@ if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
if (isset($_GET["clickmute"])) {$clickmute=$_GET["clickmute"];}
elseif (isset($_POST["clickmute"])) {$clickmute=$_POST["clickmute"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
if ($clickmute!="1") {$clickmute="0";} // Prevents annoying quirk of playing the audio cue every time you click the tab to view this
$lead_id = preg_replace("/[^0-9]/","",$lead_id);
@@ -75,7 +79,6 @@ $chat_id = preg_replace('/[^- \_\.0-9a-zA-Z]/','',$chat_id);
$chat_group_id = preg_replace('/[^- \_\.0-9a-zA-Z]/','',$chat_group_id);
$server_ip = preg_replace('/[^- \_\.0-9a-zA-Z]/','',$server_ip);
$email = preg_replace("/\'|\"|\\\\|;/","",$email);
$chat_group_ids = preg_replace("/\\\\|;/","",$chat_group_ids);
$campaign = preg_replace('/[^-\_0-9a-zA-Z]/','',$campaign);
$dial_method = preg_replace('/[^-\_0-9a-zA-Z]/','',$dial_method);
$clickmute = preg_replace("/\'|\"|\\\\|;/","",$clickmute);
@@ -655,7 +658,9 @@ if($child_window) {
echo "<option value='' selected>--SELECT A CHAT GROUP--</option>\n";
# CREATE LIST OF GroUP IDS to select
if (count($chat_group_ids)>0) {
$group_stmt="select group_id, group_name from vicidial_inbound_groups where group_handling='CHAT' and group_id in ('".implode("','", $chat_group_ids)."') order by group_name asc";
$chat_group_idsSQL = implode("','", $chat_group_ids);
$chat_group_idsSQL = preg_replace("/\\\\|;/","",$chat_group_idsSQL);
$group_stmt="select group_id, group_name from vicidial_inbound_groups where group_handling='CHAT' and group_id in ('$chat_group_idsSQL') order by group_name asc";
$group_rslt=mysql_to_mysqli($group_stmt, $link);
while ($group_row=mysqli_fetch_row($group_rslt)) {
echo "<option value='".$group_row[0]."'>".$group_row[1]."</option>\n";
+3 -1
View File
@@ -7917,13 +7917,15 @@ if ($ACTION == 'VDADcheckINCOMINGother')
$email_group_str.="'$inbound_email_groups[$i]',";
}
$email_group_str=substr($email_group_str, 0, -1);
if (strlen($email_group_str) < 2) {$email_group_str = "''";}
$chat_group_ct=count($inbound_chat_groups); # This should always be greater than zero for the script to reach this point, but just in case...
for ($i=0; $i<$chat_group_ct; $i++) {
$chat_group_str.="'$inbound_chat_groups[$i]',";
}
$chat_group_str=substr($chat_group_str, 0, -1);
if (strlen($chat_group_str) < 2) {$chat_group_str = "''";}
# $DB=1;
if ( (strlen($campaign)<1) || (strlen($server_ip)<1) )