diff --git a/bin/ADMIN_backup.pl b/bin/ADMIN_backup.pl index 4266ca34..b6a541bf 100644 --- a/bin/ADMIN_backup.pl +++ b/bin/ADMIN_backup.pl @@ -218,8 +218,7 @@ else if ( -e ('/bin/mysqldump')) {$mysqldumpbin = '/bin/mysqldump';} else { - print "Can't find mysqldump binary! Exiting...\n"; - exit; + print "Can't find mysqldump binary! MySQL backups will not work...\n"; } } } diff --git a/docs/REQUIRED_APPS_INSTALL.txt b/docs/REQUIRED_APPS_INSTALL.txt index 6e47af3c..831dc424 100644 --- a/docs/REQUIRED_APPS_INSTALL.txt +++ b/docs/REQUIRED_APPS_INSTALL.txt @@ -192,12 +192,12 @@ make install cd /usr/local -wget http://mirror.candidhosting.com/pub/apache/httpd/httpd-2.2.10.tar.gz -gunzip httpd-2.2.10.tar.gz -tar xvf httpd-2.2.10.tar wget http://us2.php.net/distributions/php-5.2.6.tar.gz gunzip php-5.2.6.tar.gz tar xvf php-5.2.6.tar +wget http://mirror.candidhosting.com/pub/apache/httpd/httpd-2.2.10.tar.gz +gunzip httpd-2.2.10.tar.gz +tar xvf httpd-2.2.10.tar cd httpd-2.2.10 make clean ./configure --prefix=/usr/local/apache2 --enable-ssl --enable-setenvif --enable-so --with-apxs2 --enable-dav --enable-maintainer-mode diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index 825e9521..05f850f4 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -1,4 +1,4 @@ -Asterisk/astguiclient install from scratch. v.2.0.4 2007-12-03 +Asterisk/astguiclient install from scratch. v.2.0.5 2008-12-03 By the VICIDIAL group info@vicidial.com **** IMPORTANT - In order for vicidial/astguiclient to function correctly please diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index ceabf776..5909d2f4 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -596,7 +596,8 @@ agent_clipboard_copy VARCHAR(50) default 'NONE', agent_extended_alt_dial ENUM('Y','N') default 'N', use_campaign_dnc ENUM('Y','N') default 'N', three_way_call_cid ENUM('CAMPAIGN','CUSTOMER','AGENT_PHONE') default 'CAMPAIGN', -three_way_dial_prefix VARCHAR(20) default '' +three_way_dial_prefix VARCHAR(20) default '', +web_form_target VARCHAR(100) NOT NULL default 'vdcwebform' ); CREATE TABLE vicidial_lists ( diff --git a/extras/upgrade_2.0.5.sql b/extras/upgrade_2.0.5.sql index 5fe7c00a..41bab3dd 100644 --- a/extras/upgrade_2.0.5.sql +++ b/extras/upgrade_2.0.5.sql @@ -544,3 +544,7 @@ ALTER TABLE vicidial_campaign_stats ADD hold_sec_queue_calls MEDIUMINT(8) UNSIGN CREATE INDEX comment_a on live_inbound_log (comment_a); UPDATE system_settings SET db_schema_version='1118'; + +ALTER TABLE vicidial_campaigns ADD web_form_target VARCHAR(100) NOT NULL default 'vdcwebform'; + +UPDATE system_settings SET db_schema_version='1119'; diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt index 78b53192..8a34101b 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt @@ -340,6 +340,9 @@ Force Timeclock Login -<\/B> This option allows you to not let an agent log in t Force Timeclock Login|| Stats Percent of Calls Answered Within X seconds - This field allows you to set the number of hold seconds that the realtime stats display will use to calculate the percentage of answered calls that were answered within X number of seconds on hold|| Stats Percent of Calls Answered Within X seconds|| +Web Form Target-<\/B> This is where you can set the custom web page frame that the web form will be opened in when the user clicks on the WEB FORM button. Default is _blank.|| +Web Form Target|| +To customize the query string after the web form, simply begin the web form with VAR and then the URL that you want to use, replacing the variables with the variable names that you want to use --A--phone_number--B-- just like in the SCRIPTS tab section|| ############################################################ CLIENT diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 0ffc33fe..3a76b89d 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -209,10 +209,11 @@ # 81110-1514 - Added hangup_all_non_reserved to fix non-Hangup bug # 81119-1811 - webform backslash fix # 81124-2213 - Fixes blind transfer bug +# 81209-1617 - Added campaign web form target option and web form address variables # -$version = '2.0.5-188'; -$build = '81124-2213'; +$version = '2.0.5-189'; +$build = '81209-1617'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=53; $one_mysql_log=0; @@ -880,7 +881,7 @@ $VDloginDISPLAY=0; $HKstatusnames = substr("$HKstatusnames", 0, -1); ##### grab the campaign settings - $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -926,6 +927,7 @@ $VDloginDISPLAY=0; $three_way_call_cid = $row[38]; $dial_method = $row[39]; $three_way_dial_prefix = $row[40]; + $web_form_target = $row[41]; if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) { @@ -2144,6 +2146,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var blind_transfer = 0; var hangup_all_non_reserved = ''; var dial_method = ''; + var web_form_target = ''; var DiaLControl_auto_HTML = "\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"\"Resume\""; @@ -3905,65 +3908,81 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var genderValue = document.getElementById('gender_list').options[genderIndex].value; document.vicidial_form.gender.value = genderValue; - web_form_vars = - "lead_id=" + document.vicidial_form.lead_id.value + - "&vendor_id=" + document.vicidial_form.vendor_lead_code.value + - "&list_id=" + document.vicidial_form.list_id.value + - "&gmt_offset_now=" + document.vicidial_form.gmt_offset_now.value + - "&phone_code=" + document.vicidial_form.phone_code.value + - "&phone_number=" + document.vicidial_form.phone_number.value + - "&title=" + document.vicidial_form.title.value + - "&first_name=" + document.vicidial_form.first_name.value + - "&middle_initial=" + document.vicidial_form.middle_initial.value + - "&last_name=" + document.vicidial_form.last_name.value + - "&address1=" + document.vicidial_form.address1.value + - "&address2=" + document.vicidial_form.address2.value + - "&address3=" + document.vicidial_form.address3.value + - "&city=" + document.vicidial_form.city.value + - "&state=" + document.vicidial_form.state.value + - "&province=" + document.vicidial_form.province.value + - "&postal_code=" + document.vicidial_form.postal_code.value + - "&country_code=" + document.vicidial_form.country_code.value + - "&gender=" + document.vicidial_form.gender.value + - "&date_of_birth=" + document.vicidial_form.date_of_birth.value + - "&alt_phone=" + document.vicidial_form.alt_phone.value + - "&email=" + document.vicidial_form.email.value + - "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value + - "&user=" + user + - "&pass=" + pass + - "&campaign=" + campaign + - "&phone_login=" + phone_login + - "&phone_pass=" + phone_pass + - "&fronter=" + fronter + - "&closer=" + user + - "&group=" + campaign + - "&channel_group=" + campaign + - "&SQLdate=" + SQLdate + - "&epoch=" + UnixTime + - "&uniqueid=" + document.vicidial_form.uniqueid.value + - "&customer_zap_channel=" + lastcustchannel + - "&server_ip=" + server_ip + - "&SIPexten=" + extension + - "&session_id=" + session_id + - "&phone=" + document.vicidial_form.phone_number.value + - "&parked_by=" + document.vicidial_form.lead_id.value + - "&dispo=" + LeaDDispO + '' + - "&dialed_number=" + dialed_number + '' + - "&dialed_label=" + dialed_label + '' + - "&source_id=" + source_id + '' + - webform_session; - -// $VICIDIAL_web_QUERY_STRING =~ s/ /+/gi; -// $VICIDIAL_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi; + var regWFAcustom = new RegExp("^VAR","ig"); + if (VDIC_web_form_address.match(regWFAcustom)) + { + URLDecode(VDIC_web_form_address,'YES'); + var TEMP_VDIC_web_form_address = decoded; + TEMP_VDIC_web_form_address = TEMP_VDIC_web_form_address.replace(regWFAcustom, ''); + } + else + { + web_form_vars = + "lead_id=" + document.vicidial_form.lead_id.value + + "&vendor_id=" + document.vicidial_form.vendor_lead_code.value + + "&list_id=" + document.vicidial_form.list_id.value + + "&gmt_offset_now=" + document.vicidial_form.gmt_offset_now.value + + "&phone_code=" + document.vicidial_form.phone_code.value + + "&phone_number=" + document.vicidial_form.phone_number.value + + "&title=" + document.vicidial_form.title.value + + "&first_name=" + document.vicidial_form.first_name.value + + "&middle_initial=" + document.vicidial_form.middle_initial.value + + "&last_name=" + document.vicidial_form.last_name.value + + "&address1=" + document.vicidial_form.address1.value + + "&address2=" + document.vicidial_form.address2.value + + "&address3=" + document.vicidial_form.address3.value + + "&city=" + document.vicidial_form.city.value + + "&state=" + document.vicidial_form.state.value + + "&province=" + document.vicidial_form.province.value + + "&postal_code=" + document.vicidial_form.postal_code.value + + "&country_code=" + document.vicidial_form.country_code.value + + "&gender=" + document.vicidial_form.gender.value + + "&date_of_birth=" + document.vicidial_form.date_of_birth.value + + "&alt_phone=" + document.vicidial_form.alt_phone.value + + "&email=" + document.vicidial_form.email.value + + "&security_phrase=" + document.vicidial_form.security_phrase.value + + "&comments=" + document.vicidial_form.comments.value + + "&user=" + user + + "&pass=" + pass + + "&campaign=" + campaign + + "&phone_login=" + phone_login + + "&phone_pass=" + phone_pass + + "&fronter=" + fronter + + "&closer=" + user + + "&group=" + group + + "&channel_group=" + group + + "&SQLdate=" + SQLdate + + "&epoch=" + UnixTime + + "&uniqueid=" + document.vicidial_form.uniqueid.value + + "&customer_zap_channel=" + lastcustchannel + + "&customer_server_ip=" + lastcustserverip + + "&server_ip=" + server_ip + + "&SIPexten=" + extension + + "&session_id=" + session_id + + "&phone=" + document.vicidial_form.phone_number.value + + "&parked_by=" + document.vicidial_form.lead_id.value + + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + + "&source_id=" + source_id + '' + + webform_session; + + var regWFspace = new RegExp(" ","ig"); + web_form_vars = web_form_vars.replace(regWF, ''); + var regWF = new RegExp("\\`|\\~|\\:|\\;|\\#|\\'|\\\"|\\{|\\}|\\(|\\)|\\*|\\^|\\%|\\$|\\!|\\%|\\r|\\t|\\n","ig"); + web_form_vars = web_form_vars.replace(regWFspace, '+'); + web_form_vars = web_form_vars.replace(regWF, ''); - var regWFspace = new RegExp(" ","ig"); - web_form_vars = web_form_vars.replace(regWF, ''); - var regWF = new RegExp("\\`|\\~|\\:|\\;|\\#|\\'|\\\"|\\{|\\}|\\(|\\)|\\*|\\^|\\%|\\$|\\!|\\%|\\r|\\t|\\n","ig"); - web_form_vars = web_form_vars.replace(regWFspace, '+'); - web_form_vars = web_form_vars.replace(regWF, ''); + var regWFAvars = new RegExp("\\?","ig"); + if (VDIC_web_form_address.match(regWFAvars)) + {web_form_vars = '&' + web_form_vars} + else + {web_form_vars = '?' + web_form_vars} - VDIC_web_form_address = VICIDiaL_web_form_address; + var TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars; + } + + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; if (LeaDPreVDispO == 'CALLBK') { @@ -3976,14 +3995,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} showDiv('CBcommentsBox'); } - var regWFAvars = new RegExp("\\?","ig"); - if (VDIC_web_form_address.match(regWFAvars)) - {web_form_vars = '&' + web_form_vars} - else - {web_form_vars = '?' + web_form_vars} - - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; - if (document.vicidial_form.LeadPreview.checked==false) { reselect_preview_dial = 0; @@ -4749,69 +4760,82 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.gender.value = genderValue; - web_form_vars = - "lead_id=" + document.vicidial_form.lead_id.value + - "&vendor_id=" + document.vicidial_form.vendor_lead_code.value + - "&list_id=" + document.vicidial_form.list_id.value + - "&gmt_offset_now=" + document.vicidial_form.gmt_offset_now.value + - "&phone_code=" + document.vicidial_form.phone_code.value + - "&phone_number=" + document.vicidial_form.phone_number.value + - "&title=" + document.vicidial_form.title.value + - "&first_name=" + document.vicidial_form.first_name.value + - "&middle_initial=" + document.vicidial_form.middle_initial.value + - "&last_name=" + document.vicidial_form.last_name.value + - "&address1=" + document.vicidial_form.address1.value + - "&address2=" + document.vicidial_form.address2.value + - "&address3=" + document.vicidial_form.address3.value + - "&city=" + document.vicidial_form.city.value + - "&state=" + document.vicidial_form.state.value + - "&province=" + document.vicidial_form.province.value + - "&postal_code=" + document.vicidial_form.postal_code.value + - "&country_code=" + document.vicidial_form.country_code.value + - "&gender=" + document.vicidial_form.gender.value + - "&date_of_birth=" + document.vicidial_form.date_of_birth.value + - "&alt_phone=" + document.vicidial_form.alt_phone.value + - "&email=" + document.vicidial_form.email.value + - "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value + - "&user=" + user + - "&pass=" + pass + - "&campaign=" + campaign + - "&phone_login=" + phone_login + - "&phone_pass=" + phone_pass + - "&fronter=" + fronter + - "&closer=" + user + - "&group=" + group + - "&channel_group=" + group + - "&SQLdate=" + SQLdate + - "&epoch=" + UnixTime + - "&uniqueid=" + document.vicidial_form.uniqueid.value + - "&customer_zap_channel=" + lastcustchannel + - "&customer_server_ip=" + lastcustserverip + - "&server_ip=" + server_ip + - "&SIPexten=" + extension + - "&session_id=" + session_id + - "&phone=" + document.vicidial_form.phone_number.value + - "&parked_by=" + document.vicidial_form.lead_id.value + - "&dispo=" + LeaDDispO + '' + - "&dialed_number=" + dialed_number + '' + - "&dialed_label=" + dialed_label + '' + - "&source_id=" + source_id + '' + - webform_session; - - var regWFspace = new RegExp(" ","ig"); - web_form_vars = web_form_vars.replace(regWF, ''); - var regWF = new RegExp("\\`|\\~|\\:|\\;|\\#|\\'|\\\"|\\{|\\}|\\(|\\)|\\*|\\^|\\%|\\$|\\!|\\%|\\r|\\t|\\n","ig"); - web_form_vars = web_form_vars.replace(regWFspace, '+'); - web_form_vars = web_form_vars.replace(regWF, ''); - - var regWFAvars = new RegExp("\\?","ig"); - if (VDIC_web_form_address.match(regWFAvars)) - {web_form_vars = '&' + web_form_vars} + var regWFAcustom = new RegExp("^VAR","ig"); + if (VDIC_web_form_address.match(regWFAcustom)) + { + URLDecode(VDIC_web_form_address,'YES'); + var TEMP_VDIC_web_form_address = decoded; + TEMP_VDIC_web_form_address = TEMP_VDIC_web_form_address.replace(regWFAcustom, ''); + } else - {web_form_vars = '?' + web_form_vars} + { + web_form_vars = + "lead_id=" + document.vicidial_form.lead_id.value + + "&vendor_id=" + document.vicidial_form.vendor_lead_code.value + + "&list_id=" + document.vicidial_form.list_id.value + + "&gmt_offset_now=" + document.vicidial_form.gmt_offset_now.value + + "&phone_code=" + document.vicidial_form.phone_code.value + + "&phone_number=" + document.vicidial_form.phone_number.value + + "&title=" + document.vicidial_form.title.value + + "&first_name=" + document.vicidial_form.first_name.value + + "&middle_initial=" + document.vicidial_form.middle_initial.value + + "&last_name=" + document.vicidial_form.last_name.value + + "&address1=" + document.vicidial_form.address1.value + + "&address2=" + document.vicidial_form.address2.value + + "&address3=" + document.vicidial_form.address3.value + + "&city=" + document.vicidial_form.city.value + + "&state=" + document.vicidial_form.state.value + + "&province=" + document.vicidial_form.province.value + + "&postal_code=" + document.vicidial_form.postal_code.value + + "&country_code=" + document.vicidial_form.country_code.value + + "&gender=" + document.vicidial_form.gender.value + + "&date_of_birth=" + document.vicidial_form.date_of_birth.value + + "&alt_phone=" + document.vicidial_form.alt_phone.value + + "&email=" + document.vicidial_form.email.value + + "&security_phrase=" + document.vicidial_form.security_phrase.value + + "&comments=" + document.vicidial_form.comments.value + + "&user=" + user + + "&pass=" + pass + + "&campaign=" + campaign + + "&phone_login=" + phone_login + + "&phone_pass=" + phone_pass + + "&fronter=" + fronter + + "&closer=" + user + + "&group=" + group + + "&channel_group=" + group + + "&SQLdate=" + SQLdate + + "&epoch=" + UnixTime + + "&uniqueid=" + document.vicidial_form.uniqueid.value + + "&customer_zap_channel=" + lastcustchannel + + "&customer_server_ip=" + lastcustserverip + + "&server_ip=" + server_ip + + "&SIPexten=" + extension + + "&session_id=" + session_id + + "&phone=" + document.vicidial_form.phone_number.value + + "&parked_by=" + document.vicidial_form.lead_id.value + + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + + "&source_id=" + source_id + '' + + webform_session; + + var regWFspace = new RegExp(" ","ig"); + web_form_vars = web_form_vars.replace(regWF, ''); + var regWF = new RegExp("\\`|\\~|\\:|\\;|\\#|\\'|\\\"|\\{|\\}|\\(|\\)|\\*|\\^|\\%|\\$|\\!|\\%|\\r|\\t|\\n","ig"); + web_form_vars = web_form_vars.replace(regWFspace, '+'); + web_form_vars = web_form_vars.replace(regWF, ''); - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + var regWFAvars = new RegExp("\\?","ig"); + if (VDIC_web_form_address.match(regWFAvars)) + {web_form_vars = '&' + web_form_vars} + else + {web_form_vars = '?' + web_form_vars} + + var TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars; + } + + + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; if ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') ) {all_record = 'YES';} @@ -4876,76 +4900,88 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.gender.value = genderValue; } - web_form_vars = - "lead_id=" + document.vicidial_form.lead_id.value + - "&vendor_id=" + document.vicidial_form.vendor_lead_code.value + - "&list_id=" + document.vicidial_form.list_id.value + - "&gmt_offset_now=" + document.vicidial_form.gmt_offset_now.value + - "&phone_code=" + document.vicidial_form.phone_code.value + - "&phone_number=" + document.vicidial_form.phone_number.value + - "&title=" + document.vicidial_form.title.value + - "&first_name=" + document.vicidial_form.first_name.value + - "&middle_initial=" + document.vicidial_form.middle_initial.value + - "&last_name=" + document.vicidial_form.last_name.value + - "&address1=" + document.vicidial_form.address1.value + - "&address2=" + document.vicidial_form.address2.value + - "&address3=" + document.vicidial_form.address3.value + - "&city=" + document.vicidial_form.city.value + - "&state=" + document.vicidial_form.state.value + - "&province=" + document.vicidial_form.province.value + - "&postal_code=" + document.vicidial_form.postal_code.value + - "&country_code=" + document.vicidial_form.country_code.value + - "&gender=" + document.vicidial_form.gender.value + - "&date_of_birth=" + document.vicidial_form.date_of_birth.value + - "&alt_phone=" + document.vicidial_form.alt_phone.value + - "&email=" + document.vicidial_form.email.value + - "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value + - "&user=" + user + - "&pass=" + pass + - "&campaign=" + campaign + - "&phone_login=" + phone_login + - "&phone_pass=" + phone_pass + - "&fronter=" + fronter + - "&closer=" + user + - "&group=" + group + - "&channel_group=" + group + - "&SQLdate=" + SQLdate + - "&epoch=" + UnixTime + - "&uniqueid=" + document.vicidial_form.uniqueid.value + - "&customer_zap_channel=" + lastcustchannel + - "&customer_server_ip=" + lastcustserverip + - "&server_ip=" + server_ip + - "&SIPexten=" + extension + - "&session_id=" + session_id + - "&phone=" + document.vicidial_form.phone_number.value + - "&parked_by=" + document.vicidial_form.lead_id.value + - "&dispo=" + LeaDDispO + '' + - "&dialed_number=" + dialed_number + '' + - "&dialed_label=" + dialed_label + '' + - "&source_id=" + source_id + '' + - webform_session; - - var regWFspace = new RegExp(" ","ig"); - web_form_vars = web_form_vars.replace(regWF, ''); - var regWF = new RegExp("\\`|\\~|\\:|\\;|\\#|\\'|\\\"|\\{|\\}|\\(|\\)|\\*|\\^|\\%|\\$|\\!|\\%|\\r|\\t|\\n","ig"); - web_form_vars = web_form_vars.replace(regWFspace, '+'); - web_form_vars = web_form_vars.replace(regWF, ''); - - var regWFAvars = new RegExp("\\?","ig"); - if (VDIC_web_form_address.match(regWFAvars)) - {web_form_vars = '&' + web_form_vars} + var regWFAcustom = new RegExp("^VAR","ig"); + if (VDIC_web_form_address.match(regWFAcustom)) + { + URLDecode(VDIC_web_form_address,'YES'); + var TEMP_VDIC_web_form_address = decoded; + TEMP_VDIC_web_form_address = TEMP_VDIC_web_form_address.replace(regWFAcustom, ''); + } else - {web_form_vars = '?' + web_form_vars} + { + web_form_vars = + "lead_id=" + document.vicidial_form.lead_id.value + + "&vendor_id=" + document.vicidial_form.vendor_lead_code.value + + "&list_id=" + document.vicidial_form.list_id.value + + "&gmt_offset_now=" + document.vicidial_form.gmt_offset_now.value + + "&phone_code=" + document.vicidial_form.phone_code.value + + "&phone_number=" + document.vicidial_form.phone_number.value + + "&title=" + document.vicidial_form.title.value + + "&first_name=" + document.vicidial_form.first_name.value + + "&middle_initial=" + document.vicidial_form.middle_initial.value + + "&last_name=" + document.vicidial_form.last_name.value + + "&address1=" + document.vicidial_form.address1.value + + "&address2=" + document.vicidial_form.address2.value + + "&address3=" + document.vicidial_form.address3.value + + "&city=" + document.vicidial_form.city.value + + "&state=" + document.vicidial_form.state.value + + "&province=" + document.vicidial_form.province.value + + "&postal_code=" + document.vicidial_form.postal_code.value + + "&country_code=" + document.vicidial_form.country_code.value + + "&gender=" + document.vicidial_form.gender.value + + "&date_of_birth=" + document.vicidial_form.date_of_birth.value + + "&alt_phone=" + document.vicidial_form.alt_phone.value + + "&email=" + document.vicidial_form.email.value + + "&security_phrase=" + document.vicidial_form.security_phrase.value + + "&comments=" + document.vicidial_form.comments.value + + "&user=" + user + + "&pass=" + pass + + "&campaign=" + campaign + + "&phone_login=" + phone_login + + "&phone_pass=" + phone_pass + + "&fronter=" + fronter + + "&closer=" + user + + "&group=" + group + + "&channel_group=" + group + + "&SQLdate=" + SQLdate + + "&epoch=" + UnixTime + + "&uniqueid=" + document.vicidial_form.uniqueid.value + + "&customer_zap_channel=" + lastcustchannel + + "&customer_server_ip=" + lastcustserverip + + "&server_ip=" + server_ip + + "&SIPexten=" + extension + + "&session_id=" + session_id + + "&phone=" + document.vicidial_form.phone_number.value + + "&parked_by=" + document.vicidial_form.lead_id.value + + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + + "&source_id=" + source_id + '' + + webform_session; + + var regWFspace = new RegExp(" ","ig"); + web_form_vars = web_form_vars.replace(regWF, ''); + var regWF = new RegExp("\\`|\\~|\\:|\\;|\\#|\\'|\\\"|\\{|\\}|\\(|\\)|\\*|\\^|\\%|\\$|\\!|\\%|\\r|\\t|\\n","ig"); + web_form_vars = web_form_vars.replace(regWFspace, '+'); + web_form_vars = web_form_vars.replace(regWF, ''); + + var regWFAvars = new RegExp("\\?","ig"); + if (VDIC_web_form_address.match(regWFAvars)) + {web_form_vars = '&' + web_form_vars} + else + {web_form_vars = '?' + web_form_vars} + + var TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars; + } if (taskrefresh == 'OUT') { - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; } else { - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; } } diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 44a47a14..2d8985bd 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -855,6 +855,8 @@ if (isset($_GET["answer_sec_pct_rt_stat_two"])) {$answer_sec_pct_rt_stat_two= elseif (isset($_POST["answer_sec_pct_rt_stat_two"])) {$answer_sec_pct_rt_stat_two=$_POST["answer_sec_pct_rt_stat_two"];} if (isset($_GET["list_active_change"])) {$list_active_change=$_GET["list_active_change"];} elseif (isset($_POST["list_active_change"])) {$list_active_change=$_POST["list_active_change"];} +if (isset($_GET["web_form_target"])) {$web_form_target=$_GET["web_form_target"];} + elseif (isset($_POST["web_form_target"])) {$web_form_target=$_POST["web_form_target"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -1218,6 +1220,7 @@ $hold_time_option_voicemail = ereg_replace("[^-\_0-9a-zA-Z]","",$hold_time_optio $hold_time_option_callback_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$hold_time_option_callback_filename); $exten_context = ereg_replace("[^-\_0-9a-zA-Z]","",$exten_context); $three_way_call_cid = ereg_replace("[^-\_0-9a-zA-Z]","",$three_way_call_cid); +$web_form_target = ereg_replace("[^-\_0-9a-zA-Z]","",$web_form_target); ### ALPHA-NUMERIC and underscore and dash and comma $logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list); @@ -1479,11 +1482,12 @@ $survey_camp_record_dir = ereg_replace(";","",$survey_camp_record_dir); # 81107-1551 - Added Stats Percent of Calls Answered Within X seconds fields to in-groups # 81118-0933 - Changed lists listing with links and more options # 81119-0715 - Added ability to bulk enable/disable lists from modify campaign screen +# 81209-1538 - Added web_form_target to campaign screen # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.0.5-151'; -$build = '81119-0715'; +$admin_version = '2.0.5-152'; +$build = '81209-1538'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -2627,7 +2631,12 @@ echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -5461,7 +5470,7 @@ if ($ADD==1111) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -5538,7 +5547,7 @@ if ($ADD==1311) echo "
ADD A NEW DID\n"; echo "\n"; echo "

