From 09e640c727cb9ffd94aa35e1682c54cd0fad4663 Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 24 Jul 2008 04:18:55 +0000 Subject: [PATCH] change in VDAD and CLOSER stats pages to custom category status, not including UNDEFINED git-svn-id: svn://192.168.202.10@929 3d104415-ff17-0410-8863-d5cf3c621b8a --- www/vicidial/AST_CLOSERstats.php | 15 +++++++++------ www/vicidial/AST_VDADstats.php | 16 +++++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/www/vicidial/AST_CLOSERstats.php b/www/vicidial/AST_CLOSERstats.php index 9077f88f..664d5c9e 100644 --- a/www/vicidial/AST_CLOSERstats.php +++ b/www/vicidial/AST_CLOSERstats.php @@ -563,7 +563,7 @@ echo "+------------------------------------------------------+------------+----- ######### STATUS CATEGORY STATS echo "\n"; -echo "---------- STATUS CATEGORY STATS\n"; +echo "---------- CUSTOM STATUS CATEGORY STATS\n"; echo "+----------------------+------------+--------------------------------+\n"; echo "| CATEGORY | CALLS | DESCRIPTION |\n"; echo "+----------------------+------------+--------------------------------+\n"; @@ -572,12 +572,15 @@ $TOTCATcalls=0; $r=0; while ($r < $statcats_to_print) { - $TOTCATcalls = ($TOTCATcalls + $vsc_count[$r]); - $category = sprintf("%-20s", $vsc_id[$r]); while(strlen($category)>20) {$category = substr("$category", 0, -1);} - $CATcount = sprintf("%10s", $vsc_count[$r]); while(strlen($CATcount)>10) {$CATcount = substr("$CATcount", 0, -1);} - $CATname = sprintf("%-30s", $vsc_name[$r]); while(strlen($CATname)>30) {$CATname = substr("$CATname", 0, -1);} + if ($vsc_id[$r] != 'UNDEFINED') + { + $TOTCATcalls = ($TOTCATcalls + $vsc_count[$r]); + $category = sprintf("%-20s", $vsc_id[$r]); while(strlen($category)>20) {$category = substr("$category", 0, -1);} + $CATcount = sprintf("%10s", $vsc_count[$r]); while(strlen($CATcount)>10) {$CATcount = substr("$CATcount", 0, -1);} + $CATname = sprintf("%-30s", $vsc_name[$r]); while(strlen($CATname)>30) {$CATname = substr("$CATname", 0, -1);} - echo "| $category | $CATcount | $CATname |\n"; + echo "| $category | $CATcount | $CATname |\n"; + } $r++; } diff --git a/www/vicidial/AST_VDADstats.php b/www/vicidial/AST_VDADstats.php index 24d31be5..10c08651 100644 --- a/www/vicidial/AST_VDADstats.php +++ b/www/vicidial/AST_VDADstats.php @@ -552,7 +552,7 @@ echo "+------------------------------------------------------+------------+----- ######### STATUS CATEGORY STATS echo "\n"; -echo "---------- STATUS CATEGORY STATS\n"; +echo "---------- CUSTOM STATUS CATEGORY STATS\n"; echo "+----------------------+------------+--------------------------------+\n"; echo "| CATEGORY | CALLS | DESCRIPTION |\n"; echo "+----------------------+------------+--------------------------------+\n"; @@ -562,13 +562,15 @@ $TOTCATcalls=0; $r=0; while ($r < $statcats_to_print) { - $TOTCATcalls = ($TOTCATcalls + $vsc_count[$r]); - $category = sprintf("%-20s", $vsc_id[$r]); while(strlen($category)>20) {$category = substr("$category", 0, -1);} - $CATcount = sprintf("%10s", $vsc_count[$r]); while(strlen($CATcount)>10) {$CATcount = substr("$CATcount", 0, -1);} - $CATname = sprintf("%-30s", $vsc_name[$r]); while(strlen($CATname)>30) {$CATname = substr("$CATname", 0, -1);} - - echo "| $category | $CATcount | $CATname |\n"; + if ($vsc_id[$r] != 'UNDEFINED') + { + $TOTCATcalls = ($TOTCATcalls + $vsc_count[$r]); + $category = sprintf("%-20s", $vsc_id[$r]); while(strlen($category)>20) {$category = substr("$category", 0, -1);} + $CATcount = sprintf("%10s", $vsc_count[$r]); while(strlen($CATcount)>10) {$CATcount = substr("$CATcount", 0, -1);} + $CATname = sprintf("%-30s", $vsc_name[$r]); while(strlen($CATname)>30) {$CATname = substr("$CATname", 0, -1);} + echo "| $category | $CATcount | $CATname |\n"; + } $r++; }