diff --git a/UPGRADE b/UPGRADE index 50baccba..a4bec3bc 100644 --- a/UPGRADE +++ b/UPGRADE @@ -697,6 +697,10 @@ OTHER CHANGES: 194. Added MIN LENGTH to the Dispo Call URL ALT admin screen, allowing for a minimum call time threshold before a Dispo Call URL will trigger. +195. Added User Location to the Modify User page. Also added Queue Groups Admin + pages, allowing you to define multiple campaigns and/or in-groups in a + single Queue Group to be used in some reports. + diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 22393019..b84fa183 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -691,7 +691,8 @@ max_inbound_filter_min_sec SMALLINT(5) default '-1', status_group_id VARCHAR(20) default '', mobile_number VARCHAR(20) default '', two_factor_override ENUM('NOT_ACTIVE','ENABLED','DISABLED') default 'NOT_ACTIVE', -manual_dial_filter VARCHAR(50) default 'DISABLED' +manual_dial_filter VARCHAR(50) default 'DISABLED', +user_location VARCHAR(100) default '' ) ENGINE=MyISAM; CREATE UNIQUE INDEX user ON vicidial_users (user); @@ -4685,6 +4686,15 @@ index (call_date), unique index cicc_cd (caller_code, uniqueid) ) ENGINE=MyISAM; +CREATE TABLE vicidial_queue_groups ( +queue_group VARCHAR(20) NOT NULL, +queue_group_name VARCHAR(40) NOT NULL, +included_campaigns TEXT, +included_inbound_groups TEXT, +user_group VARCHAR(20) default '---ALL---', +active ENUM('Y','N') +) ENGINE=MyISAM; + ALTER TABLE vicidial_email_list MODIFY message text character set utf8; @@ -5026,7 +5036,8 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('PHONE_DEFAULTS','Default phone settings for preloading','PHONE_DEFAULTS','---ALL---','# Below are all phone settings recognized under the PHONE_DEFAULTS \r\n# container type and the type of data each accepts. Any setting that\r\n# uses a default value in the database has said value pre-set below\r\n\r\n# 10 char max\r\nvoicemail_id => \r\n \r\n# 15 char max\r\nserver_ip => \r\n\r\n# 100 char max\r\npass => \r\n\r\n# 10 char max\r\nstatus => \r\n\r\n# Y/N only\r\nactive => Y\r\n\r\n# 50 char max\r\nphone_type => \r\n\r\n# \'SIP\',\'Zap\',\'IAX2\' or \'EXTERNAL\'\r\nprotocol => SIP\r\n\r\n# positive or negatier 2-decimal floating point number\r\nlocal_gmt => -5.00\r\n\r\n# 20 char max\r\nvoicemail_dump_exten => 85026666666666\r\n\r\n# 20 char max\r\noutbound_cid => \r\n\r\n# 100 char max\r\nemail => \r\n\r\n# 15 char max\r\ntemplate_id => \r\n\r\n# text, conf_override can span multiple lines, see below\r\nconf_override => \r\n# type=friend\r\n# host=dynamic\r\n# canreinvite=no\r\n# context=default1\r\n\r\n# 50 char max\r\nphone_context => default\r\n\r\n# Unsigned - max value 65536\r\nphone_ring_timeout => 60\r\n\r\n# 20 char max\r\nconf_secret => test\r\n\r\n# Y/N only\r\ndelete_vm_after_email => N\r\n\r\n# Options - Y, N, or Y_API_LAUNCH\r\nis_webphone => N\r\n\r\n# Y/N only\r\nuse_external_server_ip => N\r\n\r\n# 100 char max\r\ncodecs_list => \r\n\r\n# 0/1 only\r\ncodecs_with_template => 0\r\n\r\n# Options - Y, N, TOGGLE, or TOGGLE_OFF\r\nwebphone_dialpad => Y\r\n\r\n# Y/N only\r\non_hook_agent => N\r\n\r\n# Y/N only\r\nwebphone_auto_answer => Y\r\n\r\n# 30 char max\r\nvoicemail_timezone => eastern\r\n\r\n# 255 char max\r\nvoicemail_options => \r\n\r\n# 20 char max\r\nuser_group => ---ALL---\r\n\r\n# 100 char max\r\nvoicemail_greeting => \r\n\r\n# 20 char max\r\nvoicemail_dump_exten_no_inst => 85026666666667\r\n\r\n# Y/N only\r\nvoicemail_instructions => Y\r\n\r\n# Y/N only\r\non_login_report => N\r\n\r\n# 40 char max\r\nunavail_dialplan_fwd_exten => \r\n\r\n# 100 char max\r\nunavail_dialplan_fwd_context => \r\n\r\n# text\r\nnva_call_url => \r\n\r\n# 40 char max\r\nnva_search_method => \r\n\r\n# 255 char max\r\nnva_error_filename => \r\n\r\n# Integer, any size\r\nnva_new_list_id => 995\r\n\r\n# 10 char max\r\nnva_new_phone_code => 1\r\n\r\n# 6 char max\r\nnva_new_status => NVAINS\r\n\r\n# Y/N only\r\nwebphone_dialbox => Y\r\n\r\n# Y/N only\r\nwebphone_mute => Y\r\n\r\n# Y/N only\r\nwebphone_volume => Y\r\n\r\n# Y/N only\r\nwebphone_debug => N\r\n\r\n# 20 char max\r\noutbound_alt_cid => \r\n\r\n# Y/N only\r\nconf_qualify => Y\r\n\r\n# 255 char max\r\nwebphone_layout => \r\n'); INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('QC_STATUS_TEMPLATE','Sample QC Status Template','QC_TEMPLATE','---ALL---','# These types of containers are simply used for creating a list of \r\n# QC-enabled statuses to apply to campaigns, lists, and ingroups.\r\n# Simply put all the statuses that this template should allow in\r\n# a comma-delimited string, as below:\r\n\r\nSALE,DNC,NI'); INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('INTERNATIONAL_DNC_IMPORT','Process DNC lists of various countries from FTP site','PERL_CLI','---ALL---','# This setting container is used for the international DNC system. \r\n# The below two settings are mandatory for importing suppression lists\r\n# and tell the import process where to look for new files and where to\r\n# move them when handled. These settings cannot have the same value. \r\n--file-dir=/root/ftp\r\n--file-destination=/root/ftp/DONE\r\n\r\n# Uncomment below and set the status to whatever custom disposition you \r\n# would like already-loaded leads to be set to when they dedupe against\r\n# a country\'s DNC list (default is \"DNCI\")\r\n# --dnc-status-override=BMNR\r\n\r\n# The below settings are optional for when files are stored on a remote\r\n# server. It is strongly recommended these settings are not used and\r\n# that the processing scripts and files are stored locally on the same\r\n# server. \r\n# --ftp-host=localhost\r\n# --ftp-user=user\r\n# --ftp-pwd=pwd\r\n# --ftp-port=21\r\n# --ftp-passive=1\r\n'),('DNC_IMPORT_FORMATS','Import formats for DNC files','OTHER','---ALL---','# This setting container is used for storing file formats used when \r\n# loading DNC suppression lists into the dialer. \r\n#\r\n# import template => (delimited|fixed),delimiter,phone1(,phone2,phone3)\r\n#\r\n# For delimited files, the phone1 value should be the index value of\r\n# the field where the phone appears. The first array index is 0 and\r\n# indexes continue through the natural numbers.\r\n\r\n# In delimited files, acceptable values for the \"delimiter\" field are:\r\n# - \"tab\", \"pipe\", \"comma\", \"quote-comma\"\r\nBASIC_DELIMITED_FORMAT => delimited,pipe,0\r\n\r\n# If the phone number is split into multiple fields (ex: area code in\r\n# one field, rest of the number in another), simply list additional \r\n# indices of the phone number fields separated by commas in the order \r\n# in which the data should be combined to make the complete phone \r\n# number \r\nDELIMITED_WITH_AC_AND_EXCHANGE_SPLIT => delimited,tab,0,1\r\n\r\n# For fixed-length files, the phone field values should be of the type:\r\n# - \"starting_position|length\"\r\nBASIC_FIXED_FORMAT => fixed,,0|10\r\n\r\n# (delimited|fixed) is not used for CSV/Excel files, so all that needs \r\n# providing for those is the index field value(s) of the phone number\r\nBASIC_CSV_OR_EXCEL_FORMAT => ,,0'),('DNC_CURRENT_BLOCKED_LISTS','Lists currently blocked due to pending DNC scrub','READ_ONLY','---ALL---',''); +INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('USER_LOCATIONS_SYSTEM','User Locations List','OTHER','---ALL---',';location|description\n|default\n'); UPDATE system_settings set vdc_agent_api_active='1'; -UPDATE system_settings SET db_schema_version='1648',db_schema_update_date=NOW(),reload_timestamp=NOW(); +UPDATE system_settings SET db_schema_version='1649',db_schema_update_date=NOW(),reload_timestamp=NOW(); diff --git a/extras/upgrade_2.14.sql b/extras/upgrade_2.14.sql index ab7925a1..d9f1a15d 100644 --- a/extras/upgrade_2.14.sql +++ b/extras/upgrade_2.14.sql @@ -1835,3 +1835,18 @@ UPDATE system_settings SET db_schema_version='1647',db_schema_update_date=NOW() ALTER TABLE vicidial_url_multi ADD url_call_length SMALLINT(5) default '0'; UPDATE system_settings SET db_schema_version='1648',db_schema_update_date=NOW() where db_schema_version < 1648; + +ALTER TABLE vicidial_users ADD user_location VARCHAR(100) default ''; + +INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('USER_LOCATIONS_SYSTEM','User Locations List','OTHER','---ALL---',';location|description\n|default\n'); + +CREATE TABLE vicidial_queue_groups ( +queue_group VARCHAR(20) NOT NULL, +queue_group_name VARCHAR(40) NOT NULL, +included_campaigns TEXT, +included_inbound_groups TEXT, +user_group VARCHAR(20) default '---ALL---', +active ENUM('Y','N') +) ENGINE=MyISAM; + +UPDATE system_settings SET db_schema_version='1649',db_schema_update_date=NOW() where db_schema_version < 1649; diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index fe7e9cb3..8c674fe6 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -2678,7 +2678,16 @@ if (isset($_GET["in_queue_nanque"])) {$in_queue_nanque=$_GET["in_queue_nanque" elseif (isset($_POST["in_queue_nanque"])) {$in_queue_nanque=$_POST["in_queue_nanque"];} if (isset($_GET["in_queue_nanque_exceptions"])) {$in_queue_nanque_exceptions=$_GET["in_queue_nanque_exceptions"];} elseif (isset($_POST["in_queue_nanque_exceptions"])) {$in_queue_nanque_exceptions=$_POST["in_queue_nanque_exceptions"];} - +if (isset($_GET["user_location"])) {$user_location=$_GET["user_location"];} + elseif (isset($_POST["user_location"])) {$user_location=$_POST["user_location"];} +if (isset($_GET["queue_group"])) {$queue_group=$_GET["queue_group"];} + elseif (isset($_POST["queue_group"])) {$queue_group=$_POST["queue_group"];} +if (isset($_GET["queue_group_name"])) {$queue_group_name=$_GET["queue_group_name"];} + elseif (isset($_POST["queue_group_name"])) {$queue_group_name=$_POST["queue_group_name"];} +if (isset($_GET["included_campaigns"])) {$included_campaigns=$_GET["included_campaigns"];} + elseif (isset($_POST["included_campaigns"])) {$included_campaigns=$_POST["included_campaigns"];} +if (isset($_GET["included_inbound_groups"])) {$included_inbound_groups=$_GET["included_inbound_groups"];} + elseif (isset($_POST["included_inbound_groups"])) {$included_inbound_groups=$_POST["included_inbound_groups"];} if (isset($script_id)) {$script_id= mb_strtoupper($script_id,'utf-8');} if (isset($lead_filter_id)) {$lead_filter_id = mb_strtoupper($lead_filter_id,'utf-8');} @@ -3774,6 +3783,7 @@ if ($non_latin < 1) $call_limit_24hour_scope = preg_replace('/[^-_0-9a-zA-Z]/','',$call_limit_24hour_scope); $call_limit_24hour_override = preg_replace('/[^-_0-9a-zA-Z]/','',$call_limit_24hour_override); $in_queue_nanque_exceptions = preg_replace('/[^-_0-9a-zA-Z]/','',$in_queue_nanque_exceptions); + $queue_group = preg_replace('/[^-_0-9a-zA-Z]/','',$queue_group); ### ALPHA-NUMERIC and underscore $qc_statuses_id = preg_replace('/[^_0-9a-zA-Z]/','',$qc_statuses_id); @@ -3999,6 +4009,8 @@ if ($non_latin < 1) $label_rank = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_rank); $label_owner = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_owner); $label_entry_list_id = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_entry_list_id); + $user_location = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$user_location); + $queue_group_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$queue_group_name); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot $call_out_number_group = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$call_out_number_group); @@ -4487,6 +4499,7 @@ else $call_limit_24hour_scope = preg_replace('/[^-_0-9\p{L}]/u','',$call_limit_24hour_scope); $call_limit_24hour_override = preg_replace('/[^-_0-9\p{L}]/u','',$call_limit_24hour_override); $in_queue_nanque_exceptions = preg_replace('/[^-_0-9\p{L}]/u','',$in_queue_nanque_exceptions); + $queue_group = preg_replace('/[^-_0-9\p{L}]/u','',$queue_group); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_timeout_prompt = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$menu_timeout_prompt); @@ -4709,6 +4722,8 @@ else $label_rank = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_rank); $label_owner = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_owner); $label_entry_list_id = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_entry_list_id); + $user_location = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$user_location); + $queue_group_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$queue_group_name); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot $call_out_number_group = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$call_out_number_group); @@ -5729,11 +5744,13 @@ if ($SSscript_remove_js > 0) # 211012-0934 - Added incall_tally_threshold_seconds campaign feature # 211027-1031 - Added lead_search Non-Agent API function # 211106-1500 - Added In-Group in_queue_nanque settings +# 211208-1646 - Added user_location to User Modify page, Added Queue Groups to Admin pages +# # 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-833a'; -$build = '211106-1500'; +$admin_version = '2.14-834a'; +$build = '211208-1646'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6414,6 +6431,7 @@ if ($ADD==194111111111) {$hh='admin'; $sh='ar'; echo _QXZ("ADD AUTOMATED REPORT" if ($ADD==195111111111) {$hh='admin'; $sh='il'; echo _QXZ("ADD IP LIST");} if ($ADD==196111111111) {$hh='admin'; $sh='cg'; echo _QXZ("ADD CID GROUP");} if ($ADD==197111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("ADD VM MESSAGE GROUP");} +if ($ADD==198111111111) {$hh='admin'; $sh='qg'; echo _QXZ("ADD QUEUE GROUP");} if ($ADD==1111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("ADD NEW CONFERENCE");} if ($ADD==11111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("ADD NEW AGENT CONFERENCE");} if ($ADD=='2') {$hh='users'; $sh='new'; echo _QXZ("New User Addition");} @@ -6471,6 +6489,7 @@ if ($ADD==294111111111) {$hh='admin'; $sh='ar'; echo _QXZ("ADDING NEW AUTOMATED if ($ADD==295111111111) {$hh='admin'; $sh='il'; echo _QXZ("ADDING NEW IP LIST");} if ($ADD==296111111111) {$hh='admin'; $sh='cg'; echo _QXZ("ADDING NEW CID GROUP");} if ($ADD==297111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("ADDING NEW VM MESSAGE GROUP");} +if ($ADD==298111111111) {$hh='admin'; $sh='qg'; echo _QXZ("ADDING NEW QUEUE GROUP");} if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("ADDING NEW CONFERENCE");} if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("ADDING NEW AGENT CONFERENCE");} if ($ADD==221111111111111) {$hh='admin'; $sh='status'; echo _QXZ("ADDING SYSTEM STATUSES");} @@ -6555,6 +6574,7 @@ if ($ADD==394111111111) {$hh='admin'; $sh='ar'; echo _QXZ("MODIFY AUTOMATED REPO if ($ADD==395111111111) {$hh='admin'; $sh='il'; echo _QXZ("MODIFY IP LIST");} if ($ADD==396111111111) {$hh='admin'; $sh='cg'; echo _QXZ("MODIFY CID GROUP");} if ($ADD==397111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("MODIFY VM MESSAGE GROUP");} +if ($ADD==398111111111) {$hh='admin'; $sh='qg'; echo _QXZ("MODIFY QUEUE GROUP");} if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("MODIFY CONFERENCE");} if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("MODIFY AGENT CONFERENCE");} if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo _QXZ("MODIFY SYSTEM SETTINGS");} @@ -6609,6 +6629,7 @@ if ($ADD==493111111111) {$hh='admin'; $sh='sg'; echo _QXZ("MODIFY STATUS GROUP") if ($ADD==494111111111) {$hh='admin'; $sh='ar'; echo _QXZ("MODIFY AUTOMATED REPORT");} if ($ADD==496111111111) {$hh='admin'; $sh='cg'; echo _QXZ("MODIFY CID GROUP");} if ($ADD==497111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("MODIFY VM MESSAGE GROUP");} +if ($ADD==498111111111) {$hh='admin'; $sh='qg'; echo _QXZ("MODIFY QUEUE GROUP");} if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("MODIFY CONFERENCE");} if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("MODIFY CONFERENCE");} if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo _QXZ("MODIFY SYSTEM SETTINGS");} @@ -6654,6 +6675,7 @@ if ($ADD==594111111111) {$hh='admin'; $sh='ar'; echo _QXZ("DELETE AUTOMATED REPO if ($ADD==595111111111) {$hh='admin'; $sh='il'; echo _QXZ("DELETE IP LIST");} if ($ADD==596111111111) {$hh='admin'; $sh='cg'; echo _QXZ("DELETE CID GROUP");} if ($ADD==597111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("DELETE VM MESSAGE GROUP");} +if ($ADD==598111111111) {$hh='admin'; $sh='qg'; echo _QXZ("DELETE QUEUE GROUP");} if ($ADD==5111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("DELETE CONFERENCE");} if ($ADD==51111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("DELETE AGENT CONFERENCE");} if ($ADD==6) {$hh='users'; $sh='list'; echo _QXZ("Delete User");} @@ -6702,6 +6724,7 @@ if ($ADD==694111111111) {$hh='admin'; $sh='ar'; echo _QXZ("DELETE AUTOMATED REPO if ($ADD==695111111111) {$hh='admin'; $sh='il'; echo _QXZ("DELETE IP LIST");} if ($ADD==696111111111) {$hh='admin'; $sh='cg'; echo _QXZ("DELETE CID GROUP");} if ($ADD==697111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("DELETE VM MESSAGE GROUP");} +if ($ADD==698111111111) {$hh='admin'; $sh='qg'; echo _QXZ("DELETE QUEUE GROUP");} if ($ADD==6111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("DELETE CONFERENCE");} if ($ADD==61111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("DELETE AGENT CONFERENCE");} if ($ADD==73) {$hh='campaigns'; echo _QXZ("Dialable Lead Count");} @@ -6756,6 +6779,7 @@ if ($ADD==194000000000) {$hh='admin'; $sh='ar'; echo _QXZ("AUTOMATED REPORTS LIS if ($ADD==195000000000) {$hh='admin'; $sh='il'; echo _QXZ("IP LISTS");} if ($ADD==196000000000) {$hh='admin'; $sh='cg'; echo _QXZ("CID GROUP LIST");} if ($ADD==197000000000) {$hh='admin'; $sh='vmmg'; echo _QXZ("VM MESSAGE GROUPS LIST");} +if ($ADD==198000000000) {$hh='admin'; $sh='qg'; echo _QXZ("QUEUE GROUPS LIST");} if ($ADD==1000000000000) {$hh='admin'; $sh='conference'; echo _QXZ("CONFERENCE LIST");} if ($ADD==10000000000000) {$hh='admin'; $sh='conference'; echo _QXZ("AGENT CONFERENCE LIST");} if ($ADD==100000000000000) {$hh='qc'; $sh='campaign'; echo _QXZ("Quality Control");} @@ -7428,6 +7452,89 @@ if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($A } ##### END get campaigns listing for checkboxes ##### +##### BEGIN Queue Groups campaigns/in-groups listings ##### +if ( ($ADD==298111111111) or ($ADD==398111111111) or ($ADD==498111111111) or ($ADD==598111111111) or ($ADD==698111111111) ) + { + if ( ($ADD==298111111111) or ($ADD==398111111111) or ($ADD==598111111111) or ($ADD==698111111111) ) + { + $stmt="SELECT queue_group,queue_group_name,active,user_group,included_campaigns,included_inbound_groups from vicidial_queue_groups where queue_group='$queue_group' $LOGadmin_viewable_groupsSQL;"; + $rslt=mysql_to_mysqli($stmt, $link); + $row=mysqli_fetch_row($rslt); + $included_campaigns = $row[4]; + $included_inbound_groups = $row[5]; + + $qg_allowed_campaigns = preg_replace("/ -$/","",$included_campaigns); + $qg_campaigns = explode(" ", $qg_allowed_campaigns); + $qg_allowed_inbound_groups = preg_replace("/ -$/","",$included_inbound_groups); + $qg_groups = explode(" ", $qg_allowed_inbound_groups); + } + if ($ADD==498111111111) + { + $qg_campaigns = $included_campaigns; + $qg_groups = $included_inbound_groups; + } + + $qg_campaigns_value=''; + $qg_campaigns_list=''; + $qg_groups_value=''; + $qg_groups_list=''; + + $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; + $rslt=mysql_to_mysqli($stmt, $link); + $campaigns_to_print = mysqli_num_rows($rslt); + + $o=0; + while ($campaigns_to_print > $o) + { + $rowx=mysqli_fetch_row($rslt); + $campaign_id_value = $rowx[0]; + $campaign_name_value = $rowx[1]; + $qg_campaigns_list .= ""; + $p++; + } + $qg_campaigns_list .= "> $campaign_id_value - $campaign_name_value
\n"; + $o++; + } + + $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') $LOGadmin_viewable_groupsSQL order by group_id;"; + $rslt=mysql_to_mysqli($stmt, $link); + $groups_to_print = mysqli_num_rows($rslt); + + $o=0; + while ($groups_to_print > $o) + { + $rowx=mysqli_fetch_row($rslt); + $group_id_value = $rowx[0]; + $group_name_value = $rowx[1]; + $qg_groups_list .= " 1) ) + { + $qg_groups_list .= " CHECKED"; + $qg_groups_value .= " $group_id_value"; + } + $p++; + } + $qg_groups_list .= "> $group_id_value - $group_name_value
\n"; + $o++; + } + + if (strlen($qg_campaigns_value)>2) {$qg_campaigns_value .= " -";} + if (strlen($qg_groups_value)>2) {$qg_groups_value .= " -";} + } +##### END Queue Groups campaigns/in-groups listings ##### + if ( (strlen($ADD)==11) or (strlen($ADD)>12) or ( ($ADD > 1299) and ($ADD < 9999) ) or ($ADD=='141111111111') or ($ADD=='140111111111') or ($ADD=='341111111111') or ($ADD=='311111111111111') or ( (strlen($ADD)>4) and ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD<70)) or ($ADD=="4A") or ($ADD=="4B") or (strlen($ADD)==12) ) { @@ -11048,6 +11155,42 @@ if ($ADD==197111111111) } +###################### +# ADD=198111111111 display the ADD NEW Queue Group +###################### +if ($ADD==198111111111) + { + if ($LOGmodify_statuses==1) + { + echo " + 0) {echo " onclick=\"window.document.location='$ADMIN?ADD=198000000000';\"";} ?>> + + > 25) { + ?> + > + 25) and (!preg_match('/campaign|user/i',$hh) ) ) { ?> > diff --git a/www/vicidial/help_documentation.txt b/www/vicidial/help_documentation.txt index ded1322f..a2af7f15 100644 --- a/www/vicidial/help_documentation.txt +++ b/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 20211117202701 +# version: 20211208172501 users-user User ID This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. users-pass Password This field is where you put the users password. Must be at least 2 characters in length. 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. users-force_change_password Force Change Password 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. @@ -11,6 +11,7 @@ users-phone_pass Phone Pass Here is where you can set a default phone pass users-active Active This field defines whether the user is active in the system and can log in as an agent or manager. Default is Y. users-voicemail_id Voicemail ID This is the voicemail box that calls will be directed to in an AGENTDIRECT in-group at the drop time if the in-group has the drop method set to VOICEMAIL and the Voicemail field set to AGENTVMAIL. users-optional User Code and Territory These are optional fields. +users-user_location User Location This menu allows you to choose the location for this user. This location can be used by some reports in the system. The options for this menu are defined in the USER_LOCATIONS_SYSTEM Settings Container in the Admin - Settings Containers web admin page. The format for this container is -location|description- without the dashes. Locations and their Descriptions must each be less than 100 characters in length. default is -blank-. users-email Email This field can be used by some scripts and functions, like dispo_send_email.php and two-factor-authentication, referenced by the --A--agent_email--B-- variable. users-mobile_number Mobile Number This field can be used by two-factor-authentication, if your system is configured for it. users-user_nickname User Nickname Optional alternative name used for agent when chatting with customers in the customer website chat feature. Only used if populated. @@ -746,6 +747,7 @@ cid_groups-cid_auto_rotate_minutes CID Auto Rotate Minutes This feature onl cid_groups-cid_auto_rotate_minimum CID Auto Rotate Minimum Works together with the CID Auto Rotate Minutes setting above, if it is enabled, and will not rotate to the next CID until at least this number of calls have been placed while active for the current CID that is dialing. Default is 0 for no limit. cid_groups-cid_auto_rotate_calls CID Auto Rotate Calls, CID and Time Shows the number of calls placed using the current CID, the CID currently being used and the Date-Time the CID was activated. vm_message_groups VM Message Groups Voicemail Message Groups are designed to allow agents to select from several messages to leave on a customer voicemail box when transferring to a voicemail message in the agent screen. The ID must be from 2 to 40 characters in length with no punctuation other than an underscore allowed. The Name must be from 5 to 255 characters in length. Active will determine if the VM Message Group is shown as an option in the campaign modify screen setting for VM Message Groups. For the Audio Files, you can define the order in which they appear on the agent screen by using the Rank setting. The Time Range will define what time of the customers day the message are displayed on the agent screen, in 2400 hours time format. The Display is what text will show up for this audio file on the agent screen. +queue_groups Queue Groups Queue Groups are used by some reports to show stats from a group of campaigns and-or inbound groups. The ID must be from 2 to 20 characters in length with no punctuation other than an underscore allowed. The Name must be from 5 to 40 characters in length. Active will determine if the Queue Group is shown as an option in reports. For the Included Campaigns and Inbound Groups, you can select the ones that you want to be included in the Queue Group. inbound_groups-park_ext Park Music-on-Hold This optional setting will override the agent campaign setting for Park Music-on-Hold, if populated. Default is empty for disabled. inbound_groups-populate_lead_source Populate Lead Source If this option is not DISABLED and there is no source_id channel variable set on the call, then the system will fill the source_id lead field with one of the other options when leads are added with an inbound call. INBOUND_NUMBER will use the inbound phone number dialed. BLANK will leave the source_id field blank. DISABLED will use the default behavior which will set the source_id field to VDCL. Default is DISABLED. user_groups-user_group User Group This is the short name of a User group, try not to use any spaces or punctuation for this field. max 20 characters, minimum of 2 characters. diff --git a/www/vicidial/images/icon_queuegroups.png b/www/vicidial/images/icon_queuegroups.png new file mode 100644 index 00000000..5265cbd3 Binary files /dev/null and b/www/vicidial/images/icon_queuegroups.png differ diff --git a/www/vicidial/images/icon_queuegroups_white.png b/www/vicidial/images/icon_queuegroups_white.png new file mode 100644 index 00000000..e34b6de3 Binary files /dev/null and b/www/vicidial/images/icon_queuegroups_white.png differ
\n"; + echo "\"Queue "; + + echo "
"._QXZ("ADD NEW QUEUE GROUP")."
\n"; + echo "\n"; + echo "
\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
"._QXZ("Queue Group ID").": $NWB#queue_groups$NWE
"._QXZ("Queue Group Name").": $NWB#queue_groups$NWE
"._QXZ("Active").": $NWB#queue_groups$NWE
"._QXZ("Admin User Group").": $NWB#queue_groups$NWE
\n"; + } + else + { + echo _QXZ("You do not have permission to view this page")."\n"; + exit; + } + } + + ###################### # ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN ###################### @@ -11530,7 +11673,7 @@ if ($ADD=="2A") $pass=''; } - $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts,preset_contact_search,modify_contacts,modify_same_user_level,admin_hide_lead_data,admin_hide_phone_data,agentcall_email,agentcall_chat,modify_email_accounts,pass_hash,alter_admin_interface_options,max_inbound_calls,modify_custom_dialplans,wrapup_seconds_override,modify_languages,selected_language,user_choose_language,ignore_group_on_search,api_list_restrict,api_allowed_functions,lead_filter_id,admin_cf_show_hidden,user_hide_realtime,modify_colors,user_nickname,user_new_lead_limit,api_only_user,modify_auto_reports,modify_ip_lists,ignore_ip_list,ready_max_logout,export_gdpr_leads,access_recordings,pause_code_approval,max_hopper_calls,max_hopper_calls_hour,mute_recordings,hide_call_log_info,next_dial_my_callbacks,user_admin_redirect_url,max_inbound_filter_enabled,max_inbound_filter_statuses,max_inbound_filter_ingroups,max_inbound_filter_min_sec,status_group_id,mobile_number,two_factor_override,manual_dial_filter) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts,preset_contact_search,modify_contacts,modify_same_user_level,admin_hide_lead_data,admin_hide_phone_data,agentcall_email,agentcall_chat,modify_email_accounts,\"$pass_hash\",alter_admin_interface_options,max_inbound_calls,modify_custom_dialplans,wrapup_seconds_override,modify_languages,selected_language,user_choose_language,ignore_group_on_search,api_list_restrict,api_allowed_functions,lead_filter_id,admin_cf_show_hidden,user_hide_realtime,modify_colors,user_nickname,user_new_lead_limit,api_only_user,modify_auto_reports,modify_ip_lists,ignore_ip_list,ready_max_logout,export_gdpr_leads,access_recordings,pause_code_approval,max_hopper_calls,max_hopper_calls_hour,mute_recordings,hide_call_log_info,next_dial_my_callbacks,user_admin_redirect_url,max_inbound_filter_enabled,max_inbound_filter_statuses,max_inbound_filter_ingroups,max_inbound_filter_min_sec,status_group_id,mobile_number,two_factor_override,manual_dial_filter from vicidial_users where user=\"$source_user_id\";"; + $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts,preset_contact_search,modify_contacts,modify_same_user_level,admin_hide_lead_data,admin_hide_phone_data,agentcall_email,agentcall_chat,modify_email_accounts,pass_hash,alter_admin_interface_options,max_inbound_calls,modify_custom_dialplans,wrapup_seconds_override,modify_languages,selected_language,user_choose_language,ignore_group_on_search,api_list_restrict,api_allowed_functions,lead_filter_id,admin_cf_show_hidden,user_hide_realtime,modify_colors,user_nickname,user_new_lead_limit,api_only_user,modify_auto_reports,modify_ip_lists,ignore_ip_list,ready_max_logout,export_gdpr_leads,access_recordings,pause_code_approval,max_hopper_calls,max_hopper_calls_hour,mute_recordings,hide_call_log_info,next_dial_my_callbacks,user_admin_redirect_url,max_inbound_filter_enabled,max_inbound_filter_statuses,max_inbound_filter_ingroups,max_inbound_filter_min_sec,status_group_id,mobile_number,two_factor_override,manual_dial_filter,user_location) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts,preset_contact_search,modify_contacts,modify_same_user_level,admin_hide_lead_data,admin_hide_phone_data,agentcall_email,agentcall_chat,modify_email_accounts,\"$pass_hash\",alter_admin_interface_options,max_inbound_calls,modify_custom_dialplans,wrapup_seconds_override,modify_languages,selected_language,user_choose_language,ignore_group_on_search,api_list_restrict,api_allowed_functions,lead_filter_id,admin_cf_show_hidden,user_hide_realtime,modify_colors,user_nickname,user_new_lead_limit,api_only_user,modify_auto_reports,modify_ip_lists,ignore_ip_list,ready_max_logout,export_gdpr_leads,access_recordings,pause_code_approval,max_hopper_calls,max_hopper_calls_hour,mute_recordings,hide_call_log_info,next_dial_my_callbacks,user_admin_redirect_url,max_inbound_filter_enabled,max_inbound_filter_statuses,max_inbound_filter_ingroups,max_inbound_filter_min_sec,status_group_id,mobile_number,two_factor_override,manual_dial_filter,user_location from vicidial_users where user=\"$source_user_id\";"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,calls_today,group_type) SELECT \"$user\",group_id,group_rank,group_weight,\"0\",group_type from vicidial_inbound_group_agents where user=\"$source_user_id\";"; @@ -15102,6 +15245,48 @@ if ($ADD==297111111111) } +###################### +# ADD=298111111111 adds new Queue Group to the system +###################### +if ($ADD==298111111111) + { + if ( ($LOGmodify_statuses!=1) or ($add_copy_disabled > 0) ) + { + echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; + } + else + { + echo ""; + $stmt="SELECT count(*) from vicidial_queue_groups where queue_group='$queue_group';"; + $rslt=mysql_to_mysqli($stmt, $link); + $row=mysqli_fetch_row($rslt); + if ($row[0] > 0) + {echo "
"._QXZ("VM MESSAGE GROUP NOT ADDED - there is already a VM MESSAGE GROUP in the system with this ID")."\n";} + else + { + if ( (strlen($queue_group) < 2) or (strlen($queue_group_name) < 2) or (strlen($active) < 1) ) + {echo "
"._QXZ("VM MESSAGE GROUP NOT ADDED - Please go back and look at the data you entered")."\n";} + else + { + echo "
"._QXZ("VM MESSAGE GROUP ADDED")."\n"; + + $stmt="INSERT INTO vicidial_queue_groups SET queue_group='$queue_group',queue_group_name='$queue_group_name',active='$active',user_group='$user_group';"; + $rslt=mysql_to_mysqli($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = preg_replace('/;/', '', $SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='QUEUEGROUPS', event_type='ADD', record_id='$queue_group', event_code='ADMIN ADD QUEUE GROUP', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_to_mysqli($stmt, $link); + } + } + } + $ADD=398111111111; + } + + ###################### # ADD=2111111111111 adds new conference to the system ###################### @@ -15383,7 +15568,7 @@ if ($ADD=="4A") echo "
"._QXZ("USER MODIFIED - ADMIN").": $user\n"; - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override',export_reports='$export_reports',delete_from_dnc='$delete_from_dnc',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',voicemail_id='$voicemail_id',agent_call_log_view_override='$agent_call_log_view_override',callcard_admin='$callcard_admin',agent_choose_blended='$agent_choose_blended',realtime_block_user_info='$realtime_block_user_info',custom_fields_modify='$custom_fields_modify',force_change_password='$force_change_password',agent_lead_search_override='$agent_lead_search',modify_shifts='$modify_shifts',modify_phones='$modify_phones',modify_carriers='$modify_carriers',modify_labels='$modify_labels',modify_statuses='$modify_statuses',modify_voicemail='$modify_voicemail',modify_audiostore='$modify_audiostore',modify_moh='$modify_moh',modify_tts='$modify_tts',preset_contact_search='$preset_contact_search',modify_contacts='$modify_contacts',modify_same_user_level='$modify_same_user_level',admin_hide_lead_data='$admin_hide_lead_data',admin_hide_phone_data='$admin_hide_phone_data',agentcall_email='$agentcall_email',agentcall_chat='$agentcall_chat',modify_email_accounts='$modify_email_accounts',failed_login_count=0,alter_admin_interface_options='$alter_admin_interface_options',max_inbound_calls='$max_inbound_calls',modify_custom_dialplans='$modify_custom_dialplans',wrapup_seconds_override='$wrapup_seconds_override',modify_languages='$modify_languages',selected_language='$selected_language',user_choose_language='$user_choose_language',ignore_group_on_search='$ignore_group_on_search',api_list_restrict='$api_list_restrict',api_allowed_functions='$api_allowed_functions',lead_filter_id='$lead_filter_id',admin_cf_show_hidden='$admin_cf_show_hidden',user_hide_realtime='$user_hide_realtime',access_recordings='$access_recordings',modify_colors='$modify_colors',user_nickname='$user_nickname',user_new_lead_limit='$user_new_lead_limit',api_only_user='$api_only_user',modify_auto_reports='$modify_auto_reports',modify_ip_lists='$modify_ip_lists',ignore_ip_list='$ignore_ip_list',ready_max_logout='$ready_max_logout',export_gdpr_leads='$export_gdpr_leads',pause_code_approval='$pause_code_approval',max_hopper_calls='$max_hopper_calls',max_hopper_calls_hour='$max_hopper_calls_hour',mute_recordings='$mute_recordings',hide_call_log_info='$hide_call_log_info',next_dial_my_callbacks='$next_dial_my_callbacks',user_admin_redirect_url='" . mysqli_real_escape_string($link, $user_admin_redirect_url) . "',max_inbound_filter_enabled='$max_inbound_filter_enabled',max_inbound_filter_statuses='$max_inbound_filter_statuses',max_inbound_filter_ingroups='$max_inbound_filter_ingroups',max_inbound_filter_min_sec='$max_inbound_filter_min_sec',status_group_id='$status_group_id',mobile_number='$mobile_number',two_factor_override='$two_factor_override',manual_dial_filter='$manual_dial_filter' $pass_hashSQL where user='$user' $LOGadmin_viewable_groupsSQL;"; + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override',export_reports='$export_reports',delete_from_dnc='$delete_from_dnc',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',voicemail_id='$voicemail_id',agent_call_log_view_override='$agent_call_log_view_override',callcard_admin='$callcard_admin',agent_choose_blended='$agent_choose_blended',realtime_block_user_info='$realtime_block_user_info',custom_fields_modify='$custom_fields_modify',force_change_password='$force_change_password',agent_lead_search_override='$agent_lead_search',modify_shifts='$modify_shifts',modify_phones='$modify_phones',modify_carriers='$modify_carriers',modify_labels='$modify_labels',modify_statuses='$modify_statuses',modify_voicemail='$modify_voicemail',modify_audiostore='$modify_audiostore',modify_moh='$modify_moh',modify_tts='$modify_tts',preset_contact_search='$preset_contact_search',modify_contacts='$modify_contacts',modify_same_user_level='$modify_same_user_level',admin_hide_lead_data='$admin_hide_lead_data',admin_hide_phone_data='$admin_hide_phone_data',agentcall_email='$agentcall_email',agentcall_chat='$agentcall_chat',modify_email_accounts='$modify_email_accounts',failed_login_count=0,alter_admin_interface_options='$alter_admin_interface_options',max_inbound_calls='$max_inbound_calls',modify_custom_dialplans='$modify_custom_dialplans',wrapup_seconds_override='$wrapup_seconds_override',modify_languages='$modify_languages',selected_language='$selected_language',user_choose_language='$user_choose_language',ignore_group_on_search='$ignore_group_on_search',api_list_restrict='$api_list_restrict',api_allowed_functions='$api_allowed_functions',lead_filter_id='$lead_filter_id',admin_cf_show_hidden='$admin_cf_show_hidden',user_hide_realtime='$user_hide_realtime',access_recordings='$access_recordings',modify_colors='$modify_colors',user_nickname='$user_nickname',user_new_lead_limit='$user_new_lead_limit',api_only_user='$api_only_user',modify_auto_reports='$modify_auto_reports',modify_ip_lists='$modify_ip_lists',ignore_ip_list='$ignore_ip_list',ready_max_logout='$ready_max_logout',export_gdpr_leads='$export_gdpr_leads',pause_code_approval='$pause_code_approval',max_hopper_calls='$max_hopper_calls',max_hopper_calls_hour='$max_hopper_calls_hour',mute_recordings='$mute_recordings',hide_call_log_info='$hide_call_log_info',next_dial_my_callbacks='$next_dial_my_callbacks',user_admin_redirect_url='" . mysqli_real_escape_string($link, $user_admin_redirect_url) . "',max_inbound_filter_enabled='$max_inbound_filter_enabled',max_inbound_filter_statuses='$max_inbound_filter_statuses',max_inbound_filter_ingroups='$max_inbound_filter_ingroups',max_inbound_filter_min_sec='$max_inbound_filter_min_sec',status_group_id='$status_group_id',mobile_number='$mobile_number',two_factor_override='$two_factor_override',manual_dial_filter='$manual_dial_filter',user_location='$user_location' $pass_hashSQL where user='$user' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -15672,7 +15857,7 @@ if ($ADD=="4B") echo "
"._QXZ("USER MODIFIED - ADMIN").": $user\n"; - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',alter_custphone_override='$alter_custphone_override',active='$active',agent_shift_enforcement_override='$agent_shift_enforcement_override',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',voicemail_id='$voicemail_id',agent_call_log_view_override='$agent_call_log_view_override',agent_choose_blended='$agent_choose_blended',agent_lead_search_override='$agent_lead_search',preset_contact_search='$preset_contact_search',max_inbound_calls='$max_inbound_calls',wrapup_seconds_override='$wrapup_seconds_override',lead_filter_id='$lead_filter_id',user_hide_realtime='$user_hide_realtime',user_nickname='$user_nickname',user_new_lead_limit='$user_new_lead_limit',ready_max_logout='$ready_max_logout',failed_login_count=0,max_hopper_calls='$max_hopper_calls',max_hopper_calls_hour='$max_hopper_calls_hour',hide_call_log_info='$hide_call_log_info',next_dial_my_callbacks='$next_dial_my_callbacks',max_inbound_filter_enabled='$max_inbound_filter_enabled',max_inbound_filter_statuses='$max_inbound_filter_statuses',max_inbound_filter_ingroups='$max_inbound_filter_ingroups',max_inbound_filter_min_sec='$max_inbound_filter_min_sec',status_group_id='$status_group_id',mobile_number='$mobile_number' $pass_hashSQL where user='$user' $LOGadmin_viewable_groupsSQL;"; + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',alter_custphone_override='$alter_custphone_override',active='$active',agent_shift_enforcement_override='$agent_shift_enforcement_override',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',voicemail_id='$voicemail_id',agent_call_log_view_override='$agent_call_log_view_override',agent_choose_blended='$agent_choose_blended',agent_lead_search_override='$agent_lead_search',preset_contact_search='$preset_contact_search',max_inbound_calls='$max_inbound_calls',wrapup_seconds_override='$wrapup_seconds_override',lead_filter_id='$lead_filter_id',user_hide_realtime='$user_hide_realtime',user_nickname='$user_nickname',user_new_lead_limit='$user_new_lead_limit',ready_max_logout='$ready_max_logout',failed_login_count=0,max_hopper_calls='$max_hopper_calls',max_hopper_calls_hour='$max_hopper_calls_hour',hide_call_log_info='$hide_call_log_info',next_dial_my_callbacks='$next_dial_my_callbacks',max_inbound_filter_enabled='$max_inbound_filter_enabled',max_inbound_filter_statuses='$max_inbound_filter_statuses',max_inbound_filter_ingroups='$max_inbound_filter_ingroups',max_inbound_filter_min_sec='$max_inbound_filter_min_sec',status_group_id='$status_group_id',mobile_number='$mobile_number',user_location='$user_location' $pass_hashSQL where user='$user' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); @@ -15934,7 +16119,7 @@ if ($ADD==4) echo "
"._QXZ("USER MODIFIED").": $user\n"; - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',active='$active',email='$email',user_code='$user_code',territory='$territory',user_nickname='$user_nickname',user_new_lead_limit='$user_new_lead_limit',failed_login_count=0,mobile_number='$mobile_number' $pass_hashSQL where user='$user' $LOGadmin_viewable_groupsSQL;"; + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',active='$active',email='$email',user_code='$user_code',territory='$territory',user_nickname='$user_nickname',user_new_lead_limit='$user_new_lead_limit',failed_login_count=0,mobile_number='$mobile_number',user_location='$user_location' $pass_hashSQL where user='$user' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -19261,6 +19446,46 @@ if ($ADD==497111111111) } +###################### +# ADD=498111111111 modify Queue Group record in the system +###################### +if ($ADD==498111111111) + { + if ($LOGmodify_statuses==1) + { + echo ""; + + if ( (strlen($queue_group) < 2) or (strlen($queue_group_name) < 5) ) + {echo "
QUEUE GROUP ENTRY NOT MODIFIED - Please go back and look at the data you entered\n";} + else + { + $stmt="UPDATE vicidial_queue_groups set queue_group_name='$queue_group_name',active='$active',user_group='$user_group',included_inbound_groups='$qg_groups_value',included_campaigns='$qg_campaigns_value' where queue_group='$queue_group';"; + $rslt=mysql_to_mysqli($stmt, $link); + $affected_rowsA = mysqli_affected_rows($link); + if ($DB > 0) {echo "|$affected_rowsA|$stmt|\n";} + $stmtLIST = $stmt; + + + echo "
"._QXZ("QUEUE GROUP ENTRY MODIFIED").": $queue_group\n"; + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmtLIST|$stmtA|"; + $SQL_log = preg_replace('/;/', '', $SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='QUEUEGROUP', event_type='MODIFY', record_id='$queue_group', event_code='ADMIN MODIFY QUEUE GROUP', event_sql=\"$SQL_log\", event_notes='$affected_rowsA $affected_rowsB $affected_rowsC';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_to_mysqli($stmt, $link); + } + } + else + { + echo _QXZ("You do not have permission to view this page")."\n"; + exit; + } + $ADD=398111111111; # go to Queue Group entry modification form below + } + + ###################### # ADD=471111111111 modify voicemail record in the system ###################### @@ -21165,13 +21390,34 @@ if ($ADD==597111111111) } else { - echo "
"._QXZ("VM MESSAGE GROUP DELETION CONFIRMATION").": $cid_group_id\n"; + echo "
"._QXZ("VM MESSAGE GROUP DELETION CONFIRMATION").": $leave_vm_message_group_id\n"; echo "

"._QXZ("Click here to delete VM Message group")." $leave_vm_message_group_id


\n"; } $ADD='397111111111'; # go to VM Message Group entry modification below } +###################### +# ADD=598111111111 confirmation before deletion of Queue Group record +###################### +if ($ADD==598111111111) + { + echo ""; + + if (strlen($queue_group) < 2) + { + echo "
"._QXZ("QUEUE GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; + echo "
"._QXZ("QUEUE Group ID be at least 2 characters in length")."\n"; + } + else + { + echo "
"._QXZ("QUEUE GROUP DELETION CONFIRMATION").": $queue_group\n"; + echo "

"._QXZ("Click here to delete Queue Group")." $queue_group


\n"; + } + $ADD='398111111111'; # go to Queue Group entry modification below + } + + ###################### # ADD=5111111111111 confirmation before deletion of conference record ###################### @@ -23697,6 +23943,46 @@ if ($ADD==697111111111) } +###################### +# ADD=698111111111 delete Queue Groups record +###################### +if ($ADD==698111111111) + { + echo ""; + + if ( (strlen($queue_group) < 2) or ($CoNfIrM != 'YES') or ($LOGmodify_statuses!=1) ) + { + echo "
"._QXZ("QUEUE GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; + echo "
"._QXZ("Queue Group ID must be at least 2 characters in length")."\n"; + } + else + { + $stmt="SELECT count(*) from vicidial_queue_groups where queue_group='$queue_group' $LOGadmin_viewable_groupsSQL;"; + $rslt=mysql_to_mysqli($stmt, $link); + $row=mysqli_fetch_row($rslt); + if ($row[0] < 1) + {echo "
"._QXZ("QUEUE GROUP NOT FOUND").": $queue_group\n";} + else + { + $stmt="DELETE from vicidial_queue_groups where queue_group='$queue_group' $LOGadmin_viewable_groupsSQL;"; + $rslt=mysql_to_mysqli($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = preg_replace('/;/', '', $SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='QUEUEGROUPS', event_type='DELETE', record_id='$queue_group', event_code='ADMIN DELETE QUEUE GROUP', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_to_mysqli($stmt, $link); + + echo "
"._QXZ("QUEUE GROUP DELETION COMPLETED").": $queue_group\n"; + echo "

\n"; + } + } + $ADD='198000000000'; # go to Queue Groups entry list + } + + ###################### # ADD=6111111111111 delete conference record ###################### @@ -23791,7 +24077,7 @@ if ($ADD==3) echo "\n"; echo "\n"; echo "\n"; + + + + ##### get container entry for USER_LOCATIONS_SYSTEM for pulldown menu + $raw_location_data=";location|description\n|default\n"; + $stmt="SELECT container_entry from vicidial_settings_containers where container_id='USER_LOCATIONS_SYSTEM';"; + $rslt=mysql_to_mysqli($stmt, $link); + $loc_to_print = mysqli_num_rows($rslt); + if ($loc_to_print > 0) + { + $rowx=mysqli_fetch_row($rslt); + $raw_location_data = $rowx[0]; + } + $location_ARY = explode("\n",$raw_location_data); + $location_ct = count($location_ARY); + $location_container_menu=''; + $loc_selected=0; + $o=0; + while ($location_ct > $o) + { + if ( (!preg_match("/^;/",$location_ARY[$o])) and (strlen($location_ARY[$o]) > 2) and (preg_match("/\|/",$location_ARY[$o])) ) + { + $location_item_ARY = explode('|',$location_ARY[$o]); + if (mb_strlen($location_item_ARY[1],'utf-8')>50) + {$location_item_ARY[1] = mb_substr($location_item_ARY[1],0,50,'utf-8') . '...';} + $location_container_menu .= "\n"; + } + $o++; + } + echo "\n"; + echo "\n"; echo "\n"; @@ -39486,6 +39810,76 @@ if ($ADD==397111111111) } +###################### +# ADD=398111111111 modify Queue Group record in the system +###################### +if ($ADD==398111111111) + { + if ($LOGmodify_statuses==1) + { + if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) + { + $modify_url = "$PHP_SELF?ADD=398111111111&queue_group_name=$queue_group_name"; + $modify_footer_refresh=1; + } + echo "
\n"; echo ""; - $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts,preset_contact_search,modify_contacts,modify_same_user_level,admin_hide_lead_data,admin_hide_phone_data,agentcall_email,modify_email_accounts,failed_login_count,last_login_date,last_ip,alter_admin_interface_options,max_inbound_calls,modify_custom_dialplans,wrapup_seconds_override,modify_languages,selected_language,user_choose_language,ignore_group_on_search,api_list_restrict,api_allowed_functions,lead_filter_id,agentcall_chat,admin_cf_show_hidden,user_hide_realtime,access_recordings,modify_colors,user_nickname,user_new_lead_limit,api_only_user,modify_auto_reports,modify_ip_lists,ignore_ip_list,ready_max_logout,export_gdpr_leads,pause_code_approval,max_hopper_calls,max_hopper_calls_hour,mute_recordings,hide_call_log_info,next_dial_my_callbacks,user_admin_redirect_url,max_inbound_filter_enabled,max_inbound_filter_statuses,max_inbound_filter_ingroups,max_inbound_filter_min_sec,status_group_id,mobile_number,two_factor_override,manual_dial_filter from vicidial_users where user='$user' $LOGadmin_viewable_groupsSQL;"; + $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts,preset_contact_search,modify_contacts,modify_same_user_level,admin_hide_lead_data,admin_hide_phone_data,agentcall_email,modify_email_accounts,failed_login_count,last_login_date,last_ip,alter_admin_interface_options,max_inbound_calls,modify_custom_dialplans,wrapup_seconds_override,modify_languages,selected_language,user_choose_language,ignore_group_on_search,api_list_restrict,api_allowed_functions,lead_filter_id,agentcall_chat,admin_cf_show_hidden,user_hide_realtime,access_recordings,modify_colors,user_nickname,user_new_lead_limit,api_only_user,modify_auto_reports,modify_ip_lists,ignore_ip_list,ready_max_logout,export_gdpr_leads,pause_code_approval,max_hopper_calls,max_hopper_calls_hour,mute_recordings,hide_call_log_info,next_dial_my_callbacks,user_admin_redirect_url,max_inbound_filter_enabled,max_inbound_filter_statuses,max_inbound_filter_ingroups,max_inbound_filter_min_sec,status_group_id,mobile_number,two_factor_override,manual_dial_filter,user_location from vicidial_users where user='$user' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $user_id = $row[0]; @@ -23934,6 +24220,7 @@ if ($ADD==3) $mobile_number = $row[139]; $two_factor_override = $row[140]; $manual_dial_filter = $row[141]; + $user_location = $row[142]; ##### latest 2FA auth record data $last_auth=''; @@ -24022,6 +24309,43 @@ if ($ADD==3) echo "
"._QXZ("Email").": $NWB#users-email$NWE
"._QXZ("Mobile Number").": $NWB#users-mobile_number$NWE
"._QXZ("User Code").": $NWB#users-optional$NWE
"._QXZ("User Location").": $NWB#users-user_location$NWE
"._QXZ("Main Territory").": $NWB#users-optional$NWE
"._QXZ("User Nickname").": $NWB#users-user_nickname$NWE
\n"; + ##### get container entry for USER_LOCATIONS_SYSTEM for pulldown menu + $user_locations_ct=0; + $raw_location_data=";location|description\n|default\n"; + $stmt="SELECT container_entry from vicidial_settings_containers where container_id='USER_LOCATIONS_SYSTEM';"; + $rslt=mysql_to_mysqli($stmt, $link); + $loc_to_print = mysqli_num_rows($rslt); + if ($loc_to_print > 0) + { + $rowx=mysqli_fetch_row($rslt); + $raw_location_data = $rowx[0]; + } + $location_ARY = explode("\n",$raw_location_data); + $location_ct = count($location_ARY); + $o=0; + while ($location_ct > $o) + { + if ( (!preg_match("/^;/",$location_ARY[$o])) and (strlen($location_ARY[$o]) > 2) and (preg_match("/\|/",$location_ARY[$o])) ) + { + $user_locations_ct++; + } + $o++; + } + echo "\n"; + echo "\n"; echo "\n"; @@ -45187,6 +45605,84 @@ if ($ADD==197000000000) } +###################### +# ADD=198000000000 display all Queue Group entries +###################### +if ($ADD==198000000000) + { + echo "
\n"; + echo ""; + + $stmt="SELECT queue_group,queue_group_name,active,user_group,included_campaigns,included_inbound_groups from vicidial_queue_groups where queue_group='$queue_group' $LOGadmin_viewable_groupsSQL;"; + $rslt=mysql_to_mysqli($stmt, $link); + $row=mysqli_fetch_row($rslt); + $queue_group = $row[0]; + $queue_group_name = $row[1]; + $active = $row[2]; + $user_group = (preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]); + $included_campaigns = $row[4]; + $included_inbound_groups = $row[5]; + + echo "
"._QXZ("MODIFY A QUEUE GROUP RECORD").": $queue_group\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
"._QXZ("Queue Group ID").": $queue_group
"._QXZ("Queue Group Name").": $NWB#queue_groups$NWE
"._QXZ("Admin User Group").": $NWB#queue_groups$NWE
"._QXZ("Active").": $NWB#queue_groups$NWE
"._QXZ("Included Campaigns").":
$NWB#queue_groups$NWE
\n"; + echo "$qg_campaigns_list"; + echo "
 
"._QXZ("Included Inbound Groups").":
$NWB#queue_groups$NWE
\n"; + echo "$qg_groups_list"; + echo "
 
\n"; + + echo "
\n"; + + if ($LOGast_delete_phones > 0) + { + echo "

"._QXZ("DELETE QUEUE GROUP ENTRY")."\n"; + } + if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) + { + echo "

"._QXZ("Click here to see Admin changes to this Queue Group entry")."
\n"; + } + } + else + { + echo _QXZ("You do not have permission to view this page")."\n"; + exit; + } + } + + ###################### # ADD=371111111111 modify voicemail box in the system ###################### @@ -41632,6 +42026,30 @@ if ($ADD==311111111111111) echo "
"._QXZ("User Territories Active").": $NWB#settings-user_territories_active$NWE
"._QXZ("User Locations").": $user_locations_ct   $NWB#users-user_location$NWE
"._QXZ("List Status Modification Confirmation").": $NWB#settings-list_status_modification_confirmation$NWE
"._QXZ("Enable First Webform").": $NWB#settings-enable_first_webform$NWE
\n"; echo "\n"; } + echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=195000000000';\"";} echo ">\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo " "; + + $stmt="SELECT queue_group,queue_group_name,active,user_group,included_campaigns,included_inbound_groups from vicidial_queue_groups $whereLOGadmin_viewable_groupsSQL order by queue_group;"; + $rslt=mysql_to_mysqli($stmt, $link); + $queue_groups_to_print = mysqli_num_rows($rslt); + if ($DB) {echo "|$queue_groups_to_print|$stmt|\n";} + + echo "
"._QXZ("QUEUE GROUP LISTINGS").":\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + + $o=0; + $queue_group_ids = $MT; + $queue_group_names = $MT; + $QGactive = $MT; + $QGentries = $MT; + $admin_group = $MT; + + while ($queue_groups_to_print > $o) + { + $row=mysqli_fetch_row($rslt); + $queue_group_ids[$o] = $row[0]; + $queue_group_names[$o] = $row[1]; + $QGactive[$o] = _QXZ("$row[2]"); + $admin_group[$o] = (preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]); + $temp_included_campaigns = $row[4]; + $temp_included_campaigns = preg_replace("/ -$/",'',$temp_included_campaigns); + $temp_included_inbound_groups = $row[5]; + $temp_included_inbound_groups = preg_replace("/ -$/",'',$temp_included_inbound_groups); + $QGentries[$o] = "$temp_included_campaigns$temp_included_inbound_groups"; + if ($DB) {echo "
$o|$queue_group_ids[$o]|$queue_group_names[$o]|$QGentries[$o]|\n";} + $o++; + } + + $o=0; + while ($queue_groups_to_print > $o) + { + if (preg_match('/1$|3$|5$|7$|9$/i', $o)) + {$bgcolor='class="records_list_x"';} + else + {$bgcolor='class="records_list_y"';} + $temp_entries_ct=0; + if (preg_match("/ /",$QGentries[$o])) + { + $temp_entries_ARY = explode(' ',$QGentries[$o]); + $temp_entries_ct = count($temp_entries_ARY); + while(strlen($QGentries[$o]) > 40) {$QGentries[$o] = preg_replace("/.$/",'',$QGentries[$o]);} + if (strlen($QGentries[$o]) >= 40) {$QGentries[$o] .= "...";} + } + + echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=398111111111&queue_group=$queue_group_ids[$o]'\"";} echo ">"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; + } + + echo "
"._QXZ("QUEUE GROUP ID").""._QXZ("NOTES").""._QXZ("ACTIVE").""._QXZ("GROUP").""._QXZ("#").""._QXZ("ENTRIES").""._QXZ("MODIFY")."
$queue_group_ids[$o] $queue_group_names[$o] "._QXZ("$QGactive[$o]")." $admin_group[$o] $temp_entries_ct $QGentries[$o]"._QXZ("MODIFY")."
\n"; + } + + ###################### # ADD=1000000000000 display all conferences ###################### @@ -46935,6 +47431,11 @@ if ($ADD==999998) echo "
"._QXZ("IP Lists")."
"._QXZ("Queue Groups")."
\n"; echo "
  \n"; } diff --git a/www/vicidial/admin_header.php b/www/vicidial/admin_header.php index 3739b56e..f256baec 100644 --- a/www/vicidial/admin_header.php +++ b/www/vicidial/admin_header.php @@ -89,6 +89,7 @@ # 210306-0902 - Changes for new QC module # 210707-0730 - Added header links for timezones, phone codes and postal codes # 210907-1904 - Added new OWNERCUSTOMx handle methods for menu options +# 211208-1920 - Added Queue Groups to admin sidebar and sub-menu # $stmt="SELECT admin_home_url,enable_tts_integration,callcard_enabled,custom_fields_enabled,allow_emails,level_8_disable_add,allow_chats,enable_languages,admin_row_click,admin_screen_colors,user_new_lead_limit,user_territories_active,qc_features_active,agent_soundboards,enable_drop_lists,allow_ip_lists from system_settings;"; @@ -2334,6 +2335,7 @@ if ($subcamp_font_size < 4) {$subcamp_font_size='11';} $sg_sh="CLASS=\"subhead_style\""; $cg_sh="CLASS=\"subhead_style\""; $vmmg_sh="CLASS=\"subhead_style\""; + $qg_sh="CLASS=\"subhead_style\""; $emails_sh="CLASS=\"subhead_style\""; $ar_sh="CLASS=\"subhead_style\""; $il_sh="CLASS=\"subhead_style\""; @@ -2361,6 +2363,7 @@ if ($subcamp_font_size < 4) {$subcamp_font_size='11';} if ($sh=='sg') {$sg_sh="CLASS=\"subhead_style_selected\"";} if ($sh=='cg') {$cg_sh="CLASS=\"subhead_style_selected\"";} if ($sh=='vmmg') {$vmmg_sh="CLASS=\"subhead_style_selected\"";} + if ($sh=='qg') {$qg_sh="CLASS=\"subhead_style_selected\"";} if ($sh=='emails') {$emails_sh="CLASS=\"subhead_style_selected\"";} if ($sh=='ar') {$ar_sh="CLASS=\"subhead_style_selected\"";} if ($sh=='il') {$il_sh="CLASS=\"subhead_style_selected\"";} @@ -2483,6 +2486,11 @@ if ($subcamp_font_size < 4) {$subcamp_font_size='11';}
>   +   \"Queue
    |  
    |  
    |     |