-Web Form - This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button. +Web Form - This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button. To customize the query string after the web form, simply begin the web form with VAR and then the URL that you want to use, replacing the variables with the variable names that you want to use --A--phone_number--B-- just like in the SCRIPTS tab section. + +
+
+
+Web Form Target- This is where you can set the custom web page frame that the web form will be opened in when the user clicks on the WEB FORM button. Default is _blank.
@@ -5243,7 +5252,7 @@ if ($ADD==11) echo "
Active: $NWB#vicidial_campaigns-active$NWE
Park Extension: $NWB#vicidial_campaigns-park_ext$NWE
Park Filename: $NWB#vicidial_campaigns-park_file_name$NWE
Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
Active: $NWB#vicidial_inbound_groups-active$NWE
Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "
DID Extension: (no spaces)$NWB#vicidial_inbound_dids-did_pattern$NWE
DID Extension: (no spaces or dashes)$NWB#vicidial_inbound_dids-did_pattern$NWE
DID Description: $NWB#vicidial_inbound_dids-did_description$NWE
\n"; @@ -5565,7 +5574,7 @@ if ($ADD==1411) echo "
COPY DID\n"; echo "\n"; echo "
\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -12105,7 +12116,7 @@ if ($ADD==31) echo "QC Enabled: \n"; echo "\n"; # echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "
DID Extension: (no spaces)$NWB#vicidial_inbound_dids-did_pattern$NWE
DID Extension: (no spaces or dashes)$NWB#vicidial_inbound_dids-did_pattern$NWE
DID Description: $NWB#vicidial_inbound_dids-did_description$NWE
Source DID:
Campaign Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$NWE
Active: $NWB#vicidial_campaigns-active$NWE
Park Extension: - Filename: $NWB#vicidial_campaigns-park_ext$NWE
Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
Web Form Target: $NWB#vicidial_campaigns-web_form_target$NWE
Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
Allow Inbound and Blended: $NWB#vicidial_campaigns-campaign_allow_inbound$NWE
$NWB#vicidial_campaigns-qc_enabled$NWE
QC Statuses:
$NWB#vicidial_campaigns-qc_statuses$NWE
$qc_statuses_list
QC Lists:
$NWB#vicidial_campaigns-qc_lists$NWE
$qc_lists_list
QC WebForm: $NWB#vicidial_campaigns-qc_web_form_address$NWE
QC WebForm: $NWB#vicidial_campaigns-qc_web_form_address$NWE
QC Script:
Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
Active: $NWB#vicidial_inbound_groups-active$NWE
Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
Queue Priority:
QC Enabled: $NWB#vicidial_inbound_groups-qc_enabled$NWE
QC Statuses:
$NWB#vicidial_inbound_groups-qc_statuses$NWE
$qc_statuses_list
QC WebForm: $NWB#vicidial_inbound_groups-qc_web_form_address$NWE
QC WebForm: $NWB#vicidial_inbound_groups-qc_web_form_address$NWE
QC Script: