Added additional $VLforce_index flags in hopper loading script, for high-volume dialing systems
Fix for user-group, in-group and campaign allowed/permissions matching issues Added updated Greek translation file git-svn-id: svn://192.168.202.10@3065 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -375,6 +375,10 @@ OTHER CHANGES:
|
||||
manually enter in the phone number before a call is placed. Does not
|
||||
affect 3way calls or transfers.
|
||||
|
||||
105. Added alphabet letters translation to phone DTMF digits feature in Agent
|
||||
Screen. For example, Putting "SMITH" in the SendDTMF field would result
|
||||
in "76484" being sent over DTMF.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+4
-2
@@ -21,7 +21,7 @@
|
||||
# exten => _8320*.,1,AGI(VD_amd.agi,${EXTEN}-----YES)
|
||||
# exten => _8320*.,2,Hangup
|
||||
#
|
||||
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 60206-1434 - first build
|
||||
@@ -53,6 +53,7 @@
|
||||
# 180529-1707 - Fix for missing called_count value in vicidial_log insertions
|
||||
# 180919-1831 - Fix for logging issue
|
||||
# 180924-1557 - Added called_count as AMM wildcard
|
||||
# 190216-0813 - Fix for user-group, in-group and campaign allowed/permissions matching issues
|
||||
#
|
||||
|
||||
$script = 'VD_amd.agi';
|
||||
@@ -441,7 +442,8 @@ else
|
||||
{
|
||||
$sthA->finish();
|
||||
### Grab vmail forward message values from the database
|
||||
$stmtA = "SELECT am_message_exten,amd_send_to_vmx,waitforsilence_options,survey_recording,campaign_rec_filename,cpd_amd_action,amd_inbound_group,amd_callmenu,cpd_unknown_action,campaign_id,am_message_wildcards FROM vicidial_campaigns where closer_campaigns LIKE \"% $VD_campaign_id %\" order by campaign_id limit 1;";
|
||||
$SQL_group_id=$VD_campaign_id; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$stmtA = "SELECT am_message_exten,amd_send_to_vmx,waitforsilence_options,survey_recording,campaign_rec_filename,cpd_amd_action,amd_inbound_group,amd_callmenu,cpd_unknown_action,campaign_id,am_message_wildcards FROM vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" order by campaign_id limit 1;";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# ;inbound DID catch-all:
|
||||
#exten => _X.,1,AGI(agi-DID_route.agi)
|
||||
#
|
||||
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 81007-0324 - First Build
|
||||
@@ -44,6 +44,7 @@
|
||||
# 161102-1035 - Fixed QM partition problem
|
||||
# 170322-1708 - Added filter phone group entry BLANK for a blank CIDnumber
|
||||
# 170923-1355 - Added system filter feature, before any other actions
|
||||
# 190216-0814 - Fix for user-group, in-group and campaign settings matching issues
|
||||
#
|
||||
|
||||
|
||||
@@ -1154,7 +1155,8 @@ if ( ($no_agent_ingroup_redirect =~ /Y|NO_PAUSED|READY_ONLY/) && ($pre_filter_ma
|
||||
{$NPsql = "and status NOT IN('PAUSED')";}
|
||||
if ($no_agent_ingroup_redirect =~ /READY_ONLY/)
|
||||
{$NPsql = "and status IN('READY','CLOSER')";}
|
||||
$stmtA = "SELECT count(*) FROM vicidial_live_agents where closer_campaigns LIKE \"% $no_agent_ingroup_id %\" and last_update_time > '$BDtsSQLdate' $NPsql;";
|
||||
$SQL_group_id=$no_agent_ingroup_id; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$stmtA = "SELECT count(*) FROM vicidial_live_agents where closer_campaigns LIKE \"% $SQL_group_id %\" and last_update_time > '$BDtsSQLdate' $NPsql;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
|
||||
@@ -231,6 +231,7 @@
|
||||
# 180806-0809 - Added CID callback number validation and change features
|
||||
# 180926-2351 - Added _wait_time options for next_agent_call
|
||||
# 190121-1505 - Added RA_USER_PHONE On-Hook CID to solve last RINGAGENT issues
|
||||
# 190216-0812 - Fix for user-group, in-group and campaign allowed/permissions matching issues
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||
@@ -1459,7 +1460,8 @@ if (length($action_xfer_cid) > 4)
|
||||
{
|
||||
$CIDcampaign_cid='0000000000';
|
||||
### Grab ID values from the database
|
||||
$stmtA = "SELECT campaign_id,campaign_cid FROM vicidial_campaigns where closer_campaigns LIKE \"% $channel_group %\" and active='Y';";
|
||||
$SQL_group_id=$channel_group; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$stmtA = "SELECT campaign_id,campaign_cid FROM vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" and active='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -1835,7 +1837,8 @@ if ( ( ($no_agent_no_queue =~ /Y|NO_PAUSED|NO_READY/) || ($MCnanque_override > 0
|
||||
{$NCsql = "and status IN('READY','CLOSER')";}
|
||||
if ( ( ($channel_group =~ /AGENTDIRECT/i) || ($dial_ingroup_flag > 0) ) && (length($agent_only) > 1) )
|
||||
{$ADsql = "and user='$agent_only'";}
|
||||
$stmtA = "SELECT count(*) FROM vicidial_live_agents where closer_campaigns LIKE \"% $channel_group %\" $NPsql $ADsql $NCsql;";
|
||||
$SQL_group_id=$channel_group; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$stmtA = "SELECT count(*) FROM vicidial_live_agents where closer_campaigns LIKE \"% $SQL_group_id %\" $NPsql $ADsql $NCsql;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -2823,7 +2826,8 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
{
|
||||
$qp_groupWAIT .= "and ";
|
||||
}
|
||||
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $aryA[0] %\" ";
|
||||
$SQL_group_id=$aryA[0]; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $SQL_group_id %\" ";
|
||||
$dbc++;
|
||||
}
|
||||
|
||||
@@ -2841,7 +2845,8 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
{
|
||||
$qp_groupWAIT .= "and ";
|
||||
}
|
||||
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $aryA[0] %\" ";
|
||||
$SQL_group_id=$aryA[0]; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $SQL_group_id %\" ";
|
||||
$dbc++;
|
||||
$dbcQ++;
|
||||
}
|
||||
@@ -3005,7 +3010,8 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
{$sthArows=0;}
|
||||
else
|
||||
{
|
||||
$stmtA = "SELECT conf_exten,user,extension,server_ip,last_call_time,ra_user,campaign_id,on_hook_agent,on_hook_ring_time FROM vicidial_live_agents where status IN('CLOSER','READY') and lead_id<1 $ADUfindSQL and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' and vicidial_live_agents.user NOT IN($ring_no_answer_agents'') $qp_groupWAIT_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 1;";
|
||||
$SQL_group_id=$channel_group; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$stmtA = "SELECT conf_exten,user,extension,server_ip,last_call_time,ra_user,campaign_id,on_hook_agent,on_hook_ring_time FROM vicidial_live_agents where status IN('CLOSER','READY') and lead_id<1 $ADUfindSQL and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $SQL_group_id %\" and last_update_time > '$BDtsSQLdate' and vicidial_live_agents.user NOT IN($ring_no_answer_agents'') $qp_groupWAIT_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 1;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -3242,7 +3248,8 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
if ($CAMP_callorder =~ /ring_all$/i)
|
||||
{
|
||||
### gather all available agents phones information (don't call more than 50 phones at once)
|
||||
$stmtA = "SELECT conf_exten,user,extension,server_ip,ra_user,on_hook_ring_time from vicidial_live_agents where status IN('CLOSER','READY') and on_hook_agent='Y' and lead_id<1 $ADUfindSQL and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $qp_groupWAIT_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 50;";
|
||||
$SQL_group_id=$channel_group; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$stmtA = "SELECT conf_exten,user,extension,server_ip,ra_user,on_hook_ring_time from vicidial_live_agents where status IN('CLOSER','READY') and on_hook_agent='Y' and lead_id<1 $ADUfindSQL and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $SQL_group_id %\" and last_update_time > '$BDtsSQLdate' $qp_groupWAIT_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 50;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArowsAR=$sthA->rows;
|
||||
|
||||
+11
-6
@@ -6,7 +6,7 @@
|
||||
# adjusts the auto_dial_level for vicidial adaptive-predictive campaigns.
|
||||
# gather call stats for campaigns and in-groups
|
||||
#
|
||||
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGELOG
|
||||
# 60823-1302 - First build from AST_VDhopper.pl
|
||||
@@ -48,6 +48,7 @@
|
||||
# 171221-1049 - Added caching of inbound call stats
|
||||
# 180203-1728 - Added function to check for inbound callback queue calls to be placed
|
||||
# 180519-2303 - Added Waiting Call On/Off URL feature for in-groups
|
||||
# 190216-0809 - Fix for user-group, in-group and campaign allowed/permissions matching issues
|
||||
#
|
||||
|
||||
|
||||
@@ -877,7 +878,8 @@ while ($master_loop < $CLIloops)
|
||||
{
|
||||
$qp_groupWAIT .= "and ";
|
||||
}
|
||||
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $aryA[0] %\" ";
|
||||
$SQL_group_id=$aryA[0]; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $SQL_group_id %\" ";
|
||||
$dbc++;
|
||||
}
|
||||
|
||||
@@ -894,7 +896,8 @@ while ($master_loop < $CLIloops)
|
||||
{
|
||||
$qp_groupWAIT .= "and ";
|
||||
}
|
||||
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $aryA[0] %\" ";
|
||||
$SQL_group_id=$aryA[0]; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $SQL_group_id %\" ";
|
||||
$dbc++;
|
||||
$dbcQ++;
|
||||
}
|
||||
@@ -1068,7 +1071,8 @@ while ($master_loop < $CLIloops)
|
||||
else
|
||||
{
|
||||
$sthArowsFA=0;
|
||||
$stmtA = "SELECT conf_exten,user,extension,server_ip,last_call_time,ra_user,campaign_id,on_hook_agent,on_hook_ring_time FROM vicidial_live_agents where status IN('CLOSER','READY') and lead_id<1 $ADUfindSQL and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $ICBQgroup_id[$r] %\" and last_update_time > '$BDtsSQLdate' and user NOT IN($routed_user_list'') $qp_groupWAIT_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 1;";
|
||||
$SQL_group_id=$ICBQgroup_id[$r]; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$stmtA = "SELECT conf_exten,user,extension,server_ip,last_call_time,ra_user,campaign_id,on_hook_agent,on_hook_ring_time FROM vicidial_live_agents where status IN('CLOSER','READY') and lead_id<1 $ADUfindSQL and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $SQL_group_id %\" and last_update_time > '$BDtsSQLdate' and user NOT IN($routed_user_list'') $qp_groupWAIT_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 1;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArowsFA=$sthA->rows;
|
||||
@@ -4195,7 +4199,8 @@ sub calculate_drops_inbound
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT count(*) from vicidial_live_agents where closer_campaigns LIKE \"% $group_id[$p] %\" and last_update_time > '$VDL_one';";
|
||||
$SQL_group_id=$group_id[$p]; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$stmtA = "SELECT count(*) from vicidial_live_agents where closer_campaigns LIKE \"% $SQL_group_id %\" and last_update_time > '$VDL_one';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -4206,7 +4211,7 @@ sub calculate_drops_inbound
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT count(*) from vicidial_live_agents where closer_campaigns LIKE \"% $group_id[$p] %\" and last_update_time > '$VDL_one' and extension LIKE \"R/%\";";
|
||||
$stmtA = "SELECT count(*) from vicidial_live_agents where closer_campaigns LIKE \"% $SQL_group_id %\" and last_update_time > '$VDL_one' and extension LIKE \"R/%\";";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
|
||||
+6
-5
@@ -92,10 +92,11 @@
|
||||
# 180301-1453 - Fix to allow for commented(#) lines in filters
|
||||
# 180419-1109 - Fix for list mix to use call count limit on initial count, issue #1094
|
||||
# 180924-1734 - Added callback_dnc campaign option
|
||||
# 190213-1207 - Added additional $VLforce_index flags, for high-volume dialing systems
|
||||
#
|
||||
|
||||
# constants
|
||||
$build = '180924-1734';
|
||||
$build = '190213-1207';
|
||||
$DB=0; # Debug flag, set to 0 for no debug messages. Can be overriden with CLI --debug flag
|
||||
$US='__';
|
||||
$MT[0]='';
|
||||
@@ -2749,7 +2750,7 @@ foreach(@campaign_id)
|
||||
if ($hopper_vlc_dup_check[$i] =~ /Y/)
|
||||
{$vlc_dup_check_SQL = "and vendor_lead_code NOT IN($live_vlc$vlc_lists)";}
|
||||
|
||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list where $recycle_SQL[$i] and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $hopper_level[$i];";
|
||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where $recycle_SQL[$i] and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $hopper_level[$i];";
|
||||
if ($DBX) {print " |$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -2805,7 +2806,7 @@ foreach(@campaign_id)
|
||||
if ($hopper_vlc_dup_check[$i] =~ /Y/)
|
||||
{$vlc_dup_check_SQL = "and vendor_lead_code NOT IN($live_vlc$vlc_lists)";}
|
||||
|
||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $NEW_level;";
|
||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where called_since_last_reset='N' and status IN('NEW') and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $NEW_level;";
|
||||
if ($DBX) {print " |$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -2859,7 +2860,7 @@ foreach(@campaign_id)
|
||||
|
||||
if ($list_order_mix[$i] =~ /DISABLED/)
|
||||
{
|
||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list where called_since_last_reset='N' and status IN($STATUSsql[$i]) and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $OTHER_level;";
|
||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where called_since_last_reset='N' and status IN($STATUSsql[$i]) and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $OTHER_level;";
|
||||
if ($DBX) {print " |$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -2962,7 +2963,7 @@ foreach(@campaign_id)
|
||||
if ($hopper_vlc_dup_check[$i] =~ /Y/)
|
||||
{$vlc_dup_check_SQL = "and vendor_lead_code NOT IN($live_vlc$vlc_lists)";}
|
||||
|
||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list where called_since_last_reset='N' and ($list_mix_dialableSQL) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $LM_step_goal[$x];";
|
||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where called_since_last_reset='N' and ($list_mix_dialableSQL) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $LM_step_goal[$x];";
|
||||
if ($DBX) {print " |$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# default path to astguiclient configuration file:
|
||||
$PATHconf = '/etc/astguiclient.conf';
|
||||
|
||||
# Copyright (C) 2018 Joe Johnson, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Joe Johnson, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# VD_email_inbound.pl
|
||||
# This script is responsible for assigning transferred and new emails to
|
||||
@@ -24,6 +24,7 @@ $PATHconf = '/etc/astguiclient.conf';
|
||||
# changes:
|
||||
# 121214-2303 - First Build
|
||||
# 180610-1812 - Added code to not allow XFER emails to go to user who transferred
|
||||
# 190216-0810 - Fix for user-group, email-group and campaign allowed/permissions matching issues
|
||||
#
|
||||
|
||||
if ($ARGV[0]=~/--help/)
|
||||
@@ -324,7 +325,8 @@ sub AssignAgents()
|
||||
my $LOCKaffected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02158'; $MEL_aff_rows=$LOCKaffected_rows; &mysql_error_logging;
|
||||
|
||||
$stmtA = "SELECT user FROM vicidial_live_agents where status IN('CLOSER','READY') and lead_id<1 $ADUfindSQL and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $group_id %\" and last_update_time > '$BDtsSQLdate' and vicidial_live_agents.user NOT IN($ring_no_answer_agents) $qp_groupWAIT_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 1;";
|
||||
$SQL_group_id=$group_id; $SQL_group_id =~ s/_/\\_/gi;
|
||||
$stmtA = "SELECT user FROM vicidial_live_agents where status IN('CLOSER','READY') and lead_id<1 $ADUfindSQL and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $SQL_group_id %\" and last_update_time > '$BDtsSQLdate' and vicidial_live_agents.user NOT IN($ring_no_answer_agents) $qp_groupWAIT_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 1;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
if ($ARGV[0]=~/debug/i) {print $stmtA."\n";}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -466,10 +466,11 @@
|
||||
# 180926-2150 - Added translatable phrases, related to issue #1114
|
||||
# 181005-1744 - Added SYSTEM option for manual_dial_filter
|
||||
# 190106-1353 - Added manual_dial_validation feature
|
||||
# 190216-0805 - Fix for user-group, in-group and campaign allowed/permissions matching issues
|
||||
#
|
||||
|
||||
$version = '2.14-360';
|
||||
$build = '190106-1353';
|
||||
$version = '2.14-361';
|
||||
$build = '190216-0805';
|
||||
$php_script = 'vdc_db_query.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=787;
|
||||
@@ -15091,7 +15092,8 @@ if ($ACTION == 'AGENTSview')
|
||||
{
|
||||
if ($status == 'Y')
|
||||
{
|
||||
$AGENTviewSQL .= " and (vla.closer_campaigns LIKE \"% $group_name %\")";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group_name);
|
||||
$AGENTviewSQL .= " and (vla.closer_campaigns LIKE \"% $SQL_group_id %\")";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# shows the agents logged into vicidial and set to take calls from in-group
|
||||
#
|
||||
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 100320-2102 - First Build
|
||||
@@ -15,6 +15,7 @@
|
||||
# 141114-0658 - Finalized adding QXZ translation to all admin files
|
||||
# 141230-0045 - Added code for on-the-fly language translations display
|
||||
# 170409-1534 - Added IP List validation code
|
||||
# 190216-0806 - Fix for user-group, in-group and campaign allowed/permissions matching issues
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -254,7 +255,8 @@ else
|
||||
|
||||
echo "\n";
|
||||
|
||||
$stmt="select count(*) from vicidial_live_agents where closer_campaigns LIKE\"% " . mysqli_real_escape_string($link, $group) . " %\";";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group);
|
||||
$stmt="select count(*) from vicidial_live_agents where closer_campaigns LIKE\"% $SQL_group_id %\";";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
+45
-28
@@ -4467,12 +4467,13 @@ else
|
||||
# 181116-1133 - Fix for DID server IP de-assignment
|
||||
# 190108-0806 - Added manual_dial_validation system and campaign options, update date for 2019
|
||||
# 190121-2019 - Added RA_AGENT_PHONE on-hook agent option
|
||||
# 190207-2301 - Fix for user-group, in-group and campaign allowed/permissions matching issues
|
||||
#
|
||||
|
||||
# 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.14-697a';
|
||||
$build = '190121-2019';
|
||||
$admin_version = '2.14-698a';
|
||||
$build = '190207-2301';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -5643,7 +5644,7 @@ if ( ( (strlen($ADD)>4) and ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($AD
|
||||
$UGcampaign_ct = count($UGcampaigns);
|
||||
while ($p < $UGcampaign_ct)
|
||||
{
|
||||
if ($campaign_id_values[$o] == $UGcampaigns[$p])
|
||||
if ($campaign_id_values[$o] === $UGcampaigns[$p])
|
||||
{$RANK_camp_active++; $GRADE_camp_active++;}
|
||||
$p++;
|
||||
}
|
||||
@@ -5863,7 +5864,7 @@ if ( ( (strlen($ADD)>4) and ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($AD
|
||||
if (is_array($groups)) {$group_ct = count($groups);} else {$group_ct=0;}
|
||||
while ($p < $group_ct)
|
||||
{
|
||||
if ($group_id_values[$o] == $groups[$p])
|
||||
if ($group_id_values[$o] === $groups[$p])
|
||||
{
|
||||
$groups_list .= " CHECKED";
|
||||
$RANKgroups_list .= " CHECKED";
|
||||
@@ -5875,7 +5876,7 @@ if ( ( (strlen($ADD)>4) and ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($AD
|
||||
if (is_array($XFERgroups)) {$XFERgroup_ct = count($XFERgroups);} else {$XFERgroup_ct=0;}
|
||||
while ($p < $XFERgroup_ct)
|
||||
{
|
||||
if ($group_id_values[$o] == $XFERgroups[$p])
|
||||
if ($group_id_values[$o] === $XFERgroups[$p])
|
||||
{
|
||||
$XFERgroups_list .= " CHECKED";
|
||||
$XFERgroups_value .= " $group_id_values[$o]";
|
||||
@@ -6006,13 +6007,13 @@ if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($A
|
||||
$p=0;
|
||||
while ($p<1000)
|
||||
{
|
||||
if ( ($campaign_id_value == $campaigns[$p]) and (strlen($campaign_id_value) > 1) )
|
||||
if ( ($campaign_id_value === $campaigns[$p]) and (strlen($campaign_id_value) > 1) )
|
||||
{
|
||||
# echo "<!-- X $p|$campaign_id_value|$campaigns[$p]| -->";
|
||||
$campaigns_list .= " CHECKED";
|
||||
$campaigns_value .= " $campaign_id_value";
|
||||
}
|
||||
if ($campaign_id_value == $qc_campaigns[$p])
|
||||
if ($campaign_id_value === $qc_campaigns[$p])
|
||||
{
|
||||
$qc_campaigns_list .= " CHECKED";
|
||||
$qc_campaigns_value .= " $campaign_id_value";
|
||||
@@ -6039,7 +6040,7 @@ if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($A
|
||||
$p=0;
|
||||
while ($p<2000)
|
||||
{
|
||||
if ( ($group_id_value == $qc_groups[$p]) and (strlen($group_id_value) > 1) )
|
||||
if ( ($group_id_value === $qc_groups[$p]) and (strlen($group_id_value) > 1) )
|
||||
{
|
||||
$qc_groups_list .= " CHECKED";
|
||||
$qc_groups_value .= " $group_id_value";
|
||||
@@ -11013,7 +11014,9 @@ if ($ADD==2011)
|
||||
$affected_rowsC = mysqli_affected_rows($link);
|
||||
|
||||
# add new in-group to user's agent-selected in-groups
|
||||
$stmtD="UPDATE vicidial_users set closer_campaigns=REPLACE( closer_campaigns, ' $source_group_id ', ' $source_group_id $group_id ' ) where closer_campaigns LIKE \"% $source_group_id %\" and closer_campaigns NOT LIKE \"% $group_id %\";";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group_id);
|
||||
$SQL_source_group_id = preg_replace("/_/",'\\_',$source_group_id);
|
||||
$stmtD="UPDATE vicidial_users set closer_campaigns=REPLACE( closer_campaigns, ' $source_group_id ', ' $source_group_id $group_id ' ) where closer_campaigns LIKE \"% $SQL_source_group_id %\" and closer_campaigns NOT LIKE \"% $SQL_group_id %\";";
|
||||
$rslt=mysql_to_mysqli($stmtD, $link);
|
||||
$affected_rowsD = mysqli_affected_rows($link);
|
||||
|
||||
@@ -11101,7 +11104,9 @@ if ( ($ADD==2911) and ($SSallow_emails>0) )
|
||||
$affected_rowsC = mysqli_affected_rows($link);
|
||||
|
||||
# add new in-group to user's agent-selected in-groups
|
||||
$stmtD="UPDATE vicidial_users set closer_campaigns=REPLACE( closer_campaigns, ' $source_group_id ', ' $source_group_id $group_id ' ) where closer_campaigns LIKE \"% $source_group_id %\" and closer_campaigns NOT LIKE \"% $group_id %\";";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group_id);
|
||||
$SQL_source_group_id = preg_replace("/_/",'\\_',$source_group_id);
|
||||
$stmtD="UPDATE vicidial_users set closer_campaigns=REPLACE( closer_campaigns, ' $source_group_id ', ' $source_group_id $group_id ' ) where closer_campaigns LIKE \"% $SQL_source_group_id %\" and closer_campaigns NOT LIKE \"% $SQL_group_id %\";";
|
||||
$rslt=mysql_to_mysqli($stmtD, $link);
|
||||
$affected_rowsD = mysqli_affected_rows($link);
|
||||
|
||||
@@ -11188,7 +11193,9 @@ if ( ($ADD==29111) and ($SSallow_chats>0) )
|
||||
$rslt=mysql_to_mysqli($stmtC, $link);
|
||||
|
||||
# add new in-group to user's agent-selected in-groups
|
||||
$stmtD="UPDATE vicidial_users set closer_campaigns=REPLACE( closer_campaigns, ' $source_group_id ', ' $source_group_id $group_id ' ) where closer_campaigns LIKE \"% $source_group_id %\" and closer_campaigns NOT LIKE \"% $group_id %\";";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group_id);
|
||||
$SQL_source_group_id = preg_replace("/_/",'\\_',$source_group_id);
|
||||
$stmtD="UPDATE vicidial_users set closer_campaigns=REPLACE( closer_campaigns, ' $source_group_id ', ' $source_group_id $group_id ' ) where closer_campaigns LIKE \"% $SQL_source_group_id %\" and closer_campaigns NOT LIKE \"% $SQL_group_id %\";";
|
||||
$rslt=mysql_to_mysqli($stmtD, $link);
|
||||
$affected_rowsD = mysqli_affected_rows($link);
|
||||
|
||||
@@ -14334,7 +14341,7 @@ if ($ADD==41)
|
||||
$group_ct = count($groups);
|
||||
while ($p < $group_ct)
|
||||
{
|
||||
if ($group_id_values[$o] == $groups[$p])
|
||||
if ($group_id_values[$o] === $groups[$p])
|
||||
{
|
||||
$groups_list .= " CHECKED";
|
||||
$groups_value .= " $group_id_values[$o]";
|
||||
@@ -27753,7 +27760,7 @@ if ($ADD==331)
|
||||
$group_ct = count($groups);
|
||||
while ($p < $group_ct)
|
||||
{
|
||||
if ($group_id_values[$o] == $groups[$p])
|
||||
if ($group_id_values[$o] === $groups[$p])
|
||||
{
|
||||
$groups_list .= " CHECKED";
|
||||
$groups_value .= " $group_id_values[$o]";
|
||||
@@ -28132,7 +28139,8 @@ if ($ADD==3111)
|
||||
|
||||
$allowed_campaigns_count=0;
|
||||
$allowed_campaigns_warning='';
|
||||
$stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $query_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$SQL_query_group_id = preg_replace("/_/",'\\_',$query_group_id);
|
||||
$stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_query_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$campin_to_print = mysqli_num_rows($rslt);
|
||||
$vc_allowed_ct=0;
|
||||
@@ -28856,7 +28864,7 @@ if ($ADD==3111)
|
||||
$p=0;
|
||||
while ($p < $QCs_to_print)
|
||||
{
|
||||
if ($rowx[0] == $QCstatuses[$p])
|
||||
if ($rowx[0] === $QCstatuses[$p])
|
||||
{
|
||||
$qc_statuses_list .= " CHECKED";
|
||||
}
|
||||
@@ -28881,7 +28889,7 @@ if ($ADD==3111)
|
||||
$p=0;
|
||||
while ($p < $QCs_to_print)
|
||||
{
|
||||
if ($rowx[0] == $QCstatuses[$p])
|
||||
if ($rowx[0] === $QCstatuses[$p])
|
||||
{
|
||||
$qc_statuses_list .= " CHECKED";
|
||||
}
|
||||
@@ -29196,9 +29204,11 @@ if ($ADD==3111)
|
||||
echo "<B>"._QXZ("CAMPAIGNS ALLOWING THIS IN-GROUP").":</B><BR>\n";
|
||||
echo "<TABLE>\n";
|
||||
|
||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where closer_campaigns LIKE \"% $group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group_id);
|
||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$campin_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB > 0) {echo "|$SQL_group_id|$group_id|$stmt|\n";}
|
||||
$o=0;
|
||||
while ($campin_to_print > $o)
|
||||
{
|
||||
@@ -29482,7 +29492,8 @@ if ($ADD==3811)
|
||||
|
||||
$allowed_campaigns_count=0;
|
||||
$allowed_campaigns_warning='';
|
||||
$stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $query_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$query_group_id);
|
||||
$stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$campin_to_print = mysqli_num_rows($rslt);
|
||||
$vc_allowed_ct=0;
|
||||
@@ -29684,7 +29695,7 @@ if ($ADD==3811)
|
||||
$p=0;
|
||||
while ($p < $QCs_to_print)
|
||||
{
|
||||
if ($rowx[0] == $QCstatuses[$p])
|
||||
if ($rowx[0] === $QCstatuses[$p])
|
||||
{
|
||||
$qc_statuses_list .= " CHECKED";
|
||||
}
|
||||
@@ -29709,7 +29720,7 @@ if ($ADD==3811)
|
||||
$p=0;
|
||||
while ($p < $QCs_to_print)
|
||||
{
|
||||
if ($rowx[0] == $QCstatuses[$p])
|
||||
if ($rowx[0] === $QCstatuses[$p])
|
||||
{
|
||||
$qc_statuses_list .= " CHECKED";
|
||||
}
|
||||
@@ -30009,7 +30020,8 @@ if ($ADD==3811)
|
||||
echo "<B>"._QXZ("CAMPAIGNS ALLOWING THIS IN-GROUP").":</B><BR>\n";
|
||||
echo "<TABLE>\n";
|
||||
|
||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where closer_campaigns LIKE \"% $group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group_id);
|
||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$campin_to_print = mysqli_num_rows($rslt);
|
||||
$o=0;
|
||||
@@ -30300,7 +30312,8 @@ if ($ADD==3911)
|
||||
|
||||
$allowed_campaigns_count=0;
|
||||
$allowed_campaigns_warning='';
|
||||
$stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $query_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$query_group_id);
|
||||
$stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$campin_to_print = mysqli_num_rows($rslt);
|
||||
$vc_allowed_ct=0;
|
||||
@@ -30493,7 +30506,7 @@ if ($ADD==3911)
|
||||
$p=0;
|
||||
while ($p < $QCs_to_print)
|
||||
{
|
||||
if ($rowx[0] == $QCstatuses[$p])
|
||||
if ($rowx[0] === $QCstatuses[$p])
|
||||
{
|
||||
$qc_statuses_list .= " CHECKED";
|
||||
}
|
||||
@@ -30518,7 +30531,7 @@ if ($ADD==3911)
|
||||
$p=0;
|
||||
while ($p < $QCs_to_print)
|
||||
{
|
||||
if ($rowx[0] == $QCstatuses[$p])
|
||||
if ($rowx[0] === $QCstatuses[$p])
|
||||
{
|
||||
$qc_statuses_list .= " CHECKED";
|
||||
}
|
||||
@@ -30803,7 +30816,8 @@ if ($ADD==3911)
|
||||
echo "<B>"._QXZ("CAMPAIGNS ALLOWING THIS CHAT GROUP").":</B><BR>\n";
|
||||
echo "<TABLE>\n";
|
||||
|
||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where closer_campaigns LIKE \"% $group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group_id);
|
||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$campin_to_print = mysqli_num_rows($rslt);
|
||||
$o=0;
|
||||
@@ -38378,7 +38392,8 @@ if ($ADD==1000)
|
||||
{
|
||||
$allowed_campaigns_count=0;
|
||||
$allowed_campaigns_warning='';
|
||||
$stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $group_id_ary[$o] %\" $LOGallowed_campaignsSQL;";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group_id_ary[$o]);
|
||||
$stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$campin_to_print = mysqli_num_rows($rslt);
|
||||
$vc_allowed_ct=0;
|
||||
@@ -38461,7 +38476,8 @@ if ( ($ADD==1800) and ($SSallow_emails>0) )
|
||||
|
||||
$allowed_campaigns_warning='';
|
||||
## Get campaign allowed count
|
||||
$ct_stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $row[0] %\" $LOGallowed_campaignsSQL;";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$row[0]);
|
||||
$ct_stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$ct_rslt=mysql_to_mysqli($ct_stmt, $link);
|
||||
$ct_row=mysqli_fetch_row($ct_rslt);
|
||||
$email_allowed_campaigns_count=$ct_row[0];
|
||||
@@ -38520,7 +38536,8 @@ if ( ($ADD==1900) and ($SSallow_chats>0) )
|
||||
|
||||
$allowed_campaigns_warning='';
|
||||
## Get campaign allowed count
|
||||
$ct_stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $row[0] %\" $LOGallowed_campaignsSQL;";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$row[0]);
|
||||
$ct_stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;";
|
||||
$ct_rslt=mysql_to_mysqli($ct_stmt, $link);
|
||||
$ct_row=mysqli_fetch_row($ct_rslt);
|
||||
$chat_allowed_campaigns_count=$ct_row[0];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# fcstats.php
|
||||
#
|
||||
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
#
|
||||
@@ -39,6 +39,7 @@
|
||||
# 170829-0040 - Added screen color settings
|
||||
# 171012-2015 - Fixed javascript/apache errors with graphs
|
||||
# 180508-2215 - Added new help display
|
||||
# 190216-0807 - Fix for user-group, in-group and campaign allowed/permissions matching issues
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -449,7 +450,8 @@ $HTML_text.=_QXZ("In-Group Fronter-Closer Stats Report",57)." $NOW_TIME\n";
|
||||
$HTML_text.="\n";
|
||||
$HTML_text.="---------- "._QXZ("TOTALS FOR")." $query_date_BEGIN "._QXZ("to")." $query_date_END\n";
|
||||
|
||||
$sale_dispo_stmt="select distinct status from vicidial_campaign_statuses where sale='Y' and campaign_id in (SELECT campaign_id from vicidial_campaigns where closer_campaigns LIKE \"% " . mysqli_real_escape_string($link, $group) . " %\" $LOGallowed_campaignsSQL) UNION select distinct status from vicidial_statuses where sale='Y'";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group);
|
||||
$sale_dispo_stmt="select distinct status from vicidial_campaign_statuses where sale='Y' and campaign_id in (SELECT campaign_id from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL) UNION select distinct status from vicidial_statuses where sale='Y'";
|
||||
if ($DB) {$HTML_text.="$sale_dispo_stmt\n";}
|
||||
$sale_dispo_rslt=mysql_to_mysqli($sale_dispo_stmt, $link);
|
||||
$sale_dispos="'SALE'"; $sale_dispo_str="|SALE";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# fcstats_detail.php
|
||||
#
|
||||
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
#
|
||||
@@ -41,6 +41,7 @@
|
||||
# 170829-0040 - Added screen color settings
|
||||
# 171012-2015 - Fixed javascript/apache errors with graphs
|
||||
# 180508-2215 - Added new help display
|
||||
# 190216-0808 - Fix for user-group, in-group and campaign allowed/permissions matching issues
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -854,7 +855,8 @@ $HTML_text.=_QXZ("In-Group Fronter-Closer Stats Report",57)." $NOW_TIME\n";
|
||||
$HTML_text.="\n";
|
||||
$HTML_text.="---------- "._QXZ("TOTALS FOR")." $query_date_BEGIN "._QXZ("to")." $query_date_END\n";
|
||||
|
||||
$sale_dispo_stmt="select distinct status from vicidial_campaign_statuses where sale='Y' and campaign_id in (SELECT campaign_id from vicidial_campaigns where closer_campaigns LIKE \"% " . implode(" %\" OR closer_campaigns LIKE \"% ", array_map(array($link, 'real_escape_string'), $group)) . " %\" $LOGallowed_campaignsSQL) UNION select distinct status from vicidial_statuses where sale='Y'";
|
||||
$SQL_group_id = preg_replace("/_/",'\\_',$group);
|
||||
$sale_dispo_stmt="select distinct status from vicidial_campaign_statuses where sale='Y' and campaign_id in (SELECT campaign_id from vicidial_campaigns where closer_campaigns LIKE \"% " . implode(" %\" OR closer_campaigns LIKE \"% ", array_map(array($link, 'real_escape_string'), $SQL_group_id)) . " %\" $LOGallowed_campaignsSQL) UNION select distinct status from vicidial_statuses where sale='Y'";
|
||||
if ($DB) {$HTML_text.="$sale_dispo_stmt\n";}
|
||||
$sale_dispo_rslt=mysql_to_mysqli($sale_dispo_stmt, $link);
|
||||
$sale_dispos="'SALE'"; $sale_dispo_str="|SALE";
|
||||
|
||||
@@ -199,7 +199,7 @@ if (!isset($group)) {$group = array();}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
if (!isset($server_ip)) {$server_ip = '10.10.10.15';}
|
||||
|
||||
$stmt="select distinct(serial_id) from vicidial_process_log order by serial_id desc limit 1000;";
|
||||
$stmt="select distinct(serial_id) from vicidial_process_log order by run_time desc limit 10000;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$campaigns_to_print = mysqli_num_rows($rslt);
|
||||
|
||||
Reference in New Issue
Block a user