final vdc_db_query changes for the auto alt dial functionality on the agent side

git-svn-id: svn://192.168.202.10@466 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2007-01-16 17:15:10 +00:00
parent 1ebac475bb
commit 0f39d2d8bd
+12 -1
View File
@@ -1538,7 +1538,12 @@ if ($ACTION == 'updateDISPO')
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
if ( ($auto_dial_level > 0) and ( ($dispo_choice=='N') or ($dispo_choice=='B') or ($dispo_choice=='DC') ) )
$stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) )
{
$stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';";
if ($DB) {echo "$stmt\n";}
@@ -1552,6 +1557,12 @@ if ($ACTION == 'updateDISPO')
$rslt=mysql_query($stmt, $link);
}
}
else
{
$stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n";
}