LICENSE: AGPLv2 # # This script is designed display the contents of the FORM tab in the agent # interface, as well as take submission of the form submission when the agent # dispositions the call # # CHANGELOG: # 100630-1119 - First build of script # 100703-1124 - Added submit_button,admin_submit fields, which will log to admin log # 100712-2322 - Added code to log vicidial_list.entry_list_id field if data altered # 100916-1749 - Added non-lead variable parsing # 110719-0856 - Added HIDEBLOB type # 110730-2335 - Added call_id variable # 111025-1433 - Fixed case sensitivity on list fields # 120315-1729 - Filtere out single quotes and backslashes from custom fields # 130328-0012 - Converted ereg to preg functions # 130402-2256 - Added user_group variable # 130603-2204 - Added login lockout for 15 minutes after 10 failed logins, and other security fixes # 130615-2155 - Allow qc_enabled user access to this page even if not logged in as an agent # 130705-1512 - Added optional encrypted passwords compatibility # 130802-1033 - Changed to PHP mysqli functions # 140101-2139 - Small fix for admin modify lead page on encrypted password systems # 140429-2042 - Added TABLEper_call_notes display script variable for form display # 140810-2119 - Changed to use QXZ function for echoing text # 141118-1424 - Added agent_email variable # 141128-0855 - Code cleanup for QXZ functions # 141216-2116 - Added language settings lookups and user/pass variable standardization # 150114-2045 - Added list_name variable # 150312-1502 - Allow for single quotes in vicidial_list data fields # 150418-1751 - Added fixed fields to submit output, issue #842 # 150512-0617 - Fix for non-latin customer data # 150609-1923 - Added list_description variable # 150923-2027 - Added DID custom variables # 160129-1019 - Added missing pass field to SUBMIT stage form # 160912-0805 - Added debug, fixed issue with multi-selected values # 170301-0834 - Added call_id field for custom fields # 170317-0755 - Added more missing display variables # 170331-2300 - Added more debug logging # 170428-1215 - Small fix for admin modify lead display # 171021-1339 - Fix to update default field if duplicate field in custom fields changed # 171116-2333 - Added code for duplicate fields # 180503-1813 - Added code for SWITCH field type # 200406-1137 - Added hide_gender and gender default population # 201117-2056 - Changes for better compatibility with non-latin data input # 210211-0146 - Added SOURCESELECT field type # 210304-1612 - Added READONLY submit_button option # 210310-1115 - Added BUTTON field type with SubmitRefresh function # 210315-1747 - Added campaign setting for clear_form # 210329-2025 - Fixed for consistent custom fields values filtering # 210404-1522 - Added only_field option for refresh of already-loaded custom form SOURCESELECT element # 210506-1825 - Fix for SELECTSOURCE reloading issue # 210616-2037 - Added optional CORS support, see options.php for details # 210825-0902 - Fix for XSS security issue # $version = '2.14-44'; $build = '210825-0902'; $php_script = 'vdc_form_display.php'; require_once("dbconnect_mysqli.php"); require_once("functions.php"); $bcrypt=1; if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} if (isset($_GET["new_list_id"])) {$new_list_id=$_GET["new_list_id"];} elseif (isset($_POST["new_list_id"])) {$new_list_id=$_POST["new_list_id"];} if (isset($_GET["user"])) {$user=$_GET["user"];} elseif (isset($_POST["user"])) {$user=$_POST["user"];} if (isset($_GET["pass"])) {$pass=$_GET["pass"];} elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} if (isset($_GET["submit_button"])) {$submit_button=$_GET["submit_button"];} elseif (isset($_POST["submit_button"])) {$submit_button=$_POST["submit_button"];} if (isset($_GET["admin_submit"])) {$admin_submit=$_GET["admin_submit"];} elseif (isset($_POST["admin_submit"])) {$admin_submit=$_POST["admin_submit"];} if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];} elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];} if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];} elseif (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];} if (isset($_GET["closer"])) {$closer=$_GET["closer"];} elseif (isset($_POST["closer"])) {$closer=$_POST["closer"];} if (isset($_GET["group"])) {$group=$_GET["group"];} elseif (isset($_POST["group"])) {$group=$_POST["group"];} if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} if (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];} elseif (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];} if (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];} elseif (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];} if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} if (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];} elseif (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];} if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} if (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];} elseif (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];} if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} if (isset($_GET["phone"])) {$phone=$_GET["phone"];} elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];} elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];} if (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];} elseif (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];} if (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];} elseif (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];} if (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];} elseif (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];} if (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];} elseif (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];} if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];} elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];} if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];} elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];} if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} if (isset($_GET["agent_email"])) {$agent_email=$_GET["agent_email"];} elseif (isset($_POST["agent_email"])) {$agent_email=$_POST["agent_email"];} if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];} elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];} if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];} elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];} if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];} elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];} if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];} elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];} if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];} elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];} if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];} elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];} if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];} elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];} if (isset($_GET["preset_number_a"])) {$preset_number_a=$_GET["preset_number_a"];} elseif (isset($_POST["preset_number_a"])) {$preset_number_a=$_POST["preset_number_a"];} if (isset($_GET["preset_number_b"])) {$preset_number_b=$_GET["preset_number_b"];} elseif (isset($_POST["preset_number_b"])) {$preset_number_b=$_POST["preset_number_b"];} if (isset($_GET["preset_number_c"])) {$preset_number_c=$_GET["preset_number_c"];} elseif (isset($_POST["preset_number_c"])) {$preset_number_c=$_POST["preset_number_c"];} if (isset($_GET["preset_number_d"])) {$preset_number_d=$_GET["preset_number_d"];} elseif (isset($_POST["preset_number_d"])) {$preset_number_d=$_POST["preset_number_d"];} if (isset($_GET["preset_number_e"])) {$preset_number_e=$_GET["preset_number_e"];} elseif (isset($_POST["preset_number_e"])) {$preset_number_e=$_POST["preset_number_e"];} if (isset($_GET["preset_number_f"])) {$preset_number_f=$_GET["preset_number_f"];} elseif (isset($_POST["preset_number_f"])) {$preset_number_f=$_POST["preset_number_f"];} if (isset($_GET["preset_dtmf_a"])) {$preset_dtmf_a=$_GET["preset_dtmf_a"];} elseif (isset($_POST["preset_dtmf_a"])) {$preset_dtmf_a=$_POST["preset_dtmf_a"];} if (isset($_GET["preset_dtmf_b"])) {$preset_dtmf_b=$_GET["preset_dtmf_b"];} elseif (isset($_POST["preset_dtmf_b"])) {$preset_dtmf_b=$_POST["preset_dtmf_b"];} if (isset($_GET["did_id"])) {$did_id=$_GET["did_id"];} elseif (isset($_POST["did_id"])) {$did_id=$_POST["did_id"];} if (isset($_GET["did_extension"])) {$did_extension=$_GET["did_extension"];} elseif (isset($_POST["did_extension"])) {$did_extension=$_POST["did_extension"];} if (isset($_GET["did_pattern"])) {$did_pattern=$_GET["did_pattern"];} elseif (isset($_POST["did_pattern"])) {$did_pattern=$_POST["did_pattern"];} if (isset($_GET["did_description"])) {$did_description=$_GET["did_description"];} elseif (isset($_POST["did_description"])) {$did_description=$_POST["did_description"];} if (isset($_GET["closecallid"])) {$closecallid=$_GET["closecallid"];} elseif (isset($_POST["closecallid"])) {$closecallid=$_POST["closecallid"];} if (isset($_GET["xfercallid"])) {$xfercallid=$_GET["xfercallid"];} elseif (isset($_POST["xfercallid"])) {$xfercallid=$_POST["xfercallid"];} if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} if (isset($_GET["call_id"])) {$call_id=$_GET["call_id"];} elseif (isset($_POST["call_id"])) {$call_id=$_POST["call_id"];} if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} if (isset($_GET["web_vars"])) {$web_vars=$_GET["web_vars"];} elseif (isset($_POST["web_vars"])) {$web_vars=$_POST["web_vars"];} if (isset($_GET["bcrypt"])) {$bcrypt=$_GET["bcrypt"];} elseif (isset($_POST["bcrypt"])) {$bcrypt=$_POST["bcrypt"];} if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} if (isset($_GET["list_name"])) {$list_name=$_GET["list_name"];} elseif (isset($_POST["list_name"])) {$list_name=$_POST["list_name"];} if (isset($_GET["list_description"])) {$list_description=$_GET["list_description"];} elseif (isset($_POST["list_description"])) {$list_description=$_POST["list_description"];} if (isset($_GET["did_custom_one"])) {$did_custom_one=$_GET["did_custom_one"];} elseif (isset($_POST["did_custom_one"])) {$did_custom_one=$_POST["did_custom_one"];} if (isset($_GET["did_custom_two"])) {$did_custom_two=$_GET["did_custom_two"];} elseif (isset($_POST["did_custom_two"])) {$did_custom_two=$_POST["did_custom_two"];} if (isset($_GET["did_custom_three"])) {$did_custom_three=$_GET["did_custom_three"];} elseif (isset($_POST["did_custom_three"])) {$did_custom_three=$_POST["did_custom_three"];} if (isset($_GET["did_custom_four"])) {$did_custom_four=$_GET["did_custom_four"];} elseif (isset($_POST["did_custom_four"])) {$did_custom_four=$_POST["did_custom_four"];} if (isset($_GET["did_custom_five"])) {$did_custom_five=$_GET["did_custom_five"];} elseif (isset($_POST["did_custom_five"])) {$did_custom_five=$_POST["did_custom_five"];} if (isset($_GET["hide_gender"])) {$hide_gender=$_GET["hide_gender"];} elseif (isset($_POST["hide_gender"])) {$hide_gender=$_POST["hide_gender"];} if (isset($_GET["button_action"])) {$button_action=$_GET["button_action"];} elseif (isset($_POST["button_action"])) {$button_action=$_POST["button_action"];} if (isset($_GET["only_field"])) {$only_field=$_GET["only_field"];} elseif (isset($_POST["only_field"])) {$only_field=$_POST["only_field"];} if (isset($_GET["source_field"])) {$source_field=$_GET["source_field"];} elseif (isset($_POST["source_field"])) {$source_field=$_POST["source_field"];} if (isset($_GET["source_field_value"])) {$source_field_value=$_GET["source_field_value"];} elseif (isset($_POST["source_field_value"])) {$source_field_value=$_POST["source_field_value"];} if (isset($_GET["orig_URL"])) {$orig_URL=$_GET["orig_URL"];} elseif (isset($_POST["orig_URL"])) {$orig_URL=$_POST["orig_URL"];} if (isset($_GET["DB"])) {$DB=$_GET["DB"];} elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} $DB=preg_replace("/[^0-9a-zA-Z]/","",$DB); if ($bcrypt == 'OFF') {$bcrypt=0;} # if options file exists, use the override values for the above variables # see the options-example.php file for more information if (file_exists('options.php')) { require_once('options.php'); } header ("Content-type: text/html; charset=utf-8"); header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 if ($stage=='WELCOME') {echo "FORM"; exit;} $txt = '.txt'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; $script_height = ($script_height - 20); if (strlen($bgcolor) < 6) {$bgcolor='FFFFFF';} $startMS = microtime(); $ip = getenv("REMOTE_ADDR"); $query_string = getenv("QUERY_STRING"); $REQUEST_URI = getenv("REQUEST_URI"); $POST_URI = ''; foreach($_POST as $key=>$value) {$POST_URI .= '&'.$key.'='.$value;} if (strlen($POST_URI)>1) {$POST_URI = preg_replace("/^&/",'',$POST_URI);} $REQUEST_URI = preg_replace("/'|\"|\\\\|;/","",$REQUEST_URI); $POST_URI = preg_replace("/'|\"|\\\\|;/","",$POST_URI); if ( (strlen($query_string) < 1) and (strlen($POST_URI) > 2) ) {$query_string = $POST_URI;} if ( (strlen($query_string) > 0) and (strlen($POST_URI) > 2) ) {$query_string .= "&GET-AND-POST=Y&".$POST_URI;} $CL=':'; $script_name = getenv("SCRIPT_NAME"); $server_name = getenv("SERVER_NAME"); $server_port = getenv("SERVER_PORT"); if (preg_match("/443/i",$server_port)) {$HTTPprotocol = 'https://';} else {$HTTPprotocol = 'http://';} if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} else {$server_port = "$CL$server_port";} $vdcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; $vdcURL = $vdcPAGE . '?' . $query_string; $vicidial_list_fields = '|lead_id|entry_date|vendor_lead_code|source_id|list_id|gmt_offset_now|called_since_last_reset|phone_code|phone_number|title|first_name|middle_initial|last_name|address1|address2|address3|city|state|province|postal_code|country_code|gender|date_of_birth|alt_phone|email|security_phrase|comments|called_count|last_local_call_time|rank|owner|'; $IFRAME=0; $SUBMIT_only=0; $user = preg_replace("/\'|\"|\\\\|;| /","",$user); $pass = preg_replace("/\'|\"|\\\\|;| /","",$pass); ############################################# ##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP ##### $VUselected_language = ''; $stmt="SELECT selected_language from vicidial_users where user='$user';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'06002',$user,$server_ip,$session_name,$one_mysql_log);} $sl_ct = mysqli_num_rows($rslt); if ($sl_ct > 0) { $row=mysqli_fetch_row($rslt); $VUselected_language = $row[0]; } $stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock,custom_fields_enabled,enable_languages,language_method,agent_debug_logging FROM system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'06005',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysqli_num_rows($rslt); if ($qm_conf_ct > 0) { $row=mysqli_fetch_row($rslt); $non_latin = $row[0]; $timeclock_end_of_day = $row[1]; $agentonly_callback_campaign_lock = $row[2]; $custom_fields_enabled = $row[3]; $SSenable_languages = $row[4]; $SSlanguage_method = $row[5]; $SSagent_debug_logging = $row[6]; } ##### END SETTINGS LOOKUP ##### ########################################### $length_in_sec = preg_replace("/[^0-9]/","",$length_in_sec); $phone_code = preg_replace("/[^0-9]/","",$phone_code); $phone_number = preg_replace("/[^0-9]/","",$phone_number); $lead_id = preg_replace('/[^0-9]/', '', $lead_id); $list_id = preg_replace('/[^0-9]/', '', $list_id); $new_list_id = preg_replace('/[^0-9]/', '', $new_list_id); $agent_log_id = preg_replace('/[^0-9]/', '', $agent_log_id); $server_ip = preg_replace('/[^-\.\:\_0-9a-zA-Z]/','',$server_ip); $session_id = preg_replace('/[^0-9]/','',$session_id); $call_id = preg_replace('/[^-_\.0-9a-zA-Z]/','',$call_id); $button_action = preg_replace('/[^-_0-9a-zA-Z]/','',$button_action); $only_field = preg_replace('/[^-_0-9a-zA-Z]/','',$only_field); $source_field = preg_replace('/[^-_0-9a-zA-Z]/','',$source_field); $source_field_value = preg_replace("/\'|\"|\\\\|;/",'',$source_field_value); if ($non_latin < 1) { $user=preg_replace("/[^-_0-9a-zA-Z]/","",$user); $uniqueid = preg_replace('/[^-_\.0-9a-zA-Z]/','',$uniqueid); $campaign = preg_replace('/[^-_0-9a-zA-Z]/','',$campaign); $user_group = preg_replace('/[^-_0-9a-zA-Z]/','',$user_group); } else { $uniqueid = preg_replace('/[^-_\.0-9\p{L}]/u','',$uniqueid); $campaign = preg_replace('/[^-_0-9\p{L}]/u','',$campaign); $user_group = preg_replace('/[^-_0-9\p{L}]/u','',$user_group); } # default optional vars if not set if (!isset($format)) {$format="text";} if ($format == 'debug') {$DB=1;} if (!isset($ACTION)) {$ACTION="custom_form_frame";} if (!isset($query_date)) {$query_date = $NOW_DATE;} if (strlen($SSagent_debug_logging) > 1) { if ($SSagent_debug_logging == "$user") {$SSagent_debug_logging=1;} else {$SSagent_debug_logging=0;} } $auth_api_flag = 0; if ( ($submit_button=='YES') or ($submit_button=='READONLY') or ($admin_submit=='YES') ) {$auth_api_flag = 1;} $auth=0; $auth_message = user_authorization($user,$pass,'',0,$bcrypt,0,$auth_api_flag,'vdc_form_display'); if ($auth_message == 'GOOD') {$auth=1;} $stmt="SELECT count(*) from vicidial_users where user='$user' and ( (modify_leads IN('1','2','3','4')) or (qc_enabled='1') );"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $VUmodify=$row[0]; $stmt="SELECT count(*) from vicidial_live_agents where user='$user';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $LVAactive=$row[0]; if ($custom_fields_enabled < 1) { echo _QXZ("Custom Fields Disabled:")." |$custom_fields_enabled|\n"; echo "
\n"; exit; } if ( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) or ( ($LVAactive < 1) and ($VUmodify < 1) ) ) { echo _QXZ("Invalid Username/Password:")." |$user|$pass|$auth_message|\n"; echo "\n"; exit; } else { # do nothing for now } ### BEGIN refresh single field ### if ( ($stage=='REFRESH_SINGLE_FIELD') and (strlen($only_field) > 0) ) { require_once("functions.php"); $CFoutput = custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_id,$did_id,$did_extension,$did_pattern,$did_description,$dialed_number,$dialed_label,$only_field,$source_field,$source_field_value); echo "$CFoutput"; if ($SSagent_debug_logging > 0) { $stage .= " $only_field"; vicidial_ajax_log($NOW_TIME,$startMS,$link,$ACTION,$php_script,$user,$stage,$lead_id,$session_name,$stmt); } exit; } ### END refresh single field ### ### BEGIN parse submission of the custom fields form ### if ($stage=='SUBMIT') { if ($submit_button=='READONLY') { echo _QXZ("You do not have permission to modify leads").": $submit_button\n