diff --git a/agc_2-X/trunk/www/vicidial/admin_modify_lead.php b/agc_2-X/trunk/www/vicidial/admin_modify_lead.php
index fd51a12b..9a658ec3 100644
--- a/agc_2-X/trunk/www/vicidial/admin_modify_lead.php
+++ b/agc_2-X/trunk/www/vicidial/admin_modify_lead.php
@@ -108,6 +108,7 @@ $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
# 61130-1639 - Added recording_log lookup and list for this lead_id
# 61201-1136 - Added recording_log user(TSR) display and link
# 70305-1133 - Changed to default CHECKED modify logs upon status change
+# 70424-1128 - Added campaign-specific statuses, reformatted recordings list
#
$STARTtime = date("U");
@@ -274,6 +275,36 @@ else
if ($lead_count > 0)
{
+ $stmt="select * from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 500;";
+ $rslt=mysql_query($stmt, $link);
+ $logs_to_print = mysql_num_rows($rslt);
+
+ $u=0;
+ $call_log = '';
+ $log_campaign = '';
+ while ($logs_to_print > $u)
+ {
+ $row=mysql_fetch_row($rslt);
+ if (strlen($log_campaign)<1) {$log_campaign = $row[3];}
+ if (eregi("1$|3$|5$|7$|9$", $u))
+ {$bgcolor='bgcolor="#B9CBFD"';}
+ else
+ {$bgcolor='bgcolor="#9BB9FB"';}
+
+ $u++;
+ $call_log .= "
";
+ $call_log .= "| $u | ";
+ $call_log .= "$row[4] | ";
+ $call_log .= " $row[7] | \n";
+ $call_log .= " $row[8] | \n";
+ $call_log .= " $row[11] | \n";
+ $call_log .= " $row[3] | \n";
+ $call_log .= " $row[2] | \n";
+ $call_log .= " $row[1] |
\n";
+
+ }
+
+
$stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
@@ -349,15 +380,32 @@ else
while ($statuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
- if ($dispo == "$rowx[0]")
+ if ( (strlen($dispo) == strlen($rowx[0])) and (eregi($dispo,$rowx[0])) )
{$statuses_list .= "\n"; $DS++;}
else
{$statuses_list .= "\n";}
$o++;
}
+
+ $stmt="SELECT * from vicidial_campaign_statuses where selectable='Y' and campaign_id='$log_campaign' order by status";
+ $rslt=mysql_query($stmt, $link);
+ $CAMPstatuses_to_print = mysql_num_rows($rslt);
+
+ $o=0;
+ while ($CAMPstatuses_to_print > $o)
+ {
+ $rowx=mysql_fetch_row($rslt);
+ if ( (strlen($dispo) == strlen($rowx[0])) and (eregi($dispo,$rowx[0])) )
+ {$statuses_list .= "\n"; $DS++;}
+ else
+ {$statuses_list .= "\n";}
+ $o++;
+ }
+
+
if ($DS < 1) {$statuses_list .= "\n";}
echo "$statuses_list";
- echo "\n";
+ echo " (with $log_campaign statuses)\n";
echo "| Modify agent and vicidial logs | |
\n";
@@ -433,38 +481,19 @@ echo "CALLS TO THIS LEAD:\n";
echo "\n";
echo "| # | DATE/TIME | LENGTH | STATUS | TSR | CAMPAIGN | LIST | LEAD |
\n";
- $stmt="select * from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 500;";
- $rslt=mysql_query($stmt, $link);
- $logs_to_print = mysql_num_rows($rslt);
- $u=0;
- while ($logs_to_print > $u)
- {
- $row=mysql_fetch_row($rslt);
- if (eregi("1$|3$|5$|7$|9$", $u))
- {$bgcolor='bgcolor="#B9CBFD"';}
- else
- {$bgcolor='bgcolor="#9BB9FB"';}
+echo "$call_log\n";
+
+
- $u++;
- echo "";
- echo "| $u | ";
- echo "$row[4] | ";
- echo " $row[7] | \n";
- echo " $row[8] | \n";
- echo " $row[11] | \n";
- echo " $row[3] | \n";
- echo " $row[2] | \n";
- echo " $row[1] |
\n";
- }
echo "
\n";
echo "
\n";
echo "RECORDINGS FOR THIS LEAD:\n";
-echo "\n";
+echo "\n";
echo "| # | LEAD | DATE/TIME | SECONDS | RECID | FILENAME | LOCATION | TSR |
\n";
$stmt="select * from recording_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by recording_id desc limit 500;";
@@ -484,10 +513,10 @@ echo "| # | LEAD | ";
echo "| $u | ";
echo " $row[12] | ";
- echo " $row[4] | \n";
+ echo " $row[4] | \n";
echo " $row[8] | \n";
- echo " $row[0] | \n";
- echo " $row[10] | \n";
+ echo " $row[0] | \n";
+ echo " $row[10] | \n";
echo " $row[11] | \n";
echo " $row[13] | ";
echo " |
\n";