Added ability to transfer customer chats to another chat group or agent
Added API Log Report to Admin Utilities page git-svn-id: svn://192.168.202.10@2485 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -238,6 +238,10 @@ OTHER CHANGES:
|
|||||||
placed from the agent screen, and if one exists it will be deleted
|
placed from the agent screen, and if one exists it will be deleted
|
||||||
before the manual dial call is placed.
|
before the manual dial call is placed.
|
||||||
|
|
||||||
|
61. Added ability to transfer customer chats to another chat group or agent
|
||||||
|
|
||||||
|
62. Added API Log Report to Admin Utilities page
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
CHAT MESSAGING Started 2014-05-01 Updated 2016-01-20
|
CHAT MESSAGING Started 2014-05-01 Updated 2016-03-05
|
||||||
|
|
||||||
|
|
||||||
After over 18 months of development, the Chat Messaging system for Vicidial was added to svn/trunk on December 13th, 2015(svn revision 2428). Our Chat messaging allows for customers to chat with agents from websites, as well as allowing managers to chat with agents and agents to chat with other agents all within their existing agent screen.
|
After over 18 months of development, the Chat Messaging system for Vicidial was added to svn/trunk on December 13th, 2015(svn revision 2428). Our Chat messaging allows for customers to chat with agents from websites, as well as allowing managers to chat with agents and agents to chat with other agents all within their existing agent screen.
|
||||||
@@ -8,6 +8,8 @@ The Chat Messaging built into Vicidial is entirely web-based and uses it's own p
|
|||||||
|
|
||||||
UPDATE 2015-12-19: We added several security enhancements related to the chat functionality. We strongly recommend that you update your system to svn/trunk revision 2435 or higher if you are running revision between 2428 and 2434. We also added dynamic language capability throughout the chat screens.
|
UPDATE 2015-12-19: We added several security enhancements related to the chat functionality. We strongly recommend that you update your system to svn/trunk revision 2435 or higher if you are running revision between 2428 and 2434. We also added dynamic language capability throughout the chat screens.
|
||||||
|
|
||||||
|
UPDATE 2016-03-05: We added the ability to transfer a customer chat to another chat group or agent.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AGENT CHAT INTERFACE INSTRUCTIONS:
|
AGENT CHAT INTERFACE INSTRUCTIONS:
|
||||||
|
|||||||
@@ -3197,6 +3197,9 @@ status VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
|||||||
chat_creator VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
chat_creator VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
group_id VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
group_id VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
lead_id INT(9) UNSIGNED DEFAULT NULL,
|
lead_id INT(9) UNSIGNED DEFAULT NULL,
|
||||||
|
transferring_agent VARCHAR(20),
|
||||||
|
user_direct VARCHAR(20),
|
||||||
|
user_direct_group_id VARCHAR(20),
|
||||||
PRIMARY KEY (chat_id),
|
PRIMARY KEY (chat_id),
|
||||||
KEY vicidial_chat_archive_lead_id_key (lead_id),
|
KEY vicidial_chat_archive_lead_id_key (lead_id),
|
||||||
KEY vicidial_chat_archive_start_time_key (chat_start_time)
|
KEY vicidial_chat_archive_start_time_key (chat_start_time)
|
||||||
@@ -3245,6 +3248,9 @@ status VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
|||||||
chat_creator VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
chat_creator VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
group_id VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
group_id VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
lead_id INT(9) UNSIGNED DEFAULT NULL,
|
lead_id INT(9) UNSIGNED DEFAULT NULL,
|
||||||
|
transferring_agent VARCHAR(20),
|
||||||
|
user_direct VARCHAR(20),
|
||||||
|
user_direct_group_id VARCHAR(20),
|
||||||
PRIMARY KEY (chat_id),
|
PRIMARY KEY (chat_id),
|
||||||
KEY vicidial_live_chats_lead_id_key (lead_id),
|
KEY vicidial_live_chats_lead_id_key (lead_id),
|
||||||
KEY vicidial_live_chats_start_time_key (chat_start_time)
|
KEY vicidial_live_chats_start_time_key (chat_start_time)
|
||||||
@@ -3494,6 +3500,7 @@ INSERT INTO vicidial_music_on_hold SET moh_id='default',moh_name='Default Music
|
|||||||
INSERT INTO vicidial_music_on_hold_files SET moh_id='default',filename='conf',rank='1';
|
INSERT INTO vicidial_music_on_hold_files SET moh_id='default',filename='conf',rank='1';
|
||||||
|
|
||||||
INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,queue_priority) values('AGENTDIRECT','Single Agent Direct Queue','white','Y','99');
|
INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,queue_priority) values('AGENTDIRECT','Single Agent Direct Queue','white','Y','99');
|
||||||
|
INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,hold_time_option_no_block,hold_time_option_prompt_seconds,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,group_calldate,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number) VALUES ('AGENTDIRECT_CHAT','Agent Direct Queue for Chats','#FFFFFF','Y','','','longest_wait_time','Y','','',NULL,NULL,NULL,NULL,360,'MESSAGE','8307','24hours','MESSAGE','vm-goodbye','8300',NULL,'---NONE---','default','generic_hold',60,'ding',1000,'---NONE---',99,'---NONE---','DISABLED','NONE','---NONE---','N',NULL,'24HRMIDNIGHT','NONE','Y',NULL,NULL,'N','N','NONE',360,'8300','','---NONE---','vm-hangup',0,'---NONE---','N','ALWAYS',20,30,'','N','MESSAGE','nbdy-avail-to-take-call|vm-goodbye','','NONE','',-1,'','','','','','N','N','DISABLED','',0,'to-be-called-back|digits/1','','N',10,'N',10,'NONE','NONE','WAIT','NONE','NONE','NONE',120,'8300','','---NONE---','','vm-hangup',999,'to-be-called-back|digits/1','N',10,'',0,'','','N',10,15,'','GENERIC',NULL,'CUSTOMER','','','---ALL---','DISABLED',0,'DROP','','CHAT','','ENABLED','N','N','N','N','N','','N','');
|
||||||
|
|
||||||
INSERT INTO vicidial_lists SET list_id='999',list_name='Default inbound list',campaign_id='TESTCAMP',active='N';
|
INSERT INTO vicidial_lists SET list_id='999',list_name='Default inbound list',campaign_id='TESTCAMP',active='N';
|
||||||
INSERT INTO vicidial_lists SET list_id='998',list_name='Default Manual list',campaign_id='TESTCAMP',active='N';
|
INSERT INTO vicidial_lists SET list_id='998',list_name='Default Manual list',campaign_id='TESTCAMP',active='N';
|
||||||
@@ -3713,4 +3720,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
|
|||||||
|
|
||||||
UPDATE system_settings set vdc_agent_api_active='1';
|
UPDATE system_settings set vdc_agent_api_active='1';
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1452',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
UPDATE system_settings SET db_schema_version='1453',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||||
|
|||||||
@@ -512,3 +512,15 @@ UPDATE system_settings SET db_schema_version='1451',db_schema_update_date=NOW()
|
|||||||
ALTER TABLE system_settings ADD report_default_format ENUM('TEXT', 'HTML') default 'TEXT';
|
ALTER TABLE system_settings ADD report_default_format ENUM('TEXT', 'HTML') default 'TEXT';
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1452',db_schema_update_date=NOW() where db_schema_version < 1452;
|
UPDATE system_settings SET db_schema_version='1452',db_schema_update_date=NOW() where db_schema_version < 1452;
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_live_chats ADD transferring_agent VARCHAR(20);
|
||||||
|
ALTER TABLE vicidial_live_chats ADD user_direct VARCHAR(20);
|
||||||
|
ALTER TABLE vicidial_live_chats ADD user_direct_group_id VARCHAR(20);
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_chat_archive ADD transferring_agent VARCHAR(20);
|
||||||
|
ALTER TABLE vicidial_chat_archive ADD user_direct VARCHAR(20);
|
||||||
|
ALTER TABLE vicidial_chat_archive ADD user_direct_group_id VARCHAR(20);
|
||||||
|
|
||||||
|
INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,hold_time_option_no_block,hold_time_option_prompt_seconds,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,group_calldate,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number) VALUES ('AGENTDIRECT_CHAT','Agent Direct Queue for Chats','#FFFFFF','Y','','','longest_wait_time','Y','','',NULL,NULL,NULL,NULL,360,'MESSAGE','8307','24hours','MESSAGE','vm-goodbye','8300',NULL,'---NONE---','default','generic_hold',60,'ding',1000,'---NONE---',99,'---NONE---','DISABLED','NONE','---NONE---','N',NULL,'24HRMIDNIGHT','NONE','Y',NULL,NULL,'N','N','NONE',360,'8300','','---NONE---','vm-hangup',0,'---NONE---','N','ALWAYS',20,30,'','N','MESSAGE','nbdy-avail-to-take-call|vm-goodbye','','NONE','',-1,'','','','','','N','N','DISABLED','',0,'to-be-called-back|digits/1','','N',10,'N',10,'NONE','NONE','WAIT','NONE','NONE','NONE',120,'8300','','---NONE---','','vm-hangup',999,'to-be-called-back|digits/1','N',10,'',0,'','','N',10,15,'','GENERIC',NULL,'CUSTOMER','','','---ALL---','DISABLED',0,'DROP','','CHAT','','ENABLED','N','N','N','N','N','','N','');
|
||||||
|
|
||||||
|
UPDATE system_settings SET db_schema_version='1453',db_schema_update_date=NOW() where db_schema_version < 1453;
|
||||||
|
|||||||
@@ -2421,7 +2421,7 @@ print conf "# 5 - AST_VDadapt (If multi-server system, this must only be on one
|
|||||||
print conf "# 6 - FastAGI_log\n";
|
print conf "# 6 - FastAGI_log\n";
|
||||||
print conf "# 7 - AST_VDauto_dial_FILL (only for multi-server, this must only be on one server)\n";
|
print conf "# 7 - AST_VDauto_dial_FILL (only for multi-server, this must only be on one server)\n";
|
||||||
print conf "# 8 - ip_relay (used for blind agent monitoring)\n";
|
print conf "# 8 - ip_relay (used for blind agent monitoring)\n";
|
||||||
print conf "# 9 - Timeclock auto logout\n";
|
print conf "# 9 - Timeclock auto logout, (If multi-server system, this must only be on one server)\n";
|
||||||
print conf "# E - Email processor, (If multi-server system, this must only be on one server)\n";
|
print conf "# E - Email processor, (If multi-server system, this must only be on one server)\n";
|
||||||
print conf "VARactive_keepalives => $VARactive_keepalives\n";
|
print conf "VARactive_keepalives => $VARactive_keepalives\n";
|
||||||
print conf "\n";
|
print conf "\n";
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
# 151231-0841 - Added agent_allowed_chat_groups setting
|
# 151231-0841 - Added agent_allowed_chat_groups setting
|
||||||
# 160107-2318 - Bug fix for agent ending chat with manager
|
# 160107-2318 - Bug fix for agent ending chat with manager
|
||||||
# 160108-2300 - Changed some mysqli_query to mysql_to_mysqli for consistency
|
# 160108-2300 - Changed some mysqli_query to mysql_to_mysqli for consistency
|
||||||
|
# 160303-0051 - Added code for chat transfers
|
||||||
#
|
#
|
||||||
|
|
||||||
require("dbconnect_mysqli.php");
|
require("dbconnect_mysqli.php");
|
||||||
@@ -79,6 +80,10 @@ if (isset($_GET["manager_message"])) {$manager_message=$_GET["manager_messag
|
|||||||
elseif (isset($_POST["manager_message"])) {$manager_message=$_POST["manager_message"];}
|
elseif (isset($_POST["manager_message"])) {$manager_message=$_POST["manager_message"];}
|
||||||
if (isset($_GET["ChatReloadIDNumber"])) {$ChatReloadIDNumber=$_GET["ChatReloadIDNumber"];}
|
if (isset($_GET["ChatReloadIDNumber"])) {$ChatReloadIDNumber=$_GET["ChatReloadIDNumber"];}
|
||||||
elseif (isset($_POST["ChatReloadIDNumber"])) {$ChatReloadIDNumber=$_POST["ChatReloadIDNumber"];}
|
elseif (isset($_POST["ChatReloadIDNumber"])) {$ChatReloadIDNumber=$_POST["ChatReloadIDNumber"];}
|
||||||
|
if (isset($_GET["chat_xfer_type"])) {$chat_xfer_type=$_GET["chat_xfer_type"];}
|
||||||
|
elseif (isset($_POST["chat_xfer_type"])) {$chat_xfer_type=$_POST["chat_xfer_type"];}
|
||||||
|
if (isset($_GET["chat_xfer_value"])) {$chat_xfer_value=$_GET["chat_xfer_value"];}
|
||||||
|
elseif (isset($_POST["chat_xfer_value"])) {$chat_xfer_value=$_POST["chat_xfer_value"];}
|
||||||
|
|
||||||
$chat_member_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/',"",$chat_member_name);
|
$chat_member_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/',"",$chat_member_name);
|
||||||
if (!$user) {echo "No user, no using."; exit;}
|
if (!$user) {echo "No user, no using."; exit;}
|
||||||
@@ -549,6 +554,91 @@ if ($action=="agent_send_message" && $chat_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action=="xfer_chat" && $user && $chat_id && $chat_xfer_value && $chat_xfer_type) {
|
||||||
|
$stmt="select group_id from vicidial_live_chats where chat_id='$chat_id'";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
if (mysqli_num_rows($rslt)==0) {
|
||||||
|
echo "ERROR";
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$group_id=$row[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($chat_xfer_type=="group") {
|
||||||
|
$upd_stmt="update vicidial_live_chats set group_id='$chat_xfer_value', status='WAITING', chat_creator='NONE', transferring_agent='$user' where chat_id='$chat_id'";
|
||||||
|
$upd_rslt=mysql_to_mysqli($upd_stmt, $link);
|
||||||
|
} else {
|
||||||
|
$upd_stmt="update vicidial_live_chats set group_id='AGENTDIRECT_CHAT', user_direct='$chat_xfer_value', user_direct_group_id='$group_id', status='WAITING', transferring_agent='$user' where chat_id='$chat_id'";
|
||||||
|
$upd_rslt=mysql_to_mysqli($upd_stmt, $link);
|
||||||
|
}
|
||||||
|
echo mysqli_affected_rows($link)."|";
|
||||||
|
|
||||||
|
if (mysqli_affected_rows($link)==1) {
|
||||||
|
$log_upd_stmt="insert into vicidial_chat_log(chat_id, message, message_time, poster, chat_member_name, chat_level) VALUES('$chat_id', 'Chat transferred to ".strtoupper($chat_xfer_type)." ".strtoupper($chat_xfer_value)."', now(), '$user', '".mysqli_real_escape_string($link, $chat_member_name)."', '1')";
|
||||||
|
$log_upd_rslt=mysql_to_mysqli($log_upd_stmt, $link);
|
||||||
|
|
||||||
|
$upd_stmt="UPDATE vicidial_live_agents set status='PAUSED',comments='',external_hangup=0,external_status='',external_pause='',external_dial='',last_state_change='$NOW_TIME',pause_code='' where user='$user' and server_ip='$server_ip' and status='INCALL' and comments='CHAT'";
|
||||||
|
$upd_rslt=mysql_to_mysqli($upd_stmt, $link);
|
||||||
|
|
||||||
|
$del_stmt="delete from vicidial_chat_participants where chat_member='$user' and chat_id='$chat_id'";
|
||||||
|
$del_rslt=mysql_to_mysqli($del_stmt, $link);
|
||||||
|
|
||||||
|
$vla_stmt="select closer_campaigns from vicidial_live_agents where user='$user'";
|
||||||
|
$vla_rslt=mysql_to_mysqli($vla_stmt, $link);
|
||||||
|
echo "<BR/><BR/><input class='green_btn' type='button' style=\"width:150px\" value=\""._QXZ("START CHAT")."\" onClick=\"StartChat()\">";
|
||||||
|
echo "<BR/><BR/><select name='startchat_group_id' id='startchat_group_id' class='chat_window' onChange=\"document.getElementById('chat_group_id').value=this.value\">";
|
||||||
|
echo "<option value='' selected>--"._QXZ("SELECT A CHAT GROUP")."--</option>";
|
||||||
|
if (mysqli_num_rows($vla_rslt)>0) {
|
||||||
|
$vla_row=mysqli_fetch_row($vla_rslt);
|
||||||
|
$closer_campaigns=trim($vla_row[0]);
|
||||||
|
$closer_campaigns=preg_replace('/\s/', '\',\'', $closer_campaigns);
|
||||||
|
$closer_campaigns_SQL="'".$closer_campaigns."'";
|
||||||
|
|
||||||
|
$group_stmt="select group_id, group_name from vicidial_inbound_groups where group_handling='CHAT' and group_id in ($closer_campaigns_SQL) 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>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "</select>";
|
||||||
|
echo "|"; // DO NOT ECHO TOGGLE DIAL CONTROL HERE. WE DO NOT WANT THE AGENT'S PAUSE BUTTON REACTIVATED YET.
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
vicidial_live_chats
|
||||||
|
+---------+---------------------+--------+--------------+----------+---------+
|
||||||
|
| chat_id | chat_start_time | status | chat_creator | group_id | lead_id |
|
||||||
|
+---------+---------------------+--------+--------------+----------+---------+
|
||||||
|
| 516 | 2015-12-18 12:04:54 | LIVE | 6666 | MIKECHAT | 1079414 |
|
||||||
|
| 517 | 2015-12-18 12:13:48 | LIVE | 6666 | MIKECHAT | 1079414 |
|
||||||
|
| 510 | 2015-12-18 09:23:09 | LIVE | 6666 | MIKECHAT | 1079414 |
|
||||||
|
+---------+---------------------+--------+--------------+----------+---------+
|
||||||
|
|
||||||
|
vicidial_chat_participants
|
||||||
|
+---------------------+-----------------+------+-----+---------+----------------+
|
||||||
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
|
+---------------------+-----------------+------+-----+---------+----------------+
|
||||||
|
| chat_participant_id | int(9) unsigned | NO | PRI | NULL | auto_increment |
|
||||||
|
| chat_id | int(9) unsigned | YES | MUL | NULL | |
|
||||||
|
| chat_member | varchar(20) | YES | | NULL | |
|
||||||
|
| chat_member_name | varchar(100) | YES | | NULL | |
|
||||||
|
| ping_date | datetime | YES | | NULL | |
|
||||||
|
| vd_agent | enum('Y','N') | YES | | N | |
|
||||||
|
+---------------------+-----------------+------+-----+---------+----------------+
|
||||||
|
|
||||||
|
vicidial_chat_log
|
||||||
|
+----------------+---------+----------------------------+---------------------+--------+------------------+------------+
|
||||||
|
| message_row_id | chat_id | message | message_time | poster | chat_member_name | chat_level |
|
||||||
|
+----------------+---------+----------------------------+---------------------+--------+------------------+------------+
|
||||||
|
| 530 | 517 | Harold Smith has left chat | 2015-12-18 12:19:53 | 6666 | Admin | 1 |
|
||||||
|
| 529 | 516 | Harold Smith has left chat | 2015-12-18 12:06:09 | 6666 | Admin | 1 |
|
||||||
|
| 513 | 510 | Harold Smith has left chat | 2015-12-18 09:26:17 | 6666 | Admin | 1 |
|
||||||
|
+----------------+---------+----------------------------+---------------------+--------+------------------+------------+
|
||||||
|
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($action=="agent_leave_chat" && $user && $chat_id) {
|
if ($action=="agent_leave_chat" && $user && $chat_id) {
|
||||||
$del_stmt2="delete from vicidial_chat_participants where chat_id='$chat_id' and chat_member='$user'";
|
$del_stmt2="delete from vicidial_chat_participants where chat_id='$chat_id' and chat_member='$user'";
|
||||||
$del_rslt2=mysql_to_mysqli($del_stmt2, $link);
|
$del_rslt2=mysql_to_mysqli($del_stmt2, $link);
|
||||||
@@ -730,8 +820,107 @@ if ($action=="send_invite" && $chat_id && $email && $chat_group_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action=="load_xfer_options" && $user && $chat_group_id) {
|
||||||
|
$vla_stmt="select vla.campaign_id, vug.agent_allowed_chat_groups from vicidial_live_agents vla, vicidial_users vu, vicidial_user_groups vug where vla.user='$user' and vla.user=vu.user and vu.user_group=vug.user_group";
|
||||||
|
$vla_rslt=mysql_to_mysqli($vla_stmt, $link);
|
||||||
|
if (mysqli_num_rows($vla_rslt)>0) {
|
||||||
|
$vla_row=mysqli_fetch_row($vla_rslt);
|
||||||
|
$user_campaign_id=trim($vla_row[0]);
|
||||||
|
$allowed_chat_user_groups=trim($vla_row[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$xfer_group_stmt="select xfer_groups from vicidial_campaigns where campaign_id='$user_campaign_id'";
|
||||||
|
$xfer_group_rslt=mysql_to_mysqli($xfer_group_stmt, $link);
|
||||||
|
if (mysqli_num_rows($xfer_group_rslt)>0) {
|
||||||
|
$xfer_row=mysqli_fetch_row($xfer_group_rslt);
|
||||||
|
$xfer_groups=trim($xfer_row[0]);
|
||||||
|
$xfer_groups=preg_replace('/\s/', '\',\'', $xfer_groups);
|
||||||
|
$xfer_groups_SQL="'".$xfer_groups."'";
|
||||||
|
}
|
||||||
|
|
||||||
|
$chat_groups_array=array();
|
||||||
|
$chat_group_names_array=array();
|
||||||
|
$chat_agents_array=array();
|
||||||
|
$chat_agent_names_array=array();
|
||||||
|
|
||||||
|
$group_stmt="select group_id, group_name from vicidial_inbound_groups where group_handling='CHAT' and group_id in ($xfer_groups_SQL) order by group_name asc";
|
||||||
|
$group_rslt=mysql_to_mysqli($group_stmt, $link);
|
||||||
|
if (mysqli_num_rows($group_rslt)>0) {
|
||||||
|
while ($group_row=mysqli_fetch_row($group_rslt)) {
|
||||||
|
# echo "<option value='".$group_row[0]."'>".$group_row[1]."</option>";
|
||||||
|
array_push($chat_groups_array, $group_row[0]);
|
||||||
|
array_push($chat_group_names_array, $group_row[1]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
array_push($chat_groups_array, "");
|
||||||
|
array_push($chat_group_names_array, "** "._QXZ("NO AVAILABLE GROUPS")." **");
|
||||||
|
}
|
||||||
|
|
||||||
|
echo implode("|", $chat_groups_array)."\n".implode("|", $chat_group_names_array);
|
||||||
|
echo "\n";
|
||||||
|
|
||||||
|
$user_group_SQL="";
|
||||||
|
if (preg_match('/\-\-CAMPAIGN\-AGENTS\-\-/')) {
|
||||||
|
$user_group_SQL.="vla.campaign_id='$user_campaign_id' or ";
|
||||||
|
$allowed_chat_user_groups=trim(preg_replace('/\-\-CAMPAIGN\-AGENTS\-\-/', '', $allowed_chat_user_groups));
|
||||||
|
}
|
||||||
|
if (!preg_match('/\-\-ALL\-GROUPS\-\-/', $allowed_chat_user_groups)) {
|
||||||
|
$allowed_chat_user_groups=preg_replace('/\s/', '\',\'', $allowed_chat_user_groups);
|
||||||
|
$user_group_SQL.="vu.user_group in ('$allowed_chat_user_groups')";
|
||||||
|
} else {
|
||||||
|
$user_group_SQL.="vu.user_group not in ('')";
|
||||||
|
}
|
||||||
|
$user_group_SQL=preg_replace('/ or $/', '', $user_group_SQL);
|
||||||
|
if (strlen($user_group_SQL)>0) {
|
||||||
|
$available_agents_SQL="and ($user_group_SQL)";
|
||||||
|
} else {
|
||||||
|
$available_agents_SQL="";
|
||||||
|
}
|
||||||
|
|
||||||
|
$agent_stmt="select vu.user, full_name from vicidial_live_agents vla, vicidial_users vu, vicidial_campaigns vc where vla.user!='$user' and vla.user=vu.user and vla.campaign_id=vc.campaign_id and vc.allow_chats='Y' $available_agents_SQL order by full_name asc";
|
||||||
|
$agent_rslt=mysql_to_mysqli($agent_stmt, $link);
|
||||||
|
if (mysqli_num_rows($agent_rslt)>0) {
|
||||||
|
while ($agent_row=mysqli_fetch_row($agent_rslt)) {
|
||||||
|
# echo "<option value='".$agent_row[0]."'>".$agent_row[0]." - ".$agent_row[1]."</option>";
|
||||||
|
array_push($chat_agents_array, $agent_row[0]);
|
||||||
|
array_push($chat_agent_names_array, $agent_row[1]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
array_push($chat_agents_array, "");
|
||||||
|
array_push($chat_agent_names_array, "** "._QXZ("NO AVAILABLE AGENTS")." **");
|
||||||
|
}
|
||||||
|
|
||||||
|
echo implode("|", $chat_agents_array)."\n".implode("|", $chat_agent_names_array);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if ($action=="end_chat" && $chat_id && $chat_creator && $user && $server_ip) {
|
if ($action=="end_chat" && $chat_id && $chat_creator && $user && $server_ip) {
|
||||||
if ($user!=$chat_creator) {
|
# Check that chat is actually ending by the agent and not a transfer
|
||||||
|
if ($chat_creator=="XFER") {
|
||||||
|
echo "Leaving XFER|";
|
||||||
|
# At this point this should only be coming from the 'HANGUP CUSTOMER' button, so once that is clicked it is safe to make the 'START CHAT' available again.
|
||||||
|
$vla_stmt="select closer_campaigns from vicidial_live_agents where user='$user'";
|
||||||
|
$vla_rslt=mysql_to_mysqli($vla_stmt, $link);
|
||||||
|
echo "<BR/><BR/><input class='green_btn' type='button' style=\"width:150px\" value=\""._QXZ("START CHAT")."\" onClick=\"StartChat()\">";
|
||||||
|
echo "<BR/><BR/><select name='startchat_group_id' id='startchat_group_id' class='chat_window' onChange=\"document.getElementById('chat_group_id').value=this.value\">";
|
||||||
|
echo "<option value='' selected>--"._QXZ("SELECT A CHAT GROUP")."--</option>";
|
||||||
|
if (mysqli_num_rows($vla_rslt)>0) {
|
||||||
|
$vla_row=mysqli_fetch_row($vla_rslt);
|
||||||
|
$closer_campaigns=trim($vla_row[0]);
|
||||||
|
$closer_campaigns=preg_replace('/\s/', '\',\'', $closer_campaigns);
|
||||||
|
$closer_campaigns_SQL="'".$closer_campaigns."'";
|
||||||
|
|
||||||
|
$group_stmt="select group_id, group_name from vicidial_inbound_groups where group_handling='CHAT' and group_id in ($closer_campaigns_SQL) 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>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "</select>";
|
||||||
|
echo "|TOGGLE_DIAL_CONTROL";
|
||||||
|
|
||||||
|
exit;
|
||||||
|
} else if ($user!=$chat_creator) {
|
||||||
echo _QXZ("You cannot end this chat unless you are the one who started it.");
|
echo _QXZ("You cannot end this chat unless you are the one who started it.");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,10 +71,11 @@
|
|||||||
# 150904-2138 - Added SQL features for chats started via agent invite, modified output
|
# 150904-2138 - Added SQL features for chats started via agent invite, modified output
|
||||||
# 160104-1232 - Added proper detection of dead chats, disabled dead detection of emails
|
# 160104-1232 - Added proper detection of dead chats, disabled dead detection of emails
|
||||||
# 160227-1007 - Fixed XSS security issue, issue #929
|
# 160227-1007 - Fixed XSS security issue, issue #929
|
||||||
|
# 160303-2354 - Added code for chat transfers
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.12-46';
|
$version = '2.12-47';
|
||||||
$build = '160227-1007';
|
$build = '160303-2354';
|
||||||
$php_script = 'conf_exten_check.php';
|
$php_script = 'conf_exten_check.php';
|
||||||
$mel=1; # Mysql Error Log enabled = 1
|
$mel=1; # Mysql Error Log enabled = 1
|
||||||
$mysql_log_count=44;
|
$mysql_log_count=44;
|
||||||
@@ -396,7 +397,7 @@ if ($ACTION == 'refresh')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$chat_stmt="select count(*) from vicidial_live_chats where status='WAITING' and (group_id IN('$AccampSQL')) and chat_creator!='$user'";
|
$chat_stmt="select count(*) from vicidial_live_chats where status='WAITING' and ((group_id IN('$AccampSQL') and (transferring_agent is null or transferring_agent!='$user')) or (group_id='AGENTDIRECT_CHAT' and user_direct='$user')) and chat_creator!='$user'";
|
||||||
$chat_rslt=mysql_to_mysqli($chat_stmt, $link);
|
$chat_rslt=mysql_to_mysqli($chat_stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$chat_stmt,'03041',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$chat_stmt,'03041',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
$chat_row=mysqli_fetch_row($chat_rslt);
|
$chat_row=mysqli_fetch_row($chat_rslt);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
# vdc_chat_display.php
|
# vdc_chat_display.php
|
||||||
#
|
#
|
||||||
# Copyright (C) 2015 Joe Johnson, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2016 Joe Johnson, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# This is the interface for agents to chat with customers and each other. It's separate from the manager-to-agent
|
# This is the interface for agents to chat with customers and each other. It's separate from the manager-to-agent
|
||||||
# chat interface out of necessity and calls the chat_db_query.php page to send information and display it. It will
|
# chat interface out of necessity and calls the chat_db_query.php page to send information and display it. It will
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
# 150903-2349 - First build
|
# 150903-2349 - First build
|
||||||
# 151213-1107 - Added variable filtering
|
# 151213-1107 - Added variable filtering
|
||||||
# 151218-0913 - Added missing translation code and user auth
|
# 151218-0913 - Added missing translation code and user auth
|
||||||
|
# 160303-0051 - Added code for chat transfers
|
||||||
#
|
#
|
||||||
|
|
||||||
require("dbconnect_mysqli.php");
|
require("dbconnect_mysqli.php");
|
||||||
@@ -535,7 +536,7 @@ function EndChat(hangup_override) { // hangup_override comes from parent Iframe
|
|||||||
|
|
||||||
if (!chat_creator || !user || !chat_id) {
|
if (!chat_creator || !user || !chat_id) {
|
||||||
return false;
|
return false;
|
||||||
} else if (user!=chat_creator) {
|
} else if (user!=chat_creator && chat_creator!='XFER') {
|
||||||
chat_alert_box("<?php echo _QXZ("Only the chat creator can end the chat"); ?>");
|
chat_alert_box("<?php echo _QXZ("Only the chat creator can end the chat"); ?>");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -605,6 +606,158 @@ function ShowHideMembers(menuName, chat_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ToggleSpan(span_name) {
|
||||||
|
var span_vis = document.getElementById(span_name).style;
|
||||||
|
if (span_vis.display=='none') { span_vis.display = 'block'; } else { span_vis.display = 'none'; }
|
||||||
|
}
|
||||||
|
|
||||||
|
function LoadXferOptions() {
|
||||||
|
var chat_group_id=document.getElementById('chat_group_id').value;
|
||||||
|
var user=document.getElementById('user').value;
|
||||||
|
var pass=document.getElementById('pass').value;
|
||||||
|
|
||||||
|
// Clear select menus
|
||||||
|
var GroupOptions = document.getElementById("ChatXferGroups");
|
||||||
|
while (GroupOptions.length > 1) {
|
||||||
|
GroupOptions.remove(GroupOptions.length-1);
|
||||||
|
}
|
||||||
|
var AgentOptions = document.getElementById("ChatXferAgents");
|
||||||
|
while (AgentOptions.length > 1) {
|
||||||
|
AgentOptions.remove(AgentOptions.length-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
var xmlhttp=false;
|
||||||
|
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
|
||||||
|
{
|
||||||
|
xmlhttp = new XMLHttpRequest();
|
||||||
|
}
|
||||||
|
if (xmlhttp)
|
||||||
|
{
|
||||||
|
chat_query = "&action=load_xfer_options&user="+user+"&pass="+pass+"&lead_id="+lead_id+"&server_ip="+server_ip+"&chat_group_id="+chat_group_id;
|
||||||
|
xmlhttp.open('POST', 'chat_db_query.php');
|
||||||
|
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||||
|
xmlhttp.send(chat_query);
|
||||||
|
xmlhttp.onreadystatechange = function()
|
||||||
|
{
|
||||||
|
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
||||||
|
{
|
||||||
|
var xfer_options = xmlhttp.responseText;
|
||||||
|
if (xfer_options!="")
|
||||||
|
{
|
||||||
|
var xfer_options_array=xfer_options.split("\n");
|
||||||
|
var groups_array=xfer_options_array[0].split("|");
|
||||||
|
var group_names_array=xfer_options_array[1].split("|");
|
||||||
|
var agents_array=xfer_options_array[2].split("|");
|
||||||
|
var agent_names_array=xfer_options_array[3].split("|");
|
||||||
|
/*
|
||||||
|
var opt = document.createElement('option');
|
||||||
|
opt.value = "";
|
||||||
|
opt.innerHTML = "<?php echo _QXZ("-- Select a group to transfer to --"); ?>";
|
||||||
|
GroupOptions.appendChild(opt);
|
||||||
|
|
||||||
|
var opt = document.createElement('option');
|
||||||
|
opt.value = "";
|
||||||
|
opt.innerHTML = "<?php echo _QXZ("-- Select an agent to transfer to --"); ?>";
|
||||||
|
AgentOptions.appendChild(opt);
|
||||||
|
*/
|
||||||
|
for (var i = 0; i<groups_array.length; i++)
|
||||||
|
{
|
||||||
|
var opt = document.createElement('option');
|
||||||
|
opt.value = groups_array[i];
|
||||||
|
opt.innerHTML = group_names_array[i];
|
||||||
|
GroupOptions.appendChild(opt);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i<agents_array.length; i++)
|
||||||
|
{
|
||||||
|
var opt = document.createElement('option');
|
||||||
|
opt.value = agents_array[i];
|
||||||
|
opt.innerHTML = agent_names_array[i];
|
||||||
|
AgentOptions.appendChild(opt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function SendChatXferSpan(selGroup, selAgent) {
|
||||||
|
var chat_id=document.getElementById('chat_id').value;
|
||||||
|
var chat_member_name=encodeURIComponent(document.getElementById('chat_member_name').value.trim());
|
||||||
|
var user=document.getElementById('user').value;
|
||||||
|
var pass=document.getElementById('pass').value;
|
||||||
|
var server_ip=document.getElementById('server_ip').value;
|
||||||
|
|
||||||
|
if ((selGroup==0 && selAgent==0) || (selGroup>0 && selAgent>0))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (selGroup>0)
|
||||||
|
{
|
||||||
|
var chat_xfer_value=document.getElementById("ChatXferGroups").options[selGroup].value;
|
||||||
|
var chat_xfer_type="group";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var chat_xfer_value=document.getElementById("ChatXferAgents").options[selAgent].value;
|
||||||
|
var chat_xfer_type="agent";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var xmlhttp=false;
|
||||||
|
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
|
||||||
|
{
|
||||||
|
xmlhttp = new XMLHttpRequest();
|
||||||
|
}
|
||||||
|
if (xmlhttp)
|
||||||
|
{
|
||||||
|
chat_query = "&action=xfer_chat&chat_member_name="+chat_member_name+"&user="+user+"&pass="+pass+"&lead_id="+lead_id+"&chat_id="+chat_id+"&server_ip="+server_ip+"&chat_xfer_value="+chat_xfer_value+"&chat_xfer_type="+chat_xfer_type;
|
||||||
|
xmlhttp.open('POST', 'chat_db_query.php');
|
||||||
|
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||||
|
xmlhttp.send(chat_query);
|
||||||
|
xmlhttp.onreadystatechange = function()
|
||||||
|
{
|
||||||
|
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
||||||
|
{
|
||||||
|
var xfer_result_data = xmlhttp.responseText;
|
||||||
|
var xfer_result=xfer_result_data.split("|");
|
||||||
|
if (xfer_result[0]==0)
|
||||||
|
{
|
||||||
|
alert("<?php echo _QXZ("TRANSFER FAILED"); ?>");
|
||||||
|
}
|
||||||
|
else if (xfer_result[0]>1)
|
||||||
|
{
|
||||||
|
alert("<?php echo _QXZ("System error - multiple chats found"); ?>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById('chat_creator_console').innerHTML=''; // DO NOT MAKE ANY BUTTONS AVAILABLE AT THIS POINT FOR ENDING OR STARTING A CHAT!
|
||||||
|
document.getElementById('ChatConsoleSpan').style.display='none';
|
||||||
|
document.getElementById('XferConsoleSpan').style.display='none';
|
||||||
|
document.getElementById('chat_group_id').value='';
|
||||||
|
document.getElementById('chat_creator').value='XFER';
|
||||||
|
// IF AGENT NEVER INVITED SOMEONE, THERE'S NO LEAD ATTACHED AND IT'S SAFE FOR THEM TO JUST GO BACK TO BEING PAUSED WITHOUT HAVING TO DO ANYTHING ELSE.
|
||||||
|
// HOWEVER, SINCE WE DEACTIVATED THE PAUSE BUTTON FROM THE StartChat() FUNCTION WE NEED TO REACTIVATE IT IN PAUSED MODE.
|
||||||
|
if (xfer_result[2]=="TOGGLE_DIAL_CONTROL")
|
||||||
|
{
|
||||||
|
if (dial_method=="INBOUND_MAN")
|
||||||
|
{
|
||||||
|
window.parent.document.getElementById("DiaLControl").innerHTML = DiaLControl_inbound_manual_HTML;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
window.parent.document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UpdateChatWindow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
window.onbeforeunload = LeaveChat;
|
window.onbeforeunload = LeaveChat;
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
@@ -663,9 +816,10 @@ if($child_window) {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align='center'>
|
<td align='center'>
|
||||||
|
<span id="ChatConsoleSpan" name="ChatConsoleSpan" style="display: block;">
|
||||||
<table width='400' align='center' border='0' cellpadding='0' cellspacing='0'>
|
<table width='400' align='center' border='0' cellpadding='0' cellspacing='0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan='2' align='center'>
|
<td colspan='3' align='center'>
|
||||||
<textarea border='1' name='chat_message' id='chat_message' class='chat_window' cols='100' rows='4' onkeypress="if (event.keyCode==13 && !event.shiftKey) {SendMessage(this.form.chat_id.value, this.form.user.value, this.form.chat_message.value); return false;}"></textarea>
|
<textarea border='1' name='chat_message' id='chat_message' class='chat_window' cols='100' rows='4' onkeypress="if (event.keyCode==13 && !event.shiftKey) {SendMessage(this.form.chat_id.value, this.form.user.value, this.form.chat_message.value); return false;}"></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -679,6 +833,8 @@ if($child_window) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
<td align='right' class='chat_message' valign='top'><input class='red_btn' type='button' style="width:100px" value="<?php echo _QXZ("TRANSFER"); ?>" onClick="ToggleSpan('ChatConsoleSpan'); ToggleSpan('XferConsoleSpan'); LoadXferOptions();"><BR><BR>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan='2' align='center'>
|
<td colspan='2' align='center'>
|
||||||
@@ -688,6 +844,31 @@ if($child_window) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
</span>
|
||||||
|
<span id="XferConsoleSpan" name="XferConsoleSpan" style="display: none;">
|
||||||
|
<table width='450' align='center' border='0' cellpadding='3' cellspacing='0'>
|
||||||
|
<tr>
|
||||||
|
<td align='right' width='100' class='chat_message'><?php echo _QXZ("Chat group"); ?>:</td>
|
||||||
|
<td align='left' width='240'>
|
||||||
|
<select name='ChatXferGroups' id='ChatXferGroups' onChange="document.getElementById('ChatXferAgents').selectedIndex='0'" class='chat_window' style="width:240px">
|
||||||
|
<option value=''><?php echo _QXZ("-- Select a group to transfer to --"); ?></option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td align='center' valign='middle' rowspan='2' width='*'><input class='blue_btn' type='button' style="width:100px" value="<?php echo _QXZ("TRANSFER CHAT"); ?>" onClick="SendChatXferSpan(document.getElementById('ChatXferGroups').selectedIndex, document.getElementById('ChatXferAgents').selectedIndex)"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align='right' class='chat_message'><?php echo _QXZ("Agents"); ?>:</td>
|
||||||
|
<td align='left'>
|
||||||
|
<select name='ChatXferAgents' id='ChatXferAgents' onChange="document.getElementById('ChatXferGroups').selectedIndex='0'" class='chat_window' style="width:240px">
|
||||||
|
<option value=''><?php echo _QXZ("-- Select an agent to transfer to --"); ?></option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align='center' colspan='3'><BR><input class='red_btn' type='button' style="width:100px" value="<?php echo _QXZ("CANCEL"); ?>" onClick="ToggleSpan('ChatConsoleSpan'); ToggleSpan('XferConsoleSpan');"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td valign='middle' align='center' width='200' rowspan='2'>
|
<td valign='middle' align='center' width='200' rowspan='2'>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -400,10 +400,11 @@
|
|||||||
# 160108-2300 - Changed some mysqli_query to mysql_to_mysqli for consistency
|
# 160108-2300 - Changed some mysqli_query to mysql_to_mysqli for consistency
|
||||||
# 160109-0747 - Added manual_dial_hopper_check campaign setting
|
# 160109-0747 - Added manual_dial_hopper_check campaign setting
|
||||||
# 160120-2226 - Fixed issue where non-phone leads were not updating, and lead_info issue
|
# 160120-2226 - Fixed issue where non-phone leads were not updating, and lead_info issue
|
||||||
|
# 160303-0049 - Fixed issue with did script variables, added code for chat transfers
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.12-294';
|
$version = '2.12-295';
|
||||||
$build = '160120-2226';
|
$build = '160303-0049';
|
||||||
$php_script = 'vdc_db_query.php';
|
$php_script = 'vdc_db_query.php';
|
||||||
$mel=1; # Mysql Error Log enabled = 1
|
$mel=1; # Mysql Error Log enabled = 1
|
||||||
$mysql_log_count=654;
|
$mysql_log_count=654;
|
||||||
@@ -7325,7 +7326,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
$DID_pattern='';
|
$DID_pattern='';
|
||||||
$DID_description='';
|
$DID_description='';
|
||||||
|
|
||||||
$stmt = "SELECT did_id,extension from vicidial_did_log where uniqueid='$uniqueid' and caller_id_number='$phone_number' order by call_date desc limit 1;";
|
$stmt = "SELECT did_id,extension from vicidial_did_log where uniqueid='$uniqueid' and ( (caller_id_number='$phone_number') or (caller_id_number LIKE \"%$phone_number\") ) order by call_date desc limit 1;";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00337',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00337',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
@@ -7977,7 +7978,7 @@ if ($ACTION == 'VDADcheckINCOMINGother')
|
|||||||
$INclosecallid='';
|
$INclosecallid='';
|
||||||
$INxfercallid='';
|
$INxfercallid='';
|
||||||
$email_group_str='';
|
$email_group_str='';
|
||||||
$chat_group_str='';
|
$chat_group_str="";
|
||||||
$VLA_inOUT='NONE';
|
$VLA_inOUT='NONE';
|
||||||
$queue_seconds=0;
|
$queue_seconds=0;
|
||||||
|
|
||||||
@@ -8033,7 +8034,8 @@ if ($ACTION == 'VDADcheckINCOMINGother')
|
|||||||
### If no emails have been sent to agent, check for chats, this is the code section where the agent interface will grab the next available chat
|
### If no emails have been sent to agent, check for chats, this is the code section where the agent interface will grab the next available chat
|
||||||
if ($email_ct==0)
|
if ($email_ct==0)
|
||||||
{
|
{
|
||||||
$stmt="SELECT chat_id,UNIX_TIMESTAMP(chat_start_time),status,chat_creator,group_id,lead_id from vicidial_live_chats where status='WAITING' and group_id in ($chat_group_str) order by chat_id asc limit 1;";
|
# Chats don't have a priority setting, but we use it for the AGENTDIRECT_CHAT one (which has it set to 99 and is uneditable through the admin) so that is always the highest priority. Also ensures that agent does not transfer to self if transferring to the same ingroup (transferring_agent!=user clause)
|
||||||
|
$stmt="SELECT vlc.chat_id,UNIX_TIMESTAMP(vlc.chat_start_time),vlc.status,vlc.chat_creator,vlc.group_id,vlc.lead_id,vlc.user_direct_group_id,vig.queue_priority from vicidial_live_chats vlc, vicidial_inbound_groups vig where vlc.status='WAITING' and (vlc.group_id in ($chat_group_str) or (vlc.group_id='AGENTDIRECT_CHAT' and user_direct='$user')) and (transferring_agent is null or transferring_agent!='$user') order by queue_priority desc, chat_id asc limit 1;";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00638',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00638',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
@@ -8047,8 +8049,12 @@ if ($ACTION == 'VDADcheckINCOMINGother')
|
|||||||
$group_id = $chat_row[4];
|
$group_id = $chat_row[4];
|
||||||
$VDADchannel_group = $chat_row[4];
|
$VDADchannel_group = $chat_row[4];
|
||||||
$lead_id = $chat_row[5];
|
$lead_id = $chat_row[5];
|
||||||
|
$user_direct_group_id = $chat_row[6];
|
||||||
$uniqueid=date("U").".".rand(1, 9999);
|
$uniqueid=date("U").".".rand(1, 9999);
|
||||||
$upd_stmt="update vicidial_live_chats set status='LIVE', chat_creator='$user' where chat_id='$chat_id'";
|
# If this is a transfer directly to an agent, the group ID is 'AGENTDIRECT_CHAT', and we need to set this back to the group ID it was prior to coming over (maybe)
|
||||||
|
if ($group_id=="AGENTDIRECT_CHAT") {$upd_clause=", group_id='$user_direct_group_id'";} else {$upd_clause="";}
|
||||||
|
|
||||||
|
$upd_stmt="update vicidial_live_chats set status='LIVE', chat_creator='$user'$upd_clause where chat_id='$chat_id'";
|
||||||
$upd_rslt=mysql_to_mysqli($upd_stmt, $link);
|
$upd_rslt=mysql_to_mysqli($upd_stmt, $link);
|
||||||
$chat_ct=mysqli_affected_rows($link);
|
$chat_ct=mysqli_affected_rows($link);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
# 160108-1710 - Added available_agents variable
|
# 160108-1710 - Added available_agents variable
|
||||||
# 160120-1943 - Added show_email variable
|
# 160120-1943 - Added show_email variable
|
||||||
# 160203-1051 - Added display of chat message after ending it
|
# 160203-1051 - Added display of chat message after ending it
|
||||||
|
# 160303-0055 - Added code for chat transfers
|
||||||
#
|
#
|
||||||
|
|
||||||
require("dbconnect_mysqli.php");
|
require("dbconnect_mysqli.php");
|
||||||
@@ -165,11 +166,18 @@ if ($action=="leave_chat" && $user && $chat_id) {
|
|||||||
$upd_stmt="UPDATE vicidial_list set status='CDROP' where lead_id='$lead_id'";
|
$upd_stmt="UPDATE vicidial_list set status='CDROP' where lead_id='$lead_id'";
|
||||||
$upd_rslt=mysql_to_mysqli($upd_stmt, $link);
|
$upd_rslt=mysql_to_mysqli($upd_stmt, $link);
|
||||||
|
|
||||||
$ins_stmt="INSERT IGNORE INTO vicidial_chat_archive SELECT chat_id, chat_start_time, 'DROP', chat_creator, group_id, lead_id From vicidial_live_chats where chat_id='$chat_id'";
|
$ins_stmt="INSERT IGNORE INTO vicidial_chat_archive SELECT chat_id, chat_start_time, 'DROP', chat_creator, group_id, lead_id, transferring_agent, user_direct, user_direct_group_id From vicidial_live_chats where chat_id='$chat_id'";
|
||||||
$ins_rslt=mysql_to_mysqli($ins_stmt, $link);
|
$ins_rslt=mysql_to_mysqli($ins_stmt, $link);
|
||||||
|
|
||||||
$del_stmt="DELETE from vicidial_live_chats where chat_id='$chat_id'";
|
$del_stmt="DELETE from vicidial_live_chats where chat_id='$chat_id'";
|
||||||
$del_rslt=mysql_to_mysqli($del_stmt, $link);
|
$del_rslt=mysql_to_mysqli($del_stmt, $link);
|
||||||
|
|
||||||
|
# ARCHIVE CHAT IN CASE CUSTOMER IS LEAVING WHILE BEING TRANSFERRED
|
||||||
|
$archive_log_stmt="insert ignore into vicidial_chat_log_archive select * from vicidial_chat_log where chat_id='$chat_id'";
|
||||||
|
$archive_log_rslt=mysql_to_mysqli($archive_log_stmt, $link);
|
||||||
|
|
||||||
|
$del_log_stmt="delete from vicidial_chat_log where chat_id='$chat_id'";
|
||||||
|
$del_log_rslt=mysql_to_mysqli($del_log_stmt, $link);
|
||||||
} else {
|
} else {
|
||||||
# CHAT IS LIVE/AGENT NEEDS NOTIFICATION
|
# CHAT IS LIVE/AGENT NEEDS NOTIFICATION
|
||||||
$ins_alert_stmt="INSERT INTO vicidial_chat_log(poster, chat_member_name, message_time, message, chat_id, chat_level) SELECT '$chat_creator', full_name, now(), '$chat_member_name has left chat', '$chat_id', '1' from vicidial_users where user='$chat_creator'";
|
$ins_alert_stmt="INSERT INTO vicidial_chat_log(poster, chat_member_name, message_time, message, chat_id, chat_level) SELECT '$chat_creator', full_name, now(), '$chat_member_name has left chat', '$chat_id', '1' from vicidial_users where user='$chat_creator'";
|
||||||
@@ -180,7 +188,7 @@ if ($action=="leave_chat" && $user && $chat_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($action=="update_chat_window" && $chat_id) {
|
if ($action=="update_chat_window" && $chat_id) {
|
||||||
$status_stmt="SELECT status, chat_creator from vicidial_live_chats where chat_id='$chat_id'";
|
$status_stmt="SELECT status, chat_creator, transferring_agent from vicidial_live_chats where chat_id='$chat_id'";
|
||||||
$status_rslt=mysql_to_mysqli($status_stmt, $link);
|
$status_rslt=mysql_to_mysqli($status_stmt, $link);
|
||||||
if (mysqli_num_rows($status_rslt)==0) {
|
if (mysqli_num_rows($status_rslt)==0) {
|
||||||
# JCJ - comment out to display in Javascript function that calls this in parent page.
|
# JCJ - comment out to display in Javascript function that calls this in parent page.
|
||||||
@@ -217,8 +225,8 @@ if ($action=="update_chat_window" && $chat_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
## CHECK IF CHAT IS ACTIVE, IF SO GRAB DISTINCT USERS IN ORDER OF POST TO ASSIGN COLORS
|
## CHECK IF CHAT IS ACTIVE, IF SO GRAB DISTINCT USERS IN ORDER OF POST TO ASSIGN COLORS
|
||||||
if ($status_row[0]=="LIVE") {
|
if ($status_row[0]=="LIVE" || ($status_row[0]=="WAITING" && $status_row[2]!="")) {
|
||||||
$live_stmt="SELECT * from vicidial_live_chats vlc, vicidial_chat_participants vcp where vlc.chat_id='$chat_id' and status='LIVE' and vlc.chat_id=vcp.chat_id and vcp.chat_member='$user'";
|
$live_stmt="SELECT * from vicidial_live_chats vlc, vicidial_chat_participants vcp where vlc.chat_id='$chat_id' and (status='LIVE' or (status='WAITING' and transferring_agent is not null)) and vlc.chat_id=vcp.chat_id and vcp.chat_member='$user'";
|
||||||
$live_rslt=mysql_to_mysqli($live_stmt, $link);
|
$live_rslt=mysql_to_mysqli($live_stmt, $link);
|
||||||
if (mysqli_num_rows($live_rslt)>0) {
|
if (mysqli_num_rows($live_rslt)>0) {
|
||||||
echo "<font class='chat_title bold'>"._QXZ("Current chat").": $chat_id</font><BR/>\n";
|
echo "<font class='chat_title bold'>"._QXZ("Current chat").": $chat_id</font><BR/>\n";
|
||||||
@@ -246,6 +254,10 @@ if ($action=="update_chat_window" && $chat_id) {
|
|||||||
echo "<li><font color='$color_array[$chat_color_key]' class='chat_message bold'>$row[5]</font> <font class='chat_timestamp bold'>($row[3])</font> - <font class='chat_message ".$style_array[$row[6]]."'>$row[2]</font></li>\n";
|
echo "<li><font color='$color_array[$chat_color_key]' class='chat_message bold'>$row[5]</font> <font class='chat_timestamp bold'>($row[3])</font> - <font class='chat_message ".$style_array[$row[6]]."'>$row[2]</font></li>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($status_row[0]=="WAITING" && $status_row[2]!="") {
|
||||||
|
echo "<BR><font class='chat_message bold'>"._QXZ("Currently being transferred, waiting for agent...")."</font><BR/>\n";
|
||||||
|
}
|
||||||
|
|
||||||
## PLAY AUDIO FILE IF THERE ARE NEW MESSAGES
|
## PLAY AUDIO FILE IF THERE ARE NEW MESSAGES
|
||||||
$current_messages=mysqli_num_rows($rslt);
|
$current_messages=mysqli_num_rows($rslt);
|
||||||
echo "<input type='hidden' id='current_message_count' name='current_message_count' value='$current_messages'>\n";
|
echo "<input type='hidden' id='current_message_count' name='current_message_count' value='$current_messages'>\n";
|
||||||
|
|||||||
@@ -0,0 +1,704 @@
|
|||||||
|
<?php
|
||||||
|
# AST_API_log_report.php
|
||||||
|
#
|
||||||
|
# This report is for viewing the a report of API activity to the vicidial_api_log table
|
||||||
|
#
|
||||||
|
# Copyright (C) 2016 Joe Johnson, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
|
#
|
||||||
|
# CHANGES
|
||||||
|
#
|
||||||
|
# 160305-0842 - First build
|
||||||
|
#
|
||||||
|
|
||||||
|
$startMS = microtime();
|
||||||
|
|
||||||
|
require("dbconnect_mysqli.php");
|
||||||
|
require("functions.php");
|
||||||
|
|
||||||
|
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||||
|
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||||
|
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||||
|
|
||||||
|
if (isset($_GET["api_date_D"])) {$api_date_D=$_GET["api_date_D"];}
|
||||||
|
elseif (isset($_POST["api_date_D"])) {$api_date_D=$_POST["api_date_D"];}
|
||||||
|
if (isset($_GET["api_date_end_D"])) {$api_date_end_D=$_GET["api_date_end_D"];}
|
||||||
|
elseif (isset($_POST["api_date_end_D"])) {$api_date_end_D=$_POST["api_date_end_D"];}
|
||||||
|
if (isset($_GET["api_date_T"])) {$api_date_T=$_GET["api_date_T"];}
|
||||||
|
elseif (isset($_POST["api_date_T"])) {$api_date_T=$_POST["api_date_T"];}
|
||||||
|
if (isset($_GET["api_date_end_T"])) {$api_date_end_T=$_GET["api_date_end_T"];}
|
||||||
|
elseif (isset($_POST["api_date_end_T"])) {$api_date_end_T=$_POST["api_date_end_T"];}
|
||||||
|
if (isset($_GET["users"])) {$users=$_GET["users"];}
|
||||||
|
elseif (isset($_POST["users"])) {$users=$_POST["users"];}
|
||||||
|
if (isset($_GET["agent_users"])) {$agent_users=$_GET["agent_users"];}
|
||||||
|
elseif (isset($_POST["agent_users"])) {$agent_users=$_POST["agent_users"];}
|
||||||
|
if (isset($_GET["functions"])) {$functions=$_GET["functions"];}
|
||||||
|
elseif (isset($_POST["functions"])) {$functions=$_POST["functions"];}
|
||||||
|
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||||
|
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
|
||||||
|
if (isset($_GET["file_download"])) {$file_download=$_GET["file_download"];}
|
||||||
|
elseif (isset($_POST["file_download"])) {$file_download=$_POST["file_download"];}
|
||||||
|
if (isset($_GET["results"])) {$results=$_GET["results"];}
|
||||||
|
elseif (isset($_POST["results"])) {$results=$_POST["results"];}
|
||||||
|
if (isset($_GET["order_by"])) {$order_by=$_GET["order_by"];}
|
||||||
|
elseif (isset($_POST["order_by"])) {$order_by=$_POST["order_by"];}
|
||||||
|
if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_display_type"];}
|
||||||
|
elseif (isset($_POST["report_display_type"])) {$report_display_type=$_POST["report_display_type"];}
|
||||||
|
if (isset($_GET["search_archived_data"])) {$search_archived_data=$_GET["search_archived_data"];}
|
||||||
|
elseif (isset($_POST["search_archived_data"])) {$search_archived_data=$_POST["search_archived_data"];}
|
||||||
|
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
||||||
|
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||||
|
|
||||||
|
$report_name="API Log Report";
|
||||||
|
$NOW_DATE = date("Y-m-d");
|
||||||
|
if (!isset($api_date_D)) {$api_date_D=$NOW_DATE;}
|
||||||
|
if (!isset($api_date_end_D)) {$api_date_end_D=$NOW_DATE;}
|
||||||
|
if (!isset($api_date_T)) {$api_date_T="00:00:00";}
|
||||||
|
if (!isset($api_date_end_T)) {$api_date_end_T="23:59:59";}
|
||||||
|
if (!isset($order_by)) {$order_by="api_date";}
|
||||||
|
$api_date_from="$api_date_D $api_date_T";
|
||||||
|
$api_date_to="$api_date_end_D $api_date_end_T";
|
||||||
|
$CSV_text="\"API ACCESS LOG REPORT\"\n";
|
||||||
|
$CSV_text.="\"API DATE RANGE:\",\"$api_date_from to $api_date_to\"\n";
|
||||||
|
$ASCII_rpt_header="API DATE RANGE: $api_date_from to $api_date_to\n";
|
||||||
|
|
||||||
|
|
||||||
|
#if (!isset($recording_date_D)) {$recording_date_D=$NOW_DATE;}
|
||||||
|
#if (!isset($recording_date_end_D)) {$recording_date_end_D=$NOW_DATE;}
|
||||||
|
#if (!isset($recording_date_T)) {$recording_date_T="00:00:00";}
|
||||||
|
#if (!isset($recording_date_end_T)) {$recording_date_end_T="23:59:59";}
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||||
|
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method FROM system_settings;";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
if ($DB) {$HTML_text.="$stmt\n";}
|
||||||
|
if ($archive_tbl) {$agent_log_table="vicidial_api_log_archive";} else {$agent_log_table="vicidial_api_log";}
|
||||||
|
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||||
|
if ($qm_conf_ct > 0)
|
||||||
|
{
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$non_latin = $row[0];
|
||||||
|
$outbound_autodial_active = $row[1];
|
||||||
|
$slave_db_server = $row[2];
|
||||||
|
$reports_use_slave_db = $row[3];
|
||||||
|
$SSenable_languages = $row[4];
|
||||||
|
$SSlanguage_method = $row[5];
|
||||||
|
}
|
||||||
|
##### END SETTINGS LOOKUP #####
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
### ARCHIVED DATA CHECK CONFIGURATION
|
||||||
|
$archives_available="N";
|
||||||
|
$log_tables_array=array("vicidial_api_log");
|
||||||
|
for ($t=0; $t<count($log_tables_array); $t++)
|
||||||
|
{
|
||||||
|
$table_name=$log_tables_array[$t];
|
||||||
|
$archive_table_name=use_archive_table($table_name);
|
||||||
|
if ($archive_table_name!=$table_name) {$archives_available="Y";}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($search_archived_data)
|
||||||
|
{
|
||||||
|
$vicidial_api_log_table=use_archive_table("vicidial_api_log");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$vicidial_api_log_table="vicidial_api_log";
|
||||||
|
}
|
||||||
|
#############
|
||||||
|
|
||||||
|
if ($non_latin < 1)
|
||||||
|
{
|
||||||
|
$PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER);
|
||||||
|
$PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$PHP_AUTH_PW = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_PW);
|
||||||
|
$PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$sl_ct = mysqli_num_rows($rslt);
|
||||||
|
if ($sl_ct > 0)
|
||||||
|
{
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$VUselected_language = $row[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$auth=0;
|
||||||
|
$reports_auth=0;
|
||||||
|
$admin_auth=0;
|
||||||
|
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'REPORTS',1);
|
||||||
|
if ($auth_message == 'GOOD')
|
||||||
|
{$auth=1;}
|
||||||
|
|
||||||
|
if ($auth > 0)
|
||||||
|
{
|
||||||
|
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and view_reports='1';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$admin_auth=$row[0];
|
||||||
|
|
||||||
|
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports='1';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$reports_auth=$row[0];
|
||||||
|
|
||||||
|
if ($reports_auth < 1)
|
||||||
|
{
|
||||||
|
$VDdisplayMESSAGE = _QXZ("You are not allowed to view reports");
|
||||||
|
Header ("Content-type: text/html; charset=utf-8");
|
||||||
|
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ( ($reports_auth > 0) and ($admin_auth < 1) )
|
||||||
|
{
|
||||||
|
$ADD=999999;
|
||||||
|
$reports_only_user=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
|
||||||
|
if ($auth_message == 'LOCK')
|
||||||
|
{
|
||||||
|
$VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
|
||||||
|
Header ("Content-type: text/html; charset=utf-8");
|
||||||
|
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
|
||||||
|
Header("HTTP/1.0 401 Unauthorized");
|
||||||
|
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
##### BEGIN log visit to the vicidial_report_log table #####
|
||||||
|
$LOGip = getenv("REMOTE_ADDR");
|
||||||
|
$LOGbrowser = getenv("HTTP_USER_AGENT");
|
||||||
|
$LOGscript_name = getenv("SCRIPT_NAME");
|
||||||
|
$LOGserver_name = getenv("SERVER_NAME");
|
||||||
|
$LOGserver_port = getenv("SERVER_PORT");
|
||||||
|
$LOGrequest_uri = getenv("REQUEST_URI");
|
||||||
|
$LOGhttp_referer = getenv("HTTP_REFERER");
|
||||||
|
if (preg_match("/443/i",$LOGserver_port)) {$HTTPprotocol = 'https://';}
|
||||||
|
else {$HTTPprotocol = 'http://';}
|
||||||
|
if (($LOGserver_port == '80') or ($LOGserver_port == '443') ) {$LOGserver_port='';}
|
||||||
|
else {$LOGserver_port = ":$LOGserver_port";}
|
||||||
|
$LOGfull_url = "$HTTPprotocol$LOGserver_name$LOGserver_port$LOGrequest_uri";
|
||||||
|
|
||||||
|
$LOGhostname = php_uname('n');
|
||||||
|
if (strlen($LOGhostname)<1) {$LOGhostname='X';}
|
||||||
|
if (strlen($LOGserver_name)<1) {$LOGserver_name='X';}
|
||||||
|
|
||||||
|
$stmt="SELECT webserver_id FROM vicidial_webservers where webserver='$LOGserver_name' and hostname='$LOGhostname' LIMIT 1;";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$webserver_id_ct = mysqli_num_rows($rslt);
|
||||||
|
if ($webserver_id_ct > 0)
|
||||||
|
{
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$webserver_id = $row[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
##### insert webserver entry
|
||||||
|
$stmt="INSERT INTO vicidial_webservers (webserver,hostname) values('$LOGserver_name','$LOGhostname');";
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$affected_rows = mysqli_affected_rows($link);
|
||||||
|
$webserver_id = mysqli_insert_id($link);
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="INSERT INTO vicidial_report_log set event_date=NOW(), user='$PHP_AUTH_USER', ip_address='$LOGip', report_name='$report_name', browser='$LOGbrowser', referer='$LOGhttp_referer', notes='$LOGserver_name:$LOGserver_port $LOGscript_name |$group[0], $query_date, $end_date, $shift, $file_download, $report_display_type|', url='$LOGfull_url', webserver='$webserver_id';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$report_log_id = mysqli_insert_id($link);
|
||||||
|
##### END log visit to the vicidial_report_log table #####
|
||||||
|
|
||||||
|
if ( (strlen($slave_db_server)>5) and (preg_match("/$report_name/",$reports_use_slave_db)) )
|
||||||
|
{
|
||||||
|
mysqli_close($link);
|
||||||
|
$use_slave_server=1;
|
||||||
|
$db_source = 'S';
|
||||||
|
require("dbconnect_mysqli.php");
|
||||||
|
$HTML_text.="<!-- Using slave server $slave_db_server $db_source -->\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="SELECT user_group from vicidial_users where user='$PHP_AUTH_USER';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$LOGuser_group = $row[0];
|
||||||
|
|
||||||
|
$stmt="SELECT allowed_campaigns,allowed_reports,admin_viewable_groups,admin_viewable_call_times from vicidial_user_groups where user_group='$LOGuser_group';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$LOGallowed_campaigns = $row[0];
|
||||||
|
$LOGallowed_reports = $row[1];
|
||||||
|
$LOGadmin_viewable_groups = $row[2];
|
||||||
|
$LOGadmin_viewable_call_times = $row[3];
|
||||||
|
|
||||||
|
if ( (!preg_match("/$report_name/",$LOGallowed_reports)) and (!preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
|
||||||
|
{
|
||||||
|
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
|
||||||
|
Header("HTTP/1.0 401 Unauthorized");
|
||||||
|
echo _QXZ("You are not allowed to view this report").": |$PHP_AUTH_USER|$report_name|\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$LOGadmin_viewable_groupsSQL='';
|
||||||
|
$whereLOGadmin_viewable_groupsSQL='';
|
||||||
|
if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) )
|
||||||
|
{
|
||||||
|
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups);
|
||||||
|
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL);
|
||||||
|
$LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||||
|
$whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$i=0;
|
||||||
|
$users_string='|';
|
||||||
|
$users_ct = count($users);
|
||||||
|
while($i < $users_ct)
|
||||||
|
{
|
||||||
|
$users_string .= "$users[$i]|";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
$i=0;
|
||||||
|
$user_group_string='|';
|
||||||
|
$user_group_ct = count($user_group);
|
||||||
|
while($i < $users_ct)
|
||||||
|
{
|
||||||
|
$user_group_string .= "$user_group[$i]|";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="select user_group from vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$user_groups_to_print = mysqli_num_rows($rslt);
|
||||||
|
$i=0;
|
||||||
|
while ($i < $user_groups_to_print)
|
||||||
|
{
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$user_groups[$i] =$row[0];
|
||||||
|
# if (preg_match('/\-ALL/',$user_group_string)) {$user_group[$i]=$row[0];}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="select distinct user from vicidial_api_log where user!='' order by user";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$users_to_print = mysqli_num_rows($rslt);
|
||||||
|
$i=0;
|
||||||
|
while ($row=mysqli_fetch_row($rslt))
|
||||||
|
{
|
||||||
|
$user_list[$i]=$row[0];
|
||||||
|
$name_stmt="select full_name from vicidial_users where user='$row[0]'";
|
||||||
|
$name_rslt=mysql_to_mysqli($name_stmt, $link);
|
||||||
|
if (mysqli_num_rows($name_rslt)>0)
|
||||||
|
{
|
||||||
|
$name_row=mysqli_fetch_row($name_rslt);
|
||||||
|
$user_names[$i]=" - ".$name_row[0];
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
$stmt="select user, full_name from vicidial_users $whereLOGadmin_viewable_groupsSQL order by user";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$users_to_print = mysqli_num_rows($rslt);
|
||||||
|
$i=0;
|
||||||
|
while ($i < $users_to_print)
|
||||||
|
{
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$user_list[$i]=$row[0];
|
||||||
|
$user_names[$i]=$row[1];
|
||||||
|
$user_directory[$row[0]]=" - ".$row[1];
|
||||||
|
if ($all_users) {$user_list[$i]=$row[0];}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$i=0;
|
||||||
|
$user_string='|';
|
||||||
|
$user_ct = count($users);
|
||||||
|
while($i < $user_ct)
|
||||||
|
{
|
||||||
|
$user_string .= "$users[$i]|";
|
||||||
|
$userQS .= "&users[]=$users[$i]";
|
||||||
|
$user_SQL="and user in ('".implode("','", $users)."')";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( (preg_match('/\-\-ALL\-\-/',$user_string) ) or ($user_ct < 1) )
|
||||||
|
{$vu_user_SQL = ""; $vra_user_SQL = ""; $user_SQL="";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ASCII_rpt_header.="USERS: ".implode(", ", $users)."\n";
|
||||||
|
$CSV_text.="\"USERS:\",\"".implode(", ", $users)."\"\n";
|
||||||
|
$GRAPH_header.="<th class='column_header grey_graph_cell'>SELECTED USERS</th>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$i=0;
|
||||||
|
$agent_user_string='|';
|
||||||
|
$agent_user_ct = count($agent_users);
|
||||||
|
while($i < $agent_user_ct)
|
||||||
|
{
|
||||||
|
$agent_user_string .= "$agent_users[$i]|";
|
||||||
|
$agent_userQS .= "&agent_users[]=$agent_users[$i]";
|
||||||
|
$agent_user_SQL="and agent_user in ('".implode("','", $agent_users)."')";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( (preg_match('/\-\-ALL\-\-/',$agent_user_string) ) or ($agent_user_ct < 1) )
|
||||||
|
{$vu_agent_user_SQL = ""; $vra_agent_user_SQL = ""; $agent_user_SQL="";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ASCII_rpt_header.="AGENT USERS: ".implode(", ", $agent_users)."\n";
|
||||||
|
$CSV_text.="\"AGENT USERS:\",\"".implode(", ", $agent_users)."\"\n";
|
||||||
|
$GRAPH_header.="<th class='column_header grey_graph_cell'>SELECTED AGENTS</th>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$i=0;
|
||||||
|
$function_string='|';
|
||||||
|
$function_ct = count($functions);
|
||||||
|
while($i < $function_ct)
|
||||||
|
{
|
||||||
|
$function_string .= "$functions[$i]|";
|
||||||
|
$functionQS .= "&functions[]=$functions[$i]";
|
||||||
|
$function_SQL="and function in ('".implode("','", $functions)."')";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( (preg_match('/\-\-ALL\-\-/',$function_string) ) or ($function_ct < 1) )
|
||||||
|
{$vu_function_SQL = ""; $vra_function_SQL = ""; $function_SQL="";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ASCII_rpt_header.="FUNCTIONS: ".implode(", ", $functions)."\n";
|
||||||
|
$CSV_text.="\"FUNCTIONS:\",\"".implode(", ", $functions)."\"\n";
|
||||||
|
$GRAPH_header.="<th class='column_header grey_graph_cell'>SELECTED FUNCTIONS</th>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$i=0;
|
||||||
|
$result_string='|';
|
||||||
|
$result_ct = count($results);
|
||||||
|
while($i < $result_ct)
|
||||||
|
{
|
||||||
|
$result_string .= "$results[$i]|";
|
||||||
|
$resultQS .= "&results[]=$results[$i]";
|
||||||
|
$result_SQL="and result in ('".implode("','", $results)."')";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( (preg_match('/\-\-ALL\-\-/',$result_string) ) or ($result_ct < 1) )
|
||||||
|
{$vu_result_SQL = ""; $vra_result_SQL = ""; $result_SQL="";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ASCII_rpt_header.="RESULTS: ".implode(", ", $results)."\n";
|
||||||
|
$CSV_text.="\"RESULTS:\",\"".implode(", ", $results)."\"\n";
|
||||||
|
$GRAPH_header.="<th class='column_header grey_graph_cell'>SELECTED RESULTS</th>";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
$i=0;
|
||||||
|
$user_group_string='|';
|
||||||
|
$user_group_ct = count($user_group);
|
||||||
|
while($i < $user_group_ct)
|
||||||
|
{
|
||||||
|
$user_group_string .= "$user_group[$i]|";
|
||||||
|
$user_groupQS .= "&user_group[]=$user_group[$i]";
|
||||||
|
$user_group_SQL=" and user_group in ('".implode("','", $user_group)."') and vra.user=vu.user and ";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( (preg_match('/\-\-ALL\-\-/',$user_group_string) ) or ($user_group_ct < 1) )
|
||||||
|
{$user_group_SQL = "";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ASCII_rpt_header.=" User groups: ".implode(", ", $user_group)."\n";
|
||||||
|
$CSV_text.="\"User groups:\",\"".implode(", ", $user_group)."\"\n";
|
||||||
|
$GRAPH_header.="<th class='column_header grey_graph_cell'>SELECTED USER GROUPS</th>";
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
$stmt="select distinct user from $vicidial_api_log_table where user!='' order by user";
|
||||||
|
if ($DB) {echo "$stmt<BR>\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$users_array=array();
|
||||||
|
$user_names_array=array();
|
||||||
|
while ($row=mysqli_fetch_array($rslt)) {
|
||||||
|
array_push($users_array, $row["user"]);
|
||||||
|
array_push($user_names_array, $user_directory[$row["user"]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="select distinct function from $vicidial_api_log_table where function!='' order by function";
|
||||||
|
if ($DB) {echo "$stmt<BR>\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$functions_array=array();
|
||||||
|
while ($row=mysqli_fetch_array($rslt)) {
|
||||||
|
array_push($functions_array, $row["function"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="select distinct agent_user from $vicidial_api_log_table where agent_user!='' order by agent_user";
|
||||||
|
if ($DB) {echo "$stmt<BR>\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$agent_users_array=array();
|
||||||
|
$agent_user_names_array=array();
|
||||||
|
while ($row=mysqli_fetch_array($rslt)) {
|
||||||
|
array_push($agent_users_array, $row["agent_user"]);
|
||||||
|
array_push($agent_user_names_array, $user_directory[$row["agent_user"]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="select distinct result from $vicidial_api_log_table where result!='' order by result";
|
||||||
|
if ($DB) {echo "$stmt<BR>\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$results_array=array();
|
||||||
|
while ($row=mysqli_fetch_array($rslt)) {
|
||||||
|
array_push($results_array, $row["result"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($DB) {echo "$user_group_string|$user_group_ct|$user_groupQS|$i<BR>\n";}
|
||||||
|
|
||||||
|
$LINKbase = "$PHP_SELF?DB=$DB&api_date_D=$api_date_D&api_date_T=$api_date_T&api_date_end_D=$api_date_end_D&api_date_end_T=$api_date_end_T$resultQS$functionQS$agent_userQS$userQS&shift=$shift&DB=$DB&show_percentages=$show_percentages&SUBMIT=1";
|
||||||
|
|
||||||
|
$NWB = " <a href=\"javascript:openNewWindow('help.php?ADD=99999";
|
||||||
|
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||||
|
|
||||||
|
$HTML_head.="<HTML>\n";
|
||||||
|
$HTML_head.="<HEAD>\n";
|
||||||
|
$HTML_head.="<STYLE type=\"text/css\">\n";
|
||||||
|
$HTML_head.="<!--\n";
|
||||||
|
$HTML_head.=" .green {color: white; background-color: green}\n";
|
||||||
|
$HTML_head.=" .red {color: white; background-color: red}\n";
|
||||||
|
$HTML_head.=" .blue {color: white; background-color: blue}\n";
|
||||||
|
$HTML_head.=" .purple {color: white; background-color: purple}\n";
|
||||||
|
$HTML_head.="-->\n";
|
||||||
|
$HTML_head.=" </STYLE>\n";
|
||||||
|
|
||||||
|
|
||||||
|
$HTML_head.="<script language=\"JavaScript\" src=\"calendar_db.js\"></script>\n";
|
||||||
|
$HTML_head.="<link rel=\"stylesheet\" href=\"calendar.css\">\n";
|
||||||
|
$HTML_head.="<link rel=\"stylesheet\" href=\"horizontalbargraph.css\">\n";
|
||||||
|
$HTML_text.="<script language=\"JavaScript\">\n";
|
||||||
|
$HTML_text.="function ToggleSpan(spanID) {\n";
|
||||||
|
$HTML_text.=" if (document.getElementById(spanID).style.display == 'none') {\n";
|
||||||
|
$HTML_text.=" document.getElementById(spanID).style.display = 'block';\n";
|
||||||
|
$HTML_text.=" } else {\n";
|
||||||
|
$HTML_text.=" document.getElementById(spanID).style.display = 'none';\n";
|
||||||
|
$HTML_text.=" }\n";
|
||||||
|
$HTML_text.=" }\n";
|
||||||
|
$HTML_text.="</script>\n";
|
||||||
|
|
||||||
|
$HTML_head.="<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
|
||||||
|
$HTML_head.="<TITLE>"._QXZ("$report_name")."</TITLE></HEAD><BODY BGCOLOR=WHITE marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
||||||
|
|
||||||
|
$short_header=1;
|
||||||
|
|
||||||
|
# require("admin_header.php");
|
||||||
|
|
||||||
|
$HTML_text.="<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
|
||||||
|
|
||||||
|
$HTML_text.="<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>\n";
|
||||||
|
$HTML_text.="<TABLE CELLSPACING=3><TR><TD VALIGN=TOP> "._QXZ("Access date range").":<BR>";
|
||||||
|
$HTML_text.="<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
|
||||||
|
$HTML_text.="<INPUT TYPE=hidden NAME=api_date ID=api_date VALUE=\"$api_date\">\n";
|
||||||
|
$HTML_text.="<INPUT TYPE=hidden NAME=api_date_end ID=api_date_end VALUE=\"$api_date_end\">\n";
|
||||||
|
$HTML_text.="<INPUT TYPE=TEXT NAME=api_date_D SIZE=11 MAXLENGTH=10 VALUE=\"$api_date_D\">";
|
||||||
|
|
||||||
|
$HTML_text.="<script language=\"JavaScript\">\n";
|
||||||
|
$HTML_text.="var o_cal = new tcal ({\n";
|
||||||
|
$HTML_text.=" // form name\n";
|
||||||
|
$HTML_text.=" 'formname': 'vicidial_report',\n";
|
||||||
|
$HTML_text.=" // input name\n";
|
||||||
|
$HTML_text.=" 'controlname': 'api_date_D'\n";
|
||||||
|
$HTML_text.="});\n";
|
||||||
|
$HTML_text.="o_cal.a_tpl.yearscroll = false;\n";
|
||||||
|
$HTML_text.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
|
||||||
|
$HTML_text.="</script>\n";
|
||||||
|
$HTML_text.=" <INPUT TYPE=TEXT NAME=api_date_T SIZE=9 MAXLENGTH=8 VALUE=\"$api_date_T\">";
|
||||||
|
$HTML_text.="<BR> "._QXZ("to")." <BR><INPUT TYPE=TEXT NAME=api_date_end_D SIZE=11 MAXLENGTH=10 VALUE=\"$api_date_end_D\">";
|
||||||
|
$HTML_text.="<script language=\"JavaScript\">\n";
|
||||||
|
$HTML_text.="var o_cal = new tcal ({\n";
|
||||||
|
$HTML_text.=" // form name\n";
|
||||||
|
$HTML_text.=" 'formname': 'vicidial_report',\n";
|
||||||
|
$HTML_text.=" // input name\n";
|
||||||
|
$HTML_text.=" 'controlname': 'api_date_end_D'\n";
|
||||||
|
$HTML_text.="});\n";
|
||||||
|
$HTML_text.="o_cal.a_tpl.yearscroll = false;\n";
|
||||||
|
$HTML_text.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
|
||||||
|
$HTML_text.="</script>\n";
|
||||||
|
$HTML_text.=" <INPUT TYPE=TEXT NAME=api_date_end_T SIZE=9 MAXLENGTH=8 VALUE=\"$api_date_end_T\">";
|
||||||
|
$HTML_text.="</TD>";
|
||||||
|
|
||||||
|
$HTML_text.="<TD VALIGN=TOP>"._QXZ("Users").": <BR>";
|
||||||
|
$HTML_text.="<SELECT SIZE=5 NAME=users[] multiple>\n";
|
||||||
|
if (preg_match('/\-\-ALL\-\-/',$users_string))
|
||||||
|
{$HTML_text.="<option value=\"--ALL--\" selected>-- "._QXZ("ALL USERS")." --</option>\n";}
|
||||||
|
else
|
||||||
|
{$HTML_text.="<option value=\"--ALL--\">-- "._QXZ("ALL USERS")." --</option>\n";}
|
||||||
|
$o=0;
|
||||||
|
for ($o=0; $o<count($users_array); $o++)
|
||||||
|
{
|
||||||
|
if (preg_match("/$user_list[$o]\|/i",$users_string)) {$HTML_text.="<option selected value=\"$users_array[$o]\">$users_array[$o]$user_names_array[$o]</option>\n";}
|
||||||
|
else {$HTML_text.="<option value=\"$users_array[$o]\">$users_array[$o]$user_names_array[$o]</option>\n";}
|
||||||
|
}
|
||||||
|
$HTML_text.="</SELECT>\n";
|
||||||
|
$HTML_text.="</TD>\n";
|
||||||
|
|
||||||
|
$HTML_text.="<TD VALIGN=TOP>"._QXZ("Agent users").": <BR>";
|
||||||
|
$HTML_text.="<SELECT SIZE=5 NAME=agent_users[] multiple>\n";
|
||||||
|
if (preg_match('/\-\-ALL\-\-/',$agent_user_string))
|
||||||
|
{$HTML_text.="<option value=\"--ALL--\" selected>-- "._QXZ("ALL AGENTS")." --</option>\n";}
|
||||||
|
else
|
||||||
|
{$HTML_text.="<option value=\"--ALL--\">-- "._QXZ("ALL AGENTS")." --</option>\n";}
|
||||||
|
|
||||||
|
for ($o=0; $o<count($agent_users_array); $o++)
|
||||||
|
{
|
||||||
|
if (preg_match("/$agent_users_array[$o]\|/i",$agent_user_string)) {$HTML_text.="<option selected value=\"$agent_users_array[$o]\">$agent_users_array[$o]$agent_user_names_array[$o]</option>\n";}
|
||||||
|
else {$HTML_text.="<option value=\"$agent_users_array[$o]\">$agent_users_array[$o]$agent_user_names_array[$o]</option>\n";}
|
||||||
|
}
|
||||||
|
$HTML_text.="</SELECT>\n";
|
||||||
|
$HTML_text.="</TD>\n";
|
||||||
|
|
||||||
|
$HTML_text.="<TD VALIGN=TOP>"._QXZ("Functions").": <BR>";
|
||||||
|
$HTML_text.="<SELECT SIZE=5 NAME=functions[] multiple>\n";
|
||||||
|
if (preg_match('/\-\-ALL\-\-/',$function_string))
|
||||||
|
{$HTML_text.="<option value=\"--ALL--\" selected>-- "._QXZ("ALL FUNCTIONS")." --</option>\n";}
|
||||||
|
else
|
||||||
|
{$HTML_text.="<option value=\"--ALL--\">-- "._QXZ("ALL FUNCTIONS")." --</option>\n";}
|
||||||
|
for ($o=0; $o<count($functions_array); $o++)
|
||||||
|
{
|
||||||
|
if (preg_match("/$functions_array[$o]\|/i",$function_string)) {$HTML_text.="<option selected value=\"$functions_array[$o]\">$functions_array[$o]</option>\n";}
|
||||||
|
else {$HTML_text.="<option value=\"$functions_array[$o]\">$functions_array[$o]</option>\n";}
|
||||||
|
}
|
||||||
|
$HTML_text.="</SELECT>\n";
|
||||||
|
$HTML_text.="</TD>\n";
|
||||||
|
|
||||||
|
$HTML_text.="<TD VALIGN=TOP>"._QXZ("Results").": <BR>";
|
||||||
|
$HTML_text.="<SELECT SIZE=5 NAME=results[] multiple>\n";
|
||||||
|
if (preg_match('/\-\-ALL\-\-/',$result_string))
|
||||||
|
{$HTML_text.="<option value=\"--ALL--\" selected>-- "._QXZ("ALL RESULTS")." --</option>\n";}
|
||||||
|
else
|
||||||
|
{$HTML_text.="<option value=\"--ALL--\">-- "._QXZ("ALL RESULTS")." --</option>\n";}
|
||||||
|
$o=0;
|
||||||
|
for ($o=0; $o<count($results_array); $o++)
|
||||||
|
{
|
||||||
|
if (preg_match("/$results_array[$o]\|/i",$result_string)) {$HTML_text.="<option selected value=\"$results_array[$o]\">$results_array[$o]</option>\n";}
|
||||||
|
else {$HTML_text.="<option value=\"$results_array[$o]\">$results_array[$o]</option>\n";}
|
||||||
|
}
|
||||||
|
$HTML_text.="</SELECT>\n";
|
||||||
|
$HTML_text.="</TD>\n";
|
||||||
|
|
||||||
|
$HTML_text.="<TD VALIGN='TOP'><BR><BR>";
|
||||||
|
$HTML_text.="<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
||||||
|
if ($archives_available=="Y")
|
||||||
|
{
|
||||||
|
$HTML_text.="<BR><BR><input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."\n";
|
||||||
|
}
|
||||||
|
$HTML_text.="</TD>";
|
||||||
|
$HTML_text.="</TR></TABLE>";
|
||||||
|
$HTML_text.="</FORM>\n\n";
|
||||||
|
|
||||||
|
$HTML_text.="<PRE><FONT SIZE=2>\n";
|
||||||
|
|
||||||
|
if ($SUBMIT && $api_date_D && $api_date_T && $api_date_end_D && $api_date_end_T)
|
||||||
|
{
|
||||||
|
$stmt="select * from $vicidial_api_log_table where api_date>='$api_date_D $api_date_T' and api_date<='$api_date_end_D $api_date_end_T' $result_SQL $function_SQL $agent_user_SQL $user_SQL order by $order_by asc";
|
||||||
|
if ($DB) {print $stmt."\n";}
|
||||||
|
# print $stmt."\n";
|
||||||
|
|
||||||
|
$ASCII_border="+---------------------+--------------------------------+------------+----------------------+--------------------------------+------------+----------------------+----------+-----------+-----------+\n";
|
||||||
|
$HTML_text.=$ASCII_rpt_header;
|
||||||
|
$HTML_text.=sprintf("%110s", " ");
|
||||||
|
$HTML_text.="<a href=\"$PHP_SELF?api_date_D=$api_date_D&api_date_T=$api_date_T&api_date_end_D=$api_date_end_D&api_date_end_T=$api_date_end_T$resultQS$functionQS$agent_userQS$userQS&file_download=1&SUBMIT=$SUBMIT\">"._QXZ("DOWNLOAD")."</a>\n";
|
||||||
|
|
||||||
|
$HTML_text.=$ASCII_border;
|
||||||
|
$HTML_text.="| <a href='$LINKbase&order_by=api_date'>API DATE</a> | <a href='$LINKbase&order_by=user'>USER</a> | <a href='$LINKbase&order_by=api_script'>API SCRIPT</a> | <a href='$LINKbase&order_by=function'>FUNCTION</a> | <a href='$LINKbase&order_by=agent_user'>AGENT USER</a> | <a href='$LINKbase&order_by=result'>RESULT</a> | <a href='$LINKbase&order_by=source'>SOURCE</a> | <a href='$LINKbase&order_by=run_time'>RUN TIME</a> | <a href='$LINKbase&order_by=webserver'>WEBSERVER</a> | <a href='$LINKbase&order_by=api_url'>API URL</a> |\n";
|
||||||
|
$HTML_text.=$ASCII_border;
|
||||||
|
|
||||||
|
$CSV_text.="\n\"API DATE\",\"USER\",\"API SCRIPT\",\"FUNCTION\",\"AGENT USER\",\"VALUE\",\"RESULT\",\"RESULT REASON\",\"SOURCE\",\"DATA\",\"RUN TIME\",\"WEBSERVER\",\"API URL\"\n";
|
||||||
|
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
while ($row=mysqli_fetch_array($rslt))
|
||||||
|
{
|
||||||
|
$full_user=substr($row["user"].$user_directory[$row["user"]], 0, 30);
|
||||||
|
$full_agent_user=substr($row["agent_user"].$user_directory[$row["agent_user"]], 0, 30);
|
||||||
|
$HTML_text.="| ";
|
||||||
|
$HTML_text.=sprintf("%-19s", $row["api_date"])." | ";
|
||||||
|
$HTML_text.=sprintf("%-30s", $full_user)." | ";
|
||||||
|
$HTML_text.=sprintf("%-10s", $row["api_script"])." | ";
|
||||||
|
$HTML_text.=sprintf("%-20s", $row["function"])." | ";
|
||||||
|
$HTML_text.=sprintf("%-30s", $full_agent_user)." | ";
|
||||||
|
$HTML_text.=sprintf("%-10s", $row["result"])." | ";
|
||||||
|
$HTML_text.=sprintf("%-20s", $row["source"])." | ";
|
||||||
|
$HTML_text.=sprintf("%-8s", substr($row["run_time"],0,8))." | ";
|
||||||
|
$HTML_text.=sprintf("%-9s", $row["webserver"])." | ";
|
||||||
|
$HTML_text.=sprintf("%-9s", $row["api_url"])." |\n";
|
||||||
|
$CSV_text.="\"$row[api_date]\",\"$full_user\",\"$row[api_script]\",\"$row[function]\",\"$full_agent_user\",\"$row[value]\",\"$row[result]\",\"$row[result_reason]\",\"$row[source]\",\"$row[data]\",\"$row[run_time]\",\"$row[webserver]\",\"$row[api_url]\"\n";
|
||||||
|
}
|
||||||
|
$HTML_text.=$ASCII_border;
|
||||||
|
}
|
||||||
|
$HTML_text.="</FONT></PRE></BODY></HTML>";
|
||||||
|
|
||||||
|
|
||||||
|
if ($file_download == 0 || !$file_download)
|
||||||
|
{
|
||||||
|
echo $HTML_head;
|
||||||
|
require("admin_header.php");
|
||||||
|
echo $HTML_text;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$FILE_TIME = date("Ymd-His");
|
||||||
|
$CSVfilename = "AST_recording_access_log_report_$US$FILE_TIME.csv";
|
||||||
|
$CSV_text=preg_replace('/\n +,/', ',', $CSV_text);
|
||||||
|
$CSV_text=preg_replace('/ +\"/', '"', $CSV_text);
|
||||||
|
$CSV_text=preg_replace('/\" +/', '"', $CSV_text);
|
||||||
|
|
||||||
|
// We'll be outputting a TXT file
|
||||||
|
header('Content-type: application/octet-stream');
|
||||||
|
// It will be called LIST_101_20090209-121212.txt
|
||||||
|
header("Content-Disposition: attachment; filename=\"$CSVfilename\"");
|
||||||
|
header('Expires: 0');
|
||||||
|
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||||
|
header('Pragma: public');
|
||||||
|
ob_clean();
|
||||||
|
flush();
|
||||||
|
|
||||||
|
echo "$CSV_text";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($db_source == 'S')
|
||||||
|
{
|
||||||
|
mysqli_close($link);
|
||||||
|
$use_slave_server=0;
|
||||||
|
$db_source = 'M';
|
||||||
|
require("dbconnect_mysqli.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
$endMS = microtime();
|
||||||
|
$startMSary = explode(" ",$startMS);
|
||||||
|
$endMSary = explode(" ",$endMS);
|
||||||
|
$runS = ($endMSary[0] - $startMSary[0]);
|
||||||
|
$runM = ($endMSary[1] - $startMSary[1]);
|
||||||
|
$TOTALrun = ($runS + $runM);
|
||||||
|
|
||||||
|
$stmt="UPDATE vicidial_report_log set run_time='$TOTALrun' where report_log_id='$report_log_id';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -111,9 +111,9 @@ $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
|||||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||||
$QUERY_STRING = getenv("QUERY_STRING");
|
$QUERY_STRING = getenv("QUERY_STRING");
|
||||||
|
|
||||||
$Vreports = 'NONE, Real-Time Main Report, Real-Time Campaign Summary, Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Fronter - Closer Report, Lists Campaign Statuses Report, Lists Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report, Agent Time Detail, Agent Status Detail, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, Single Agent Daily Time, User Group Login Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report, Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Carrier Log Report, Campaign Debug, Asterisk Debug, Hangup Cause Report, Lists Pass Report, Called Counts List IDs Report, Agent Debug Log Report, Agent-Manager Chat Log, Recording Access Log Report';
|
$Vreports = 'NONE, Real-Time Main Report, Real-Time Campaign Summary, Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Fronter - Closer Report, Lists Campaign Statuses Report, Lists Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report, Agent Time Detail, Agent Status Detail, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, Single Agent Daily Time, User Group Login Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report, Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Carrier Log Report, Campaign Debug, Asterisk Debug, Hangup Cause Report, Lists Pass Report, Called Counts List IDs Report, Agent Debug Log Report, Agent-Manager Chat Log, Recording Access Log Report, API Log Report';
|
||||||
|
|
||||||
$UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary, Inbound Report, Inbound Report by DID, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound Email Report, Inbound Chat Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Fronter - Closer Report, Lists Campaign Statuses Report, Lists Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report, Agent Time Detail, Agent Status Detail, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, Single Agent Daily Time, User Group Login Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report, Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Custom Reports Links, CallCard Search, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Lists Pass Report, Called Counts List IDs Report, Front Page System Summary, Report Page Servers Summary, Admin Utilities Page, Agent Debug Log Report, Agent-Manager Chat Log, Recording Access Log Report';
|
$UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary, Inbound Report, Inbound Report by DID, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound Email Report, Inbound Chat Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Fronter - Closer Report, Lists Campaign Statuses Report, Lists Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report, Agent Time Detail, Agent Status Detail, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, Single Agent Daily Time, User Group Login Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report, Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Custom Reports Links, CallCard Search, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Lists Pass Report, Called Counts List IDs Report, Front Page System Summary, Report Page Servers Summary, Admin Utilities Page, Agent Debug Log Report, Agent-Manager Chat Log, Recording Access Log Report, API Log Report';
|
||||||
|
|
||||||
$Vtables = 'NONE,log_noanswer,did_agent_log,contact_information';
|
$Vtables = 'NONE,log_noanswer,did_agent_log,contact_information';
|
||||||
|
|
||||||
@@ -3705,12 +3705,13 @@ else
|
|||||||
# 160111-0626 - Fixed SQL issues with making changes, Issue #913
|
# 160111-0626 - Fixed SQL issues with making changes, Issue #913
|
||||||
# 160116-1439 - Added options/permissions for accessing recordings and logging the access time
|
# 160116-1439 - Added options/permissions for accessing recordings and logging the access time
|
||||||
# 160122-1401 - Added report_default_format system setting, added agent count per server on reports page
|
# 160122-1401 - Added report_default_format system setting, added agent count per server on reports page
|
||||||
|
# 160304-2348 - Added link to API log report
|
||||||
#
|
#
|
||||||
|
|
||||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
||||||
|
|
||||||
$admin_version = '2.12-538a';
|
$admin_version = '2.12-539a';
|
||||||
$build = '160122-1401';
|
$build = '160304-2348';
|
||||||
|
|
||||||
$STARTtime = date("U");
|
$STARTtime = date("U");
|
||||||
$SQLdate = date("Y-m-d H:i:s");
|
$SQLdate = date("Y-m-d H:i:s");
|
||||||
@@ -36348,6 +36349,7 @@ if ($ADD==999994)
|
|||||||
echo "<LI><a href=\"AST_usergroup_login_report.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("User Group Login Report")."</a></FONT>\n";
|
echo "<LI><a href=\"AST_usergroup_login_report.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("User Group Login Report")."</a></FONT>\n";
|
||||||
echo "<LI><a href=\"AST_agent_debug_log_report.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("Agent Debug Log Report")."</a></FONT>\n";
|
echo "<LI><a href=\"AST_agent_debug_log_report.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("Agent Debug Log Report")."</a></FONT>\n";
|
||||||
echo "<LI><a href=\"AST_chat_log_report.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("Agent-Manager Chat Log")."</a></FONT>\n";
|
echo "<LI><a href=\"AST_chat_log_report.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("Agent-Manager Chat Log")."</a></FONT>\n";
|
||||||
|
echo "<LI><a href=\"AST_API_log_report.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("API Log Report")."</a></FONT>\n";
|
||||||
echo "<LI><a href=\"AST_recording_log_report.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("Recording Access Log")."</a></FONT>\n";
|
echo "<LI><a href=\"AST_recording_log_report.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("Recording Access Log")."</a></FONT>\n";
|
||||||
echo "<LI><a href=\"admin.php?ADD=800000000000000\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("Admin Report Log Viewer")."</a></FONT>\n";
|
echo "<LI><a href=\"admin.php?ADD=800000000000000\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("Admin Report Log Viewer")."</a></FONT>\n";
|
||||||
echo "<BR><BR>\n";
|
echo "<BR><BR>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user