Added Recording Filename and Recording ID as agent Script variables

git-svn-id: svn://192.168.202.10@1271 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-12-05 05:23:54 +00:00
parent d51b7c6a38
commit 47c886c73e
7 changed files with 420 additions and 41 deletions
+6
View File
@@ -315,6 +315,12 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
click submit. Manager must have the ability to Change Agent Campaign in
their user settings.
75. Added Recording Filename and Recording ID as Script variables. If you use
either or both of these the script content will load twice if you have
auto-launch set to SCRIPT. Only works with recording set to ALLCALLS or
ALLFORCE for script on auto-launch. Also, added a refresh link for the
script tab to reload content at will.
+18 -1
View File
@@ -1833,6 +1833,23 @@ index (user),
index (event_date)
);
CREATE TABLE vicidial_grab_call_log (
auto_call_id INT(9) UNSIGNED NOT NULL,
user VARCHAR(20),
event_date DATETIME,
call_time DATETIME,
campaign_id VARCHAR(20),
uniqueid VARCHAR(20),
phone_number VARCHAR(20),
lead_id INT(9) UNSIGNED,
queue_priority TINYINT(2) default '0',
call_type ENUM('IN','OUT','OUTBALANCE') default 'OUT',
index (auto_call_id),
index (event_date),
index (user),
index (campaign_id)
);
ALTER TABLE vicidial_campaign_server_stats ENGINE=HEAP;
@@ -1961,7 +1978,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number);
CREATE INDEX date_user on vicidial_closer_log (call_date,user);
CREATE INDEX comment_a on live_inbound_log (comment_a);
UPDATE system_settings SET db_schema_version='1183',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1184',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+19
View File
@@ -626,3 +626,22 @@ ALTER TABLE vicidial_live_agents ADD external_igb_set_user VARCHAR(20) default '
ALTER TABLE vicidial_user_closer_log ADD manager_change VARCHAR(20) default '';
UPDATE system_settings SET db_schema_version='1183',db_schema_update_date=NOW();
CREATE TABLE vicidial_grab_call_log (
auto_call_id INT(9) UNSIGNED NOT NULL,
user VARCHAR(20),
event_date DATETIME,
call_time DATETIME,
campaign_id VARCHAR(20),
uniqueid VARCHAR(20),
phone_number VARCHAR(20),
lead_id INT(9) UNSIGNED,
queue_priority TINYINT(2) default '0',
call_type ENUM('IN','OUT','OUTBALANCE') default 'OUT',
index (auto_call_id),
index (event_date),
index (user),
index (campaign_id)
);
UPDATE system_settings SET db_schema_version='1184',db_schema_update_date=NOW();
+150 -5
View File
@@ -222,10 +222,11 @@
# 91108-2120 - Fixed QM log issue with PAUSEREASON entries
# 91112-1107 - Changed ENTERQUEUE to CALLOUTBOUND for QM logging
# 91123-1801 - Added outbound_autodial field
# 91204-1937 - Added logging of agent grab calls
#
$version = '2.2.0-131';
$build = '91123-1801';
$version = '2.2.0-132';
$build = '91204-1937';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=256;
$one_mysql_log=0;
@@ -907,12 +908,25 @@ if ($ACTION == 'manDiaLnextCaLL')
if ($vla_cc_ct > 0)
{
$row=mysql_fetch_row($rslt);
$calls_today =$row[0];
$calls_today = $row[0];
}
else
{$calls_today ='0';}
$calls_today++;
$script_recording_delay=0;
##### find if script contains recording fields
$stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_campaigns vc WHERE campaign_id='$campaign' and vs.script_id=vc.campaign_script and script_text LIKE \"%--A--recording_%\";";
$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 ($DB) {echo "$stmt\n";}
$vs_vc_ct = mysql_num_rows($rslt);
if ($vs_vc_ct > 0)
{
$row=mysql_fetch_row($rslt);
$script_recording_delay = $row[0];
}
### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE
if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) )
{
@@ -1794,6 +1808,33 @@ if ($ACTION == 'manDiaLnextCaLL')
}
##### find if script contains recording fields
$stmt="SELECT count(*) FROM vicidial_lists WHERE list_id='$list_id' and agent_script_override!='' and agent_script_override IS NOT NULL and agent_script_override!='NONE';";
$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 ($DB) {echo "$stmt\n";}
$vls_vc_ct = mysql_num_rows($rslt);
if ($vls_vc_ct > 0)
{
$row=mysql_fetch_row($rslt);
if ($row[0] > 0)
{
$script_recording_delay=0;
##### find if script contains recording fields
$stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_lists vls WHERE list_id='$list_id' and vs.script_id=vls.agent_script_override and script_text LIKE \"%--A--recording_%\";";
$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 ($DB) {echo "$stmt\n";}
$vs_vc_ct = mysql_num_rows($rslt);
if ($vs_vc_ct > 0)
{
$row=mysql_fetch_row($rslt);
$script_recording_delay = $row[0];
}
}
}
$comments = eregi_replace("\r",'',$comments);
$comments = eregi_replace("\n",'!N',$comments);
@@ -1834,6 +1875,8 @@ if ($ACTION == 'manDiaLnextCaLL')
$LeaD_InfO .= $source_id . "\n";
$LeaD_InfO .= $rank . "\n";
$LeaD_InfO .= $owner . "\n";
$LeaD_InfO .= "\n";
$LeaD_InfO .= $script_recording_delay . "\n";
echo $LeaD_InfO;
}
@@ -3564,6 +3607,19 @@ if ($ACTION == 'VDADcheckINCOMING')
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00113',$user,$server_ip,$session_name,$one_mysql_log);}
$script_recording_delay=0;
##### grab number of calls today in this campaign and increment
$stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_campaigns vc WHERE campaign_id='$campaign' and vs.script_id=vc.campaign_script and script_text LIKE \"%--A--recording_%\";";
$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 ($DB) {echo "$stmt\n";}
$vs_vc_ct = mysql_num_rows($rslt);
if ($vs_vc_ct > 0)
{
$row=mysql_fetch_row($rslt);
$script_recording_delay = $row[0];
}
$stmt = "SELECT campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group from vicidial_campaigns where campaign_id='$campaign';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -3629,6 +3685,19 @@ if ($ACTION == 'VDADcheckINCOMING')
$VDCL_front_VDlog =$row[0];
}
$script_recording_delay=0;
##### find if script contains recording fields
$stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_inbound_groups vig WHERE group_id='$VDADchannel_group' and vs.script_id=vig.ingroup_script and script_text LIKE \"%--A--recording_%\";";
$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 ($DB) {echo "$stmt\n";}
$vs_vc_ct = mysql_num_rows($rslt);
if ($vs_vc_ct > 0)
{
$row=mysql_fetch_row($rslt);
$script_recording_delay = $row[0];
}
$stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two from vicidial_inbound_groups where group_id='$VDADchannel_group';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -3662,8 +3731,6 @@ if ($ACTION == 'VDADcheckINCOMING')
if ($VDIG_cidOR_ct > 0)
{
$row=mysql_fetch_row($rslt);
if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) )
{$VDCL_ingroup_script = $row[0];}
if (strlen($VDCL_xferconf_a_dtmf) < 1)
{$VDCL_xferconf_a_dtmf = $row[1];}
if (strlen($VDCL_xferconf_a_number) < 1)
@@ -3674,6 +3741,22 @@ if ($ACTION == 'VDADcheckINCOMING')
{$VDCL_xferconf_b_number = $row[4];}
if (strlen($VDCL_default_group_alias) < 1)
{$VDCL_default_group_alias = $row[5];}
if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) )
{
$VDCL_ingroup_script = $row[0];
$script_recording_delay=0;
##### find if script contains recording fields
$stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_campaigns vc WHERE campaign_id='$campaign' and vs.script_id=vc.campaign_script and script_text LIKE \"%--A--recording_%\";";
$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 ($DB) {echo "$stmt\n";}
$vs_vc_ct = mysql_num_rows($rslt);
if ($vs_vc_ct > 0)
{
$row=mysql_fetch_row($rslt);
$script_recording_delay = $row[0];
}
}
}
$stmt = "select group_web_vars from vicidial_inbound_group_agents where group_id='$VDADchannel_group' and user='$user';";
@@ -3728,6 +3811,19 @@ if ($ACTION == 'VDADcheckINCOMING')
$VDCL_default_group_alias = $row[6];
}
$script_recording_delay=0;
##### find if script contains recording fields
$stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_campaigns vc WHERE campaign_id='$VDADchannel_group' and vs.script_id=vc.campaign_script and script_text LIKE \"%--A--recording_%\";";
$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 ($DB) {echo "$stmt\n";}
$vs_vc_ct = mysql_num_rows($rslt);
if ($vs_vc_ct > 0)
{
$row=mysql_fetch_row($rslt);
$script_recording_delay = $row[0];
}
$stmt = "select group_web_vars from vicidial_campaign_agents where campaign_id='$VDADchannel_group' and user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -3773,6 +3869,32 @@ if ($ACTION == 'VDADcheckINCOMING')
else {echo '|' . $tsr . "\n";}
}
##### find if script contains recording fields
$stmt="SELECT count(*) FROM vicidial_lists WHERE list_id='$list_id' and agent_script_override!='' and agent_script_override IS NOT NULL and agent_script_override!='NONE';";
$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 ($DB) {echo "$stmt\n";}
$vls_vc_ct = mysql_num_rows($rslt);
if ($vls_vc_ct > 0)
{
$row=mysql_fetch_row($rslt);
if ($row[0] > 0)
{
$script_recording_delay=0;
##### find if script contains recording fields
$stmt="SELECT count(*) FROM vicidial_scripts vs,vicidial_lists vls WHERE list_id='$list_id' and vs.script_id=vls.agent_script_override and script_text LIKE \"%--A--recording_%\";";
$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 ($DB) {echo "$stmt\n";}
$vs_vc_ct = mysql_num_rows($rslt);
if ($vs_vc_ct > 0)
{
$row=mysql_fetch_row($rslt);
$script_recording_delay = $row[0];
}
}
}
$comments = eregi_replace("\r",'',$comments);
$comments = eregi_replace("\n",'!N',$comments);
@@ -3818,6 +3940,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$LeaD_InfO .= $alt_phone_count . "\n";
$LeaD_InfO .= $rank . "\n";
$LeaD_InfO .= $owner . "\n";
$LeaD_InfO .= $script_recording_delay . "\n";
echo $LeaD_InfO;
@@ -5674,6 +5797,28 @@ if ($ACTION == 'CALLSINQUEUEgrab')
$affected_rows = mysql_affected_rows($link);
if ($affected_rows > 0)
{
$stmt="SELECT call_time,campaign_id,uniqueid,phone_number,lead_id,queue_priority,call_type from vicidial_auto_calls where auto_call_id='$stage';";
$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 ($rslt) {$vac_count = mysql_num_rows($rslt);}
if ($vac_count > 0)
{
$row=mysql_fetch_row($rslt);
$GCcall_time = $row[0];
$GCcampaign_id = $row[1];
$GCuniqueid = $row[2];
$GCphone_number = $row[3];
$GClead_id = $row[4];
$GCqueue_priority = $row[5];
$GCcall_type = $row[6];
$stmt="INSERT INTO vicidial_grab_call_log SET auto_call_id='$stage',user='$user',event_date='$NOW_TIME',call_time='$GCcall_time',campaign_id='$GCcampaign_id',uniqueid='$GCuniqueid',phone_number='$GCphone_number',lead_id='$GClead_id',queue_priority='$GCqueue_priority',call_type='$GCcall_type';";
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);}
$affected_rows = mysql_affected_rows($link);
}
echo "SUCCESS: Call $stage grabbed for $user";
exit;
}
+11 -2
View File
@@ -8,10 +8,11 @@
# CHANGELOG:
# 90824-1435 - First build of script
# 90827-1548 - Added list override script option
# 91204-1913 - Added recording_filename and recording_id variables
#
$version = '2.2.0-2';
$build = '90827-1548';
$version = '2.2.0-3';
$build = '91204-1913';
require("dbconnect.php");
@@ -127,6 +128,10 @@ 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["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
@@ -295,6 +300,8 @@ if (eregi("iframe src",$script_text))
$script_width = eregi_replace(' ','+',$script_width);
$script_height = eregi_replace(' ','+',$script_height);
$fullname = eregi_replace(' ','+',$fullname);
$recording_filename = eregi_replace(' ','+',$recording_filename);
$recording_id = eregi_replace(' ','+',$recording_id);
}
$script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text);
@@ -353,6 +360,8 @@ $script_text = eregi_replace('--A--in_script--B--',"$in_script",$script_text);
$script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text);
$script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text);
$script_text = eregi_replace('--A--fullname--B--',"$fullname",$script_text);
$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text);
$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
$script_text = stripslashes($script_text);
+143 -29
View File
@@ -261,10 +261,11 @@
# 91111-1433 - Fixed Gender pulldown list display for IE, remove links for recording channels in SHOW CHANNELS
# 91123-1801 - Added code for outbound_autodial field
# 91130-2021 - Added code for manager override of in-group selection
# 91204-1638 - Added recording_filename and recording_id script variables and script refresh link
#
$version = '2.2.0-239';
$build = '91130-2021';
$version = '2.2.0-240';
$build = '91204-1638';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=61;
$one_mysql_log=0;
@@ -2597,6 +2598,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var no_delete_VDAC=0;
var manager_ingroups_set=0;
var external_igb_set_name='';
var recording_filename='';
var recording_id='';
var delayed_script_load='';
var script_recording_delay='';
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\" Pause \"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
@@ -3604,6 +3609,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var RClookID_array = RClookID.split("RecorDing_ID: ");
if (RClookID_array.length > 0)
{
recording_filename = RClookFILE_array[1];
recording_id = RClookID_array[1];
if (delayed_script_load == 'YES')
{
RefreshScript();
delayed_script_load='NO';
}
var RecDispNamE = RClookFILE_array[1];
if (RecDispNamE.length > 25)
{
@@ -3995,6 +4009,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (window.MDlogRecorDings)
{
var MDlogRecorDings_array=MDlogRecorDings.split("|");
// recording_filename = MDlogRecorDings_array[2];
// recording_id = MDlogRecorDings_array[3];
var RecDispNamE = MDlogRecorDings_array[2];
if (RecDispNamE.length > 25)
{
@@ -4708,6 +4725,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.vicidial_form.rank.value = MDnextResponse_array[35];
document.vicidial_form.owner.value = MDnextResponse_array[36];
// CalL_ScripT_id = MDnextResponse_array[37];
script_recording_delay = MDnextResponse_array[38];
lead_dial_number = document.vicidial_form.phone_number.value;
var dispnum = document.vicidial_form.phone_number.value;
@@ -4794,6 +4813,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&script_width=" + script_width + '' +
"&script_height=" + script_height + '' +
"&fullname=" + LOGfullname + '' +
"&recording_filename=" + recording_filename + '' +
"&recording_id=" + recording_id + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -4875,6 +4896,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&script_width=" + script_width + '' +
"&script_height=" + script_height + '' +
"&fullname=" + LOGfullname + '' +
"&recording_filename=" + recording_filename + '' +
"&recording_id=" + recording_id + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -4978,6 +5001,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&script_width=" + script_width + '' +
"&script_height=" + script_height + '' +
"&fullname=" + LOGfullname + '' +
"&recording_filename=" + recording_filename + '' +
"&recording_id=" + recording_id + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -4986,11 +5011,23 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
web_form_vars = web_form_vars.replace(regWFspace, '+');
web_form_vars = web_form_vars.replace(regWF, '');
load_script_contents();
if ( (script_recording_delay > 0) && ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') ) )
{
delayed_script_load = 'YES';
RefreshScript('CLEAR');
}
else
{
load_script_contents();
}
}
if (get_call_launch == 'SCRIPT')
{
if (delayed_script_load == 'YES')
{
load_script_contents();
}
ScriptPanelToFront();
}
@@ -5338,6 +5375,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&script_width=" + script_width + '' +
"&script_height=" + script_height + '' +
"&fullname=" + LOGfullname + '' +
"&recording_filename=" + recording_filename + '' +
"&recording_id=" + recording_id + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -5346,11 +5385,23 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
web_form_vars = web_form_vars.replace(regWFspace, '+');
web_form_vars = web_form_vars.replace(regWF, '');
load_script_contents();
if ( (script_recording_delay > 0) && ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') ) )
{
delayed_script_load = 'YES';
RefreshScript('CLEAR');
}
else
{
load_script_contents();
}
}
if (get_call_launch == 'SCRIPT')
{
if (delayed_script_load == 'YES')
{
load_script_contents();
}
ScriptPanelToFront();
}
if (get_call_launch == 'WEBFORM')
@@ -5797,6 +5848,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
EAalt_phone_count = check_VDIC_array[43];
document.vicidial_form.rank.value = check_VDIC_array[44];
document.vicidial_form.owner.value = check_VDIC_array[45];
script_recording_delay = check_VDIC_array[46];
var gIndex = 0;
if (document.vicidial_form.gender.value == 'M') {var gIndex = 1;}
@@ -6003,6 +6055,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&script_width=" + script_width + '' +
"&script_height=" + script_height + '' +
"&fullname=" + LOGfullname + '' +
"&recording_filename=" + recording_filename + '' +
"&recording_id=" + recording_id + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -6084,6 +6138,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&script_width=" + script_width + '' +
"&script_height=" + script_height + '' +
"&fullname=" + LOGfullname + '' +
"&recording_filename=" + recording_filename + '' +
"&recording_id=" + recording_id + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -6170,6 +6226,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&script_width=" + script_width + '' +
"&script_height=" + script_height + '' +
"&fullname=" + LOGfullname + '' +
"&recording_filename=" + recording_filename + '' +
"&recording_id=" + recording_id + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -6178,11 +6236,23 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
web_form_vars = web_form_vars.replace(regWFspace, '+');
web_form_vars = web_form_vars.replace(regWF, '');
load_script_contents();
if ( (script_recording_delay > 0) && ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') ) )
{
delayed_script_load = 'YES';
RefreshScript('CLEAR');
}
else
{
load_script_contents();
}
}
if (CalL_AutO_LauncH == 'SCRIPT')
{
if (delayed_script_load == 'YES')
{
load_script_contents();
}
ScriptPanelToFront();
}
@@ -6220,10 +6290,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
}
// ################################################################################
// refresh or clear the SCRIPT frame contents
function RefreshScript(temp_wipe)
{
if (temp_wipe == 'CLEAR')
{
document.getElementById("ScriptContents").innerHTML = '';
}
else
{
document.getElementById("ScriptContents").innerHTML = '';
WebFormRefresH('','','1');
load_script_contents();
}
}
// ################################################################################
// refresh the content of the web form URL
function WebFormRefresH(taskrefresh,submittask)
function WebFormRefresH(taskrefresh,submittask,force_webvars_refresh)
{
var webvars_refresh=0;
if (VDCL_group_id.length > 1)
{var group = VDCL_group_id;}
else
@@ -6245,6 +6335,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
TEMP_VDIC_web_form_address = TEMP_VDIC_web_form_address.replace(regWFAcustom, '');
}
else
{webvars_refresh=1;}
if ( (webvars_refresh > 0) || (force_webvars_refresh > 0) )
{
web_form_vars =
"lead_id=" + document.vicidial_form.lead_id.value +
@@ -6302,6 +6395,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&script_width=" + script_width + '' +
"&script_height=" + script_height + '' +
"&fullname=" + LOGfullname + '' +
"&recording_filename=" + recording_filename + '' +
"&recording_id=" + recording_id + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -6413,6 +6508,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&script_width=" + script_width + '' +
"&script_height=" + script_height + '' +
"&fullname=" + LOGfullname + '' +
"&recording_filename=" + recording_filename + '' +
"&recording_id=" + recording_id + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -7194,6 +7291,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
fronter = '';
inOUT = 'OUT';
vtiger_callback_id='0';
recording_filename='';
recording_id='';
if (manual_dial_in_progress==1)
{
@@ -8003,6 +8102,8 @@ encoded=utf8_decode(xtest);
var SCin_script = CalL_ScripT_id;
var SCscript_width = script_width;
var SCscript_height = script_height;
var SCrecording_filename = recording_filename;
var SCrecording_id = recording_id;
var SCweb_vars = LIVE_web_vars;
if (encoded.match(RGiframe))
@@ -8056,6 +8157,8 @@ encoded=utf8_decode(xtest);
SCin_script = SCin_script.replace(RGplus,'+');
SCscript_width = SCscript_width.replace(RGplus,'+');
SCscript_height = SCscript_height.replace(RGplus,'+');
SCrecording_filename = SCrecording_filename.replace(RGplus,'+');
SCrecording_id = SCrecording_id.replace(RGplus,'+');
SCweb_vars = SCweb_vars.replace(RGplus,'+');
}
@@ -8110,6 +8213,8 @@ encoded=utf8_decode(xtest);
var RGin_script = new RegExp("--A--in_script--B--","g");
var RGscript_width = new RegExp("--A--script_width--B--","g");
var RGscript_height = new RegExp("--A--script_height--B--","g");
var RGrecording_filename = new RegExp("--A--recording_filename--B--","g");
var RGrecording_id = new RegExp("--A--recording_id--B--","g");
var RGweb_vars = new RegExp("--A--web_vars--B--","g");
encoded = encoded.replace(RGvendor_lead_code, SCvendor_lead_code);
@@ -8163,6 +8268,8 @@ encoded=utf8_decode(xtest);
encoded = encoded.replace(RGin_script, SCin_script);
encoded = encoded.replace(RGscript_width, SCscript_width);
encoded = encoded.replace(RGscript_height, SCscript_height);
encoded = encoded.replace(RGrecording_filename, SCrecording_filename);
encoded = encoded.replace(RGrecording_id, SCrecording_id);
encoded = encoded.replace(RGweb_vars, SCweb_vars);
}
decoded=encoded; // simple no ?
@@ -8760,6 +8867,7 @@ else
hideDiv('HotKeyEntriesBox');
hideDiv('MainPanel');
hideDiv('ScriptPanel');
hideDiv('ScriptRefresh');
hideDiv('DispoSelectBox');
hideDiv('LogouTBox');
hideDiv('AgenTDisablEBoX');
@@ -9427,6 +9535,7 @@ else
document.getElementById("MainTable").style.backgroundColor="<?php echo $MAIN_COLOR ?>";
document.getElementById("MaiNfooter").style.backgroundColor="<?php echo $MAIN_COLOR ?>";
hideDiv('ScriptPanel');
hideDiv('ScriptRefresh');
showDiv('MainPanel');
ShoWGenDerPulldown();
@@ -9472,6 +9581,7 @@ else
function ScriptPanelToFront()
{
showDiv('ScriptPanel');
showDiv('ScriptRefresh');
document.getElementById("MainTable").style.backgroundColor="<?php echo $SCRIPT_COLOR ?>";
document.getElementById("MaiNfooter").style.backgroundColor="<?php echo $SCRIPT_COLOR ?>";
panel_bgcolor='<?php echo $SCRIPT_COLOR ?>';
@@ -9602,7 +9712,7 @@ echo "</head>\n";
<BR><BR> &nbsp; <BR>
</font></span>
<span style="position:absolute;left:0px;top:0px;z-index:49;" id="CallBacKsLisTBox">
<span style="position:absolute;left:0px;top:0px;z-index:50;" id="CallBacKsLisTBox">
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> CALLBACKS FOR AGENT <?php echo $VD_login ?>:<BR>Click on a callback below to call the customer back now. If you click on a record below to call it, it will be removed from the list.
<BR>
<div class="scroll_callback" id="CallBacKsLisT"></div>
@@ -9613,7 +9723,7 @@ echo "</head>\n";
</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:50;" id="NeWManuaLDiaLBox">
<span style="position:absolute;left:0px;top:0px;z-index:51;" id="NeWManuaLDiaLBox">
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> NEW MANUAL DIAL LEAD FOR <?php echo "$VD_login in campaign $VD_campaign" ?>:<BR><BR>Enter information below for the new lead you wish to call.
<BR>
<?php
@@ -9668,7 +9778,7 @@ Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="A
<span style="position:absolute;left:5px;top:<?php echo $HTheight ?>px;z-index:31;" id="TransferMain">
<span style="position:absolute;left:5px;top:<?php echo $HTheight ?>px;z-index:32;" id="TransferMain">
<table bgcolor="#CCCCFF" width=<?php echo $XFwidth ?>><tr>
<td align=left>
<div class="text_input" id="TransferMaindiv">
@@ -9723,7 +9833,7 @@ if ($view_calls_in_queue > 0)
<span style="position:absolute;left:<?php echo $SBwidth ?>px;top:0px;height:500;overflow:scroll;z-index:25;background-color:<?php echo $SIDEBAR_COLOR ?>;" id="AgentViewSpan"><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0><TR><TD width=5 ROWSPAN=2>&nbsp;</TD><TD ALIGN=CENTER><font class="body_text">
Other Agents Status: &nbsp; </font></TD></TR><TR><TD ALIGN=CENTER><span id="AgentViewStatus">&nbsp;</span></TD></TR></TABLE></span>
<span style="position:absolute;left:60px;top:<?php echo $BPheight ?>px;width:400;height:500;overflow:scroll;z-index:32;background-color:<?php echo $SIDEBAR_COLOR ?>;" id="AgentXferViewSpan"><CENTER><font class="body_text">
<span style="position:absolute;left:60px;top:<?php echo $BPheight ?>px;width:400;height:500;overflow:scroll;z-index:33;background-color:<?php echo $SIDEBAR_COLOR ?>;" id="AgentXferViewSpan"><CENTER><font class="body_text">
Available Agents Transfer: <span id="AgentXferViewSelect"></span></CENTER></font></span>
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:<?php echo $SLheight ?>px;z-index:27;" id="AgentViewLinkSpan"><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=91><TR><TD ALIGN=RIGHT><font class="body_small"><span id="AgentViewLink"><a href="#" onclick="AgentsViewOpen('AgentViewSpan','open');return false;">Agents View +</a></span></font></TD></TR></TABLE></span>
@@ -9740,7 +9850,7 @@ if ($agent_display_dialable_leads > 0)
<span style="position:absolute;left:<?php echo $MUwidth ?>px;top:<?php echo $SLheight ?>px;z-index:29;" id="AgentMuteSpan"></span>
<span style="position:absolute;left:5px;top:<?php echo $HTheight ?>px;z-index:33;" id="HotKeyActionBox">
<span style="position:absolute;left:5px;top:<?php echo $HTheight ?>px;z-index:34;" id="HotKeyActionBox">
<table border=0 bgcolor="#FFDD99" width=<?php echo $HCwidth ?> height=70>
<TR bgcolor="#FFEEBB"><TD height=70><font class="sh_text"> Lead Dispositioned As: </font><BR><BR><CENTER>
<font class="sd_text"><span id="HotKeyDispo"> - </span></font></CENTER>
@@ -9748,7 +9858,7 @@ if ($agent_display_dialable_leads > 0)
</TR></TABLE>
</span>
<span style="position:absolute;left:5px;top:<?php echo $HTheight ?>px;z-index:34;" id="HotKeyEntriesBox">
<span style="position:absolute;left:5px;top:<?php echo $HTheight ?>px;z-index:35;" id="HotKeyEntriesBox">
<table border=0 bgcolor="#FFDD99" width=<?php echo $HCwidth ?> height=70>
<TR bgcolor="#FFEEBB"><TD width=200><font class="sh_text"> Disposition Hot Keys: </font></td><td colspan=2>
<font class="body_small">When active, simply press the keyboard key for the desired disposition for this call. The call will then be hungup and dispositioned automatically:</font></td></tr><tr>
@@ -9764,7 +9874,7 @@ if ($agent_display_dialable_leads > 0)
</TR></TABLE>
</span>
<span style="position:absolute;left:5px;top:<?php echo $HTheight ?>px;z-index:35;" id="CBcommentsBox">
<span style="position:absolute;left:5px;top:<?php echo $HTheight ?>px;z-index:36;" id="CBcommentsBox">
<table border=0 bgcolor="#FFFFCC" width=<?php echo $HCwidth ?> height=70>
<TR bgcolor="#FFFF66">
<TD align=left><font class="sh_text"> Previous Callback Information: </font></td>
@@ -9781,7 +9891,7 @@ if ($agent_display_dialable_leads > 0)
</TR></TABLE>
</span>
<span style="position:absolute;left:5px;top:<?php echo $HTheight ?>px;z-index:36;" id="EAcommentsBox">
<span style="position:absolute;left:5px;top:<?php echo $HTheight ?>px;z-index:37;" id="EAcommentsBox">
<table border=0 bgcolor="#FFFFCC" width=<?php echo $HCwidth ?> height=70>
<TR bgcolor="#FFFF66">
<TD align=left><font class="sh_text"> Extended Alt Phone Information: </font></td>
@@ -9798,14 +9908,14 @@ if ($agent_display_dialable_leads > 0)
</TR></TABLE>
</span>
<span style="position:absolute;left:695px;top:<?php echo $HTheight ?>px;z-index:37;" id="EAcommentsMinBox">
<span style="position:absolute;left:695px;top:<?php echo $HTheight ?>px;z-index:38;" id="EAcommentsMinBox">
<table border=0 bgcolor="#FFFFCC" width=40 height=20>
<TR bgcolor="#FFFF66">
<TD align=left><font class="sk_text"><a href="#" onclick="EAcommentsBoxshow();return false;"> maximize </a> <BR>Alt Phone Info</font></td>
</tr></TABLE>
</span>
<span style="position:absolute;left:0px;top:12px;z-index:38;" id="NoneInSessionBox">
<span style="position:absolute;left:0px;top:12px;z-index:39;" id="NoneInSessionBox">
<table border=1 bgcolor="#CCFFFF" width=<?php echo $CAwidth ?> height=500><TR><TD align=center> Noone is in your session: <span id="NoneInSessionID"></span><BR>
<a href="#" onclick="NoneInSessionOK();return false;">Go Back</a>
<BR><BR>
@@ -9813,7 +9923,7 @@ if ($agent_display_dialable_leads > 0)
</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:39;" id="CustomerGoneBox">
<span style="position:absolute;left:0px;top:0px;z-index:40;" id="CustomerGoneBox">
<table border=1 bgcolor="#CCFFFF" width=<?php echo $CAwidth ?> height=500><TR><TD align=center> Customer has hung up: <span id="CustomerGoneChanneL"></span><BR>
<a href="#" onclick="CustomerGoneOK();return false;">Go Back</a>
<BR><BR>
@@ -9822,7 +9932,7 @@ if ($agent_display_dialable_leads > 0)
</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:40;" id="WrapupBox">
<span style="position:absolute;left:0px;top:0px;z-index:41;" id="WrapupBox">
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=550><TR><TD align=center> Call Wrapup: <span id="WrapupTimer"></span> seconds remaining in wrapup<BR><BR>
<span id="WrapupMessage"><?php echo $wrapup_message ?></span>
<BR><BR>
@@ -9831,33 +9941,33 @@ if ($agent_display_dialable_leads > 0)
</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:41;" id="AgenTDisablEBoX">
<span style="position:absolute;left:0px;top:0px;z-index:42;" id="AgenTDisablEBoX">
<table border=1 bgcolor="#FFFFFF" width=<?php echo $CAwidth ?> height=500><TR><TD align=center>Your session has been disabled<BR><a href="#" onclick="LogouT('DISABLED');return false;">LOGOUT</a><BR><BR><a href="#" onclick="hideDiv('AgenTDisablEBoX');return false;">Go Back</a>
</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:42;" id="SysteMDisablEBoX">
<span style="position:absolute;left:0px;top:0px;z-index:43;" id="SysteMDisablEBoX">
<table border=1 bgcolor="#FFFFFF" width=<?php echo $CAwidth ?> height=500><TR><TD align=center>There is a time synchronization problem with your system, please tell your system administrator<BR><BR><BR><a href="#" onclick="hideDiv('SysteMDisablEBoX');return false;">Go Back</a>
</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:43;" id="LogouTBox">
<span style="position:absolute;left:0px;top:0px;z-index:44;" id="LogouTBox">
<table border=1 bgcolor="#FFFFFF" width=<?php echo $CAwidth ?> height=500><TR><TD align=center><BR><span id="LogouTBoxLink">LOGOUT</span></TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:70px;z-index:44;" id="DispoButtonHideA">
<span style="position:absolute;left:0px;top:70px;z-index:45;" id="DispoButtonHideA">
<table border=0 bgcolor="#CCFFCC" width=165 height=22><TR><TD align=center VALIGN=top></TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:138px;z-index:45;" id="DispoButtonHideB">
<span style="position:absolute;left:0px;top:138px;z-index:46;" id="DispoButtonHideB">
<table border=0 bgcolor="#CCFFCC" width=165 height=250><TR><TD align=center VALIGN=top>&nbsp;</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:46;" id="DispoButtonHideC">
<span style="position:absolute;left:0px;top:0px;z-index:47;" id="DispoButtonHideC">
<table border=0 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=47><TR><TD align=center VALIGN=top>Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call. </TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:47;" id="DispoSelectBox">
<span style="position:absolute;left:0px;top:0px;z-index:48;" id="DispoSelectBox">
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> DISPOSITION CALL :<span id="DispoSelectPhonE"></span> &nbsp; &nbsp; &nbsp; <span id="DispoSelectHAspan"><a href="#" onclick="DispoHanguPAgaiN()">Hangup Again</a></span> &nbsp; &nbsp; &nbsp; <span id="DispoSelectMaxMin"><a href="#" onclick="DispoMinimize()"> minimize </a></span><BR>
<span id="DispoSelectContent"> End-of-call Disposition Selection </span>
<input type=hidden name=DispoSelection><BR>
@@ -9889,7 +9999,7 @@ if ($agent_display_dialable_leads > 0)
<span style="position:absolute;left:0px;top:1500px;z-index:65;" id="GENDERhideFORieALT"></span>
<span style="position:absolute;left:0px;top:0px;z-index:48;" id="CallBackSelectBox">
<span style="position:absolute;left:0px;top:0px;z-index:49;" id="CallBackSelectBox">
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> Select a CallBack Date :<span id="CallBackDatE"></span><BR>
<input type=hidden name=CallBackDatESelectioN ID="CallBackDatESelectioN">
<input type=hidden name=CallBackTimESelectioN ID="CallBackTimESelectioN">
@@ -9942,7 +10052,7 @@ if ($agent_display_dialable_leads > 0)
</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:51;" id="CloserSelectBox">
<span style="position:absolute;left:0px;top:0px;z-index:52;" id="CloserSelectBox">
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> CLOSER INBOUND GROUP SELECTION <BR>
<span id="CloserSelectContent"> Closer Inbound Group Selection </span>
<input type=hidden name=CloserSelectList><BR>
@@ -9960,7 +10070,7 @@ if ($agent_display_dialable_leads > 0)
</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:52;" id="TerritorySelectBox">
<span style="position:absolute;left:0px;top:0px;z-index:53;" id="TerritorySelectBox">
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> TERRITORY SELECTION <BR>
<span id="TerritorySelectContent"> Territory Selection </span>
<input type=hidden name=TerritorySelectList><BR>
@@ -9970,7 +10080,7 @@ if ($agent_display_dialable_leads > 0)
</TD></TR></TABLE>
</span>
<span style="position:absolute;left:0px;top:0px;z-index:53;" id="NothingBox">
<span style="position:absolute;left:0px;top:0px;z-index:54;" id="NothingBox">
<BUTTON Type=button name="inert_button"><img src="./images/blank.gif"></BUTTON>
<span id="DiaLLeaDPrevieWHide">Channel</span>
<span id="DiaLDiaLAltPhonEHide">Channel</span>
@@ -9987,6 +10097,10 @@ if ($agent_display_dialable_leads > 0)
<table border=0 bgcolor="<?php echo $SCRIPT_COLOR ?>" width=<?php echo $SSwidth ?> height=<?php echo $SSheight ?>><TR><TD align=left valign=top><font class="sb_text"><div class="noscroll_script" id="ScriptContents">AGENT SCRIPT</div></font></TD></TR></TABLE>
</span>
<span style="position:absolute;left:<?php echo $AMwidth ?>px;top:69px;z-index:31;" id="ScriptRefresh">
<a href="#" onclick="RefreshScript()"><font class="body_small">refresh</font></a>
</span>
<?php if ( ($HK_statuses_camp > 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?>
<span style="position:absolute;left:<?php echo $HKwidth ?>px;top:<?php echo $HKheight ?>px;z-index:16;" id="hotkeysdisplay"><a href="#" onMouseOver="HotKeys('ON')"><IMG SRC="./images/vdc_XB_hotkeysactive_OFF.gif" border=0 alt="HOT KEYS INACTIVE"></a></span>
+73 -4
View File
@@ -1989,11 +1989,12 @@ else
# 91031-1232 - Added carrier_description field, campaigns links from in-group screen, server links on reports page, agent ranks listing active only
# 91121-0334 - Limited list called count display to 100+
# 91125-0628 - Added conf_secret for servers
# 91204-1652 - Added recording_filename and recording_id as script variables
#
# 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.2.0-224';
$build = '91125-0628';
$admin_version = '2.2.0-225';
$build = '91204-1652';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -4689,10 +4690,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. 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. 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>
&#60;iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&#38;vendor_id=--A--vendor_lead_code--B--&#38;list_id=--A--list_id--B--&#38;gmt_offset_now=--A--gmt_offset_now--B--&#38;phone_code=--A--phone_code--B--&#38;phone_number=--A--phone_number--B--&#38;title=--A--title--B--&#38;first_name=--A--first_name--B--&#38;middle_initial=--A--middle_initial--B--&#38;last_name=--A--last_name--B--&#38;address1=--A--address1--B--&#38;address2=--A--address2--B--&#38;address3=--A--address3--B--&#38;city=--A--city--B--&#38;state=--A--state--B--&#38;province=--A--province--B--&#38;postal_code=--A--postal_code--B--&#38;country_code=--A--country_code--B--&#38;gender=--A--gender--B--&#38;date_of_birth=--A--date_of_birth--B--&#38;alt_phone=--A--alt_phone--B--&#38;email=--A--email--B--&#38;security_phrase=--A--security_phrase--B--&#38;comments=--A--comments--B--&#38;user=--A--user--B--&#38;campaign=--A--campaign--B--&#38;phone_login=--A--phone_login--B--&#38;fronter=--A--fronter--B--&#38;closer=--A--user--B--&#38;group=--A--group--B--&#38;channel_group=--A--group--B--&#38;SQLdate=--A--SQLdate--B--&#38;epoch=--A--epoch--B--&#38;uniqueid=--A--uniqueid--B--&#38;customer_zap_channel=--A--customer_zap_channel--B--&#38;server_ip=--A--server_ip--B--&#38;SIPexten=--A--SIPexten--B--&#38;session_id=--A--session_id--B--&#38;dialed_number=--A--dialed_number--B--&#38;dialed_label=--A--dialed_label--B--&#38;rank=--A--rank--B--&#38;owner=--A--owner--B--&#38;phone=--A--phone--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"&#62;
&#60;iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&#38;vendor_id=--A--vendor_lead_code--B--&#38;list_id=--A--list_id--B--&#38;gmt_offset_now=--A--gmt_offset_now--B--&#38;phone_code=--A--phone_code--B--&#38;phone_number=--A--phone_number--B--&#38;title=--A--title--B--&#38;first_name=--A--first_name--B--&#38;middle_initial=--A--middle_initial--B--&#38;last_name=--A--last_name--B--&#38;address1=--A--address1--B--&#38;address2=--A--address2--B--&#38;address3=--A--address3--B--&#38;city=--A--city--B--&#38;state=--A--state--B--&#38;province=--A--province--B--&#38;postal_code=--A--postal_code--B--&#38;country_code=--A--country_code--B--&#38;gender=--A--gender--B--&#38;date_of_birth=--A--date_of_birth--B--&#38;alt_phone=--A--alt_phone--B--&#38;email=--A--email--B--&#38;security_phrase=--A--security_phrase--B--&#38;comments=--A--comments--B--&#38;user=--A--user--B--&#38;campaign=--A--campaign--B--&#38;phone_login=--A--phone_login--B--&#38;fronter=--A--fronter--B--&#38;closer=--A--user--B--&#38;group=--A--group--B--&#38;channel_group=--A--group--B--&#38;SQLdate=--A--SQLdate--B--&#38;epoch=--A--epoch--B--&#38;uniqueid=--A--uniqueid--B--&#38;customer_zap_channel=--A--customer_zap_channel--B--&#38;server_ip=--A--server_ip--B--&#38;SIPexten=--A--SIPexten--B--&#38;session_id=--A--session_id--B--&#38;dialed_number=--A--dialed_number--B--&#38;dialed_label=--A--dialed_label--B--&#38;rank=--A--rank--B--&#38;owner=--A--owner--B--&#38;phone=--A--phone--B--&#38;camp_script=--A--camp_script--B--&#38;in_script=--A--in_script--B--&#38;script_width=--A--script_width--B--&#38;script_height=--A--script_height--B--&#38;recording_filename=--A--recording_filename--B--&#38;recording_id=--A--recording_id--B--&#38;" 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"&#62;
&#60;/iframe&#62;
</DIV>
@@ -6045,6 +6046,8 @@ if ($ADD==7111111)
$RGin_script = '';
$script_width = '600';
$script_height = '400';
$recording_filename = '20091204-1639_6666_7275551212';
$recording_id = '1235';
echo "</title>\n";
echo "</head>\n";
@@ -6104,6 +6107,8 @@ if ($ADD==7111111)
$RGin_script = eregi_replace(' ','+',$RGin_script);
$script_width = eregi_replace(' ','+',$script_width);
$script_height = eregi_replace(' ','+',$script_height);
$recording_filename = eregi_replace(' ','+',$recording_filename);
$recording_id = eregi_replace(' ','+',$recording_id);
}
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
@@ -6152,6 +6157,8 @@ if ($ADD==7111111)
$script_text = eregi_replace('--A--in_script--B--',"$RGin_script",$script_text);
$script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text);
$script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text);
$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text);
$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
@@ -7193,6 +7200,12 @@ if ($ADD==1111111)
echo "<option>dialed_label</option>";
echo "<option>rank</option>";
echo "<option>owner</option>";
echo "<option>camp_script</option>";
echo "<option>in_script</option>";
echo "<option>script_width</option>";
echo "<option>script_height</option>";
echo "<option>recording_filename</option>";
echo "<option>recording_id</option>";
echo "</select>";
echo "<input type=\"button\" name=\"insertField\" value=\"Insert\" onClick=\"scriptInsertField();\"><BR>";
# END Insert Field
@@ -20170,6 +20183,12 @@ if ($ADD==3111111)
echo "<option>dialed_label</option>";
echo "<option>rank</option>";
echo "<option>owner</option>";
echo "<option>camp_script</option>";
echo "<option>in_script</option>";
echo "<option>script_width</option>";
echo "<option>script_height</option>";
echo "<option>recording_filename</option>";
echo "<option>recording_id</option>";
echo "</select>";
echo "<input type=\"button\" name=\"insertField\" value=\"Insert\" onClick=\"scriptInsertField();\"><BR>";
# END Insert Field
@@ -20177,6 +20196,56 @@ if ($ADD==3111111)
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
echo "</TABLE></center>\n";
echo "</TABLE><BR><BR>\n";
echo "<B> CAMPAIGNS USING THIS SCRIPT:</B><BR>\n";
echo "<TABLE>\n";
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where campaign_script='$script_id';";
$rslt=mysql_query($stmt, $link);
$camps_to_print = mysql_num_rows($rslt);
$o=0;
while ($camps_to_print > $o)
{
$row=mysql_fetch_row($rslt);
echo "<TR><TD><a href=\"$PHP_SELF?ADD=31&campaign_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
$o++;
}
echo "</TABLE><BR><BR>\n";
echo "<B> IN-GROUPS USING THIS SCRIPT:</B><BR>\n";
echo "<TABLE>\n";
$stmt="SELECT group_id,group_name from vicidial_inbound_groups where ingroup_script='$script_id';";
$rslt=mysql_query($stmt, $link);
$camps_to_print = mysql_num_rows($rslt);
$o=0;
while ($camps_to_print > $o)
{
$row=mysql_fetch_row($rslt);
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3111&group_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
$o++;
}
echo "</TABLE><BR><BR>\n";
echo "<B> LIST OVERRIDES USING THIS SCRIPT:</B><BR>\n";
echo "<TABLE>\n";
$stmt="SELECT list_id,list_name from vicidial_lists where agent_script_override='$script_id';";
$rslt=mysql_query($stmt, $link);
$camps_to_print = mysql_num_rows($rslt);
$o=0;
while ($camps_to_print > $o)
{
$row=mysql_fetch_row($rslt);
echo "<TR><TD><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
$o++;
}
echo "</TABLE>\n";
if ($LOGdelete_scripts > 0)
{
echo "<br><br><a href=\"$PHP_SELF?ADD=5111111&script_id=$script_id\">DELETE THIS SCRIPT</a>\n";