Added xferconf number options to update_campaign, add_list & update_list Non-Agent API functions

git-svn-id: svn://192.168.202.10@3359 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2021-02-27 16:32:19 +00:00
parent c684d989a6
commit a88ae1f86d
3 changed files with 347 additions and 20 deletions
+32 -1
View File
@@ -1,4 +1,4 @@
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2021-02-17
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2021-02-27
This document describes the functions of an API(Application Programming
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
@@ -174,6 +174,7 @@ Changes:
210210-1627 - Added duplicate check with more X-day options for add_lead function
210216-1415 - Added list_exists_check option for add_lead function
210217-1454 - Added menu_id option for add_did and update_did functions
210227-1116 - Added xferconf number options to update_campaign, add_list & update_list functions
API Functions use the 'function' variable
@@ -1599,6 +1600,11 @@ reset_time - 4-100 characters, must be in valid 4-digit groups of 24-hour time
tz_method - one of the following: COUNTRY_AND_AREA_CODE,POSTAL_CODE,NANPA_PREFIX,OWNER_TIME_ZONE_CODE default is COUNTRY_AND_AREA_CODE
local_call_time - must be a valid call time ID in the system or 'campaign' which is the default
expiration_date - 10 characters, must be in valid date format YYYY-MM-DD (i.e. 2012-11-25)
xferconf_one - Transfer - Conf Number Override 1: 1-50 characters
xferconf_two - Transfer - Conf Number Override 2: 1-50 characters
xferconf_three - Transfer - Conf Number Override 3: 1-50 characters
xferconf_four - Transfer - Conf Number Override 4: 1-50 characters
xferconf_five - Transfer - Conf Number Override 5: 1-50 characters
custom_fields_copy - A valid list ID with custom fields to be copied to this new list, 2-14 digits
custom_copy_method - (APPEND,UPDATE,REPLACE) method for how to perform the 'custom_fields_copy', default is APPEND
APPEND - the only 100% safe method, will not result in any lost existing data, only adds fields not present in the new list
@@ -1625,6 +1631,11 @@ ERROR: add_list RESET TIME IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
ERROR: add_list EXPIRATION DATE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
ERROR: add_list LOCAL CALL TIME DOES NOT EXIST, THIS IS AN OPTIONAL FIELD - 6666|012
ERROR: add_list TIME ZONE METHOD IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
ERROR: add_list TRANSFER CONF OVERRIDE ONE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: add_list TRANSFER CONF OVERRIDE TWO IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: add_list TRANSFER CONF OVERRIDE THREE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: add_list TRANSFER CONF OVERRIDE FOUR IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: add_list TRANSFER CONF OVERRIDE FIVE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: add_list CUSTOM FIELDS LIST ID TO COPY FROM DOES NOT EXIST, THIS IS AN OPTIONAL FIELD - 6666|1101|1102|0
ERROR: add_list CUSTOM FIELDS LIST ID TO COPY FROM HAS NO CUSTOM FIELDS, THIS IS AN OPTIONAL FIELD - 6666|1101|1102|0
ERROR: add_list USER DOES NOT HAVE PERMISSION TO MODIFY CUSTOM FIELDS, THIS IS AN OPTIONAL FIELD - 6666|1101|1102|0
@@ -1666,6 +1677,11 @@ reset_time - 4-100 characters, must be in valid 4-digit groups of 24-hour time
tz_method - one of the following: COUNTRY_AND_AREA_CODE,POSTAL_CODE,NANPA_PREFIX,OWNER_TIME_ZONE_CODE default is COUNTRY_AND_AREA_CODE
local_call_time - must be a valid call time ID in the system or 'campaign' which is the default
expiration_date - 10 characters, must be in valid date format YYYY-MM-DD (i.e. 2012-11-25)
xferconf_one - Transfer - Conf Number Override 1: 1-50 characters
xferconf_two - Transfer - Conf Number Override 2: 1-50 characters
xferconf_three - Transfer - Conf Number Override 3: 1-50 characters
xferconf_four - Transfer - Conf Number Override 4: 1-50 characters
xferconf_five - Transfer - Conf Number Override 5: 1-50 characters
custom_fields_copy - A valid list ID with custom fields to be copied to the list being updated, 2-14 digits
custom_copy_method - (APPEND,UPDATE,REPLACE) method for how to perform the 'custom_fields_copy', default is APPEND
APPEND - the only 100% safe method, will not result in any lost existing data, only adds fields not present in the destination list
@@ -1702,6 +1718,11 @@ ERROR: update_list RESET TIME IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
ERROR: update_list EXPIRATION DATE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
ERROR: update_list TIME ZONE METHOD IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|012
ERROR: update_list LOCAL CALL TIME DOES NOT EXIST, THIS IS AN OPTIONAL FIELD - 6666|012
ERROR: update_list TRANSFER CONF OVERRIDE ONE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: update_list TRANSFER CONF OVERRIDE TWO IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: update_list TRANSFER CONF OVERRIDE THREE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: update_list TRANSFER CONF OVERRIDE FOUR IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: update_list TRANSFER CONF OVERRIDE FIVE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
NOTICE: update_list NO UPDATES DEFINED - 6666|
SUCCESS: update_list LIST HAS BEEN UPDATED - 6666|1101
NOTICE: update_list LEADS IN LIST HAVE BEEN RESET - 6666|1101|324
@@ -1997,6 +2018,11 @@ dial_method - Must be one of these: 'MANUAL','RATIO','INBOUND_MAN','ADAPT_AVERA
dial_timeout - Must be from 1 to 120
outbound_cid - 1-20 digits
lead_filter_id - Must be a valid Filter in the system, or '---NONE---' to not use a filter
xferconf_one - Transfer - Conf Number 1: 1-50 characters
xferconf_two - Transfer - Conf Number 2: 1-50 characters
xferconf_three - Transfer - Conf Number 3: 1-50 characters
xferconf_four - Transfer - Conf Number 4: 1-50 characters
xferconf_five - Transfer - Conf Number 5: 1-50 characters
NOTES:
- please use no special characters like apostrophes, quotes or amphersands
@@ -2019,6 +2045,11 @@ ERROR: update_campaign DIAL TIMEOUT MUST BE FROM 1 TO 120, THIS IS AN OPTIONAL F
ERROR: update_campaign CAMPAIGN NAME MUST BE FROM 6 TO 40 CHARACTERS, THIS IS AN OPTIONAL FIELD - 6666|test
ERROR: update_campaign CAMPAIGN CID MUST BE FROM 6 TO 20 CHARACTERS, THIS IS AN OPTIONAL FIELD - 6666|test
ERROR: update_campaign CAMPAIGN LEAD FILTER MUST BE A VALID FILTER IN THE SYSTEM, THIS IS AN OPTIONAL FIELD - 6666|test
ERROR: update_campaign TRANSFER CONF NUMBER ONE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: update_campaign TRANSFER CONF NUMBER TWO IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: update_campaign TRANSFER CONF NUMBER THREE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: update_campaign TRANSFER CONF NUMBER FOUR IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: update_campaign TRANSFER CONF NUMBER FIVE IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|123456789012345678901234567890123456789012345678901
ERROR: update_campaign ACTIVE MUST BE Y OR N, THIS IS AN OPTIONAL FIELD - 6666|U
NOTICE: update_campaign NO UPDATES DEFINED - 6666|
NOTICE: update_campaign HOPPER HAS BEEN RESET - 6666|1101|324
+18 -14
View File
@@ -3180,6 +3180,9 @@ $manual_dial_validation = preg_replace('/[^0-9NY]/','',$manual_dial_validation);
### ALPHACAPS-NUMERIC
$xferconf_a_number = preg_replace('/[^0-9A-Z]/','',$xferconf_a_number);
$xferconf_b_number = preg_replace('/[^0-9A-Z]/','',$xferconf_b_number);
$xferconf_c_number = preg_replace('/[^0-9A-Z]/','',$xferconf_c_number);
$xferconf_d_number = preg_replace('/[^0-9A-Z]/','',$xferconf_d_number);
$xferconf_e_number = preg_replace('/[^0-9A-Z]/','',$xferconf_e_number);
### DIGITS and Dots
$new_server_ip = preg_replace('/[^\.0-9]/','',$new_server_ip);
@@ -5473,12 +5476,13 @@ if ($SSscript_remove_js > 0)
# 210210-1601 - Added add_did Non-Agent API function
# 210211-1145 - Added Matex use information
# 210226-1545 - Added Copy Phone functionality
# 210227-1126 - Variable filter changes
#
# 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-788a';
$build = '210226-1545';
$admin_version = '2.14-789a';
$build = '210227-1126';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -7685,15 +7689,15 @@ if ($ADD==11)
{$adl = ($adl + 0.5);}
else
{
if ($adl < 10)
if ($adl < 20)
{$adl = ($adl + 1);}
else
{
if ($adl < 20)
if ($adl < 40)
{$adl = ($adl + 2);}
else
{
if ($adl < 40)
if ($adl < 100)
{$adl = ($adl + 5);}
else
{
@@ -25120,15 +25124,15 @@ if ($ADD==31)
{$adl = ($adl + 0.5);}
else
{
if ($adl < 10)
if ($adl < 20)
{$adl = ($adl + 1);}
else
{
if ($adl < 20)
if ($adl < 40)
{$adl = ($adl + 2);}
else
{
if ($adl < 40)
if ($adl < 100)
{$adl = ($adl + 5);}
else
{
@@ -27838,15 +27842,15 @@ if ($ADD==34)
{$adl = ($adl + 0.5);}
else
{
if ($adl < 10)
if ($adl < 20)
{$adl = ($adl + 1);}
else
{
if ($adl < 20)
if ($adl < 40)
{$adl = ($adl + 2);}
else
{
if ($adl < 40)
if ($adl < 100)
{$adl = ($adl + 5);}
else
{
@@ -39960,15 +39964,15 @@ if ($ADD==311111111111111)
{$adl = ($adl + 0.5);}
else
{
if ($adl < 10)
if ($adl < 20)
{$adl = ($adl + 1);}
else
{
if ($adl < 20)
if ($adl < 40)
{$adl = ($adl + 2);}
else
{
if ($adl < 40)
if ($adl < 100)
{$adl = ($adl + 5);}
else
{
+297 -5
View File
@@ -163,10 +163,11 @@
# 210210-1627 - Added duplicate check with more X-day options for add_lead function
# 210216-1415 - Added list_exists_check option for add_lead function
# 210217-1454 - Added menu_id option for add_did and update_did functions
# 210227-1116 - Added xferconf number options to update_campaign, add_list & update_list functions
#
$version = '2.14-140';
$build = '210217-1454';
$version = '2.14-141';
$build = '210227-1116';
$api_url_log = 0;
$startMS = microtime();
@@ -569,6 +570,16 @@ if (isset($_GET["list_exists_check"])) {$list_exists_check=$_GET["list_exists_
elseif (isset($_POST["list_exists_check"])) {$list_exists_check=$_POST["list_exists_check"];}
if (isset($_GET["menu_id"])) {$menu_id=$_GET["menu_id"];}
elseif (isset($_POST["menu_id"])) {$menu_id=$_POST["menu_id"];}
if (isset($_GET["xferconf_one"])) {$xferconf_one=$_GET["xferconf_one"];}
elseif (isset($_POST["xferconf_one"])) {$xferconf_one=$_POST["xferconf_one"];}
if (isset($_GET["xferconf_two"])) {$xferconf_two=$_GET["xferconf_two"];}
elseif (isset($_POST["xferconf_two"])) {$xferconf_two=$_POST["xferconf_two"];}
if (isset($_GET["xferconf_three"])) {$xferconf_three=$_GET["xferconf_three"];}
elseif (isset($_POST["xferconf_three"])) {$xferconf_three=$_POST["xferconf_three"];}
if (isset($_GET["xferconf_four"])) {$xferconf_four=$_GET["xferconf_four"];}
elseif (isset($_POST["xferconf_four"])) {$xferconf_four=$_POST["xferconf_four"];}
if (isset($_GET["xferconf_five"])) {$xferconf_five=$_GET["xferconf_five"];}
elseif (isset($_POST["xferconf_five"])) {$xferconf_five=$_POST["xferconf_five"];}
header ("Content-type: text/html; charset=utf-8");
@@ -807,6 +818,11 @@ if ($non_latin < 1)
$group_by_campaign = preg_replace('/[^0-9a-zA-Z]/','',$group_by_campaign);
$source_user = preg_replace('/[^-_0-9a-zA-Z]/','',$source_user);
$menu_id = preg_replace('/[^-_0-9a-zA-Z]/','',$menu_id);
$xferconf_one=preg_replace('/[^-_0-9a-zA-Z]/','',$xferconf_one);
$xferconf_two=preg_replace('/[^-_0-9a-zA-Z]/','',$xferconf_two);
$xferconf_three=preg_replace('/[^-_0-9a-zA-Z]/','',$xferconf_three);
$xferconf_four=preg_replace('/[^-_0-9a-zA-Z]/','',$xferconf_four);
$xferconf_five=preg_replace('/[^-_0-9a-zA-Z]/','',$xferconf_five);
}
else
{
@@ -5173,6 +5189,12 @@ if ($function == 'update_list')
$list_descriptionSQL='';
$tz_methodSQL='';
$local_call_timeSQL='';
$xferconf_oneSQL='';
$xferconf_twoSQL='';
$xferconf_threeSQL='';
$xferconf_fourSQL='';
$xferconf_fiveSQL='';
if (strlen($campaign_id) > 0)
{
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';";
@@ -5421,8 +5443,103 @@ if ($function == 'update_list')
{$local_call_timeSQL = " ,local_call_time='$local_call_time'";}
}
}
if (strlen($xferconf_one) > 0)
{
if ($xferconf_one == '--BLANK--')
{$xferconf_oneSQL = " ,xferconf_a_number=''";}
else
{
if (strlen($xferconf_one) > 50)
{
$result = 'ERROR';
$result_reason = "update_list TRANSFER CONF OVERRIDE ONE IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_one";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_oneSQL = " ,xferconf_a_number='$xferconf_one'";}
}
}
if (strlen($xferconf_two) > 0)
{
if ($xferconf_two == '--BLANK--')
{$xferconf_twoSQL = " ,xferconf_b_number=''";}
else
{
if (strlen($xferconf_two) > 50)
{
$result = 'ERROR';
$result_reason = "update_list TRANSFER CONF OVERRIDE TWO IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_two";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_twoSQL = " ,xferconf_b_number='$xferconf_two'";}
}
}
if (strlen($xferconf_three) > 0)
{
if ($xferconf_three == '--BLANK--')
{$xferconf_threeSQL = " ,xferconf_c_number=''";}
else
{
if (strlen($xferconf_three) > 50)
{
$result = 'ERROR';
$result_reason = "update_list TRANSFER CONF OVERRIDE THREE IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_three";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_threeSQL = " ,xferconf_c_number='$xferconf_three'";}
}
}
if (strlen($xferconf_four) > 0)
{
if ($xferconf_four == '--BLANK--')
{$xferconf_fourSQL = " ,xferconf_d_number=''";}
else
{
if (strlen($xferconf_four) > 50)
{
$result = 'ERROR';
$result_reason = "update_list TRANSFER CONF OVERRIDE FOUR IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_four";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_fourSQL = " ,xferconf_d_number='$xferconf_four'";}
}
}
if (strlen($xferconf_five) > 0)
{
if ($xferconf_five == '--BLANK--')
{$xferconf_fiveSQL = " ,xferconf_e_number=''";}
else
{
if (strlen($xferconf_five) > 50)
{
$result = 'ERROR';
$result_reason = "update_list TRANSFER CONF OVERRIDE FIVE IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_five";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_fiveSQL = " ,xferconf_e_number='$xferconf_five'";}
}
}
$updateSQL = "$webformthreeSQL$webformtwoSQL$webformSQL$ammessageSQL$outboundcidSQL$activeSQL$listnameSQL$campaignSQL$scriptSQL$dropingroupSQL$resettimeSQL$expiration_dateSQL$list_descriptionSQL$tz_methodSQL$local_call_timeSQL";
$updateSQL = "$webformthreeSQL$webformtwoSQL$webformSQL$ammessageSQL$outboundcidSQL$activeSQL$listnameSQL$campaignSQL$scriptSQL$dropingroupSQL$resettimeSQL$expiration_dateSQL$list_descriptionSQL$tz_methodSQL$local_call_timeSQL$xferconf_oneSQL$xferconf_twoSQL$xferconf_threeSQL$xferconf_fourSQL$xferconf_fiveSQL";
if (strlen($updateSQL)< 3)
{
@@ -6300,6 +6417,11 @@ if ($function == 'add_list')
$list_descriptionSQL='';
$tz_methodSQL='';
$local_call_timeSQL='';
$xferconf_oneSQL='';
$xferconf_twoSQL='';
$xferconf_threeSQL='';
$xferconf_fourSQL='';
$xferconf_fiveSQL='';
if (strlen($web_form_address) > 0)
{
if (preg_match("/%3A%2F%2F/",$web_form_address))
@@ -6377,8 +6499,78 @@ if ($function == 'add_list')
else
{$local_call_timeSQL = " ,local_call_time='$local_call_time'";}
}
if (strlen($xferconf_one) > 0)
{
if (strlen($xferconf_one) > 50)
{
$result = 'ERROR';
$result_reason = "add_list TRANSFER CONF OVERRIDE ONE IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_one";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_oneSQL = " ,xferconf_a_number='$xferconf_one'";}
}
if (strlen($xferconf_two) > 0)
{
if (strlen($xferconf_two) > 50)
{
$result = 'ERROR';
$result_reason = "add_list TRANSFER CONF OVERRIDE TWO IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_two";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_twoSQL = " ,xferconf_b_number='$xferconf_two'";}
}
if (strlen($xferconf_three) > 0)
{
if (strlen($xferconf_three) > 50)
{
$result = 'ERROR';
$result_reason = "add_list TRANSFER CONF OVERRIDE THREE IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_three";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_threeSQL = " ,xferconf_c_number='$xferconf_three'";}
}
if (strlen($xferconf_four) > 0)
{
if (strlen($xferconf_four) > 50)
{
$result = 'ERROR';
$result_reason = "add_list TRANSFER CONF OVERRIDE FOUR IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_four";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_fourSQL = " ,xferconf_d_number='$xferconf_four'";}
}
if (strlen($xferconf_five) > 0)
{
if (strlen($xferconf_five) > 50)
{
$result = 'ERROR';
$result_reason = "add_list TRANSFER CONF OVERRIDE FIVE IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_five";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_fiveSQL = " ,xferconf_e_number='$xferconf_five'";}
}
$stmt="INSERT INTO vicidial_lists SET list_id='$list_id', list_name='$list_name', campaign_id='$campaign_id', active='$active', campaign_cid_override='$outbound_cid', agent_script_override='$script', am_message_exten_override='$am_message', drop_inbound_group_override='$drop_inbound_group', reset_time='$reset_time', expiration_date='$expiration_date' $webformSQL $webformtwoSQL $webformthreeSQL $list_descriptionSQL $tz_methodSQL $local_call_timeSQL;";
$stmt="INSERT INTO vicidial_lists SET list_id='$list_id', list_name='$list_name', campaign_id='$campaign_id', active='$active', campaign_cid_override='$outbound_cid', agent_script_override='$script', am_message_exten_override='$am_message', drop_inbound_group_override='$drop_inbound_group', reset_time='$reset_time', expiration_date='$expiration_date' $webformSQL $webformtwoSQL $webformthreeSQL $list_descriptionSQL $tz_methodSQL $local_call_timeSQL $xferconf_oneSQL$xferconf_twoSQL$xferconf_threeSQL$xferconf_fourSQL$xferconf_fiveSQL;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "|$stmt|\n";}
@@ -6534,6 +6726,11 @@ if ($function == 'update_campaign')
$campaignfilterSQL='';
$activeSQL='';
$autodiallevelSQL='';
$xferconf_oneSQL='';
$xferconf_twoSQL='';
$xferconf_threeSQL='';
$xferconf_fourSQL='';
$xferconf_fiveSQL='';
if (strlen($auto_dial_level) > 0)
{
@@ -6684,8 +6881,103 @@ if ($function == 'update_campaign')
else
{$activeSQL = " ,active='$active'";}
}
if (strlen($xferconf_one) > 0)
{
if ($xferconf_one == '--BLANK--')
{$xferconf_oneSQL = " ,xferconf_a_number=''";}
else
{
if (strlen($xferconf_one) > 50)
{
$result = 'ERROR';
$result_reason = "update_campaign TRANSFER CONF NUMBER ONE IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_one";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_oneSQL = " ,xferconf_a_number='$xferconf_one'";}
}
}
if (strlen($xferconf_two) > 0)
{
if ($xferconf_two == '--BLANK--')
{$xferconf_twoSQL = " ,xferconf_b_number=''";}
else
{
if (strlen($xferconf_two) > 50)
{
$result = 'ERROR';
$result_reason = "update_campaign TRANSFER CONF NUMBER TWO IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_two";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_twoSQL = " ,xferconf_b_number='$xferconf_two'";}
}
}
if (strlen($xferconf_three) > 0)
{
if ($xferconf_three == '--BLANK--')
{$xferconf_threeSQL = " ,xferconf_c_number=''";}
else
{
if (strlen($xferconf_three) > 50)
{
$result = 'ERROR';
$result_reason = "update_campaign TRANSFER CONF NUMBER THREE IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_three";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_threeSQL = " ,xferconf_c_number='$xferconf_three'";}
}
}
if (strlen($xferconf_four) > 0)
{
if ($xferconf_four == '--BLANK--')
{$xferconf_fourSQL = " ,xferconf_d_number=''";}
else
{
if (strlen($xferconf_four) > 50)
{
$result = 'ERROR';
$result_reason = "update_campaign TRANSFER CONF NUMBER FOUR IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_four";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_fourSQL = " ,xferconf_d_number='$xferconf_four'";}
}
}
if (strlen($xferconf_five) > 0)
{
if ($xferconf_five == '--BLANK--')
{$xferconf_fiveSQL = " ,xferconf_e_number=''";}
else
{
if (strlen($xferconf_five) > 50)
{
$result = 'ERROR';
$result_reason = "update_campaign TRANSFER CONF NUMBER FIVE IS NOT VALID, THIS IS AN OPTIONAL FIELD";
$data = "$xferconf_five";
echo "$result: $result_reason: |$user|$data\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
else
{$xferconf_fiveSQL = " ,xferconf_e_number='$xferconf_five'";}
}
}
$updateSQL = "$campaignnameSQL$activeSQL$dialtimeoutSQL$hopperlevelSQL$campaignvdadextenSQL$adaptivemaximumlevelSQL$dialmethodSQL$autodiallevelSQL$campaigncidSQL$campaignfilterSQL";
$updateSQL = "$campaignnameSQL$activeSQL$dialtimeoutSQL$hopperlevelSQL$campaignvdadextenSQL$adaptivemaximumlevelSQL$dialmethodSQL$autodiallevelSQL$campaigncidSQL$campaignfilterSQL$xferconf_oneSQL$xferconf_twoSQL$xferconf_threeSQL$xferconf_fourSQL$xferconf_fiveSQL";
if (strlen($updateSQL)< 3)
{