diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE
index ce629a85..e15af432 100644
--- a/agc_2-X/trunk/UPGRADE
+++ b/agc_2-X/trunk/UPGRADE
@@ -485,6 +485,9 @@ OTHER CHANGES:
135. Added AMD Agent Route Options as a campaign option allowing you to set
the specific AMD responses for calls that should be routed to agents
+136. Added the "list_custom_fields" Non-Agent API function, to show all list
+ custom data fields in a list/all-lists.
+
diff --git a/agc_2-X/trunk/docs/NON-AGENT_API.txt b/agc_2-X/trunk/docs/NON-AGENT_API.txt
index 76654967..e4edf9a9 100644
--- a/agc_2-X/trunk/docs/NON-AGENT_API.txt
+++ b/agc_2-X/trunk/docs/NON-AGENT_API.txt
@@ -1,4 +1,4 @@
-NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2019-11-14
+NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2020-03-31
This document describes the functions of an API(Application Programming
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
@@ -32,6 +32,7 @@ update_phone_alias - updates or deletes an existing phone alias record in the sy
add_list - adds a list to the system
update_list - updates list settings in the system, reset leads in list, delete list
list_info - summary information about a list
+list_custom_fields - shows the custom fields that are in a list, or all lists
add_group_alias - adds group alias to the system
user_group_status - real-time status of one or more user groups
in_group_status - real-time status of one or more in groups
@@ -152,6 +153,7 @@ Changes:
191107-1143 - Added list_info function
191113-1758 - Added add_dnc_phone and add_fpg_phone functions
191114-1637 - Added remove_from_hopper option to update_lead function
+200331-1207 - Added list_custom_fields function
API Functions use the 'function' variable
@@ -1595,6 +1597,42 @@ list_id|list_name|campaign_id|active|list_changedate|list_lastcalldate|expiratio
+
+--------------------------------------------------------------------------------
+list_custom_fields - shows the custom data fields that are in a list, or all lists
+
+NOTE: api user for this function must have user_level set to 8 or higher and "modify lists" enabled
+NOTE: this output will not include display-only fields in the FORM, only the non-default custom data fields,
+ any DISPLAY, SCRIPT and SWITCH form elements will be ignored
+
+REQUIRED FIELDS-
+list_id - must be all numbers, 2-14 digits, OR use "---ALL---" for all lists
+source - description of what originated the API call (maximum 20 characters)
+
+SETTINGS FIELDS- (optional)
+stage - the format of the exported data: csv, tab, pipe(default)
+header - include a header(YES) or not(NO). This is optional, default is not to include a header
+custom_order - the order to put the custom fields into: table_order, alpha_up, alpha_down (default is 'table_order')
+
+Example URL strings for API calls:
+http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=list_custom_fields&list_id=1101&header=YES
+
+Example responses:
+ERROR: list_custom_fields CUSTOM LIST FIELDS ARE NOT ENABLED ON THIS SYSTEM - 6666
+ERROR: list_custom_fields USER DOES NOT HAVE PERMISSION TO MODIFY LISTS - 6666
+ERROR: list_custom_fields YOU MUST USE ALL REQUIRED FIELDS - 6666|1
+ERROR: list_custom_fields NOT AN ALLOWED LIST ID - 98762
+ERROR: list_custom_fields LIST DOES NOT EXIST - 98762
+
+A SUCCESS response will not show "SUCCESS", but instead will just print the results in the following formats:
+
+list_id|list_name|campaign_id|active|list_changedate|list_lastcalldate|custom_fields_list_space_delimited
+1101|performance list|TESTCAMP|Y|2019-09-02 08:52:50|2019-11-07 10:12:12|fav_color fav_food res_city res_state res_zip
+
+
+
+
+
--------------------------------------------------------------------------------
check_phone_number - allows you to check if a phone number is valid and dialable
diff --git a/agc_2-X/trunk/www/agc/functions.php b/agc_2-X/trunk/www/agc/functions.php
index 9e455a14..bd81af9f 100644
--- a/agc_2-X/trunk/www/agc/functions.php
+++ b/agc_2-X/trunk/www/agc/functions.php
@@ -2497,6 +2497,9 @@ function _QXZ($English_text, $sprintf=0, $align="l", $v_one='', $v_two='', $v_th
{
if ( (strlen($VUselected_language) > 0) and ($VUselected_language != 'default English') )
{
+ if ($English_text=="Y" && !preg_match('/english/i', $VUselected_language)) {$English_text="YES";}
+ if ($English_text=="N" && !preg_match('/english/i', $VUselected_language)) {$English_text="NO";}
+
if ($SSlanguage_method == 'MYSQL')
{
$stmt="SELECT translated_text from vicidial_language_phrases where english_text='$English_text' and language_id='$VUselected_language';";
@@ -2545,4 +2548,4 @@ function _QXZ($English_text, $sprintf=0, $align="l", $v_one='', $v_two='', $v_th
return $English_text;
}
-?>
\ No newline at end of file
+?>
diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php
index dc821239..8271ccb3 100644
--- a/agc_2-X/trunk/www/agc/vdc_db_query.php
+++ b/agc_2-X/trunk/www/agc/vdc_db_query.php
@@ -16637,8 +16637,8 @@ if ($ACTION == 'CALLLOGview')
$ALLlead_id[$g] = $row[7];
$ALLhangup_reason[$g] = $row[8];
$ALLalt_dial[$g] = $row[9];
- $ALLin_out[$g] = "OUT-AUTO";
- if ($row[10] == 'MANUAL') {$ALLin_out[$g] = "OUT-MANUAL";}
+ $ALLin_out[$g] = _QXZ("OUT-AUTO");
+ if ($row[10] == 'MANUAL') {$ALLin_out[$g] = _QXZ("OUT-MANUAL");}
$stmtA="SELECT first_name,last_name FROM vicidial_list WHERE lead_id='$ALLlead_id[$g]';";
$rsltA=mysql_to_mysqli($stmtA, $link);
diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php
index d5c9b23e..9eb08ea4 100644
--- a/agc_2-X/trunk/www/agc/vicidial.php
+++ b/agc_2-X/trunk/www/agc/vicidial.php
@@ -4094,9 +4094,8 @@ $cb_display_days=999;
if ($callback_display_days > 0)
{$cb_display_days=$callback_display_days;}
-$Cmonths = Array('0','January','February','March','April','May','June',
- 'July','August','September','October','November','December');
-$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
+$Cmonths = Array('0',_QXZ('January'),_QXZ('February'),_QXZ('March'),_QXZ('April'),_QXZ('May'),_QXZ('June'),_QXZ('July'),_QXZ('August'),_QXZ('September'),_QXZ('October'),_QXZ('November'),_QXZ('December'));
+$Cdays = Array(_QXZ('Sun'),_QXZ('Mon'),_QXZ('Tue'),_QXZ('Wed'),_QXZ('Thu'),_QXZ('Fri'),_QXZ('Sat'));
$CCAL_OUT = '';
diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php
index 44ab98a3..40a50119 100644
--- a/agc_2-X/trunk/www/vicidial/admin.php
+++ b/agc_2-X/trunk/www/vicidial/admin.php
@@ -128,7 +128,7 @@ $UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summa
$Vtables = 'NONE,log_noanswer,did_agent_log,contact_information';
-$APIfunctions = 'ALL_FUNCTIONS add_group_alias add_lead add_list add_phone add_phone_alias add_user agent_ingroup_info agent_stats_export agent_status audio_playback blind_monitor call_agent callid_info change_ingroups check_phone_number did_log_export external_add_lead external_dial external_hangup external_pause external_status in_group_status logout moh_list park_call pause_code preview_dial_action ra_call_control recording recording_lookup send_dtmf server_refresh set_timer_action sounds_list st_get_agent_active_lead st_login_log transfer_conference update_fields update_lead update_list list_info update_log_entry update_phone update_phone_alias update_user user_group_status vm_list webphone_url webserver logged_in_agents update_campaign update_did lead_field_info phone_number_log switch_lead ccc_lead_info lead_status_search call_status_stats calls_in_queue_count force_fronter_leave_3way force_fronter_audio_stop update_cid_group_entry add_dnc_phone add_fpg_phone';
+$APIfunctions = 'ALL_FUNCTIONS add_group_alias add_lead add_list add_phone add_phone_alias add_user agent_ingroup_info agent_stats_export agent_status audio_playback blind_monitor call_agent callid_info change_ingroups check_phone_number did_log_export external_add_lead external_dial external_hangup external_pause external_status in_group_status logout moh_list park_call pause_code preview_dial_action ra_call_control recording recording_lookup send_dtmf server_refresh set_timer_action sounds_list st_get_agent_active_lead st_login_log transfer_conference update_fields update_lead update_list list_info list_custom_fields update_log_entry update_phone update_phone_alias update_user user_group_status vm_list webphone_url webserver logged_in_agents update_campaign update_did lead_field_info phone_number_log switch_lead ccc_lead_info lead_status_search call_status_stats calls_in_queue_count force_fronter_leave_3way force_fronter_audio_stop update_cid_group_entry add_dnc_phone add_fpg_phone';
### BEGIN housecleaning of old static report files, if not done before ###
@@ -4628,12 +4628,13 @@ else
# 200315-1126 - Added a SKIP option for the CID Group auto-rotate feature
# 200318-1330 - Added a default bgcolor to the servers table on the Reports page, Issue #1203
# 200327-1715 - Translation fixes
+# 200331-1148 - Added list_custom_fields API function, and more translation fixes
#
# 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-742a';
-$build = '200327-1715';
+$admin_version = '2.14-743a';
+$build = '200331-1148';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -24370,7 +24371,7 @@ if ($ADD==31)
}
else
{
- echo "