diff --git a/www/chat_customer/customer_chat_code.php b/www/chat_customer/customer_chat_code.php index 4d2d7dc3..3f076cc6 100644 --- a/www/chat_customer/customer_chat_code.php +++ b/www/chat_customer/customer_chat_code.php @@ -8,12 +8,15 @@ # # Builds: # 151212-0829 - First Build for customer chat +# 151217-1015 - Allow for group_id variable # if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} if (isset($_GET["chat_id"])) {$chat_id=$_GET["chat_id"];} elseif (isset($_POST["chat_id"])) {$chat_id=$_POST["chat_id"];} +if (isset($_GET["group_id"])) {$chat_group_id=$_GET["group_id"];} + elseif (isset($_POST["group_id"])) {$chat_group_id=$_POST["group_id"];} if (isset($_GET["chat_group_id"])) {$chat_group_id=$_GET["chat_group_id"];} elseif (isset($_POST["chat_group_id"])) {$chat_group_id=$_POST["chat_group_id"];} if (isset($_GET["email"])) {$email=$_GET["email"];} diff --git a/www/chat_customer/customer_chat_functions.php b/www/chat_customer/customer_chat_functions.php index 328800c6..47634720 100644 --- a/www/chat_customer/customer_chat_functions.php +++ b/www/chat_customer/customer_chat_functions.php @@ -4,6 +4,7 @@ # CHANGES # 151212-0828 - First Build for customer chat # 151213-1106 - Added variable filtering +# 151217-1016 - Allow for carrying of group_id through to new chat # require("dbconnect_mysqli.php"); @@ -43,6 +44,8 @@ if (isset($_GET["chat_message"])) {$chat_message=$_GET["chat_message"];} elseif (isset($_POST["chat_message"])) {$chat_message=$_POST["chat_message"];} if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} +if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];} + elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];} if (isset($_GET["user"])) {$user=$_GET["user"];} elseif (isset($_POST["user"])) {$user=$_POST["user"];} if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} @@ -143,7 +146,7 @@ if ($action=="update_chat_window" && $chat_id) { $status_stmt="select status, chat_creator from vicidial_live_chats where chat_id='$chat_id'"; $status_rslt=mysql_to_mysqli($status_stmt, $link); if (mysqli_num_rows($status_rslt)==0) { - echo "Chat $chat_id does not exist or has been closed

GO BACK TO CHAT FORM\n"; + echo "Chat $chat_id does not exist or has been closed

GO BACK TO CHAT FORM\n"; } else { $status_row=mysqli_fetch_row($status_rslt); @@ -188,7 +191,7 @@ if ($action=="update_chat_window" && $chat_id) { echo "\n"; } else { - echo "You have left chat $chat_id.

GO BACK TO CHAT FORM\n"; + echo "You have left chat $chat_id.

GO BACK TO CHAT FORM\n"; } } else { if ($status_row[1]=="NONE") { diff --git a/www/chat_customer/vicidial_chat_customer_side.php b/www/chat_customer/vicidial_chat_customer_side.php index 671729e4..6ca30bbf 100644 --- a/www/chat_customer/vicidial_chat_customer_side.php +++ b/www/chat_customer/vicidial_chat_customer_side.php @@ -11,6 +11,7 @@ # 150902-2100 - First build # 151212-0830 - First Build for customer chat # 151213-1105 - Added variable filtering +# 151217-1017 - Allow for pre-populating of group_id # require("dbconnect_mysqli.php"); @@ -229,6 +230,8 @@ if ($send_request=="SEND REQUEST") { # For people requesting a chat with an agen