Added ability to use Custom List Fields in Web Forms, Scripts and Dispo Call URL entries used by the agent interface
optimization of webform generation code in vicidial.php cleanup of asterisk default conf files several other small fixes git-svn-id: svn://192.168.202.10@1525 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -336,6 +336,9 @@ OTHER CHANGES:
|
||||
not a calling report. This report will show statistics for all of the
|
||||
lists in the selected campaigns.
|
||||
|
||||
74. Added ability to use Custom List Fields in Web Forms, Scripts and Dispo
|
||||
Call URL entries used by the agent interface.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,9 +41,6 @@ exten => _999XX11112,5,Hangup
|
||||
[default]
|
||||
include => vicidial-auto
|
||||
|
||||
; VICI-GROUP DIRECT SUPPORT LINE (VICIHELP[84244357])
|
||||
exten => _84244XXX,1,Dial(IAX2/vicihelp/${EXTEN:5})
|
||||
|
||||
; Local agent alert extensions
|
||||
exten => _8600XXX*.,1,AGI(agi-VDADfixCXFER.agi)
|
||||
exten => _78600XXX*.,1,AGI(agi-VDADfixCXFER.agi)
|
||||
@@ -68,31 +65,15 @@ exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG---
|
||||
|
||||
|
||||
; Example phone extensions
|
||||
|
||||
; Extension 2000 Sipura/Linksys ATA line 1
|
||||
exten => 2000,1,Dial(sip/spa2000,30,to) ; Ring, 30 secs max
|
||||
exten => 2000,2,Voicemail,u2000 ; Send to voicemail...
|
||||
; Extension 2001 Sipura/Linksys ATA line 2
|
||||
exten => 2001,1,Dial(sip/spa2001,30,to) ; Ring, 30 secs max
|
||||
exten => 2001,2,Voicemail,u2001 ; Send to voicemail...
|
||||
; Extension 2102 rings Grandstream phone
|
||||
exten => 2102,1,Dial(sip/gs102,30,to) ; Ring, 30 secs max
|
||||
exten => 2102,2,Voicemail,u2102 ; Send to voicemail...
|
||||
; Extension 401 rings the firefly softphone
|
||||
exten => 401,1,Dial((IAX2/firefly01@firefly01/s||t)
|
||||
exten => 401,2,Hangup
|
||||
|
||||
; 100-350 phone extensions now auto-generated
|
||||
; 100-350 phone extensions now auto-generated, so no need to uncommend them
|
||||
; extensions for other SIP and IAX call center phones
|
||||
; cc100-cc150 SIP Phones
|
||||
;exten => _1[0-5]X,1,Dial(sip/cc${EXTEN},20,to)
|
||||
; cc300-cc350 IAX Phones
|
||||
;exten => _3[0-5]X,1,Dial(IAX2/cc${EXTEN},20,to)
|
||||
|
||||
; extensions if using a T1 channelbank
|
||||
;exten => _19XX,1,Dial(Zap/${EXTEN:2},30,o)
|
||||
;exten => _19XX,2,Hangup
|
||||
|
||||
; Extension 4001 rings Zap phone (this example for FXS on Zap port 1)
|
||||
;exten => 4001,1,Dial(Zap/1,30,o) ; ring Zap device 1
|
||||
;exten => 4001,2,Voicemail,u4001 ; Send to voicemail...
|
||||
|
||||
@@ -46,9 +46,6 @@ exten => _999XX11112,n,Hangup
|
||||
[default]
|
||||
include => vicidial-auto
|
||||
|
||||
; VICI-GROUP DIRECT SUPPORT LINE (VICIHELP[84244357])
|
||||
exten => _84244XXX,1,Dial(IAX2/vicihelp/${EXTEN:5})
|
||||
|
||||
; Local agent alert extensions
|
||||
exten => _8600XXX*.,1,AGI(agi-VDADfixCXFER.agi)
|
||||
exten => _78600XXX*.,1,AGI(agi-VDADfixCXFER.agi)
|
||||
@@ -73,31 +70,15 @@ exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG---
|
||||
|
||||
|
||||
; Example phone extensions
|
||||
|
||||
; Extension 2000 Sipura/Linksys ATA line 1
|
||||
exten => 2000,1,Dial(sip/spa2000,30,to) ; Ring, 30 secs max
|
||||
exten => 2000,2,Voicemail,u2000 ; Send to voicemail...
|
||||
; Extension 2001 Sipura/Linksys ATA line 2
|
||||
exten => 2001,1,Dial(sip/spa2001,30,to) ; Ring, 30 secs max
|
||||
exten => 2001,2,Voicemail,u2001 ; Send to voicemail...
|
||||
; Extension 2102 rings Grandstream phone
|
||||
exten => 2102,1,Dial(sip/gs102,30,to) ; Ring, 30 secs max
|
||||
exten => 2102,2,Voicemail,u2102 ; Send to voicemail...
|
||||
; Extension 401 rings the firefly softphone
|
||||
exten => 401,1,Dial((IAX2/firefly01@firefly01/s||t)
|
||||
exten => 401,2,Hangup
|
||||
|
||||
; 100-350 phone extensions now auto-generated
|
||||
; 100-350 phone extensions now auto-generated, so no need to uncommend them
|
||||
; extensions for other SIP and IAX call center phones
|
||||
; cc100-cc150 SIP Phones
|
||||
;exten => _1[0-5]X,1,Dial(sip/cc${EXTEN},20,to)
|
||||
; cc300-cc350 IAX Phones
|
||||
;exten => _3[0-5]X,1,Dial(IAX2/cc${EXTEN},20,to)
|
||||
|
||||
; extensions if using a T1 channelbank
|
||||
;exten => _19XX,1,Dial(Zap/${EXTEN:2},30,o)
|
||||
;exten => _19XX,2,Hangup
|
||||
|
||||
; Extension 4001 rings Zap phone (this example for FXS on Zap port 1)
|
||||
;exten => 4001,1,Dial(Zap/1,30,o) ; ring Zap device 1
|
||||
;exten => 4001,2,Voicemail,u4001 ; Send to voicemail...
|
||||
|
||||
@@ -11,25 +11,3 @@ context=trunkinbound
|
||||
|
||||
#include iax-vicidial.conf
|
||||
|
||||
;register => 1112223333:PASSWORD@iax.binfone.com
|
||||
;ASTloop/ASTblind removed and now included in iax-vicidial.conf
|
||||
|
||||
|
||||
[vicihelp]
|
||||
host=67.134.219.20 ;voip.vicidial-group.com
|
||||
type=friend
|
||||
context=opengateway
|
||||
disallow=all
|
||||
allow=gsm
|
||||
allow=ulaw
|
||||
permit=67.134.219.20/255.255.255.255
|
||||
insecure=very
|
||||
|
||||
|
||||
[1112223333]
|
||||
auth=md5
|
||||
type=friend
|
||||
username=1112223333
|
||||
secret=PASSWORD
|
||||
host=iax.binfone.com
|
||||
context=trunkinbound
|
||||
|
||||
@@ -42,25 +42,4 @@ context=trunkinbound
|
||||
|
||||
#include iax-vicidial.conf
|
||||
|
||||
;register => 1112223333:PASSWORD@iax.binfone.com
|
||||
;ASTloop/ASTblind removed and now included in iax-vicidial.conf
|
||||
|
||||
|
||||
[vicihelp]
|
||||
host=67.134.219.20 ;voip.vicidial-group.com
|
||||
type=friend
|
||||
requirecalltoken=no
|
||||
context=opengateway
|
||||
disallow=all
|
||||
allow=gsm
|
||||
allow=ulaw
|
||||
permit=67.134.219.20/255.255.255.255
|
||||
insecure=very
|
||||
|
||||
[1112223333]
|
||||
auth=md5
|
||||
type=friend
|
||||
username=1112223333
|
||||
secret=PASSWORD
|
||||
host=iax.binfone.com
|
||||
context=trunkinbound
|
||||
|
||||
@@ -96,12 +96,16 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user)
|
||||
$last_rank = $o;
|
||||
$select_SQL = preg_replace("/.$/",'',$select_SQL);
|
||||
|
||||
##### BEGIN grab the data from custom table for the lead_id
|
||||
$stmt="SELECT $select_SQL FROM custom_$list_id where lead_id='$lead_id' LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'05005',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$list_lead_ct = mysql_num_rows($rslt);
|
||||
$list_lead_ct=0;
|
||||
if (strlen($select_SQL)>0)
|
||||
{
|
||||
##### BEGIN grab the data from custom table for the lead_id
|
||||
$stmt="SELECT $select_SQL FROM custom_$list_id where lead_id='$lead_id' LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'05005',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$list_lead_ct = mysql_num_rows($rslt);
|
||||
}
|
||||
if ($list_lead_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
@@ -457,6 +461,20 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user)
|
||||
$CFoutput = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--did_id--B--',"$did_id",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--did_extension--B--',"$did_extension",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--did_pattern--B--',"$did_pattern",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--did_description--B--',"$did_description",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--closecallid--B--',"$closecallid",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--xfercallid--B--',"$xfercallid",$CFoutput);
|
||||
$CFoutput = eregi_replace('--A--agent_log_id--B--',"$agent_log_id",$CFoutput);
|
||||
|
||||
# custom fields replacement
|
||||
$o=0;
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
# - $alt_num_status - ('0','1')
|
||||
# - $DiaL_SecondS - ('0','1','2',...)
|
||||
# - $date - ('2010-02-19')
|
||||
# - $custom_field_names - ('|start_date|finish_date|favorite_color|')
|
||||
#
|
||||
# CHANGELOG:
|
||||
# 50629-1044 - First build of script
|
||||
@@ -255,12 +256,14 @@
|
||||
# 100902-1348 - Added closecallid and xfercallid variables
|
||||
# 100903-0041 - Changed lead_id max length to 10 digits
|
||||
# 100908-1102 - Added customer_3way_hangup_process function
|
||||
# 100916-2144 - Added custom list names export with lead data
|
||||
# 100927-1618 - Added ability to use custom fields in web form and dispo_call_url
|
||||
#
|
||||
|
||||
$version = '2.4-162';
|
||||
$build = '100908-1102';
|
||||
$version = '2.4-164';
|
||||
$build = '100927-1618';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=333;
|
||||
$mysql_log_count=345;
|
||||
$one_mysql_log=0;
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -442,6 +445,8 @@ if (isset($_GET["DiaL_SecondS"])) {$DiaL_SecondS=$_GET["DiaL_SecondS"];}
|
||||
elseif (isset($_POST["DiaL_SecondS"])) {$DiaL_SecondS=$_POST["DiaL_SecondS"];}
|
||||
if (isset($_GET["date"])) {$date=$_GET["date"];}
|
||||
elseif (isset($_POST["date"])) {$date=$_POST["date"];}
|
||||
if (isset($_GET["custom_field_names"])) {$FORMcustom_field_names=$_GET["custom_field_names"];}
|
||||
elseif (isset($_POST["custom_field_names"])) {$FORMcustom_field_names=$_POST["custom_field_names"];}
|
||||
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -1776,6 +1781,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$rank = trim("$row[32]");
|
||||
$owner = trim("$row[33]");
|
||||
$entry_list_id = trim("$row[34]");
|
||||
if ($entry_list_id < 100) {$entry_list_id = $list_id;}
|
||||
}
|
||||
|
||||
$called_count++;
|
||||
@@ -2156,6 +2162,50 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if (strlen($row[4]) > 0)
|
||||
{$VDCL_xferconf_e_number = $row[4];}
|
||||
}
|
||||
|
||||
$custom_field_names='|';
|
||||
$custom_field_names_SQL='';
|
||||
$custom_field_values='----------';
|
||||
$custom_field_types='|';
|
||||
### find the names of all custom fields, if any
|
||||
$stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY') and field_label NOT IN('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');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00334',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$cffn_ct = mysql_num_rows($rslt);
|
||||
$d=0;
|
||||
while ($cffn_ct > $d)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$custom_field_names .= "$row[0]|";
|
||||
$custom_field_names_SQL .= "$row[0],";
|
||||
$custom_field_types .= "$row[1]|";
|
||||
$custom_field_values .= "----------";
|
||||
$d++;
|
||||
}
|
||||
if ($cffn_ct > 0)
|
||||
{
|
||||
$custom_field_names_SQL = eregi_replace(".$","",$custom_field_names_SQL);
|
||||
### find the values of the named custom fields
|
||||
$stmt = "SELECT $custom_field_names_SQL FROM custom_$entry_list_id where lead_id='$lead_id' limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00335',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$cffv_ct = mysql_num_rows($rslt);
|
||||
if ($cffv_ct > 0)
|
||||
{
|
||||
$custom_field_values='----------';
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$d=0;
|
||||
while ($cffn_ct > $d)
|
||||
{
|
||||
$custom_field_values .= "$row[$d]----------";
|
||||
$d++;
|
||||
}
|
||||
$custom_field_values = preg_replace("/\n/"," ",$custom_field_values);
|
||||
$custom_field_values = preg_replace("/\r/","",$custom_field_values);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2207,6 +2257,9 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$LeaD_InfO .= $VDCL_xferconf_d_number . "\n";
|
||||
$LeaD_InfO .= $VDCL_xferconf_e_number . "\n";
|
||||
$LeaD_InfO .= $entry_list_id . "\n";
|
||||
$LeaD_InfO .= $custom_field_names . "\n";
|
||||
$LeaD_InfO .= $custom_field_values . "\n";
|
||||
$LeaD_InfO .= $custom_field_types . "\n";
|
||||
|
||||
echo $LeaD_InfO;
|
||||
}
|
||||
@@ -4032,6 +4085,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$rank = trim("$row[32]");
|
||||
$owner = trim("$row[33]");
|
||||
$entry_list_id = trim("$row[34]");
|
||||
if ($entry_list_id < 100) {$entry_list_id = $list_id;}
|
||||
}
|
||||
|
||||
##### if lead is a callback, grab the callback comments
|
||||
@@ -4288,7 +4342,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$stmt = "SELECT closecallid,xfercallid from vicidial_closer_log where lead_id='$lead_id' and user='$user' and list_id='$list_id' order by call_date desc limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00336',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDCL_mvac_ct = mysql_num_rows($rslt);
|
||||
if ($VDCL_mvac_ct > 0)
|
||||
{
|
||||
@@ -4545,7 +4599,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$stmt = "SELECT did_id,extension from vicidial_did_log where uniqueid='$uniqueid' order by call_date desc limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00337',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDIDL_ct = mysql_num_rows($rslt);
|
||||
if ($VDIDL_ct > 0)
|
||||
{
|
||||
@@ -4556,7 +4610,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$stmt = "SELECT did_pattern,did_description from vicidial_inbound_dids where did_id='$DID_id' limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00338',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDIDL_ct = mysql_num_rows($rslt);
|
||||
if ($VDIDL_ct > 0)
|
||||
{
|
||||
@@ -4610,6 +4664,51 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
}
|
||||
}
|
||||
|
||||
$custom_field_names='|';
|
||||
$custom_field_names_SQL='';
|
||||
$custom_field_values='----------';
|
||||
$custom_field_types='|';
|
||||
### find the names of all custom fields, if any
|
||||
$stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY') and field_label NOT IN('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');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00339',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$cffn_ct = mysql_num_rows($rslt);
|
||||
$d=0;
|
||||
while ($cffn_ct > $d)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$custom_field_names .= "$row[0]|";
|
||||
$custom_field_names_SQL .= "$row[0],";
|
||||
$custom_field_types .= "$row[1]|";
|
||||
$custom_field_values .= "----------";
|
||||
$d++;
|
||||
}
|
||||
if ($cffn_ct > 0)
|
||||
{
|
||||
$custom_field_names_SQL = eregi_replace(".$","",$custom_field_names_SQL);
|
||||
### find the values of the named custom fields
|
||||
$stmt = "SELECT $custom_field_names_SQL FROM custom_$entry_list_id where lead_id='$lead_id' limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00340',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$cffv_ct = mysql_num_rows($rslt);
|
||||
if ($cffv_ct > 0)
|
||||
{
|
||||
$custom_field_values='----------';
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$d=0;
|
||||
while ($cffn_ct > $d)
|
||||
{
|
||||
$custom_field_values .= "$row[$d]----------";
|
||||
$d++;
|
||||
}
|
||||
$custom_field_values = preg_replace("/\n/"," ",$custom_field_values);
|
||||
$custom_field_values = preg_replace("/\r/","",$custom_field_values);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$comments = eregi_replace("\r",'',$comments);
|
||||
$comments = eregi_replace("\n",'!N',$comments);
|
||||
|
||||
@@ -4657,6 +4756,9 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$LeaD_InfO .= $owner . "\n";
|
||||
$LeaD_InfO .= $script_recording_delay . "\n";
|
||||
$LeaD_InfO .= $entry_list_id . "\n";
|
||||
$LeaD_InfO .= $custom_field_names . "\n";
|
||||
$LeaD_InfO .= $custom_field_values . "\n";
|
||||
$LeaD_InfO .= $custom_field_types . "\n";
|
||||
|
||||
echo $LeaD_InfO;
|
||||
|
||||
@@ -4791,6 +4893,37 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$VDCL_start_call_url = eregi_replace('--A--user_custom_five--B--',urlencode(trim($user_custom_five)),$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--talk_time--B--',"0",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--talk_time_min--B--',"0",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--entry_list_id--B--',"$entry_list_id",$VDCL_start_call_url);
|
||||
|
||||
if (strlen($custom_field_names)>2)
|
||||
{
|
||||
$custom_field_names = preg_replace("/^\||\|$/",'',$custom_field_names);
|
||||
$custom_field_names = preg_replace("/\|/",",",$custom_field_names);
|
||||
$custom_field_names_ARY = explode(',',$custom_field_names);
|
||||
$custom_field_names_ct = count($custom_field_names_ARY);
|
||||
$custom_field_names_SQL = $custom_field_names;
|
||||
|
||||
##### BEGIN grab the data from custom table for the lead_id
|
||||
$stmt="SELECT $custom_field_names_SQL FROM custom_$entry_list_id where lead_id='$lead_id' LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00344',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$list_lead_ct = mysql_num_rows($rslt);
|
||||
if ($list_lead_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$o=0;
|
||||
while ($custom_field_names_ct > $o)
|
||||
{
|
||||
$form_field_value = trim("$row[$o]");
|
||||
$field_name_id = $custom_field_names_ARY[$o];
|
||||
$field_name_tag = "--A--" . $field_name_id . "--B--";
|
||||
$VDCL_start_call_url = eregi_replace("$field_name_tag","$form_field_value",$VDCL_start_call_url);
|
||||
$o++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($DB > 0) {echo "$VDCL_start_call_url<BR>\n";}
|
||||
$SCUfile = file("$VDCL_start_call_url");
|
||||
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
|
||||
@@ -6079,7 +6212,7 @@ if ($ACTION == 'updateDISPO')
|
||||
$stmt = "SELECT phone_number,alt_dial from vicidial_log where uniqueid='$uniqueid';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00341',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$vl_dialed_ct = mysql_num_rows($rslt);
|
||||
if ($vl_dialed_ct > 0)
|
||||
{
|
||||
@@ -6091,7 +6224,6 @@ if ($ACTION == 'updateDISPO')
|
||||
}
|
||||
|
||||
|
||||
|
||||
##### grab the data from vicidial_list for the lead_id
|
||||
$stmt="SELECT lead_id,entry_date,modify_date,status,user,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,entry_list_id FROM vicidial_list where lead_id='$lead_id' LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
@@ -6199,6 +6331,37 @@ if ($ACTION == 'updateDISPO')
|
||||
$dispo_call_url = eregi_replace('--A--talk_time_ms--B--',"$talk_time_ms",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--talk_time_min--B--',"$talk_time_min",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--agent_log_id--B--',"$CALL_agent_log_id",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--entry_list_id--B--',"$entry_list_id",$dispo_call_url);
|
||||
|
||||
if (strlen($FORMcustom_field_names)>2)
|
||||
{
|
||||
$custom_field_names = preg_replace("/^\||\|$/",'',$FORMcustom_field_names);
|
||||
$custom_field_names = preg_replace("/\|/",",",$custom_field_names);
|
||||
$custom_field_names_ARY = explode(',',$custom_field_names);
|
||||
$custom_field_names_ct = count($custom_field_names_ARY);
|
||||
$custom_field_names_SQL = $custom_field_names;
|
||||
|
||||
##### BEGIN grab the data from custom table for the lead_id
|
||||
$stmt="SELECT $custom_field_names_SQL FROM custom_$entry_list_id where lead_id='$lead_id' LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00345',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$list_lead_ct = mysql_num_rows($rslt);
|
||||
if ($list_lead_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$o=0;
|
||||
while ($custom_field_names_ct > $o)
|
||||
{
|
||||
$form_field_value = trim("$row[$o]");
|
||||
$field_name_id = $custom_field_names_ARY[$o];
|
||||
$field_name_tag = "--A--" . $field_name_id . "--B--";
|
||||
$dispo_call_url = eregi_replace("$field_name_tag","$form_field_value",$dispo_call_url);
|
||||
$o++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($DB > 0) {echo "$dispo_call_url<BR>\n";}
|
||||
$SCUfile = file("$dispo_call_url");
|
||||
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
|
||||
@@ -7556,7 +7719,7 @@ if ($ACTION == 'customer_3way_hangup_process')
|
||||
$stmt="UPDATE user_call_log SET customer_hungup='$status',customer_hungup_seconds='$stage' where lead_id='$lead_id' and user='$user' and call_type LIKE \"%3WAY%\" order by user_call_log_id desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00342',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
echo "DONE: $stage|$lead_id|$status";
|
||||
}
|
||||
@@ -7592,7 +7755,7 @@ if ($ACTION == 'Clear_API_Field')
|
||||
$stmt="UPDATE vicidial_live_agents SET $comments='' where user='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00343',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
echo "DONE: $comments";
|
||||
}
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
# 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
|
||||
#
|
||||
|
||||
$version = '2.4-3';
|
||||
$build = '100712-2322';
|
||||
$version = '2.4-4';
|
||||
$build = '100916-1749';
|
||||
|
||||
require("dbconnect.php");
|
||||
require("functions.php");
|
||||
@@ -43,10 +44,108 @@ if (isset($_GET["admin_submit"])) {$admin_submit=$_GET["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["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
|
||||
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
|
||||
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["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"];}
|
||||
|
||||
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");
|
||||
@@ -328,7 +427,7 @@ else
|
||||
echo " </script>\n";
|
||||
echo " <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
|
||||
echo "</head>\n";
|
||||
echo '<BODY BGCOLOR="#' . $bgcolor . '" marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>';
|
||||
echo "<BODY BGCOLOR=\"#" . $bgcolor . "\" marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onload=\"parent.document.getElementById('FORM_LOADED').value='1';\">";
|
||||
echo "\n";
|
||||
echo "<form action=./vdc_form_display.php method=POST name=form_custom_fields id=form_custom_fields>\n";
|
||||
echo "<input type=hidden name=lead_id id=lead_id value=\"$lead_id\">\n";
|
||||
|
||||
@@ -177,10 +177,15 @@ 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["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
|
||||
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
|
||||
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
|
||||
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
|
||||
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
|
||||
elseif (isset($_POST["ignore_list_script"])) {$ignore_list_script=$_POST["ignore_list_script"];}
|
||||
if (isset($_GET["CF_uses_custom_fields"])) {$CF_uses_custom_fields=$_GET["CF_uses_custom_fields"];}
|
||||
elseif (isset($_POST["CF_uses_custom_fields"])) {$CF_uses_custom_fields=$_POST["CF_uses_custom_fields"];}
|
||||
if (isset($_GET["entry_list_id"])) {$entry_list_id=$_GET["entry_list_id"];}
|
||||
elseif (isset($_POST["entry_list_id"])) {$entry_list_id=$_POST["entry_list_id"];}
|
||||
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
@@ -465,6 +470,29 @@ $script_text = eregi_replace('--A--did_description--B--',"$did_description",$scr
|
||||
$script_text = eregi_replace('--A--closecallid--B--',"$closecallid",$script_text);
|
||||
$script_text = eregi_replace('--A--xfercallid--B--',"$xfercallid",$script_text);
|
||||
$script_text = eregi_replace('--A--agent_log_id--B--',"$agent_log_id",$script_text);
|
||||
$script_text = eregi_replace('--A--entry_list_id--B--',"$entry_list_id",$script_text);
|
||||
|
||||
if ($CF_uses_custom_fields=='Y')
|
||||
{
|
||||
### find the names of all custom fields, if any
|
||||
$stmt = "SELECT field_label,field_type FROM vicidial_lists_fields where list_id='$entry_list_id' and field_type NOT IN('SCRIPT','DISPLAY') and field_label NOT IN('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');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$cffn_ct = mysql_num_rows($rslt);
|
||||
$d=0;
|
||||
while ($cffn_ct > $d)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$field_name_id = $row[0];
|
||||
$field_name_tag = "--A--" . $field_name_id . "--B--";
|
||||
if (isset($_GET["$field_name_id"])) {$form_field_value=$_GET["$field_name_id"];}
|
||||
elseif (isset($_POST["$field_name_id"])) {$form_field_value=$_POST["$field_name_id"];}
|
||||
$script_text = eregi_replace("$field_name_tag","$form_field_value",$script_text);
|
||||
if ($DB) {echo "$d|$field_name_id|$field_name_tag|$form_field_value|<br>\n";}
|
||||
$d++;
|
||||
}
|
||||
}
|
||||
|
||||
$script_text = eregi_replace("\n","<BR>",$script_text);
|
||||
$script_text = stripslashes($script_text);
|
||||
|
||||
|
||||
+286
-1052
File diff suppressed because it is too large
Load Diff
@@ -2546,11 +2546,12 @@ else
|
||||
# 100901-2055 - Added password strength grading, force password change, password default settings and first login screen
|
||||
# 100908-0926 - Added 3way hangup logging options to campaigns
|
||||
# 100912-0842 - Several small changes, removed Emergency VDAC clear since it does not do anything anymore
|
||||
# 100927-2321 - Added entry_list_id as a script, webform, dispo_call_url variable
|
||||
#
|
||||
# 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.4-280';
|
||||
$build = '100912-0842';
|
||||
$admin_version = '2.4-281';
|
||||
$build = '100927-2321';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -5789,10 +5790,10 @@ if ($ADD==99999)
|
||||
|
||||
<BR>
|
||||
<A NAME="vicidial_scripts-script_text">
|
||||
<B>Script Text -</B> This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: 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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id, dialed_number, dialed_label, rank, owner, camp_script, in_script, script_width, script_height, recording_filename, recording_id, user_custom_one, user_custom_two, user_custom_three, user_custom_four, user_custom_five, preset_number_a, preset_number_b, preset_number_c, preset_number_d, preset_number_e, preset_number_f, preset_dtmf_a, preset_dtmf_b, did_id, did_extension, did_pattern, did_description, closecallid, xfercallid, agent_log_id. For example, this sentence would print the persons name in it----<BR><BR> Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?<BR><BR> This would read----<BR><BR>Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?<BR><BR> You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables:
|
||||
<B>Script Text -</B> This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: 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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id, dialed_number, dialed_label, rank, owner, camp_script, in_script, script_width, script_height, recording_filename, recording_id, user_custom_one, user_custom_two, user_custom_three, user_custom_four, user_custom_five, preset_number_a, preset_number_b, preset_number_c, preset_number_d, preset_number_e, preset_number_f, preset_dtmf_a, preset_dtmf_b, did_id, did_extension, did_pattern, did_description, closecallid, xfercallid, agent_log_id, entry_list_id. For example, this sentence would print the persons name in it----<BR><BR> Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?<BR><BR> This would read----<BR><BR>Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?<BR><BR> You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables:
|
||||
|
||||
<DIV style="height:200px;width:400px;background:white;overflow:scroll;font-size:12px;font-family:sans-serif;" id=iframe_example>
|
||||
<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&dialed_number=--A--dialed_number--B--&dialed_label=--A--dialed_label--B--&rank=--A--rank--B--&owner=--A--owner--B--&phone=--A--phone--B--&camp_script=--A--camp_script--B--&in_script=--A--in_script--B--&script_width=--A--script_width--B--&script_height=--A--script_height--B--&recording_filename=--A--recording_filename--B--&recording_id=--A--recording_id--B--&user_custom_one=--A--user_custom_one--B--&user_custom_two=--A--user_custom_two--B--&user_custom_three=--A--user_custom_three--B--&user_custom_four=--A--user_custom_four--B--&user_custom_five=--A--user_custom_five--B--&preset_number_a=--A--preset_number_a--B--&preset_number_b=--A--preset_number_b--B--&preset_number_c=--A--preset_number_c--B--&preset_number_d=--A--preset_number_d--B--&preset_number_e=--A--preset_number_e--B--&preset_number_f=--A--preset_number_f--B--&preset_dtmf_a=--A--preset_dtmf_a--B--&preset_dtmf_b=--A--preset_dtmf_b--B--&did_id=--A--did_id--B--&did_extension=--A--did_extension--B--&did_pattern=--A--did_pattern--B--&did_description=--A--did_description--B--&closecallid=--A--closecallid--B--&xfercallid=--A--xfercallid--B--&agent_log_id=--A--agent_log_id--B--&" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290" STYLE="z-index:17">
|
||||
<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&dialed_number=--A--dialed_number--B--&dialed_label=--A--dialed_label--B--&rank=--A--rank--B--&owner=--A--owner--B--&phone=--A--phone--B--&camp_script=--A--camp_script--B--&in_script=--A--in_script--B--&script_width=--A--script_width--B--&script_height=--A--script_height--B--&recording_filename=--A--recording_filename--B--&recording_id=--A--recording_id--B--&user_custom_one=--A--user_custom_one--B--&user_custom_two=--A--user_custom_two--B--&user_custom_three=--A--user_custom_three--B--&user_custom_four=--A--user_custom_four--B--&user_custom_five=--A--user_custom_five--B--&preset_number_a=--A--preset_number_a--B--&preset_number_b=--A--preset_number_b--B--&preset_number_c=--A--preset_number_c--B--&preset_number_d=--A--preset_number_d--B--&preset_number_e=--A--preset_number_e--B--&preset_number_f=--A--preset_number_f--B--&preset_dtmf_a=--A--preset_dtmf_a--B--&preset_dtmf_b=--A--preset_dtmf_b--B--&did_id=--A--did_id--B--&did_extension=--A--did_extension--B--&did_pattern=--A--did_pattern--B--&did_description=--A--did_description--B--&closecallid=--A--closecallid--B--&xfercallid=--A--xfercallid--B--&agent_log_id=--A--agent_log_id--B--&entry_list_id=--A--entry_list_id--B--&" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290" STYLE="z-index:17">
|
||||
</iframe>
|
||||
</DIV>
|
||||
|
||||
@@ -7315,6 +7316,7 @@ if ($ADD==7111111)
|
||||
$closecallid = 'closecallid';
|
||||
$xfercallid = 'xfercallid';
|
||||
$agent_log_id = 'agent_log_id';
|
||||
$entry_list_id = 'entry_list_id';
|
||||
|
||||
echo "</title>\n";
|
||||
echo "</head>\n";
|
||||
@@ -7464,6 +7466,7 @@ if ($ADD==7111111)
|
||||
$script_text = eregi_replace('--A--closecallid--B--',"$closecallid",$script_text);
|
||||
$script_text = eregi_replace('--A--xfercallid--B--',"$xfercallid",$script_text);
|
||||
$script_text = eregi_replace('--A--agent_log_id--B--',"$agent_log_id",$script_text);
|
||||
$script_text = eregi_replace('--A--entry_list_id--B--',"$entry_list_id",$script_text);
|
||||
$script_text = eregi_replace("\n","<BR>",$script_text);
|
||||
|
||||
|
||||
@@ -8732,6 +8735,7 @@ if ($ADD==1111111)
|
||||
echo "<option>closecallid</option>";
|
||||
echo "<option>xfercallid</option>";
|
||||
echo "<option>agent_log_id</option>";
|
||||
echo "<option>entry_list_id</option>";
|
||||
echo "</select>";
|
||||
echo "<input type=\"button\" name=\"insertField\" value=\"Insert\" onClick=\"scriptInsertField();\"><BR>";
|
||||
# END Insert Field
|
||||
@@ -23297,6 +23301,7 @@ if ($ADD==3111111)
|
||||
echo "<option>closecallid</option>";
|
||||
echo "<option>xfercallid</option>";
|
||||
echo "<option>agent_log_id</option>";
|
||||
echo "<option>entry_list_id</option>";
|
||||
echo "</select>";
|
||||
echo "<input type=\"button\" name=\"insertField\" value=\"Insert\" onClick=\"scriptInsertField();\"><BR>";
|
||||
# END Insert Field
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
# 100629-0200 - Added SCRIPT field type option
|
||||
# 100722-1313 - Added field validation for label and name
|
||||
# 100728-1724 - Added field validation for select lists and checkbox/radio buttons
|
||||
# 100916-1754 - Do not show help in example form if help is empty
|
||||
#
|
||||
|
||||
$admin_version = '2.4-8';
|
||||
$build = '100728-1724';
|
||||
$admin_version = '2.4-9';
|
||||
$build = '100916-1754';
|
||||
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -998,7 +999,12 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
|
||||
}
|
||||
echo "<a href=\"#ANCHOR_$A_field_label[$o]\"><B>$A_field_name[$o]</B></a>";
|
||||
if ($A_name_position[$o]=='TOP')
|
||||
{echo " <span style=\"position:static;\" id=P_HELP_$A_field_label[$o]></span><span style=\"position:static;background:white;\" id=HELP_$A_field_label[$o]> <a href=\"javascript:open_help('HELP_$A_field_label[$o]','$A_field_help[$o]');\">help+</a></span><BR>";}
|
||||
{
|
||||
$helpHTML = "<a href=\"javascript:open_help('HELP_$A_field_label[$o]','$A_field_help[$o]');\">help+</a>";
|
||||
if (strlen($A_field_help[$o])<1)
|
||||
{$helpHTML = '';}
|
||||
echo " <span style=\"position:static;\" id=P_HELP_$A_field_label[$o]></span><span style=\"position:static;background:white;\" id=HELP_$A_field_label[$o]> $helpHTML</span><BR>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($last_field_rank=="$A_field_rank[$o]")
|
||||
@@ -1135,7 +1141,10 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
|
||||
|
||||
if ($A_name_position[$o]=='LEFT')
|
||||
{
|
||||
echo " $field_HTML <span style=\"position:static;\" id=P_HELP_$A_field_label[$o]></span><span style=\"position:static;background:white;\" id=HELP_$A_field_label[$o]> <a href=\"javascript:open_help('HELP_$A_field_label[$o]','$A_field_help[$o]');\">help+</a></span>";
|
||||
$helpHTML = "<a href=\"javascript:open_help('HELP_$A_field_label[$o]','$A_field_help[$o]');\">help+</a>";
|
||||
if (strlen($A_field_help[$o])<1)
|
||||
{$helpHTML = '';}
|
||||
echo " $field_HTML <span style=\"position:static;\" id=P_HELP_$A_field_label[$o]></span><span style=\"position:static;background:white;\" id=HELP_$A_field_label[$o]> $helpHTML</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -616,7 +616,7 @@ if ($lead_search > 0)
|
||||
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
||||
|
||||
#Vtiger no longer use auto increment for vtiger_crmentity crmid, vtiger_crmentity_seq is used instead to list next aviable entity ID
|
||||
# Get next aviable id to use as crmid in vtiger_crmentity
|
||||
# Get next available id to use as crmid in vtiger_crmentity
|
||||
$stmt="SELECT id from vtiger_crmentity_seq ;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $linkV);
|
||||
@@ -624,7 +624,7 @@ if ($lead_search > 0)
|
||||
$leadid = ($row[0] + 1);
|
||||
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
||||
|
||||
# Increase next aviable crmid with 1 so next record gets proper id
|
||||
# Increase next available crmid with 1 so next record gets proper id
|
||||
$stmt="UPDATE vtiger_crmentity_seq SET id = '$leadid';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $linkV);
|
||||
@@ -644,7 +644,7 @@ if ($lead_search > 0)
|
||||
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
||||
|
||||
#Insert values into vtiger_leaddetails
|
||||
$stmt = "INSERT INTO vtiger_leadaddress (leadaddressid,city,code,state,country,phone,mobile,lane) values('$leadid','$city','$postal_code','$province','$country','$phone','$alt_phone','$address1 $address2');";
|
||||
$stmt = "INSERT INTO vtiger_leadaddress (leadaddressid,city,code,state,country,phone,mobile,lane) values('$leadid','$city','$postal_code','$state','$country','$phone','$alt_phone','$address1 $address2');";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $linkV);
|
||||
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
||||
|
||||
Reference in New Issue
Block a user