Added HCI screen for Hopper Hold Inserts
git-svn-id: svn://192.168.202.10@3779 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -70,6 +70,7 @@
|
||||
# 230507-0804 - Added vicidial_latency_gaps archiving
|
||||
# 231028-0810 - Added --url-log-only and --url-log-days=x options for purging of vicidial_url_log table only
|
||||
# 231117-1914 - Added vicidial_3way_press_log archiving
|
||||
# 231126-2227 - Added vicidial_hci_log archiving
|
||||
#
|
||||
|
||||
$CALC_TEST=0;
|
||||
@@ -3498,6 +3499,59 @@ if (!$T)
|
||||
}
|
||||
|
||||
|
||||
##### vicidial_hci_log
|
||||
$stmtA = "SELECT count(*) from vicidial_hci_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$vicidial_hci_log_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT count(*) from vicidial_hci_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$vicidial_hci_log_archive_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if (!$Q) {print "\nProcessing vicidial_hci_log table... ($vicidial_hci_log_count|$vicidial_hci_log_archive_count)\n";}
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_hci_log_archive SELECT * from vicidial_hci_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows inserted into vicidial_hci_log_archive table \n";}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
if ($wipe_all > 0)
|
||||
{$stmtA = "DELETE FROM vicidial_hci_log;";}
|
||||
else
|
||||
{$stmtA = "DELETE FROM vicidial_hci_log WHERE call_date < '$del_time';";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from vicidial_hci_log table \n";}
|
||||
|
||||
$stmtA = "optimize table vicidial_hci_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$stmtA = "optimize table vicidial_hci_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
}
|
||||
|
||||
|
||||
##### vicidial_call_notes
|
||||
$stmtA = "SELECT count(*) from vicidial_call_notes;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
|
||||
@@ -168,9 +168,10 @@
|
||||
# 230609-1137 - Added VIDPROMPTSPECIAL call menu In-Group dialplan entries
|
||||
# 230909-0846 - Added purging of vicidial_khomp_log records older than 7 days
|
||||
# 230925-1454 - Added -recmon settings
|
||||
# 231136-2158 - Added hopper_hold_inserts HCI lead reservations clearing for old reservations
|
||||
#
|
||||
|
||||
$build = '230925-1454';
|
||||
$build = '231136-2158';
|
||||
|
||||
$DB=0; # Debug flag
|
||||
$teodDB=0; # flag to log Timeclock End of Day processes to log file
|
||||
@@ -488,7 +489,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
|
||||
|
||||
|
||||
##### Get the settings from system_settings #####
|
||||
$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten,voicemail_timezones,default_voicemail_timezone,call_menu_qualify_enabled,allow_voicemail_greeting,reload_timestamp,meetme_enter_login_filename,meetme_enter_leave3way_filename,allow_chats,enable_auto_reports,enable_drop_lists,expired_lists_inactive,sip_event_logging,call_quota_lead_ranking,inbound_answer_config,log_latency_gaps,demographic_quotas,weekday_resets,highest_lead_id FROM system_settings;";
|
||||
$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten,voicemail_timezones,default_voicemail_timezone,call_menu_qualify_enabled,allow_voicemail_greeting,reload_timestamp,meetme_enter_login_filename,meetme_enter_leave3way_filename,allow_chats,enable_auto_reports,enable_drop_lists,expired_lists_inactive,sip_event_logging,call_quota_lead_ranking,inbound_answer_config,log_latency_gaps,demographic_quotas,weekday_resets,highest_lead_id,hopper_hold_inserts FROM system_settings;";
|
||||
# print "$stmtA\n";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -519,6 +520,7 @@ if ($sthArows > 0)
|
||||
$SSdemographic_quotas = $aryA[20];
|
||||
$SSweekday_resets = $aryA[21];
|
||||
$SShighest_lead_id = $aryA[22];
|
||||
$SShopper_hold_inserts = $aryA[23];
|
||||
}
|
||||
$sthA->finish();
|
||||
if ($DBXXX > 0) {print "SYSTEM SETTINGS: $sounds_central_control_active|$active_voicemail_server|$SScustom_dialplan_entry|$SSdefault_codecs\n";}
|
||||
@@ -5691,6 +5693,53 @@ if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_se
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
##### START HCI lead reserve RQUEUE clearing for reservations longer than 5 minutes
|
||||
################################################################################
|
||||
# only run this on active voicemail server
|
||||
if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_server)) eq (length($server_ip))) && ($SShopper_hold_inserts > 0) )
|
||||
{
|
||||
##### gather vicidial_live_agents_details #####
|
||||
$stmtA = "SELECT lead_id,user FROM vicidial_hci_reserve where reserve_date < \"$FMSQLdate\";";
|
||||
if ($DBX) {print "$stmtA\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$i=0;
|
||||
while ($sthArows > $i)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VLADlead_id[$i] = $aryA[0];
|
||||
$VLADuser[$i] = $aryA[1];
|
||||
$i++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($DB) {print " old vicidial_hci_reserve entries to clear: $i\n";}
|
||||
|
||||
$i=0;
|
||||
while ($sthArows > $i)
|
||||
{
|
||||
$VALLmin_count_latency=0; $VALLmin_max_latency=0; $VALLmin_avg_latency=0;
|
||||
$stmtA = "UPDATE vicidial_hopper SET status='RHOLD',user='' where lead_id='$VLADlead_id[$i]' and status='RQUEUE';";
|
||||
if ($DBX) {print "$stmtA\n";}
|
||||
$affected_rows = $dbhA->do($stmtA) or die "Couldn't execute query: |$stmtA|\n";
|
||||
if ($DBX) {print "vicidial_live_agents_details update query: |$affected_rows|$stmtA|\n";}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$stmtA = "DELETE FROM vicidial_hci_reserve where reserve_date < \"$FMSQLdate\"";
|
||||
$affected_rows = $dbhA->do($stmtA) or die "Couldn't execute query: |$stmtA|\n";
|
||||
if ($DBX) {print "vicidial_hci_reserve delete query: |$affected_rows|$stmtA|\n";}
|
||||
}
|
||||
################################################################################
|
||||
##### END HCI lead reserve RQUEUE clearing for reservations longer than 5 minutes
|
||||
################################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
##### START launch Demographic Quotas process, if enabled on any active campaigns
|
||||
################################################################################
|
||||
|
||||
+1
-1
@@ -561,7 +561,7 @@ while ($master_loop < $CLIloops)
|
||||
$hopper_ready_count=0;
|
||||
$agents_loggedin_count=0;
|
||||
### Find out how many leads are in the hopper from a specific campaign
|
||||
$stmtA = "SELECT count(*) from vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');";
|
||||
$stmtA = "SELECT count(*) from vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD','RQUEUE');";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
|
||||
@@ -1087,7 +1087,7 @@ foreach(@campaign_id)
|
||||
if ($DBX) {print "DQ List AUTO Resets enabled, checking hopper count: $demographic_quotas_list_resets[$i] \n";}
|
||||
$hopper_begin_output .= "DQ List AUTO Resets enabled, checking hopper count: $demographic_quotas_list_resets[$i] \n";
|
||||
$hopper_leads=0;
|
||||
$stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');";
|
||||
$stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD','RQUEUE');";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -1524,7 +1524,7 @@ foreach(@campaign_id)
|
||||
if ($ranked_leads > 0)
|
||||
{
|
||||
$hopper_leads=0;
|
||||
$stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');";
|
||||
$stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD','RQUEUE');";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
|
||||
+4
-3
@@ -108,6 +108,7 @@
|
||||
# 220822-0938 - Change DNC check queries to put phone_number in double-quotes instead of single-quotes
|
||||
# 230428-2017 - Added demographic_quotas code
|
||||
# 231116-0821 - Added hopper_hold_inserts system and campaign settings options
|
||||
# 231126-1748 - Added RQUEUE hopper status
|
||||
#
|
||||
|
||||
# constants
|
||||
@@ -1414,7 +1415,7 @@ while ($sthArows > $rec_count)
|
||||
{
|
||||
if ($DB) { print "---------------Auto Trim Hopper Enabled For $campaign_id[$rec_count]---------------------\n"; }
|
||||
|
||||
$stmtB = "SELECT COUNT(*) FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' and status IN ('READY','RHOLD') and source IN('S','N');";
|
||||
$stmtB = "SELECT COUNT(*) FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' and status IN ('READY','RHOLD','RQUEUE') and source IN('S','N');";
|
||||
$sthB = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
|
||||
$sthB->execute or die "executing: $stmtB ", $dbhA->errstr;
|
||||
@aryLead = $sthB->fetchrow_array;
|
||||
@@ -1430,7 +1431,7 @@ while ($sthArows > $rec_count)
|
||||
if ( $camp_leads > ( 2 * $hopper_level[$rec_count] ) )
|
||||
{
|
||||
$num_to_delete = $camp_leads - 2 * $hopper_level[$rec_count];
|
||||
$stmtB = "DELETE FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' AND source='S' AND status IN ('READY','RHOLD') LIMIT $num_to_delete";
|
||||
$stmtB = "DELETE FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' AND source='S' AND status IN ('READY','RHOLD','RQUEUE') LIMIT $num_to_delete";
|
||||
$affected_rows = $dbhA->do($stmtB);
|
||||
|
||||
if ($DB)
|
||||
@@ -2212,7 +2213,7 @@ foreach(@campaign_id)
|
||||
|
||||
### Find out how many leads are READY in the hopper from a specific campaign
|
||||
$hopper_ready_count=0;
|
||||
$stmtA = "SELECT count(*) from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');";
|
||||
$stmtA = "SELECT count(*) from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD','RQUEUE');";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
HUMAN CALL INDICATOR(HCI) DOC Started: 2023-11-08 Updated: 2023-11-27
|
||||
|
||||
|
||||
This document will go over how to set up the Human Call Indicator screen on your system, with Hopper Hold Inserts for campaigns.
|
||||
|
||||
NOTE: This requires svn/trunk revision 3779 or higher!!!
|
||||
|
||||
|
||||
|
||||
What is an Human Call Indicator screen?
|
||||
|
||||
The purpose of this feature is to allow a user to log into the HCI screen to manually click on a button and then confirm their choice to enable the initiation of a phone call by the system. This confirmation of each phone call is logged and is visible in the User Stats page and the Admin Modify Lead page.
|
||||
|
||||
On the admin side, to enable the HCI screen, the System Settings "Lead Hopper Hold Inserts Allowed" option must be enabled, and the Campaign "Hopper Hold Inserts" option must be enabled for each campaign that you want this feature activated for. If "Hopper Hold Inserts" is enabled for a campaign, then no non-agent-screen phone calls can be placed from that campaign without first being individually confirmed by a live human user in the HCI screen.
|
||||
|
||||
For a user to log into the HCI screen, they must have their User's "HCI Enabled" option enabled.
|
||||
|
||||
The user can get to the HCI screen from the link on the Welcome page(HOME). Once logged in to the HCI screen, the user must select the campaign that they want to initiate calls from, then they will see the active HCI screen with phone numbers to click on (on the left side), and a summary screen (on the right side). When an agent clicks on one of the phone numbers, they will see a confirmation pop-up panel asking them to confirm that they want this number to be called. If the user confirms this propt, then the call can be placed by the system and the phone number's button will disappear from the left side of the screen and the other phone numbers will shift to fill in the empty space.
|
||||
|
||||
The statistics on the right side of the screen show the following metrics:
|
||||
1. Calls in Progress - the number of dialed but not-yet-answered calls active at this moment, does not include calls where agents are talking to customers
|
||||
2. Calls on Hold - the number of leads in the hopper that are on HOLD waiting to be confirmed for calling by an HCI screen user
|
||||
3. Records Remaining - the number of leads in the hopper that are READY and waiting to be placed through your telco carrier by the system
|
||||
4. Agents Ready - the number of agents in READY or CLOSER status, waiting for a phone call
|
||||
5. Calls Offset - the number of calls to be placed by the campaign that will fill the waiting agents above
|
||||
6. Drop Rate - the drop rate for this campaign for today's calls, taken out of the number of Human Answer phone calls for the campaign
|
||||
|
||||
At the top of the HCI screen, the user also has the option to Change Campaign to another HCI-enabled campaign, or they can LOGOUT of the HCI screen.
|
||||
|
||||
|
||||
|
||||
How do I configure this on my system?
|
||||
|
||||
No configuration is needed other than activating Hopper Hold Inserts for the system and campaigns, as well as activating the HCI Enabled setting for the users that you want to access the HCI screen.
|
||||
|
||||
|
||||
|
||||
What are the limitations of the HCI screen?
|
||||
|
||||
The HCI screen will reserve leads from the hopper that are on HOLD for each user that is logged into the HCI screen, these HOLD hopper leads are refreshed as the HCI screen user confirms phone calls, and no more than 40 calls can be initiated within 4 seconds, although in our testing we've never been able to get anywhere close to that rate.
|
||||
|
||||
If the HCI screen user does not confirm any phone calls for 5 minutes, the system will reset their reserved hopper leads and allow their HCI screen to reserve new ones. This is done to ensure the freshness of the hopper leads being confirmed through the HCI screen.
|
||||
|
||||
Since the HCI screen will reserve 40 hopper HOLD leads for each logged-in HCI screen user, you may need to raise your campaign Hopper Level depending on how many HCI screen users you will want to have logged in at any one time.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
DATABASE CHANGES FOR REFERENCE ONLY!!!!!!!!!
|
||||
|
||||
|
||||
ALTER TABLE system_settings ADD hopper_hold_inserts ENUM('0','1','2','3','4','5','6','7') default '0';
|
||||
|
||||
ALTER TABLE vicidial_campaigns ADD hopper_hold_inserts ENUM('ENABLED','DISABLED') default 'DISABLED';
|
||||
|
||||
ALTER TABLE vicidial_hopper MODIFY status ENUM('READY','QUEUE','INCALL','DONE','HOLD','DNC','RHOLD','RQUEUE') default 'READY';
|
||||
|
||||
ALTER TABLE vicidial_users ADD hci_enabled ENUM('0','1','2','3','4','5','6') default '0';
|
||||
|
||||
CREATE TABLE vicidial_hci_live_agents (
|
||||
user VARCHAR(20),
|
||||
campaign_id VARCHAR(8),
|
||||
user_ip VARCHAR(45) default '',
|
||||
login_time DATETIME,
|
||||
last_call_time DATETIME,
|
||||
last_update_time TIMESTAMP,
|
||||
status VARCHAR(40),
|
||||
lead_id INT(9) UNSIGNED default '0',
|
||||
phone_number VARCHAR(18),
|
||||
random_id INT(8) UNSIGNED,
|
||||
index(user),
|
||||
index(campaign_id),
|
||||
index(last_update_time)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_hci_agent_log (
|
||||
user VARCHAR(20),
|
||||
campaign_id VARCHAR(8),
|
||||
user_ip VARCHAR(45) default '',
|
||||
login_time DATETIME,
|
||||
last_call_time DATETIME,
|
||||
status VARCHAR(40),
|
||||
index(user),
|
||||
index(login_time)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_hci_reserve (
|
||||
user VARCHAR(20),
|
||||
lead_id INT(9) UNSIGNED,
|
||||
phone_number VARCHAR(18),
|
||||
reserve_date DATETIME,
|
||||
campaign_id VARCHAR(8),
|
||||
status VARCHAR(40),
|
||||
index(user),
|
||||
index(reserve_date),
|
||||
index(lead_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE UNIQUE INDEX vhcir on vicidial_hci_reserve (lead_id,user,campaign_id);
|
||||
|
||||
CREATE TABLE vicidial_hci_log (
|
||||
user VARCHAR(20),
|
||||
lead_id INT(9) UNSIGNED,
|
||||
phone_number VARCHAR(18),
|
||||
call_date DATETIME,
|
||||
campaign_id VARCHAR(8),
|
||||
status VARCHAR(40),
|
||||
user_ip VARCHAR(45) default '',
|
||||
index(user),
|
||||
index(call_date),
|
||||
index(lead_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_hci_log_archive LIKE vicidial_hci_log;
|
||||
CREATE UNIQUE INDEX vhlclu on vicidial_hci_log_archive (call_date,lead_id,user);
|
||||
|
||||
CREATE TABLE hci_logs (
|
||||
date DATETIME,
|
||||
user VARCHAR(20) default '',
|
||||
lead_id INT(9) UNSIGNED NOT NULL,
|
||||
campaign_id VARCHAR(8),
|
||||
index(date)
|
||||
) ENGINE=MyISAM;
|
||||
@@ -704,7 +704,8 @@ failed_login_count_today SMALLINT(6) UNSIGNED default '0',
|
||||
failed_last_ip_today VARCHAR(50) default '',
|
||||
failed_last_type_today VARCHAR(20) default '',
|
||||
modify_dial_prefix ENUM('0','1','2','3','4','5','6') default '0',
|
||||
inbound_credits MEDIUMINT(7) default '-1'
|
||||
inbound_credits MEDIUMINT(7) default '-1',
|
||||
hci_enabled ENUM('0','1','2','3','4','5','6') default '0'
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE UNIQUE INDEX user ON vicidial_users (user);
|
||||
@@ -5087,6 +5088,71 @@ index(call_3way_id),
|
||||
index(lead_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_hci_live_agents (
|
||||
user VARCHAR(20),
|
||||
campaign_id VARCHAR(8),
|
||||
user_ip VARCHAR(45) default '',
|
||||
login_time DATETIME,
|
||||
last_call_time DATETIME,
|
||||
last_update_time TIMESTAMP,
|
||||
status VARCHAR(40),
|
||||
lead_id INT(9) UNSIGNED default '0',
|
||||
phone_number VARCHAR(18),
|
||||
random_id INT(8) UNSIGNED,
|
||||
index(user),
|
||||
index(campaign_id),
|
||||
index(last_update_time)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_hci_agent_log (
|
||||
user VARCHAR(20),
|
||||
campaign_id VARCHAR(8),
|
||||
user_ip VARCHAR(45) default '',
|
||||
login_time DATETIME,
|
||||
last_call_time DATETIME,
|
||||
status VARCHAR(40),
|
||||
index(user),
|
||||
index(login_time)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_hci_reserve (
|
||||
user VARCHAR(20),
|
||||
lead_id INT(9) UNSIGNED,
|
||||
phone_number VARCHAR(18),
|
||||
reserve_date DATETIME,
|
||||
campaign_id VARCHAR(8),
|
||||
status VARCHAR(40),
|
||||
index(user),
|
||||
index(reserve_date),
|
||||
index(lead_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE UNIQUE INDEX vhcir on vicidial_hci_reserve (lead_id,user,campaign_id);
|
||||
|
||||
CREATE TABLE vicidial_hci_log (
|
||||
user VARCHAR(20),
|
||||
lead_id INT(9) UNSIGNED,
|
||||
phone_number VARCHAR(18),
|
||||
call_date DATETIME,
|
||||
campaign_id VARCHAR(8),
|
||||
status VARCHAR(40),
|
||||
user_ip VARCHAR(45) default '',
|
||||
index(user),
|
||||
index(call_date),
|
||||
index(lead_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_hci_log_archive LIKE vicidial_hci_log;
|
||||
CREATE UNIQUE INDEX vhlclu on vicidial_hci_log_archive (call_date,lead_id,user);
|
||||
|
||||
CREATE TABLE hci_logs (
|
||||
date DATETIME,
|
||||
user VARCHAR(20) default '',
|
||||
lead_id INT(9) UNSIGNED NOT NULL,
|
||||
campaign_id VARCHAR(8),
|
||||
index(date)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
|
||||
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
||||
|
||||
@@ -5486,4 +5552,4 @@ INSERT INTO `wallboard_reports` VALUES ('AGENTS_AND_QUEUES','Agents and Queues',
|
||||
|
||||
UPDATE system_settings set vdc_agent_api_active='1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1700',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1701',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -2484,3 +2484,72 @@ CREATE TABLE vicidial_3way_press_log_archive LIKE vicidial_3way_press_log;
|
||||
CREATE UNIQUE INDEX vdpla on vicidial_3way_press_log_archive (call_date,caller_code,user);
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1700',db_schema_update_date=NOW() where db_schema_version < 1700;
|
||||
|
||||
ALTER TABLE vicidial_users ADD hci_enabled ENUM('0','1','2','3','4','5','6') default '0';
|
||||
|
||||
CREATE TABLE vicidial_hci_live_agents (
|
||||
user VARCHAR(20),
|
||||
campaign_id VARCHAR(8),
|
||||
user_ip VARCHAR(45) default '',
|
||||
login_time DATETIME,
|
||||
last_call_time DATETIME,
|
||||
last_update_time TIMESTAMP,
|
||||
status VARCHAR(40),
|
||||
lead_id INT(9) UNSIGNED default '0',
|
||||
phone_number VARCHAR(18),
|
||||
random_id INT(8) UNSIGNED,
|
||||
index(user),
|
||||
index(campaign_id),
|
||||
index(last_update_time)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_hci_agent_log (
|
||||
user VARCHAR(20),
|
||||
campaign_id VARCHAR(8),
|
||||
user_ip VARCHAR(45) default '',
|
||||
login_time DATETIME,
|
||||
last_call_time DATETIME,
|
||||
status VARCHAR(40),
|
||||
index(user),
|
||||
index(login_time)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_hci_reserve (
|
||||
user VARCHAR(20),
|
||||
lead_id INT(9) UNSIGNED,
|
||||
phone_number VARCHAR(18),
|
||||
reserve_date DATETIME,
|
||||
campaign_id VARCHAR(8),
|
||||
status VARCHAR(40),
|
||||
index(user),
|
||||
index(reserve_date),
|
||||
index(lead_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE UNIQUE INDEX vhcir on vicidial_hci_reserve (lead_id,user,campaign_id);
|
||||
|
||||
CREATE TABLE vicidial_hci_log (
|
||||
user VARCHAR(20),
|
||||
lead_id INT(9) UNSIGNED,
|
||||
phone_number VARCHAR(18),
|
||||
call_date DATETIME,
|
||||
campaign_id VARCHAR(8),
|
||||
status VARCHAR(40),
|
||||
user_ip VARCHAR(45) default '',
|
||||
index(user),
|
||||
index(call_date),
|
||||
index(lead_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_hci_log_archive LIKE vicidial_hci_log;
|
||||
CREATE UNIQUE INDEX vhlclu on vicidial_hci_log_archive (call_date,lead_id,user);
|
||||
|
||||
CREATE TABLE hci_logs (
|
||||
date DATETIME,
|
||||
user VARCHAR(20) default '',
|
||||
lead_id INT(9) UNSIGNED NOT NULL,
|
||||
campaign_id VARCHAR(8),
|
||||
index(date)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1701',db_schema_update_date=NOW() where db_schema_version < 1701;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
# 220301-1627 - Added allow_web_debug system setting
|
||||
# 220812-0929 - Added User Group report permissions checking
|
||||
# 231116-0928 - Added option to display RHOLD status hopper entries
|
||||
# 231127-2001 - Added display of RQUEUE status hopper entries and hold details when displaying HOLD entries
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -322,8 +323,8 @@ echo "<TITLE>"._QXZ("Hopper List Report")."</TITLE></HEAD><BODY BGCOLOR=WHITE ma
|
||||
|
||||
if (strlen($status) < 1) {$status='READY';}
|
||||
$statusSQL = "and vicidial_hopper.status IN('READY')";
|
||||
if ($status == 'READY_and_HOLD') {$statusSQL = "and vicidial_hopper.status IN('READY','RHOLD')";}
|
||||
if ($status == 'HOLD') {$statusSQL = "and vicidial_hopper.status IN('RHOLD')";}
|
||||
if ($status == 'READY_and_HOLD') {$statusSQL = "and vicidial_hopper.status IN('READY','RHOLD','RQUEUE')";}
|
||||
if ($status == 'HOLD') {$statusSQL = "and vicidial_hopper.status IN('RHOLD','RQUEUE')";}
|
||||
|
||||
echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
@@ -383,7 +384,7 @@ else
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$hopperREADY = sprintf("%10s", $row[0]);
|
||||
|
||||
$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysqli_real_escape_string($link, $group) . "' and status='RHOLD' $LOGallowed_campaignsSQL;";
|
||||
$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysqli_real_escape_string($link, $group) . "' and status IN('RHOLD','RQUEUE') $LOGallowed_campaignsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
@@ -416,7 +417,7 @@ else
|
||||
}
|
||||
echo "+------+--------+-----------+------------+-------------+---------+-------+--------+-------+--------+--------+-------+-------+----------------------$SIDhead+----------+-----------+\n";
|
||||
|
||||
$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial,vicidial_hopper.list_id,vicidial_hopper.priority,vicidial_hopper.source,vicidial_hopper.vendor_lead_code, phone_code,UNIX_TIMESTAMP(entry_date),UNIX_TIMESTAMP(last_local_call_time),source_id,vicidial_list.rank,vicidial_list.owner from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysqli_real_escape_string($link, $group) . "' $statusSQL and vicidial_hopper.lead_id=vicidial_list.lead_id $LOGallowed_campaignsSQL order by priority desc,hopper_id limit 5000;";
|
||||
$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial,vicidial_hopper.list_id,vicidial_hopper.priority,vicidial_hopper.source,vicidial_hopper.vendor_lead_code, phone_code,UNIX_TIMESTAMP(entry_date),UNIX_TIMESTAMP(last_local_call_time),source_id,vicidial_list.rank,vicidial_list.owner,vicidial_hopper.status,vicidial_hopper.user from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysqli_real_escape_string($link, $group) . "' $statusSQL and vicidial_hopper.lead_id=vicidial_list.lead_id $LOGallowed_campaignsSQL order by priority desc,hopper_id limit 5000;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$users_to_print = mysqli_num_rows($rslt);
|
||||
@@ -472,6 +473,8 @@ else
|
||||
$source_id_TEXT = "| ".sprintf("%-20s", $row[15])." ";
|
||||
$rank = sprintf("%-6s", $row[16]);
|
||||
$owner = sprintf("%-10s", $row[17]);
|
||||
$Hstatus = sprintf("%-6s", $row[18]);
|
||||
$Huser = sprintf("%-20s", $row[19]);
|
||||
|
||||
$lead_age = intval(($STARTtime - $entry_epoch) / 86400);
|
||||
$lead_age = sprintf("%-8s", $lead_age);
|
||||
@@ -514,8 +517,10 @@ else
|
||||
if ($SSsource_id_display < 1)
|
||||
{$source_id_TEXT='';}
|
||||
|
||||
if ($DB) {echo "| $FMT_i | $priority | <a href='./admin_modify_lead.php?lead_id=$lead_id_ns&archive_search=No&archive_log=0'>$lead_id</a> | <a href='./admin.php?ADD=311&list_id=$list_id_ns'>$list_id</a> | $phone_number $phone_code || $state | $status | $count | $gmt | $rank | $alt_dial | $source | $vendor_lead_code | $lead_age | $last_call_age_TEXT | $hopper_id | $owner | $DBdata\n";}
|
||||
else {echo "| $FMT_i | $priority | <a href='./admin_modify_lead.php?lead_id=$lead_id_ns&archive_search=No&archive_log=0'>$lead_id</a> | <a href='./admin.php?ADD=311&list_id=$list_id_ns'>$list_id</a> | $phone_number | $phone_code | $state | $status | $count | $gmt | $rank | $alt_dial | $source | $vendor_lead_code $source_id_TEXT| $lead_age | $last_call_age_TEXT |\n";}
|
||||
$statusX = '';
|
||||
if (preg_match("/RHOLD|RQUEUE/",$Hstatus)) {$statusX = " $Hstatus $Huser";}
|
||||
if ($DB) {echo "| $FMT_i | $priority | <a href='./admin_modify_lead.php?lead_id=$lead_id_ns&archive_search=No&archive_log=0'>$lead_id</a> | <a href='./admin.php?ADD=311&list_id=$list_id_ns'>$list_id</a> | $phone_number $phone_code || $state | $status | $count | $gmt | $rank | $alt_dial | $source | $vendor_lead_code | $lead_age | $last_call_age_TEXT | $hopper_id | $owner | $DBdata$statusX\n";}
|
||||
else {echo "| $FMT_i | $priority | <a href='./admin_modify_lead.php?lead_id=$lead_id_ns&archive_search=No&archive_log=0'>$lead_id</a> | <a href='./admin.php?ADD=311&list_id=$list_id_ns'>$list_id</a> | $phone_number | $phone_code | $state | $status | $count | $gmt | $rank | $alt_dial | $source | $vendor_lead_code $source_id_TEXT| $lead_age | $last_call_age_TEXT |$statusX\n";}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
+29
-11
File diff suppressed because one or more lines are too long
@@ -116,6 +116,7 @@
|
||||
# 230307-1326 - Small fix for closer calls DID display, Issue #1447
|
||||
# 230309-1444 - Added Inbound Call Menu Log display as part of IVR Log section
|
||||
# 231117-1920 - Added vicidial_3way_press_log display
|
||||
# 231126-2218 - Added vicidial_hci_log display
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -277,7 +278,7 @@ if ($nonselectable_statuses > 0)
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,custom_fields_enabled,webroot_writable,allow_emails,enable_languages,language_method,active_modules,log_recording_access,admin_screen_colors,enable_gdpr_download_deletion,source_id_display,mute_recordings,sip_event_logging,allow_web_debug FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,custom_fields_enabled,webroot_writable,allow_emails,enable_languages,language_method,active_modules,log_recording_access,admin_screen_colors,enable_gdpr_download_deletion,source_id_display,mute_recordings,sip_event_logging,allow_web_debug,hopper_hold_inserts FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
#if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
@@ -298,6 +299,7 @@ if ($qm_conf_ct > 0)
|
||||
$SSmute_recordings = $row[11];
|
||||
$SSsip_event_logging = $row[12];
|
||||
$SSallow_web_debug = $row[13];
|
||||
$SShopper_hold_inserts = $row[14];
|
||||
}
|
||||
if ($SSallow_web_debug < 1) {$DB=0;}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
@@ -3438,6 +3440,69 @@ else
|
||||
}
|
||||
}
|
||||
echo "</TABLE><BR><BR>\n";
|
||||
|
||||
|
||||
|
||||
if ($SShopper_hold_inserts > 0)
|
||||
{
|
||||
echo "<B>"._QXZ("HCI AGENT LOGS FOR THIS LEAD").":</B>\n";
|
||||
echo "<TABLE width=800 cellspacing=1 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=1># </td><td align=left><font size=2> "._QXZ("PHONE")."</td><td><font size=2>"._QXZ("DATE/TIME")." </td><td><font size=2>"._QXZ("USER")." </td><td><font size=2>"._QXZ("IP")." </td><td align=left><font size=2>"._QXZ("CAMPAIGN")." </td></tr>\n";
|
||||
|
||||
$stmt="SELECT phone_number,call_date,user,user_ip,campaign_id from vicidial_hci_log where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' order by call_date desc limit 500;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$logs_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB) {echo "$logs_to_print|$stmt|\n";}
|
||||
|
||||
$u=0;
|
||||
while ($logs_to_print > $u)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if (preg_match("/1$|3$|5$|7$|9$/i", $u))
|
||||
{$bgcolor="bgcolor=\"#$SSstd_row2_background\"";}
|
||||
else
|
||||
{$bgcolor="bgcolor=\"#$SSstd_row1_background\"";}
|
||||
|
||||
$u++;
|
||||
echo "<tr $bgcolor>";
|
||||
echo "<td><font size=1>$u</td>";
|
||||
echo "<td align=left><font size=2> $row[0] </td>";
|
||||
echo "<td align=left><font size=1> $row[1] </td>\n";
|
||||
echo "<td align=left><font size=2> <A HREF=\"user_stats.php?user=$row[2]\" target=\"_blank\">$row[2]</A> </td>\n";
|
||||
echo "<td align=left><font size=2> $row[3] </td>\n";
|
||||
echo "<td align=left><font size=2> $row[4] </td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if ($archive_log=="Yes")
|
||||
{
|
||||
$stmt="SELECT phone_number,call_date,user,user_ip,campaign_id from vicidial_hci_log_archive where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' order by call_date desc limit 500;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$logs_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB) {echo "$logs_to_print|$stmt|\n";}
|
||||
|
||||
$u=0;
|
||||
while ($logs_to_print > $u)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if (preg_match("/1$|3$|5$|7$|9$/i", $u))
|
||||
{$bgcolor="bgcolor=\"#$SSstd_row2_background\"";}
|
||||
else
|
||||
{$bgcolor="bgcolor=\"#$SSstd_row1_background\"";}
|
||||
|
||||
$u++;
|
||||
echo "<tr $bgcolor>";
|
||||
echo "<td><font size=1>$u</td>";
|
||||
echo "<td align=left><font size=2> $row[0] </td>";
|
||||
echo "<td align=left><font size=1> $row[1] </td>\n";
|
||||
echo "<td align=left><font size=2> $row[2] </td>\n";
|
||||
echo "<td align=left><font size=2> $row[3] </td>\n";
|
||||
echo "<td align=left><font size=2> $row[4] </td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
}
|
||||
echo "</TABLE><BR><BR>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3584,7 +3649,7 @@ else
|
||||
echo "<tr $bgcolor>";
|
||||
echo "<td><font size=1>$u</td>";
|
||||
echo "<td><font size=1>$row[3]</td>";
|
||||
echo "<td align=right><font size=2> <A HREF=\"user_stats.php?lead_id=$row[4]\" target=\"_blank\">$row[4]</A> </td>\n";
|
||||
echo "<td align=right><font size=2> <A HREF=\"user_stats.php?user=$row[4]\" target=\"_blank\">$row[4]</A> </td>\n";
|
||||
echo "<td align=left><font size=2> $row[7]</td>\n";
|
||||
echo "<td align=left><font size=1> $row[5]</td>\n";
|
||||
echo "<td align=left><font size=1> $row[6] </td>\n";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# functions for administrative scripts and reports
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
#
|
||||
# CHANGES:
|
||||
@@ -40,6 +40,7 @@
|
||||
# 210406-1740 - Moved 'dialable_leads' function to this script
|
||||
# 210615-0952 - Default security fix, CVE-2021-28854
|
||||
# 220921-1209 - Added more failed login logging in user_authorization function
|
||||
# 231119-1445 - Added user_authorization for HCI page users
|
||||
#
|
||||
|
||||
##### BEGIN validate user login credentials, check for failed lock out #####
|
||||
@@ -100,6 +101,8 @@ function user_authorization($user,$pass,$user_option,$user_update,$api_call)
|
||||
{$stmt="SELECT count(*) from vicidial_users where user='$user' and $passSQL and user_level > 3 and active='Y' and ( (failed_login_count < $LOCK_trigger_attempts) or (UNIX_TIMESTAMP(last_login_date) < $LOCK_over) );";}
|
||||
if ($user_option == 'QC')
|
||||
{$stmt="SELECT count(*) from vicidial_users where user='$user' and $passSQL and user_level > 1 and active='Y' and ( (failed_login_count < $LOCK_trigger_attempts) or (UNIX_TIMESTAMP(last_login_date) < $LOCK_over) );";}
|
||||
if ($user_option == 'HCI')
|
||||
{$stmt="SELECT count(*) from vicidial_users where user='$user' and $passSQL and user_level >= 1 and active='Y' and ( (failed_login_count < $LOCK_trigger_attempts) or (UNIX_TIMESTAMP(last_login_date) < $LOCK_over) );";}
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
# version: 20231115223301
|
||||
# version: 20231119153001
|
||||
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 20 digits in length, Must be at least 2 characters in length. We strongly recommend not reusing user accounts for different users, for reporting accuracy. To disable a user account, set the Active option to -N-.</QXZ>
|
||||
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length, unless the User Password Minimum Length system setting is enabled, which will require a longer password. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
||||
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ>
|
||||
@@ -93,6 +93,7 @@ users-qc_user_level QC User Level <QXZ>This setting defines what the agent Quali
|
||||
users-qc_pass QC Record Pass <QXZ>This option allows the agent to specify that a record has passed the first round of QC after reviewing the record.</QXZ>
|
||||
users-qc_finish QC Record Finish <QXZ>This option allows the agent to specify that a record has finished the second round of QC after reviewing the passed record.</QXZ>
|
||||
users-qc_commit QC Record Commit <QXZ>This option allows the agent to specify that a record has been committed in QC. It can no longer be modified by anyone.</QXZ>
|
||||
users-hci_enabled HCI Enabled <QXZ>This option allows the user to have access to the HCI screen, which is accessible from the Welcome page, if Hopper Hold Inserts are allowed on your system.</QXZ>
|
||||
users-add_timeclock_log Add Timeclock Log Record <QXZ>This option allows the user to add records to the timeclock log.</QXZ>
|
||||
users-modify_timeclock_log Modify Timeclock Log Record <QXZ>This option allows the user to modify records in the timeclock log.</QXZ>
|
||||
users-delete_timeclock_log Delete Timeclock Log Record <QXZ>This option allows the user to delete records in the timeclock log.</QXZ>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# user_stats.php
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
#
|
||||
@@ -68,6 +68,7 @@
|
||||
# 220221-0916 - Added allow_web_debug system setting
|
||||
# 220310-1427 - Fix for LOGOUT/LOGIN events sharing the same timedate
|
||||
# 220916-1744 - Added reporting section for webserver/URL logins
|
||||
# 231126-2235 - Added vicidial_hci_log display
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -128,7 +129,7 @@ if ( (!isset($end_date)) or (strlen($end_date) < 10) ) {$end_date = $TODAY;}
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,user_territories_active,webroot_writable,allow_emails,level_8_disable_add,enable_languages,language_method,log_recording_access,admin_screen_colors,mute_recordings,allow_web_debug FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,user_territories_active,webroot_writable,allow_emails,level_8_disable_add,enable_languages,language_method,log_recording_access,admin_screen_colors,mute_recordings,allow_web_debug,hopper_hold_inserts FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
#if ($DB) {$MAIN.="$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
@@ -149,6 +150,7 @@ if ($qm_conf_ct > 0)
|
||||
$SSadmin_screen_colors = $row[11];
|
||||
$SSmute_recordings = $row[12];
|
||||
$SSallow_web_debug = $row[13];
|
||||
$SShopper_hold_inserts = $row[14];
|
||||
}
|
||||
if ($SSallow_web_debug < 1) {$DB=0;}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
@@ -180,6 +182,7 @@ if ($search_archived_data)
|
||||
$vicidial_agent_function_log=use_archive_table("vicidial_agent_function_log");
|
||||
$call_log_table=use_archive_table("call_log");
|
||||
$vicidial_log_table=use_archive_table("vicidial_log");
|
||||
$vicidial_hci_log=use_archive_table("vicidial_hci_log");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -197,6 +200,7 @@ else
|
||||
$vicidial_agent_function_log="vicidial_agent_function_log";
|
||||
$call_log_table="call_log";
|
||||
$vicidial_log_table="vicidial_log";
|
||||
$vicidial_hci_log="vicidial_hci_log";
|
||||
}
|
||||
#############
|
||||
|
||||
@@ -1886,6 +1890,48 @@ else
|
||||
}
|
||||
$MAIN.="</TABLE><BR><BR>\n";
|
||||
|
||||
|
||||
if ($SShopper_hold_inserts > 0)
|
||||
{
|
||||
##### BEGIN vicidial_hci_log entries #####
|
||||
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("HCI Agent Log Records for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record download limit").") $NWB#user_stats-hci_log$NWE <a href='$download_link&file_download=16'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
|
||||
$MAIN.="<TABLE width=750 cellspacing=0 cellpadding=1>\n";
|
||||
$MAIN.="<tr><td><font size=1># </td><td NOWRAP><font size=2>"._QXZ("DATE/TIME")." </td><td align=right NOWRAP><font size=2> "._QXZ("LEAD ID")." </td><td align=right NOWRAP><font size=2> "._QXZ("PHONE")." </td><td align=right NOWRAP><font size=2> "._QXZ("CALL DATE")." </td><td align=right NOWRAP><font size=2> "._QXZ("CAMPAIGN")." </td><td align=right NOWRAP><font size=2> "._QXZ("USER IP")." </td></tr>\n";
|
||||
$CSV_text16.="\""._QXZ("HCI Agent Log Records for this Time Period").": ("._QXZ("10000 record limit").")\"\n";
|
||||
$CSV_text16.="\"\",\"#\",\""._QXZ("DATE/TIME")."\",\""._QXZ("LEAD ID")."\",\""._QXZ("PHONE")."\",\""._QXZ("CALL DATE")."\",\""._QXZ("CAMPAIGN")."\",\""._QXZ("USER IP")."\"\n";
|
||||
|
||||
$stmt="SELECT call_date,lead_id,phone_number,user_ip,campaign_id from ".$vicidial_hci_log." where user='" . mysqli_real_escape_string($link, $user) . "' and call_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and call_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' order by call_date desc limit 10000;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$logs_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB > 0) {echo "|$logs_to_print|$stmt|";}
|
||||
|
||||
$u=0;
|
||||
while ($logs_to_print > $u)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$u++;
|
||||
if ($u <= 1000)
|
||||
{
|
||||
if (preg_match("/1$|3$|5$|7$|9$/i", $u))
|
||||
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';}
|
||||
|
||||
$MAIN.="<tr $bgcolor>";
|
||||
$MAIN.="<td><font size=1>$u</td>";
|
||||
$MAIN.="<td><font size=2>$row[0]</td>";
|
||||
$MAIN.="<td align=center><font size=2> <A HREF=\"admin_modify_lead.php?lead_id=$row[1]\" onclick=\"javascript:window.open('admin_modify_lead.php?lead_id=$row[1]', '_blank');return false;\">$row[1]</A> </td>\n";
|
||||
$MAIN.="<td><font size=2>$row[2]</td>";
|
||||
$MAIN.="<td align=right><font size=2> $row[3] </td>\n";
|
||||
$MAIN.="<td align=right><font size=2> $row[4] </td></tr>\n";
|
||||
}
|
||||
$CSV_text16.="\"\",\"$u\",\"$row[0]\",\"$row[1]\",\"$row[2]\",\"$row[3]\",\"$row[4]\"\n";
|
||||
}
|
||||
$MAIN.="</TABLE><BR><BR>\n";
|
||||
}
|
||||
##### END vicidial_hci_log entries #####
|
||||
|
||||
|
||||
##### BEGIN manager pause code approval entries #####
|
||||
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" SIZE=3><B>"._QXZ("Manager Pause Code Approvals for this Time Period").": </FONT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2>("._QXZ("10000 record limit").") $NWB#user_stats-pause_code_approvals$NWE <a href='$download_link&file_download=14'>["._QXZ("DOWNLOAD")."]</a></B></FONT>\n";
|
||||
$MAIN.="<TABLE width=750 cellspacing=0 cellpadding=1>\n";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# vicidial_stylesheet.php
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CSS/PHP file that uses the system-defined screen colors to display report elements
|
||||
#
|
||||
@@ -10,6 +10,7 @@
|
||||
# 190129-1303 - New mobile display elements added
|
||||
# 200309-1819 - Modifications for display formatting
|
||||
# 221230-2220 - Added cust_form style for text input fields
|
||||
# 231127-1002 - Added HCI buttons styles
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -810,3 +811,51 @@ padding-right:3px;
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.button_hci_ready {
|
||||
background-color: #CCCCCC; /* Grey */
|
||||
border: 0px;
|
||||
border-radius: 2px;
|
||||
color: #333333;
|
||||
padding: 10px 22px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.button_hci_active {
|
||||
background-color: #FFCC99; /* Orange */
|
||||
border: 0px;
|
||||
border-radius: 2px;
|
||||
color: #333333;
|
||||
padding: 10px 22px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.button_hci_verify_confirm {
|
||||
background-color: #<?php echo $SSmenu_background; ?>;
|
||||
border: 2px solid #999999;
|
||||
border-radius: 0px;
|
||||
color: #FFFFFF;
|
||||
padding: 10px 22px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.button_hci_verify_cancel {
|
||||
background-color: #E6E6E6; /* Grey */
|
||||
border: 2px solid #999999;
|
||||
border-radius: 0px;
|
||||
color: #666666;
|
||||
padding: 10px 22px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<?php
|
||||
# welcome.php - VICIDIAL welcome page
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGELOG:
|
||||
# 141007-2140 - Finalized adding QXZ translation to all admin files
|
||||
# 161106-1920 - Changed to use newer design and dynamic links
|
||||
# 220228-1109 - Added allow_web_debug system setting
|
||||
# 231119-1540 - Added HCI Screen link if hopper_hold_inserts are allowed on the system
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -23,7 +24,7 @@ if (file_exists('options.php'))
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,enable_languages,language_method,default_language,agent_screen_colors,admin_web_directory,agent_script,allow_web_debug FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,enable_languages,language_method,default_language,agent_screen_colors,admin_web_directory,agent_script,allow_web_debug,hopper_hold_inserts FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01001',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
#if ($DB) {echo "$stmt\n";}
|
||||
@@ -39,6 +40,7 @@ if ($qm_conf_ct > 0)
|
||||
$admin_web_directory = $row[5];
|
||||
$SSagent_script = $row[6];
|
||||
$SSallow_web_debug = $row[7];
|
||||
$SShopper_hold_inserts = $row[8];
|
||||
}
|
||||
if ($SSallow_web_debug < 1) {$DB=0;}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
@@ -126,6 +128,11 @@ echo "<TR><TD ALIGN=CENTER COLSPAN=2><font size=1> </TD></TR>\n";
|
||||
if ($hide_timeclock_link < 1)
|
||||
{echo "<TR><TD ALIGN=CENTER COLSPAN=2><font class=\"skb_text\"> <a href=\"../agc/timeclock.php?referrer=welcome\"> "._QXZ("Timeclock")."</a> </TD></TR>\n";}
|
||||
echo "<TR><TD ALIGN=CENTER COLSPAN=2><font size=1> </TD></TR>\n";
|
||||
if ($SShopper_hold_inserts > 0)
|
||||
{
|
||||
echo "<TR><TD ALIGN=CENTER COLSPAN=2><font class=\"skb_text\"> <a href=\"../$admin_web_directory/hci_screen.php\"> "._QXZ("HCI Screen")."</a> </TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=CENTER COLSPAN=2><font size=1> </TD></TR>\n";
|
||||
}
|
||||
echo "<TR><TD ALIGN=CENTER COLSPAN=2><font class=\"skb_text\"> <a href=\"../$admin_web_directory/admin.php\">"._QXZ("Administration")."</a> </TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=CENTER COLSPAN=2><font size=1> </TD></TR>\n";
|
||||
|
||||
@@ -134,4 +141,4 @@ echo "</form>\n\n";
|
||||
echo "</BODY>\n\n";
|
||||
echo "</HTML>\n\n";
|
||||
exit;
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user