2006-05-12 snapshot

git-svn-id: svn://192.168.202.10@7 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-07-07 15:21:52 +00:00
parent 2598ae9ec2
commit 487f7108d4
74 changed files with 10930 additions and 1055 deletions
+35 -8
View File
@@ -14,7 +14,7 @@
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT')
# - $stage - ('start','finish')
# - $stage - ('start','finish','lookup','new')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
# - $exten - ('123test',...)
@@ -368,13 +368,40 @@ if ($ACTION == 'manDiaLnextCaLL')
{
if (strlen($phone_number)>3)
{
### grab the next lead in the hopper for this campaign and reserve it for the user
$stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
$lead_id = mysql_insert_id();
$CBleadIDset=1;
if ($stage=='lookup')
{
$stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$man_leadID_ct = mysql_num_rows($rslt);
if ($man_leadID_ct > 0)
{
$row=mysql_fetch_row($rslt);
$affected_rows=1;
$lead_id =$row[0];
$CBleadIDset=1;
}
else
{
### insert a new lead in the system with this phone number
$stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
$lead_id = mysql_insert_id();
$CBleadIDset=1;
}
}
else
{
### insert a new lead in the system with this phone number
$stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
$lead_id = mysql_insert_id();
$CBleadIDset=1;
}
}
else
{