Added called_count as an update_lead non-agent-API function

git-svn-id: svn://192.168.202.10@1523 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-09-24 18:32:55 +00:00
parent 6f903b7808
commit 88579fd67e
3 changed files with 11 additions and 3 deletions
+2
View File
@@ -41,6 +41,7 @@ Changes:
100718-0245 - Added update_lead function to update existing leads
100723-1333 - Added no_update option to the update_lead function
100728-1952 - Added delete_lead option to the update_lead function
100924-1403 - Added called_count as an update_lead option
@@ -365,6 +366,7 @@ security_phrase - 1-100 characters
comments - 1-255 characters
rank - 1-5 digits
owner - 1-20 characters (user ID, Territory or user group)
called_count - digits only, the number of attempts dialing the lead
NOTES:
- in order to set a field to empty('') set it equal to --BLANK--, i.e. "&province=--BLANK--"
- please use no special characters like apostrophes, quotes or amphersands
+2 -1
View File
@@ -38,6 +38,7 @@
# 100622-0945 - Added field labels
# 100703-1122 - Added custom fields display/edit
# 100712-1416 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any
# 100924-1431 - Added Called Count display
#
require("dbconnect.php");
@@ -587,7 +588,7 @@ else
echo "<input type=hidden name=parked_time value=\"$parked_time\">\n";
echo "<table cellpadding=1 cellspacing=0>\n";
echo "<tr><td colspan=2>$label_vendor_lead_code: $vendor_id &nbsp; &nbsp; Lead ID: $lead_id</td></tr>\n";
echo "<tr><td colspan=2>Fronter: <A HREF=\"user_stats.php?user=$tsr\">$tsr</A> &nbsp; &nbsp; List ID: $list_id</td></tr>\n";
echo "<tr><td colspan=2>Fronter: <A HREF=\"user_stats.php?user=$tsr\">$tsr</A> &nbsp; &nbsp; List ID: $list_id &nbsp; &nbsp; Called Count: $called_count</td></tr>\n";
echo "<tr><td align=right>$label_title: </td><td align=left><input type=text name=title size=4 maxlength=4 value=\"$title\"> &nbsp; \n";
echo "$label_first_name: <input type=text name=first_name size=15 maxlength=30 value=\"$first_name\"> </td></tr>\n";
+7 -2
View File
@@ -36,10 +36,11 @@
# 100718-0245 - Added update_lead function to update existing leads
# 100723-1333 - Added no_update option to the update_lead function
# 100728-1952 - Added delete_lead option to the update_lead function
# 100924-1403 - Added called_count as an update_lead option
#
$version = '2.4-22';
$build = '100728-1952';
$version = '2.4-23';
$build = '100924-1403';
require("dbconnect.php");
@@ -156,6 +157,8 @@ if (isset($_GET["no_update"])) {$no_update=$_GET["no_update"];}
elseif (isset($_POST["no_update"])) {$no_update=$_POST["no_update"];}
if (isset($_GET["delete_lead"])) {$delete_lead=$_GET["delete_lead"];}
elseif (isset($_POST["delete_lead"])) {$delete_lead=$_POST["delete_lead"];}
if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];}
elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];}
header ("Content-type: text/html; charset=utf-8");
@@ -247,6 +250,7 @@ if ($non_latin < 1)
$lead_id = ereg_replace("[^0-9]","",$lead_id);
$no_update = ereg_replace("[^A-Z]","",$no_update);
$delete_lead = ereg_replace("[^A-Z]","",$delete_lead);
$called_count=ereg_replace("[^0-9]","",$called_count);
}
else
{
@@ -1902,6 +1906,7 @@ if ($function == 'update_lead')
if (strlen($comments)>0) {$VL_update_SQL .= "comments='$comments',";}
if (strlen($rank)>0) {$VL_update_SQL .= "rank='$rank',";}
if (strlen($owner)>0) {$VL_update_SQL .= "owner='$owner',";}
if (strlen($called_count)>0) {$VL_update_SQL .= "called_count='$called_count',";}
$VL_update_SQL = preg_replace("/,$/","",$VL_update_SQL);
$VL_update_SQL = preg_replace("/'--BLANK--'/","''",$VL_update_SQL);
$VL_update_SQL = preg_replace("/\n/","!N",$VL_update_SQL);