diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php index dce2c7a8..051d94d3 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php @@ -21,6 +21,7 @@ # 100914-1326 - Added lookup for user_level 7 users to set to reports only which will remove other admin links # 101214-1142 - Added Agent time stats # 110110-1327 - Changed campaign real-time link to the new realtime_report.php +# 110517-0059 - Added campaign type display option # header ("Content-type: text/html; charset=utf-8"); @@ -36,12 +37,15 @@ if (isset($_GET["DB"])) {$DB=$_GET["DB"];} elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} if (isset($_GET["adastats"])) {$adastats=$_GET["adastats"];} elseif (isset($_POST["adastats"])) {$adastats=$_POST["adastats"];} +if (isset($_GET["types"])) {$types=$_GET["types"];} + elseif (isset($_POST["types"])) {$types=$_POST["types"];} if (isset($_GET["submit"])) {$submit=$_GET["submit"];} elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} if (!isset($RR)) {$gRRroup=4;} +if (!isset($types)) {$types='SHOW ALL CAMPAIGNS';} $report_name = 'Real-Time Campaign Summary'; $db_source = 'M'; @@ -130,7 +134,12 @@ if ( (!eregi("-ALL",$LOGallowed_campaigns)) ) $whereLOGallowed_campaignsSQL = "where campaign_id IN('$rawLOGallowed_campaignsSQL')"; } -$stmt="select campaign_id from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id;"; +$campaign_typeSQL=''; +if ($types == 'AUTO-DIAL ONLY') {$campaign_typeSQL="and dial_method IN('RATIO','ADAPT_HARD_LIMIT','ADAPT_TAPERED','ADAPT_AVERAGE')";} +if ($types == 'MANUAL ONLY') {$campaign_typeSQL="and dial_method IN('MANUAL','INBOUND_MAN')";} +if ($types == 'INBOUND ONLY') {$campaign_typeSQL="and campaign_allow_inbound='Y'";} + +$stmt="select campaign_id from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL $campaign_typeSQL order by campaign_id;"; $rslt=mysql_query($stmt, $link); if (!isset($DB)) {$DB=0;} if ($DB) {echo "$stmt\n";} @@ -177,29 +186,49 @@ if (!isset($RR)) {$RR=4;} \n"; +echo"\n"; echo "
| "; +echo " |