Files
agc_2-X/www/vicidial/closer_dispo.php
T
mattf 4b258c4f03 Another batch of Added allow_web_debug system setting updates
git-svn-id: svn://192.168.202.10@3572 3d104415-ff17-0410-8863-d5cf3c621b8a
2022-02-26 04:40:37 +00:00

425 lines
21 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
# closer_dispo.php
#
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# this is the closer disposition screen of a call that has been grabbed. This
# allows the closer to modify customer information and disposition the call
#
# CHANGES
#
# 60619-1641 - Added variable filtering to eliminate SQL injection attack threat
# 90508-0644 - Changed to PHP long tags
# 120223-2249 - Removed logging of good login passwords if webroot writable is enabled
# 130610-1114 - Finalized changing of all ereg instances to preg
# 130620-0817 - Added filtering of input to prevent SQL injection attacks and new user auth
# 130901-1932 - Changed to mysqli PHP functions
# 141007-2138 - Finalized adding QXZ translation to all admin files
# 141229-2037 - Added code for on-the-fly language translations display
# 170409-1532 - Added IP List validation code
# 220224-1611 - Added allow_web_debug system setting
#
require("dbconnect_mysqli.php");
require("functions.php");
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
$PHP_SELF=$_SERVER['PHP_SELF'];
$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF);
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];}
elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];}
elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];}
if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];}
elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];}
if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];}
elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];}
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
if (isset($_GET["city"])) {$city=$_GET["city"];}
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
if (isset($_GET["state"])) {$state=$_GET["state"];}
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
if (isset($_GET["province"])) {$province=$_GET["province"];}
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
if (isset($_GET["email"])) {$email=$_GET["email"];}
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
if (isset($_GET["security"])) {$security=$_GET["security"];}
elseif (isset($_POST["security"])) {$security=$_POST["security"];}
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$DB=preg_replace("/[^0-9a-zA-Z]/","",$DB);
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,webroot_writable,outbound_autodial_active,user_territories_active,enable_languages,language_method,allow_web_debug FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
#if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysqli_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$non_latin = $row[0];
$webroot_writable = $row[1];
$SSoutbound_autodial_active = $row[2];
$user_territories_active = $row[3];
$SSenable_languages = $row[4];
$SSlanguage_method = $row[5];
$SSallow_web_debug = $row[6];
}
if ($SSallow_web_debug < 1) {$DB=0;}
##### END SETTINGS LOOKUP #####
###########################################
$server_ip = preg_replace('/[^-\.\:\_0-9a-zA-Z]/', '', $server_ip);
$dialplan_number = preg_replace("/\<|\>|\'|\"|\\\\|;/",'-',$dialplan_number);
$extension = preg_replace("/\<|\>|\'|\"|\\\\|;/",'-',$extension);
$PHONE_LOGIN = preg_replace("/\<|\>|\'|\"|\\\\|;/",'-',$PHONE_LOGIN);
$channel = preg_replace("/\<|\>|\'|\"|\\\\|;/",'-',$channel);
$parked_time = preg_replace("/\<|\>|\'|\"|\\\\|;/",'-',$parked_time);
$debugvars = preg_replace("/\<|\>|\'|\"|\\\\|;/",'-',$debugvars);
$parked_by = preg_replace("/\<|\>|\'|\"|\\\\|;/",'-',$parked_by);
$submit = preg_replace("/\<|\>|\'|\"|\\\\|;/",'-',$submit);
$SUBMIT = preg_replace("/\<|\>|\'|\"|\\\\|;/",'-',$SUBMIT);
$vendor_id = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$vendor_id);
$phone = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$phone);
$lead_id = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$lead_id);
$first_name = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$first_name);
$last_name = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$last_name);
$phone_number = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$phone_number);
$end_call = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$end_call);
$DB = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$DB);
$dispo = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$dispo);
$list_id = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$list_id);
$campaign_id = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$campaign_id);
$phone_code = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$phone_code);
$call_began = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$call_began);
$tsr = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$tsr);
$address1 = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$address1);
$address2 = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$address2);
$address3 = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$address3);
$city = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$city);
$state = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$state);
$postal_code = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$postal_code);
$province = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$province);
$country_code = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$country_code);
$alt_phone = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$alt_phone);
$email = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$email);
$security = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$security);
$comments = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$comments);
$status = preg_replace("/\<|\>|\|\"|\\\\|;/",'-',$status );
if ($non_latin < 1)
{
$PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER);
$PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW);
$user = preg_replace('/[^-_0-9a-zA-Z]/', '', $user);
$group = preg_replace('/[^-_0-9a-zA-Z]/', '', $group);
$group_selected = preg_replace('/[^-_0-9a-zA-Z]/', '', $group_selected);
$groupselect = preg_replace('/[^-_0-9a-zA-Z]/', '', $groupselect);
$channel_group = preg_replace('/[^-_0-9a-zA-Z]/', '', $channel_group);
}
else
{
$PHP_AUTH_USER = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_USER);
$PHP_AUTH_PW = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_PW);
$user = preg_replace('/[^-_0-9\p{L}]/u', '', $user);
$group = preg_replace('/[^-_0-9\p{L}]/u', '', $group);
$group_selected = preg_replace('/[^-_0-9\p{L}]/u', '', $group_selected);
$groupselect = preg_replace('/[^-_0-9\p{L}]/u', '', $groupselect);
$channel_group = preg_replace('/[^-_0-9\p{L}]/u', '', $channel_group);
}
$STARTtime = date("U");
$TODAY = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$FILE_datetime = $STARTtime;
$ext_context = 'demo';
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$sl_ct = mysqli_num_rows($rslt);
if ($sl_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$VUselected_language = $row[0];
}
$auth=0;
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'QC',1,0);
if ($auth_message == 'GOOD')
{$auth=1;}
if ($auth < 1)
{
$VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
if ($auth_message == 'LOCK')
{
$VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
}
if ($auth_message == 'IPBLOCK')
{
$VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip";
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
}
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
Header("HTTP/1.0 401 Unauthorized");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
exit;
}
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$LOGfullname=$row[0];
$fullname = $row[0];
require("screen_colors.php");
?>
<html>
<head>
<title><?php echo _QXZ("CLOSER: Call Disposition"); ?></title>
<?php
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
?>
</head>
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
<?php
if ($end_call > 0)
{
$call_length = ($STARTtime - $call_began);
### insert a NEW record to the vicidial_closer_log table
$stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysqli_real_escape_string($link, $lead_id) . "','" . mysqli_real_escape_string($link, $list_id) . "','" . mysqli_real_escape_string($link, $campaign_id) . "','" . mysqli_real_escape_string($link, $parked_time) . "','" . mysqli_real_escape_string($link, $call_began) . "','$STARTtime','" . mysqli_real_escape_string($link, $call_length) . "','" . mysqli_real_escape_string($link, $status) . "','" . mysqli_real_escape_string($link, $phone_code) . "','" . mysqli_real_escape_string($link, $phone_number) . "','$PHP_AUTH_USER','" . mysqli_real_escape_string($link, $comments) . "','Y')";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
### update the lead record in the vicidial_list table
$stmt="UPDATE vicidial_list set status='" . mysqli_real_escape_string($link, $status) . "',first_name='" . mysqli_real_escape_string($link, $first_name) . "',last_name='" . mysqli_real_escape_string($link, $last_name) . "',address1='" . mysqli_real_escape_string($link, $address1) . "',address2='" . mysqli_real_escape_string($link, $address2) . "',address3='" . mysqli_real_escape_string($link, $address3) . "',city='" . mysqli_real_escape_string($link, $city) . "',state='" . mysqli_real_escape_string($link, $state) . "',province='" . mysqli_real_escape_string($link, $province) . "',postal_code='" . mysqli_real_escape_string($link, $postal_code) . "',country_code='" . mysqli_real_escape_string($link, $country_code) . "',alt_phone='" . mysqli_real_escape_string($link, $alt_phone) . "',email='" . mysqli_real_escape_string($link, $email) . "',security_phrase='" . mysqli_real_escape_string($link, $security) . "',comments='" . mysqli_real_escape_string($link, $comments) . "' where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "'";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$stmt="SELECT count(*) from live_channels where server_ip='$server_ip' and channel='" . mysqli_real_escape_string($link, $channel) . "' and extension like \"%" . mysqli_real_escape_string($link, $extension) . "%\"";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysqli_fetch_row($rslt);
$parked_count = $row[0];
if ($parked_count > 0)
{
$DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER";
### insert a NEW record to the vicidial_manager table to be processed
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','" . mysqli_real_escape_string($link, $server_ip) . "','','Hangup','$DTqueryCID','Channel: " . mysqli_real_escape_string($link, $channel) . "','','','','','','','','','')";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
echo _QXZ("Hangup command sent for channel")." $channel &nbsp; &nbsp; &nbsp; $NOW_TIME\n<BR><BR>\n";
echo "<form><input style='background-color:#$SSbutton_color' type=button value=\""._QXZ("Close This Window")."\" onClick=\"javascript:window.close();\"></form>\n";
}
else
{
echo _QXZ("Hangup command FAILED for channel")." $channel &nbsp; &nbsp; &nbsp; $NOW_TIME\n<BR><BR>\n";
echo "<form><input style='background-color:#$SSbutton_color' type=button value=\""._QXZ("Close This Window")."\" onClick=\"javascript:window.close();\"></form>\n";
}
}
else
{
$stmt="SELECT count(*) from vicidial_list where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "'";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysqli_fetch_row($rslt);
$lead_count = $row[0];
if ($lead_count > 0)
{
$stmt="SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner from vicidial_list where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "'";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysqli_fetch_row($rslt);
$lead_id = "$row[0]";
$tsr = "$row[4]";
$vendor_id = "$row[5]";
$list_id = "$row[7]";
$campaign_id = "$row[8]";
$phone_code = "$row[10]";
$phone_number = "$row[11]";
$title = "$row[12]";
$first_name = "$row[13]"; #
$middle_initial = "$row[14]";
$last_name = "$row[15]"; #
$address1 = "$row[16]"; #
$address2 = "$row[17]"; #
$address3 = "$row[18]"; #
$city = "$row[19]"; #
$state = "$row[20]"; #
$province = "$row[21]"; #
$postal_code = "$row[22]"; #
$country_code = "$row[23]"; #
$gender = "$row[24]";
$date_of_birth = "$row[25]";
$alt_phone = "$row[26]"; #
$email = "$row[27]"; #
$security = "$row[28]"; #
$comments = "$row[29]"; #
echo "<br>"._QXZ("Call information").": $first_name $last_name - $phone_number<br><br><form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=end_call value=1>\n";
echo "<input type=hidden name=DB value=\"$DB\">\n";
echo "<input type=hidden name=lead_id value=\"$lead_id\">\n";
echo "<input type=hidden name=list_id value=\"$list_id\">\n";
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
echo "<input type=hidden name=phone_code value=\"$phone_code\">\n";
echo "<input type=hidden name=phone_number value=\"$phone_number\">\n";
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
echo "<input type=hidden name=extension value=\"$extension\">\n";
echo "<input type=hidden name=channel value=\"$channel\">\n";
echo "<input type=hidden name=call_began value=\"$call_began\">\n";
echo "<input type=hidden name=parked_time value=\"$parked_time\">\n";
echo "<table cellpadding=1 cellspacing=0>\n";
echo "<tr><td colspan=2>"._QXZ("Vendor ID").": $vendor_id &nbsp; &nbsp; "._QXZ("Campaign ID").": $campaign_id</td></tr>\n";
echo "<tr><td colspan=2>"._QXZ("Fronter").": $tsr &nbsp; &nbsp; "._QXZ("List ID").": $list_id</td></tr>\n";
echo "<tr><td align=right>"._QXZ("First Name").": </td><td align=left><input type=text name=first_name size=15 maxlength=30 value=\"$first_name\"> &nbsp; \n";
echo " "._QXZ("Last Name").": <input type=text name=last_name size=15 maxlength=30 value=\"$last_name\"> </td></tr>\n";
echo "<tr><td align=right>"._QXZ("Address 1")." : </td><td align=left><input type=text name=address1 size=30 maxlength=30 value=\"$address1\"></td></tr>\n";
echo "<tr><td align=right>"._QXZ("Address 2")." : </td><td align=left><input type=text name=address2 size=30 maxlength=30 value=\"$address2\"></td></tr>\n";
echo "<tr><td align=right>"._QXZ("Address 3")." : </td><td align=left><input type=text name=address3 size=30 maxlength=30 value=\"$address3\"></td></tr>\n";
echo "<tr><td align=right>"._QXZ("City")." : </td><td align=left><input type=text name=city size=30 maxlength=30 value=\"$city\"></td></tr>\n";
echo "<tr><td align=right>"._QXZ("State").": </td><td align=left><input type=text name=state size=2 maxlength=2 value=\"$state\"> &nbsp; \n";
echo " "._QXZ("Postal Code").": <input type=text name=postal_code size=10 maxlength=10 value=\"$postal_code\"> </td></tr>\n";
echo "<tr><td align=right>"._QXZ("Province")." : </td><td align=left><input type=text name=province size=30 maxlength=30 value=\"$province\"></td></tr>\n";
echo "<tr><td align=right>"._QXZ("Country")." : </td><td align=left><input type=text name=country_code size=3 maxlength=3 value=\"$country_code\"></td></tr>\n";
echo "<tr><td align=right>"._QXZ("Alt Phone")." : </td><td align=left><input type=text name=alt_phone size=10 maxlength=10 value=\"$alt_phone\"></td></tr>\n";
echo "<tr><td align=right>"._QXZ("Email")." : </td><td align=left><input type=text name=email size=30 maxlength=50 value=\"$email\"></td></tr>\n";
echo "<tr><td align=right>"._QXZ("Security")." : </td><td align=left><input type=text name=security size=30 maxlength=100 value=\"$security\"></td></tr>\n";
echo "<tr><td align=right>"._QXZ("Comments")." : </td><td align=left><input type=text name=comments size=30 maxlength=255 value=\"$comments\"></td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Disposition").": </td><td align=left><select size=1 name=status>\n";
$stmt="SELECT status,status_name from vicidial_statuses where selectable='Y' order by status";
$rslt=mysql_to_mysqli($stmt, $link);
$statuses_to_print = mysqli_num_rows($rslt);
$statuses_list='';
$o=0;
while ($statuses_to_print > $o) {
$rowx=mysqli_fetch_row($rslt);
$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
$o++;
}
echo "$statuses_list";
echo "</select></td></tr>\n";
echo "<tr><td colspan=2><input style='background-color:#$SSbutton_color' type=submit name=submit value=\""._QXZ("END CALL")."\"></td></tr>\n";
echo "</table></form>\n";
echo "<BR><BR><BR>\n";
}
else
{
echo _QXZ("lead lookup FAILED for lead_id")." $lead_id &nbsp; &nbsp; &nbsp; $NOW_TIME\n<BR><BR>\n";
# echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
}
}
$ENDtime = date("U");
$RUNtime = ($ENDtime - $STARTtime);
echo "\n\n\n<br><br><br>\n\n";
echo "<font size=0>\n\n\n<br><br><br>\n"._QXZ("script runtime").": $RUNtime "._QXZ("seconds")."</font>";
?>
</body>
</html>
<?php
exit;
?>