diff --git a/www/vicidial/admin_modify_lead.php b/www/vicidial/admin_modify_lead.php
index 093e967e..0da9e029 100644
--- a/www/vicidial/admin_modify_lead.php
+++ b/www/vicidial/admin_modify_lead.php
@@ -32,6 +32,7 @@
# 90508-0644 - Changed to PHP long tags
# 90708-1549 - Added phone number dialed to outbound log
# 90721-1246 - Added rank and owner as vicidial_list fields
+# 90917-2355 - Added extended alt phone entries
#
require("dbconnect.php");
@@ -341,6 +342,30 @@ else
if ($lead_count > 0)
{
+ ##### grab vicidial_list_alt_phones records #####
+ $stmt="select phone_code,phone_number,alt_phone_note,alt_phone_count,active from vicidial_list_alt_phones where lead_id='" . mysql_real_escape_string($lead_id) . "' order by alt_phone_count limit 500;";
+ $rslt=mysql_query($stmt, $link);
+ $alts_to_print = mysql_num_rows($rslt);
+
+ $c=0;
+ $alts_output = '';
+ while ($alts_to_print > $c)
+ {
+ $row=mysql_fetch_row($rslt);
+ if (eregi("1$|3$|5$|7$|9$", $c))
+ {$bgcolor='bgcolor="#B9CBFD"';}
+ else
+ {$bgcolor='bgcolor="#9BB9FB"';}
+
+ $c++;
+ $alts_output .= "
";
+ $alts_output .= "| $c | ";
+ $alts_output .= "$row[0] $row[1] | ";
+ $alts_output .= " $row[2] | \n";
+ $alts_output .= " $row[3] | \n";
+ $alts_output .= " $row[4] |
\n";
+ }
+
##### grab vicidial_log records #####
$stmt="select uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,user_group,term_reason,alt_dial from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 500;";
$rslt=mysql_query($stmt, $link);
@@ -619,6 +644,18 @@ else
echo "\n";
+ if ($c > 0)
+ {
+ echo "EXTENDED ALTERNATE PHONE NUMBERS FOR THIS LEAD:\n";
+ echo "\n";
+ echo "| # | ALT PHONE | ALT NOTE | ALT COUNT | ACTIVE |
\n";
+
+ echo "$alts_output\n";
+
+ echo "
\n";
+ echo "
\n";
+ }
+
echo "CALLS TO THIS LEAD:\n";
echo "\n";
echo "| # | DATE/TIME | LENGTH | STATUS | TSR | CAMPAIGN | LIST | LEAD | HANGUP REASON | PHONE |
\n";
diff --git a/www/vicidial/admin_search_lead.php b/www/vicidial/admin_search_lead.php
index 840e16f8..de6e60b9 100644
--- a/www/vicidial/admin_search_lead.php
+++ b/www/vicidial/admin_search_lead.php
@@ -19,6 +19,7 @@
# 90309-1828 - Added admin_log logging
# 90310-2146 - Added admin header
# 90508-0644 - Changed to PHP long tags
+# 90917-2307 - Added alternate phone number searching option
#
require("dbconnect.php");
@@ -44,21 +45,24 @@ if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
+if (isset($_GET["alt_phone_search"])) {$alt_phone_search=$_GET["alt_phone_search"];}
+ elseif (isset($_POST["alt_phone_search"])) {$alt_phone_search=$_POST["alt_phone_search"];}
$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
$phone = ereg_replace("[^0-9]","",$phone);
+if (strlen($alt_phone_search) < 2) {$alt_phone_search='No';}
$STARTtime = date("U");
$TODAY = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
- $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';";
- if ($DB) {echo "|$stmt|\n";}
- $rslt=mysql_query($stmt, $link);
- $row=mysql_fetch_row($rslt);
- $auth=$row[0];
+$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';";
+if ($DB) {echo "|$stmt|\n";}
+$rslt=mysql_query($stmt, $link);
+$row=mysql_fetch_row($rslt);
+$auth=$row[0];
if ($WeBRooTWritablE > 0)
{$fp = fopen ("./project_auth_entries.txt", "a");}
@@ -67,25 +71,24 @@ $date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
- if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
+if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
exit;
}
- else
+else
{
-
- if($auth>0)
+ if ($auth>0)
{
$office_no=strtoupper($PHP_AUTH_USER);
$password=strtoupper($PHP_AUTH_PW);
- $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
- $rslt=mysql_query($stmt, $link);
- $row=mysql_fetch_row($rslt);
- $LOGfullname =$row[0];
- $LOGmodify_leads =$row[1];
+ $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
+ $rslt=mysql_query($stmt, $link);
+ $row=mysql_fetch_row($rslt);
+ $LOGfullname = $row[0];
+ $LOGmodify_leads = $row[1];
if ($WeBRooTWritablE > 0)
{
@@ -132,12 +135,8 @@ $subcamp_color = '#C6C6C6';
require("admin_header.php");
-
-
-
echo " Lead search: $vendor_id $phone $lead_id $status $list_id $user
\n";
-
if ( (!$vendor_id) and (!$phone) and (!$lead_id) and ( (strlen($status)<1) and (strlen($list_id)<1) and (strlen($user)<1) ))
{
echo date("l F j, Y G:i:s A");
@@ -145,7 +144,8 @@ if ( (!$vendor_id) and (!$phone) and (!$lead_id) and ( (strlen($status)<1) and
echo "