Added vdc_script_dispo_example.php script which can be customized to require specific fields be filled in before submitting

Some docs updates
Some vicidial.php agent screen formatting changes

git-svn-id: svn://192.168.202.10@1598 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2011-02-09 02:40:38 +00:00
parent c980a8ec3c
commit 1a1d5ca558
7 changed files with 863 additions and 17 deletions
+11 -1
View File
@@ -409,7 +409,10 @@ OTHER CHANGES:
92. Added List override options for webform fields
93. Added script to purge all vicidial_callbacks records that are inactive or
are tied to deleted leads, AST_DB_dead_cb_purge.pl
are tied to deleted leads, AST_DB_dead_cb_purge.pl
add to the crontab like this:
# cleanup of the scheduled callback records
25 0 * * * /usr/share/astguiclient/AST_DB_dead_cb_purge.pl --purge-non-cb -q
94. Added did_log_export and recording_lookup functions to the non-agent API
@@ -438,6 +441,13 @@ OTHER CHANGES:
103. Changed vicidial.php HTML formatting to be XHTML compliant
104. Added vdc_script_dispo_example.php script which can be customized to
require specific fields be filled in before submitting, as well as
limiting this restriction to only specific dispositions. You can also
specify dispositions to be selectable that are set to non-selectable.
You use this script in an IFRAME for the campaign. It must be
customized for your specific business rules.
+20 -1
View File
@@ -13,6 +13,7 @@
#
# CHANGES
# 100310-0112 - First version
# 110202-2214 - Added ncad14csv format
#
$txt = '.txt';
@@ -103,9 +104,10 @@ if (length($ARGV[0])>1)
print " call_date phone_number vendor_id status user first_name last_name lead_id list_id campaign_id length_in_sec source_id\n";
print " pipe-basic:\n";
print " call_date|phone_number|vendor_id|status|user|first_name|last_name|lead_id|list_id|campaign_id|length_in_sec|source_id|\n";
print " ncad14csv:\n";
print " vendor_lead_code,\"source_id\",\"last_name, first_name\",\"phone_number\",\"address2\",\"alt_phone\",\"postal_code\",\"address1\",\"address3\",\"\security_phrase\",\"status\",\"call_date\",\"email\",\"city\"\n";
print "\n";
exit;
}
else
@@ -315,6 +317,8 @@ if ($output_format =~ /^tab-basic$/)
{$DLT = "\t"; $txt='.txt'; if (!$Q) {print "---- tab-basic ----\n";}}
if ($output_format =~ /^pipe-basic$/)
{$DLT = "|"; $txt='.txt'; if (!$Q) {print "---- pipe-basic ----\n";}}
if ($output_format =~ /^ncad14csv$/)
{$DLT = ","; $txt='.csv'; if (!$Q) {print "---- ncad14csv ----\n";}}
if (length($campaignSQL) < 2)
{
@@ -563,6 +567,7 @@ if ($ftp_transfer > 0)
if (!$Q) {print "Sending File Over FTP: $outfile\n";}
$ftp = Net::FTP->new("$VARREPORT_host", Port => $VARREPORT_port, Debug => $DB);
$ftp->login("$VARREPORT_user","$VARREPORT_pass");
# $ftp->cwd("CALL_LOG");
$ftp->cwd("CALL_LOG");
$ftp->put("$PATHweb/vicidial/server_reports/$outfile", "$outfile");
$ftp->quit;
@@ -597,6 +602,20 @@ sub select_format_loop
$str = "$call_date\t$phone_number\t$vendor_id\t$status\t$user\t$first_name\t$last_name\t$lead_id\t$list_id\t$campaign_id\t$length_in_sec\t$source_id\t\n";
}
if ($output_format =~ /^ncad14csv$/)
{
if ($status =~ /^PU$/) {$status='HU';}
if ($status =~ /^PM$/) {$status='BM';}
if ($status =~ /^AL$/) {$status='BM';}
if ($status =~ /^A$/) {$status='AH';}
if ($status =~ /^AA$/) {$status='AH';}
if ($status =~ /^B$/) {$status='BS';}
if ($status =~ /^AB$/) {$status='BS';}
if ($status =~ /^DC$/) {$status='IP';}
$str = "$vendor_lead_code,\"$source_id\",\"$last_name, $first_name\",\"$phone_number\",\"$address2\",\"$alt_phone\",\"$postal_code\",\"$address1\",\"$address3\",\"$security_phrase\",\"$status\",\"$call_date\",\"$email\",\"$city\"\n";
}
$Ealert .= "$str";
+3
View File
@@ -450,6 +450,9 @@ PHASE 6: ADDING CRONTAB ENTRIES FOR ASTGUICLIENT/VICIDIAL SCRIPTS
## uncomment below if using QueueMetrics
#*/5 * * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl --only-qm-live-call-check
# cleanup of the scheduled callback records
25 0 * * * /usr/share/astguiclient/AST_DB_dead_cb_purge.pl --purge-non-cb -q
## uncomment below if using Vtiger
#1 1 * * * /usr/share/astguiclient/Vtiger_optimize_all_tables.pl --quiet
+2
View File
@@ -52,6 +52,8 @@ AS OF RELEASE 2.2.0 YOU SHOULD NOT HAVE TO TAKE ANY STEPS BEYOND STEP 2 IN THIS
- AST_VDadapt.pl (defined in /etc/astguiclient.conf)
- AST_VDauto_dial_FILL.pl (defined in /etc/astguiclient.conf)
- ADMIN_archive_log_tables.pl (crontab)
- AST_DB_dead_cb_purge.pl (crontab)
2. The VARactive_keepalives variable in /etc/astguiclient.conf should have "5" and "7" on only ONE SERVER in your entire dialer setup, the other servers should not have 5 or 7 in that field.
# 1 - AST_update
+3
View File
@@ -2429,6 +2429,9 @@ SUBPHASE 6.5: setting up astguiclient scripts for continuous running
## uncomment below if using QueueMetrics
#*/5 * * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl --only-qm-live-call-check
# cleanup of the scheduled callback records
25 0 * * * /usr/share/astguiclient/AST_DB_dead_cb_purge.pl --purge-non-cb -q
## uncomment below if using Vtiger
#1 1 * * * /usr/share/astguiclient/Vtiger_optimize_all_tables.pl --quiet
+795
View File
@@ -0,0 +1,795 @@
<?php
# vdc_script_dispo_example.php
#
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed to be used in the SCRIPT tab in an IFRAME and will not submit unless a specific field is filled in
#
# ***** THIS SCRIPT REQUIRES CUSTOMIZATION BEFORE USING !!!!!!!!!!!! *****
# The default of this script assumes 2 custom fields('question' and 'answer')
#
# Example of a ViciDial agent SCRIPT using this script(you must customize this for your custom fields!):
# <iframe src="./vdc_script_dispo_example.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--&pass=--A--pass--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--&rank=--A--rank--B--&owner=--A--owner--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--&entry_list_id=--A--entry_list_id--B--&question=--A--question--B--&answer=--A--answer--B--" style="background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="--A--script_width--B--" height="--A--script_height--B--" STYLE="z-index:17"> </iframe>
#
# CHANGELOG:
# 110208-1239 - First build of script based upon vdc_script_notes.php
#
$version = '2.4-1';
$build = '110208-1239';
require("dbconnect.php");
# Configuration settings-
# Define the required fields: (these must be text fields, pipe separated)
$required_fields = 'phone_number|question|answer';
# Define statuses that trigger required fields: (must be surrounded by pipes)
#$required_statuses = '---ALL---'; # use this for all statuses required
$required_statuses = '|CALLBK|';
# Define any extra non-selectable: (single-quote-qualified, comma delimited)
$extra_statuses = "'CALLBK'";
if (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
elseif (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
if (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
elseif (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
$vendor_lead_code = $vendor_id;
if (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
elseif (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
if (isset($_POST["gmt_offset_now"])) {$gmt_offset_now=$_POST["gmt_offset_now"];}
elseif (isset($_GET["gmt_offset_now"])) {$gmt_offset_now=$_GET["gmt_offset_now"];}
if (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
elseif (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
if (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
elseif (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
if (isset($_POST["title"])) {$title=$_POST["title"];}
elseif (isset($_GET["title"])) {$title=$_GET["title"];}
if (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
elseif (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
if (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];}
elseif (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];}
if (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
elseif (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
if (isset($_POST["address1"])) {$address1=$_POST["address1"];}
elseif (isset($_GET["address1"])) {$address1=$_GET["address1"];}
if (isset($_POST["address2"])) {$address2=$_POST["address2"];}
elseif (isset($_GET["address2"])) {$address2=$_GET["address2"];}
if (isset($_POST["address3"])) {$address3=$_POST["address3"];}
elseif (isset($_GET["address3"])) {$address3=$_GET["address3"];}
if (isset($_POST["city"])) {$city=$_POST["city"];}
elseif (isset($_GET["city"])) {$city=$_GET["city"];}
if (isset($_POST["state"])) {$state=$_POST["state"];}
elseif (isset($_GET["state"])) {$state=$_GET["state"];}
if (isset($_POST["province"])) {$province=$_POST["province"];}
elseif (isset($_GET["province"])) {$province=$_GET["province"];}
if (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
elseif (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
if (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
elseif (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
if (isset($_POST["gender"])) {$gender=$_POST["gender"];}
elseif (isset($_GET["gender"])) {$gender=$_GET["gender"];}
if (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];}
elseif (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];}
if (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
elseif (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
if (isset($_POST["email"])) {$email=$_POST["email"];}
elseif (isset($_GET["email"])) {$email=$_GET["email"];}
if (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];}
elseif (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];}
if (isset($_POST["comments"])) {$comments=$_POST["comments"];}
elseif (isset($_GET["comments"])) {$comments=$_GET["comments"];}
if (isset($_POST["user"])) {$user=$_POST["user"];}
elseif (isset($_GET["user"])) {$user=$_GET["user"];}
if (isset($_POST["pass"])) {$pass=$_POST["pass"];}
elseif (isset($_GET["pass"])) {$pass=$_GET["pass"];}
if (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
elseif (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
if (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
elseif (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
if (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];}
elseif (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];}
if (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
elseif (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
if (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];}
elseif (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];}
if (isset($_POST["closer"])) {$closer=$_POST["closer"];}
elseif (isset($_GET["closer"])) {$closer=$_GET["closer"];}
if (isset($_POST["group"])) {$group=$_POST["group"];}
elseif (isset($_GET["group"])) {$group=$_GET["group"];}
if (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
elseif (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
if (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];}
elseif (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];}
if (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];}
elseif (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];}
if (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
elseif (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
if (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
elseif (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
if (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];}
elseif (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];}
if (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
elseif (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
if (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];}
elseif (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];}
if (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
elseif (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
if (isset($_POST["phone"])) {$phone=$_POST["phone"];}
elseif (isset($_GET["phone"])) {$phone=$_GET["phone"];}
if (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
elseif (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
if (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
elseif (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
if (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];}
elseif (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];}
if (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];}
elseif (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];}
if (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];}
elseif (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];}
if (isset($_POST["rank"])) {$rank=$_POST["rank"];}
elseif (isset($_GET["rank"])) {$rank=$_GET["rank"];}
if (isset($_POST["owner"])) {$owner=$_POST["owner"];}
elseif (isset($_GET["owner"])) {$owner=$_GET["owner"];}
if (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];}
elseif (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];}
if (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];}
elseif (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];}
if (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];}
elseif (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];}
if (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];}
elseif (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];}
if (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
elseif (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
if (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];}
elseif (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];}
if (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];}
elseif (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];}
if (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];}
elseif (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];}
if (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];}
elseif (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];}
if (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];}
elseif (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];}
if (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];}
elseif (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];}
if (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];}
elseif (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];}
if (isset($_POST["preset_number_a"])) {$preset_number_a=$_POST["preset_number_a"];}
elseif (isset($_GET["preset_number_a"])) {$preset_number_a=$_GET["preset_number_a"];}
if (isset($_POST["preset_number_b"])) {$preset_number_b=$_POST["preset_number_b"];}
elseif (isset($_GET["preset_number_b"])) {$preset_number_b=$_GET["preset_number_b"];}
if (isset($_POST["preset_number_c"])) {$preset_number_c=$_POST["preset_number_c"];}
elseif (isset($_GET["preset_number_c"])) {$preset_number_c=$_GET["preset_number_c"];}
if (isset($_POST["preset_number_d"])) {$preset_number_d=$_POST["preset_number_d"];}
elseif (isset($_GET["preset_number_d"])) {$preset_number_d=$_GET["preset_number_d"];}
if (isset($_POST["preset_number_e"])) {$preset_number_e=$_POST["preset_number_e"];}
elseif (isset($_GET["preset_number_e"])) {$preset_number_e=$_GET["preset_number_e"];}
if (isset($_POST["preset_number_f"])) {$preset_number_f=$_POST["preset_number_f"];}
elseif (isset($_GET["preset_number_f"])) {$preset_number_f=$_GET["preset_number_f"];}
if (isset($_POST["preset_dtmf_a"])) {$preset_dtmf_a=$_POST["preset_dtmf_a"];}
elseif (isset($_GET["preset_dtmf_a"])) {$preset_dtmf_a=$_GET["preset_dtmf_a"];}
if (isset($_POST["preset_dtmf_b"])) {$preset_dtmf_b=$_POST["preset_dtmf_b"];}
elseif (isset($_GET["preset_dtmf_b"])) {$preset_dtmf_b=$_GET["preset_dtmf_b"];}
if (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
elseif (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
if (isset($_POST["ignore_list_script"])) {$ignore_list_script=$_POST["ignore_list_script"];}
elseif (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
if (isset($_POST["entry_list_id"])) {$entry_list_id=$_POST["entry_list_id"];}
elseif (isset($_GET["entry_list_id"])) {$entry_list_id=$_GET["entry_list_id"];}
if (isset($_POST["status"])) {$status=$_POST["status"];}
elseif (isset($_GET["status"])) {$status=$_GET["status"];}
if (isset($_POST["pause"])) {$pause=$_POST["pause"];}
elseif (isset($_GET["pause"])) {$pause=$_GET["pause"];}
if (isset($_POST["DB"])) {$DB=$_POST["DB"];}
elseif (isset($_GET["DB"])) {$DB=$_GET["DB"];}
if (isset($_POST["process"])) {$process=$_POST["process"];}
elseif (isset($_GET["process"])) {$process=$_GET["process"];}
if (isset($_POST["vicidial_id"])) {$vicidial_id=$_POST["vicidial_id"];}
elseif (isset($_GET["vicidial_id"])) {$vicidial_id=$_GET["vicidial_id"];}
##### BEGIN Put custom fields parsing and input here #####
if (isset($_POST["question"])) {$question=$_POST["question"];}
elseif (isset($_GET["question"])) {$question=$_GET["question"];}
if (isset($_POST["answer"])) {$answer=$_POST["answer"];}
elseif (isset($_GET["answer"])) {$answer=$_GET["answer"];}
if (isset($_POST["call_date"])) {$call_date=$_POST["call_date"];}
elseif (isset($_GET["call_date"])) {$call_date=$_GET["call_date"];}
if (isset($_POST["order_id"])) {$order_id=$_POST["order_id"];}
elseif (isset($_GET["order_id"])) {$order_id=$_GET["order_id"];}
if (isset($_POST["appointment_date"])) {$appointment_date=$_POST["appointment_date"];}
elseif (isset($_GET["appointment_date"])) {$appointment_date=$_GET["appointment_date"];}
if (isset($_POST["appointment_time"])) {$appointment_time=$_POST["appointment_time"];}
elseif (isset($_GET["appointment_time"])) {$appointment_time=$_GET["appointment_time"];}
if (isset($_POST["call_notes"])) {$call_notes=$_POST["call_notes"];}
elseif (isset($_GET["call_notes"])) {$call_notes=$_GET["call_notes"];}
if (isset($_POST["notesid"])) {$notesid=$_POST["notesid"];}
elseif (isset($_GET["notesid"])) {$notesid=$_GET["notesid"];}
if ($notesid < 100)
{$notesid=0;}
if (strlen($vicidial_id) < 1)
{$vicidial_id = $uniqueid;}
if (strlen($appointment_time) < 1)
{$appointment_time = '12:00:00';}
$appointment_timeARRAY = explode(":",$appointment_time);
$appointment_hour = $appointment_timeARRAY[0];
$appointment_min = $appointment_timeARRAY[1];
##### END Put custom fields here #####
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
$txt = '.txt';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
$MT[0]='';
$agents='@agents';
if (strlen($call_date) < 1)
{$call_date = $NOW_TIME;}
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$timeclock_end_of_day = $row[1];
$agentonly_callback_campaign_lock = $row[2];
}
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin < 1)
{
$user=ereg_replace("[^-_0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^-_0-9a-zA-Z]","",$pass);
$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec);
$phone_code = ereg_replace("[^0-9]","",$phone_code);
$phone_number = ereg_replace("[^0-9]","",$phone_number);
}
else
{
$user = ereg_replace("'|\"|\\\\|;","",$user);
$pass = ereg_replace("'|\"|\\\\|;","",$pass);
}
if ($DB > 0)
{
echo "<BR>$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|\n<BR>";
}
### BEGIN find any custom field labels ###
$label_title = 'Title';
$label_first_name = 'First';
$label_middle_initial = 'MI';
$label_last_name = 'Last';
$label_address1 = 'Address1';
$label_address2 = 'Address2';
$label_address3 = 'Address3';
$label_city = 'City';
$label_state = 'State';
$label_province = 'Province';
$label_postal_code = 'PostCode';
$label_vendor_lead_code = 'Vendor ID';
$label_gender = 'Gender';
$label_phone_number = 'Phone';
$label_phone_code = 'DialCode';
$label_alt_phone = 'Alt. Phone';
$label_security_phrase = 'Show';
$label_email = 'Email';
$label_comments = 'Comments';
$stmt="SELECT label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments from system_settings;";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if (strlen($row[0])>0) {$label_title = $row[0];}
if (strlen($row[1])>0) {$label_first_name = $row[1];}
if (strlen($row[2])>0) {$label_middle_initial = $row[2];}
if (strlen($row[3])>0) {$label_last_name = $row[3];}
if (strlen($row[4])>0) {$label_address1 = $row[4];}
if (strlen($row[5])>0) {$label_address2 = $row[5];}
if (strlen($row[6])>0) {$label_address3 = $row[6];}
if (strlen($row[7])>0) {$label_city = $row[7];}
if (strlen($row[8])>0) {$label_state = $row[8];}
if (strlen($row[9])>0) {$label_province = $row[9];}
if (strlen($row[10])>0) {$label_postal_code = $row[10];}
if (strlen($row[11])>0) {$label_vendor_lead_code = $row[11];}
if (strlen($row[12])>0) {$label_gender = $row[12];}
if (strlen($row[13])>0) {$label_phone_number = $row[13];}
if (strlen($row[14])>0) {$label_phone_code = $row[14];}
if (strlen($row[15])>0) {$label_alt_phone = $row[15];}
if (strlen($row[16])>0) {$label_security_phrase = $row[16];}
if (strlen($row[17])>0) {$label_email = $row[17];}
if (strlen($row[18])>0) {$label_comments = $row[18];}
### END find any custom field labels ###
# default optional vars if not set
if (!isset($format)) {$format="text";}
if ($format == 'debug') {$DB=1;}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\n";
exit;
}
else
{
# do nothing for now
}
echo "<HTML>\n";
echo "<head>\n";
echo "<script language=\"Javascript\">\n";
echo "var required_fields='$required_fields';\n";
echo "var required_statuses='$required_statuses';\n";
echo "var extra_statuses=\"$extra_statuses\";\n";
echo "</script>\n";
echo "<!-- VERSION: $version BUILD: $build USER: $user server_ip: $server_ip-->\n";
echo "<title>ViciDial Script";
echo "</title>\n";
?>
<?php
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
if ($process > 0)
{
#Update vicidial_list record
$stmt="UPDATE vicidial_list SET vendor_lead_code='$vendor_lead_code',title='$title',first_name='$first_name',middle_initial='$middle_initial',last_name='$last_name',address1='$address1',address2='$address2',address3='$address3',city='$city',state='$state',province='$province',postal_code='$postal_code',phone_code='$phone_code',phone_number='$phone_number',gender='$gender',date_of_birth='$date_of_birth',alt_phone='$alt_phone',email='$email',security_phrase='$security_phrase',comments='$comments',rank='$rank',owner='$owner' where lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
#Insert/Update custom record
$stmt="INSERT IGNORE INTO custom_$entry_list_id SET question='$question',answer='$answer',lead_id='$lead_id' ON DUPLICATE KEY UPDATE question='$question',answer='$answer';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$CFaffected_rows = mysql_affected_rows($link);
$pauseSQL = '';
$epoch = date("U");
if ($pause == '1') {$pauseSQL = ",external_pause='PAUSE!$epoch'";}
#Update the agent screen with new data
$stmt="UPDATE vicidial_live_agents set external_update_fields='1',external_update_fields_data='vendor_lead_code,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,phone_code,phone_number,gender,date_of_birth,alt_phone,email,security_phrase,comments,rank,owner,question,answer,formreload,' $pauseSQL where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
if ($notesid < 100)
{
# Insert into vicidial_call_notes
$stmt="INSERT INTO vicidial_call_notes set lead_id='$lead_id',vicidial_id='$vicidial_id',call_date='$call_date',call_notes='$call_notes';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
$notesid = mysql_insert_id($link);
}
else
{
# update vicidial_call_notes record
$stmt="UPDATE vicidial_call_notes set order_id='$order_id',appointment_date='$appointment_date',appointment_time='$appointment_time',call_notes='$call_notes' where notesid='$notesid';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
}
echo "<BR><b>Data Updated, Hanging up call, please wait</b><BR><BR>\n";
sleep(3);
#Update the agent screen with status and hangup
$stmt="UPDATE vicidial_live_agents set external_status='$status',external_hangup='1' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
}
$URLarray = explode("?", $PHP_SELF);
$URLsubmit = $URLarray[0];
?>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=2 WIDTH=450>
<TR><TD COLSPAN=2 ALIGN=CENTER>
<FORM METHOD=POST NAME=vsn ID=vsn ACTION="<?php echo $URLsubmit ?>">
<input type=hidden name=DB id=DB value=<?php echo $DB ?>>
<input type=hidden name=process id=process value=1>
<input type=hidden name=lead_id id=lead_id value="<?php echo $lead_id ?>">
<input type=hidden name=user id=user value="<?php echo $user ?>">
<input type=hidden name=pass id=user value="<?php echo $pass ?>">
<input type=hidden name=notesid id=notesid value="<?php echo $notesid ?>">
<input type=hidden name=phone_code id=phone_code value="<?php echo $phone_code ?>">
<input type=hidden name=gender id=gender value="<?php echo $gender ?>">
<input type=hidden name=date_of_birth id=date_of_birth value="<?php echo $date_of_birth ?>">
<input type=hidden name=rank id=rank value="<?php echo $rank ?>">
<input type=hidden name=owner id=owner value="<?php echo $owner ?>">
<input type=hidden name=entry_list_id id=entry_list_id value="<?php echo $entry_list_id ?>">
<!-- unused hidden variables go here
<input type=hidden name=vendor_id id=vendor_id value="<?php echo $vendor_id ?>">
<input type=hidden name=title id=title value="<?php echo $title ?>">
<input type=hidden name=middle_initial id=middle_initial value="<?php echo $middle_initial ?>">
<input type=hidden name=province id=province value="<?php echo $middle_initial ?>">
<input type=hidden name=alt_phone id=alt_phone value="<?php echo $alt_phone ?>">
<input type=hidden name=email id=email value="<?php echo $email ?>">
<input type=hidden name=security_phrase id=security_phrase value="<?php echo $security_phrase ?>">
<input type=hidden name=comments id=comments value="<?php echo $comments ?>">
-->
</TD></TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Vendor ID: </TD><TD ALIGN=LEFT><input type=text name=vendor_id id=vendor_id size=20 maxlength=20 value="<?php echo $vendor_id ?>"></TD>
</TR>
<!-- <TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Source ID: </TD><TD ALIGN=LEFT>$source_id<input type=hidden name=source_id id=source_id value="<?php echo $source_id ?>"></TD>
</TR> -->
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Title: </TD><TD ALIGN=LEFT><input type=text name=title id=title size=5 maxlength=4 value="<?php echo $title ?>"></TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA"><?php echo $label_first_name ?>: </TD><TD ALIGN=LEFT><input type=text name=first_name id=first_name size=30 maxlength=30 value="<?php echo $first_name ?>"> *</TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Middle Initial: </TD><TD ALIGN=LEFT><input type=text name=middle_initial id=middle_initial size=2 maxlength=1 value="<?php echo $middle_initial ?>"></TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA"><?php echo $label_last_name ?>: </TD><TD ALIGN=LEFT><input type=text name=last_name id=last_name size=30 maxlength=30 value="<?php echo $last_name ?>"> *</TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA"><?php echo $label_address1 ?>: </TD><TD ALIGN=LEFT><input type=text name=address1 id=address1 size=30 maxlength=100 value="<?php echo $address1 ?>"> *</TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA"><?php echo $label_address2 ?>: </TD><TD ALIGN=LEFT><input type=text name=address2 id=address2 size=30 maxlength=100 value="<?php echo $address2 ?>"></TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA"><?php echo $label_address3 ?>: </TD><TD ALIGN=LEFT><input type=text name=address3 id=address3 size=30 maxlength=100 value="<?php echo $address3 ?>"></TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA"><?php echo $label_city ?>: </TD><TD ALIGN=LEFT><input type=text name=city id=city size=30 maxlength=50 value="<?php echo $city ?>"> *</TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA"><?php echo $label_state ?>: </TD><TD ALIGN=LEFT>
<SELECT name="state" id=state>
<OPTION value="<?php echo $state ?>" selected><?php echo $state ?></OPTION>
<OPTGROUP label="United States">
<OPTION value="AL">Alabama</OPTION>
<OPTION value="AK">Alaska</OPTION>
<OPTION value="AZ">Arizona</OPTION>
<OPTION value="AR">Arkansas</OPTION>
<OPTION value="CA">California</OPTION>
<OPTION value="CO">Colorado</OPTION>
<OPTION value="CT">Connecticut</OPTION>
<OPTION value="DE">Delaware</OPTION>
<OPTION value="FL">Florida</OPTION>
<OPTION value="GA">Georgia</OPTION>
<OPTION value="HI">Hawaii</OPTION>
<OPTION value="ID">Idaho</OPTION>
<OPTION value="IL">Illinois</OPTION>
<OPTION value="IN">Indiana</OPTION>
<OPTION value="IA">Iowa</OPTION>
<OPTION value="KS">Kansas</OPTION>
<OPTION value="KY">Kentucky</OPTION>
<OPTION value="LA">Louisiana</OPTION>
<OPTION value="ME">Maine</OPTION>
<OPTION value="MD">Maryland</OPTION>
<OPTION value="MA">Massachusetts</OPTION>
<OPTION value="MI">Michigan</OPTION>
<OPTION value="MN">Minnesota</OPTION>
<OPTION value="MS">Mississippi</OPTION>
<OPTION value="MO">Missouri</OPTION>
<OPTION value="MT">Montana</OPTION>
<OPTION value="NE">Nebraska</OPTION>
<OPTION value="NV">Nevada</OPTION>
<OPTION value="NH">New Hampshire</OPTION>
<OPTION value="NJ">New Jersey</OPTION>
<OPTION value="NM">New Mexico</OPTION>
<OPTION value="NY">New York</OPTION>
<OPTION value="NC">North Carolina</OPTION>
<OPTION value="ND">North Dakota</OPTION>
<OPTION value="OH">Ohio</OPTION>
<OPTION value="OK">Oklahoma</OPTION>
<OPTION value="OR">Oregon</OPTION>
<OPTION value="PA">Pennsylvania</OPTION>
<OPTION value="RI">Rhode Island</OPTION>
<OPTION value="SC">South Carolina</OPTION>
<OPTION value="SD">South Dakota</OPTION>
<OPTION value="TN">Tennessee</OPTION>
<OPTION value="TX">Texas</OPTION>
<OPTION value="UT">Utah</OPTION>
<OPTION value="VT">Vermont</OPTION>
<OPTION value="VA">Virginia</OPTION>
<OPTION value="WA">Washington</OPTION>
<OPTION value="DC">Washington, DC</OPTION>
<OPTION value="WV">West Virginia</OPTION>
<OPTION value="WI">Wisconsin</OPTION>
<OPTION value="WY">Wyoming</OPTION>
</OPTGROUP>
<!--
<OPTGROUP label="Canada">
<OPTION value="AB">ALBERTA</OPTION>
<OPTION value="NT">NORTHWEST TERRITORY</OPTION>
<OPTION value="BC">BRITISH COLUMBIA</OPTION>
<OPTION value="ON">ONTARIO</OPTION>
<OPTION value="LB">LABRADOR</OPTION>
<OPTION value="PE">PRINCE EDWARDISLAND</OPTION>
<OPTION value="MB">MANITOBA</OPTION>
<OPTION value="PQ">QUEBEC</OPTION>
<OPTION value="NB">NEW BRUNSWICK</OPTION>
<OPTION value="SK">SASKATCHEWAN</OPTION>
<OPTION value="NF">NEWFOUNDLAND</OPTION>
<OPTION value="YT">YUKON TERRITORY</OPTION>
<OPTION value="NS">NOVA SCOTIA</OPTION>
</OPTGROUP>
-->
</SELECT> *</TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Province: </TD><TD ALIGN=LEFT><input type=text name=province id=province size=20 maxlength=50 value="<?php echo $province ?>"></TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA"><?php echo $label_postal_code ?>: </TD><TD ALIGN=LEFT><input type=text name=postal_code id=postal_code size=6 maxlength=5 value="<?php echo $postal_code ?>"> *</TD>
</TR>
<!-- <TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Phone Code: </TD><TD ALIGN=LEFT><input type=text name=phone_code id=phone_code size=10 maxlength=10 value="<?php echo $phone_code ?>"></TD>
</TR> -->
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA"><?php echo $label_phone_number ?>: </TD><TD ALIGN=LEFT><input type=text name=phone_number id=phone_number size=18 maxlength=18 value="<?php echo $phone_number ?>"> *</TD>
</TR>
<!-- <TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Gender: </TD><TD ALIGN=LEFT><input type=text name=gender id=gender size=2 maxlength=1 value="<?php echo $gender ?>"></TD>
</TR> -->
<!-- <TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Date of Birth: </TD><TD ALIGN=LEFT><input type=text name=date_if_birth id=date_if_birth size=12 maxlength=12 value="<?php echo $date_of_birth ?>"></TD>
</TR> -->
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Alt. Phone: </TD><TD ALIGN=LEFT><input type=text name=alt_phone id=alt_phone size=12 maxlength=12 value="<?php echo $alt_phone ?>"> *</TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Email: </TD><TD ALIGN=LEFT><input type=text name=email id=email size=30 maxlength=70 value="<?php echo $email ?>"> *</TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Show: </TD><TD ALIGN=LEFT><input type=text name=security_phrase id=security_phrase size=30 maxlength=100 value="<?php echo $security_phrase ?>"> *</TD>
</TR>
<!-- <TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Comments: </TD><TD ALIGN=LEFT><input type=text name=comments id=comments size=40 maxlength=255 value="<?php echo $comments ?>"> *</TD>
</TR> -->
<!-- <TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Rank: </TD><TD ALIGN=LEFT><input type=text name=rank id=rank size=5 maxlength=5 value="<?php echo $rank ?>"> *</TD>
</TR> -->
<!-- <TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Owner: </TD><TD ALIGN=LEFT><input type=text name=owner id=owner size=20 maxlength=20 value="<?php echo $owner ?>"> *</TD>
</TR> -->
<!-- commenting out date/time fields
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Appointment Date/Time: </TD><TD ALIGN=LEFT><input type=text name=appointment_date id=appointment_date size=10 maxlength=10 value="<?php echo $appointment_date ?>">
<script language="JavaScript">
var o_cal = new tcal ({
// form name
'formname': 'vsn',
// input name
'controlname': 'appointment_date'
});
o_cal.a_tpl.yearscroll = false;
// o_cal.a_tpl.weekstart = 1; // Monday week start
</script>
<input type=hidden name=appointment_time id=appointment_time value="<?php echo $appointment_time ?>">
<SELECT name=appointment_hour id=appointment_hour>
<option>00</option>
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
<option>07</option>
<option>08</option>
<option>09</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<OPTION value="<?php echo $appointment_hour ?>" selected><?php echo $appointment_hour ?></OPTION>
</SELECT>
<SELECT name=appointment_min id=appointment_min>
<option>00</option>
<option>05</option>
<option>10</option>
<option>15</option>
<option>20</option>
<option>25</option>
<option>30</option>
<option>35</option>
<option>40</option>
<option>45</option>
<option>50</option>
<option>55</option>
<OPTION value="<?php echo $appointment_min ?>" selected><?php echo $appointment_min ?></OPTION>
</SELECT>
</TD>
</TR>
-->
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=CENTER COLSPAN=2><FONT FACE="ARIAL,HELVETICA" size=2>Comments:<BR><TEXTAREA NAME=comments ID=comments ROWS=5 COLS=50><?php echo $comments ?></TEXTAREA></font><br>
</TD>
</TR>
<!-- <TR BGCOLOR="#E6E6E6">
<TD ALIGN=CENTER COLSPAN=2><FONT FACE="ARIAL,HELVETICA" size=2>Call Notes:<BR><TEXTAREA NAME=call_notes ID=call_notes ROWS=5 COLS=50><?php echo $call_notes ?></TEXTAREA></font><br>
</TD>
</TR> -->
<!-- commented BEGIN put custom fields here
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Order ID: </TD><TD ALIGN=LEFT><input type=text name=order_id id=order_id size=20 maxlength=20 value="<?php echo $order_id ?>"></TD>
</TR>
commented END put custom fields here -->
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Question: </TD><TD ALIGN=LEFT><input type=text name=question id=question size=30 maxlength=50 value="<?php echo $question ?>"></TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA">Answer: </TD><TD ALIGN=LEFT><input type=text name=answer id=answer size=30 maxlength=50 value="<?php echo $answer ?>"></TD>
</TR>
<?php
echo "<tr bgcolor=#E6E6E6><td align=right>Disposition: </td><td align=left><select size=1 name=status id=status>\n";
$stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses where selectable='Y' or status IN($extra_statuses) order by status";
$rslt=mysql_query($stmt, $link);
$statuses_to_print = mysql_num_rows($rslt);
$statuses_list='';
$o=0;
$DS=0;
while ($statuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if ( (strlen($dispo) == strlen($rowx[0])) and (eregi($dispo,$rowx[0])) )
{$statuses_list .= "<option SELECTED value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; $DS++;}
else
{$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
$o++;
}
$stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where (selectable='Y' or status IN($extra_statuses)) and campaign_id='$campaign' order by status";
$rslt=mysql_query($stmt, $link);
$CAMPstatuses_to_print = mysql_num_rows($rslt);
$o=0;
$CBhold_set=0;
while ($CAMPstatuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if ( (strlen($dispo) == strlen($rowx[0])) and (eregi($dispo,$rowx[0])) )
{$statuses_list .= "<option SELECTED value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; $DS++;}
else
{$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
$o++;
}
echo "$statuses_list";
echo "</select></td></tr>\n";
?>
<TR BGCOLOR=white>
<TD ALIGN=CENTER COLSPAN=2>
<!-- commenting out date/time submission prep
var appointment_hourFORM = document.getElementById('appointment_hour');
var appointment_hourVALUE = appointment_hourFORM[appointment_hourFORM.selectedIndex].text;
var appointment_minFORM = document.getElementById('appointment_min');
var appointment_minVALUE = appointment_minFORM[appointment_minFORM.selectedIndex].text;
document.vsn.appointment_time.value = appointment_hourVALUE + ":" + appointment_minVALUE + ":00";
-->
<SCRIPT LANGUAGE="JavaScript">
function submit_form()
{
var RF_dispoFORM = document.getElementById('status');
var RF_dispoVALUE = '|' + RF_dispoFORM[RF_dispoFORM.selectedIndex].text + '|';
var regREQtest = new RegExp(RF_dispoVALUE,"g");
if ( (required_statuses.match(regREQtest)) || (required_statuses == '---ALL---') )
{
var errors = 0;
var RF_array = required_fields.split("|");
var RF_array_count = RF_array.length;
var RF_inc = 0;
while (RF_inc < RF_array_count)
{
if (RF_array[RF_inc].length > 1)
{
var RF_field_name = RF_array[RF_inc];
var RF_field_element = document.getElementById(RF_field_name);
var RF_field_value = RF_field_element.value;
if (RF_field_value.length < 1)
{
alert("You must fill in the " + RF_field_name + " field: " + RF_field_value + '|' + RF_field_value.length);
errors++;
}
}
RF_inc++;
}
}
if (errors < 1)
{
document.vsn.submit();
document.vsn.smt.disabled = true;
document.vsn.smt.value = "Processing...";
}
}
</SCRIPT>
<input type=button value="SUBMIT and HANGUP CALL" name=smt id=smt onClick="submit_form()">
&nbsp; &nbsp; &nbsp; &nbsp; <input type=checkbox name=pause id=pause size="1" value="1" /> PAUSE AGENT DIALING
</TD>
</TR>
<TR BGCOLOR="#E6E6E6">
<TD ALIGN=CENTER COLSPAN=2><FONT FACE="ARIAL,HELVETICA" size=1>Please click SUBMIT to hangup and disposition the call, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * denotes required fields</font><br>
</TD>
</TR>
</TABLE>
</FORM>
</CENTER>
</B></FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
+29 -15
View File
@@ -331,10 +331,11 @@
# 110109-1205 - Added queuemetrics_loginout NONE option
# 110112-1254 - Added options.php option for focus/blur/enter functions
# 110129-1050 - Changed to XHTML compliant formatting, issue #444
# 110208-1202 - Made scheduled callbacks notice move when on script/form tabs
#
$version = '2.4-308';
$build = '110129-1050';
$version = '2.4-309';
$build = '110208-1202';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=69;
$one_mysql_log=0;
@@ -2589,8 +2590,9 @@ $MNwidth = ($MASTERwidth + 330); # 760 - main frame
$XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference
$HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks
$CQwidth = ($MASTERwidth + 300); # 730 - calls in queue listings
$AMwidth = ($MASTERwidth + 270); # 700 - preset-dial links
$AMwidth = ($MASTERwidth + 270); # 700 - refresh links
$SCwidth = ($MASTERwidth + 230); # 670 - live call seconds counter, sidebar link
$PDwidth = ($MASTERwidth + 210); # 650 - preset-dial links
$MUwidth = ($MASTERwidth + 180); # 610 - agent mute
$SSwidth = ($MASTERwidth + 176); # 606 - scroll script
$SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session
@@ -3205,6 +3207,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var AllowManualQueueCallsChoice='<?php echo $AllowManualQueueCallsChoice ?>';
var call_variables='';
var focus_blur_enabled='<?php echo $focus_blur_enabled ?>';
var CBlinkCONTENT='';
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\" />";
@@ -5091,8 +5094,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
CBpost = '</blink></font></b>';
}
}
document.getElementById("CBstatusSpan").innerHTML ="<a href=\"#\" onclick=\"CalLBacKsLisTCheck();return false;\">" + CBpre + '' + CBprint + '' + " ACTIVE CALLBACKS" + CBpost + "</a>";
CBlinkCONTENT ="<a href=\"#\" onclick=\"CalLBacKsLisTCheck();return false;\">" + CBpre + '' + CBprint + '' + " ACTIVE CALLBACKS" + CBpost + "</a>";
document.getElementById("CBstatusSpan").innerHTML = CBlinkCONTENT;
}
}
delete xmlhttp;
@@ -5736,7 +5739,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var regUDowner = new RegExp("owner,","ig");
if (fields_list.match(regUDowner))
{document.vicidial_form.owner.value = UDfieldsResponse_array[25];}
var regUDformreload = new RegExp("formreload,","ig");
if (fields_list.match(regUDformreload))
{FormContentsLoad();}
var regWFAcustom = new RegExp("^VAR","ig");
if (VDIC_web_form_address.match(regWFAcustom))
@@ -8193,7 +8198,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
hideDiv('DispoButtonHideA');
hideDiv('DispoButtonHideB');
hideDiv('DispoButtonHideC');
document.getElementById("DispoSelectBox").style.top = 1; // Firefox error on this line for some reason
document.getElementById("DispoSelectBox").style.top = '1px'; // Firefox error on this line for some reason
document.getElementById("DispoSelectMaxMin").innerHTML = "<a href=\"#\" onclick=\"DispoMinimize()\"> minimize </a>";
document.getElementById("DispoSelectHAspan").innerHTML = "<a href=\"#\" onclick=\"DispoHanguPAgaiN()\">Hangup Again</a>";
@@ -11325,6 +11330,9 @@ else
{
document.getElementById("MainTable").style.backgroundColor="<?php echo $MAIN_COLOR ?>";
document.getElementById("MaiNfooter").style.backgroundColor="<?php echo $MAIN_COLOR ?>";
var CBMPheight = '<?php echo $CBheight ?>px';
document.getElementById("CallbacksButtons").style.top = CBMPheight;
document.getElementById("CallbacksButtons").style.left = '300px';
hideDiv('ScriptPanel');
hideDiv('ScriptRefresH');
hideDiv('FormPanel');
@@ -11373,6 +11381,9 @@ else
function ScriptPanelToFront()
{
var CBSPheight = '<?php echo $QLheight ?>px';
document.getElementById("CallbacksButtons").style.top = CBSPheight;
document.getElementById("CallbacksButtons").style.left = '360px';
showDiv('ScriptPanel');
showDiv('ScriptRefresH');
hideDiv('FormPanel');
@@ -11387,6 +11398,9 @@ else
function FormPanelToFront()
{
var CBFPheight = '<?php echo $QLheight ?>px';
document.getElementById("CallbacksButtons").style.top = CBFPheight;
document.getElementById("CallbacksButtons").style.left = '360px';
showDiv('FormPanel');
showDiv('FormRefresH');
document.getElementById("MainTable").style.backgroundColor="<?php echo $FORM_COLOR ?>";
@@ -11750,10 +11764,6 @@ $zi=2;
<span id="MDstatusSpan"><a href="#" onclick="NeWManuaLDiaLCalL('NO');return false;">MANUAL DIAL</a></span> &nbsp; &nbsp; &nbsp; <a href="#" onclick="NeWManuaLDiaLCalL('FAST');return false;">FAST DIAL</a><br />
</font></span>
<span style="position:absolute;left:300px;top:<?php echo $CBheight ?>px;z-index:<?php $zi++; echo $zi ?>;" id="CallbacksButtons"><font class="body_text">
<span id="CBstatusSpan">X ACTIVE CALLBACKS</span> <br />
</font></span>
<span style="position:absolute;left:500px;top:<?php echo $CBheight ?>px;z-index:<?php $zi++; echo $zi ?>;" id="PauseCodeButtons"><font class="body_text">
<span id="PauseCodeLinkSpan"></span> <br />
</font></span>
@@ -11762,7 +11772,7 @@ $zi=2;
<span id="CallLogLinkSpan"><a href="#" onclick="VieWCalLLoG();return false;">VIEW CALL LOG</a></span> <br />
</font></span>
<span style="position:absolute;left:0px;top:<?php echo $HKheight ?>px;z-index:<?php $zi++; echo $zi ?>;" id="MaiNfooterspan">
<span style="position:absolute;left:0px;top:<?php echo $PBheight ?>px;z-index:<?php $zi++; echo $zi ?>;" id="MaiNfooterspan">
<span id="blind_monitor_notice_span"><b><font color="red"> &nbsp; &nbsp; <span id="blind_monitor_notice_span_contents"></span></font></b></span>
<table bgcolor="<?php echo $MAIN_COLOR ?>" id="MaiNfooter" width="<?php echo $MNwidth ?>px"><tr height="32px"><td height="32px"><font face="Arial,Helvetica" size="1">VERSION: <?php echo $version ?> &nbsp; BUILD: <?php echo $build ?> &nbsp; &nbsp; Server: <?php echo $server_ip ?> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><br />
<font class="body_small">
@@ -11799,12 +11809,12 @@ $zi=2;
Your Status: <span id="AgentStatusStatus"></span> <br />Calls Dialing: <span id="AgentStatusDiaLs"></span>
</font></span>
<span style="position:absolute;left:<?php echo $AMwidth ?>px;top:<?php echo $PBheight ?>px;z-index:<?php $zi++; echo $zi ?>;" id="AgentMuteANDPreseTDiaL"><font class="body_text">
<span style="position:absolute;left:<?php echo $PDwidth ?>px;top:<?php echo $AMheight ?>px;z-index:<?php $zi++; echo $zi ?>;" id="AgentMuteANDPreseTDiaL"><font class="body_text">
<?php
if ($PreseT_DiaL_LinKs)
{
echo "<a href=\"#\" onclick=\"DtMf_PreSet_a_DiaL();return false;\"><font class=\"body_tiny\">D1 - DIAL</font></a>\n";
echo "<br />\n";
echo " &nbsp; \n";
echo "<a href=\"#\" onclick=\"DtMf_PreSet_b_DiaL();return false;\"><font class=\"body_tiny\">D2 - DIAL</font></a>\n";
}
else {echo "<br />\n";}
@@ -11826,6 +11836,10 @@ if ($view_calls_in_queue > 0)
?>
</span></font>
<span style="position:absolute;left:300px;top:<?php echo $CBheight ?>px;z-index:<?php $zi++; echo $zi ?>;" id="CallbacksButtons"><font class="body_text">
<span id="CBstatusSpan">X ACTIVE CALLBACKS</span> <br />
</font></span>
<span style="position:absolute;left:<?php echo $SBwidth ?>px;top:<?php echo $AVTheight ?>px;height:500px;overflow:scroll;z-index:<?php $zi++; echo $zi ?>;background-color:<?php echo $SIDEBAR_COLOR ?>;" id="AgentViewSpan"><table cellpadding="0" cellspacing="0" border="0"><tr><td width="5px" 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>
@@ -12134,7 +12148,7 @@ Available Agents Transfer: <span id="AgentXferViewSelect"></span></center></font
<span id="DispoManualQueueMessage"></span>
<span id="DispoSelectContent"> End-of-call Disposition Selection </span>
<input type="hidden" name=DispoSelection /><br />
<input type=checkbox name=DispoSelectStop size="1" value="0" /> PAUSE AGENT DIALING <br />
<input type=checkbox name=DispoSelectStop id=DispoSelectStop size="1" value="0" /> PAUSE AGENT DIALING <br />
<a href="#" onclick="DispoSelectContent_create('','ReSET');return false;">CLEAR FORM</a> |
<a href="#" onclick="DispoSelect_submit();return false;">SUBMIT</a>
<br /><br />