diff --git a/www/vicidial/admin_modify_lead.php b/www/vicidial/admin_modify_lead.php index b5de2177..319617eb 100644 --- a/www/vicidial/admin_modify_lead.php +++ b/www/vicidial/admin_modify_lead.php @@ -25,6 +25,7 @@ # 80428-0144 - UTF8 cleanup # 80501-0454 - Added Hangup Reason to logs display # 80516-0936 - Cleanup of logging changes, added vicidial_agent_log display +# 80701-0832 - Changed to allow for altering of main phone number # require("dbconnect.php"); @@ -36,6 +37,8 @@ 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["old_phone"])) {$old_phone=$_GET["old_phone"];} + elseif (isset($_POST["old_phone"])) {$old_phone=$_POST["old_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"];} @@ -117,7 +120,6 @@ if (isset($_GET["modify_agent_logs"])) {$modify_agent_logs=$_GET["modify_agent if (isset($_GET["add_closer_record"])) {$add_closer_record=$_GET["add_closer_record"];} elseif (isset($_POST["add_closer_record"])) {$add_closer_record=$_POST["add_closer_record"];} - $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); @@ -141,6 +143,14 @@ while ($i < $qm_conf_ct) ##### END SETTINGS LOOKUP ##### ########################################### +if ($non_latin < 1) + { + $old_phone = ereg_replace("[^0-9]","",$old_phone); + $phone_number = ereg_replace("[^0-9]","",$phone_number); + $alt_phone = ereg_replace("[^0-9]","",$alt_phone); + } +if (strlen($phone_number)<6) {$phone_number=$old_phone;} + $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";} if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} @@ -204,7 +214,7 @@ if ($end_call > 0) { ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; + $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',phone_number='$phone_number',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); @@ -454,7 +464,7 @@ else echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -474,7 +484,8 @@ else echo "Province : \n"; echo "Country : \n"; - echo "Alt Phone : \n"; + echo "Main Phone : \n"; + echo "Alt Phone : \n"; echo "Email : \n"; echo "Security : \n"; echo "Comments : \n";