Changeset 1005
- Timestamp:
- 09/13/08 15:01:09 (4 months ago)
- Files:
-
- trunk/agent/Public/call-comp.php (modified) (3 diffs)
- trunk/agent/Public/call-count-reporting.php (modified) (11 diffs)
- trunk/agent/Public/call-daily-load.php (modified) (2 diffs)
- trunk/agent/Public/call-last-month.php (modified) (4 diffs)
- trunk/agent/Public/call-log-customers.php (modified) (9 diffs)
- trunk/agent/Public/card-history.php (modified) (2 diffs)
- trunk/agent/Public/graph_statbar.php (modified) (1 diff)
- trunk/agent/Public/graph_stat.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/agent/Public/call-comp.php
r778 r1005 5 5 6 6 7 if (! has_rights (ACX_CALL_REPORT)) {7 if (! has_rights (ACX_CALL_REPORT)) { 8 8 Header ("HTTP/1.0 401 Unauthorized"); 9 9 Header ("Location: PP_error.php?c=accessdenied"); … … 70 70 71 71 $FG_TABLE_COL[]=array (gettext("CardUsed"), "username", "11%", "center", "SORT", "", "30", "", "", "", "", "linktocustomer"); 72 $FG_TABLE_COL[]=array (gettext("terminatecause "), "terminatecause", "10%", "center", "SORT", "30");72 $FG_TABLE_COL[]=array (gettext("terminatecauseid"), "terminatecauseid", "10%", "center", "SORT", "30"); 73 73 $FG_TABLE_COL[]=array (gettext("IAX/SIP"), "sipiax", "6%", "center", "SORT", "", "list", $yesno); 74 74 //$FG_TABLE_COL[]=array ("DestID", "destID", "12%", "center", "SORT", "30"); … … 91 91 // This Variable store the argument for the SQL query 92 92 93 $FG_COL_QUERY='t1.starttime, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t1.terminatecause , t1.sipiax, t1.calledrate, t1.sessionbill';93 $FG_COL_QUERY='t1.starttime, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t1.terminatecauseid, t1.sipiax, t1.calledrate, t1.sessionbill'; 94 94 // t1.stoptime, 95 95 trunk/agent/Public/call-count-reporting.php
r778 r1005 4 4 include ("../lib/agent.smarty.php"); 5 5 6 if (! has_rights (ACX_CALL_REPORT)) {6 if (! has_rights (ACX_CALL_REPORT)) { 7 7 Header ("HTTP/1.0 401 Unauthorized"); 8 8 Header ("Location: PP_error.php?c=accessdenied"); … … 10 10 } 11 11 12 getpost_ifset(array('inputtopvar','topsearch', 'posted', 'Period', 'frommonth', 'fromstatsmonth', 'tomonth', 'tostatsmonth', 'fromday', 'fromstatsday_sday', 'fromstatsmonth_sday', 'today', 'tostatsday_sday', 'tostatsmonth_sday', 'resulttype', 'stitle', 'atmenu', 'current_page', 'order', 'sens', 'choose_currency', 'terminatecause ', 'nodisplay','grouped'));12 getpost_ifset(array('inputtopvar','topsearch', 'posted', 'Period', 'frommonth', 'fromstatsmonth', 'tomonth', 'tostatsmonth', 'fromday', 'fromstatsday_sday', 'fromstatsmonth_sday', 'today', 'tostatsday_sday', 'tostatsmonth_sday', 'resulttype', 'stitle', 'atmenu', 'current_page', 'order', 'sens', 'choose_currency', 'terminatecauseid', 'nodisplay','grouped')); 13 13 14 14 //var $field=array(); … … 71 71 $FG_TABLE_COL[]=array (gettext("Sell"), "cost", "25%", "center","sort","","","","","","","display_2bill"); 72 72 if ($grouped) $FG_TABLE_COL[]=array (gettext("Calldate"), "day", "10%", "center", "SORT", "19", "", "", "", "", "", "display_dateformat"); 73 $FG_TABLE_COL[]=array (gettext("terminatecause "), "terminatecause", "10%", "center", "SORT", "30");73 $FG_TABLE_COL[]=array (gettext("terminatecauseid"), "terminatecauseid", "10%", "center", "SORT", "30"); 74 74 75 75 if ((isset($inputtopvar)) && ($inputtopvar!="") && (isset($topsearch)) && ($topsearch!="")){ … … 78 78 79 79 if ($grouped){ 80 $FG_COL_QUERY=$field[1].', sum(sessiontime) AS calltime, sum(sessionbill) as cost, sum(buycost) as buy,substring(starttime,1,10) AS day,terminatecause , count(*) as nbcall';81 $SQL_GROUP="GROUP BY ".$field[1].",day,terminatecause ";80 $FG_COL_QUERY=$field[1].', sum(sessiontime) AS calltime, sum(sessionbill) as cost, sum(buycost) as buy,substring(starttime,1,10) AS day,terminatecauseid, count(*) as nbcall'; 81 $SQL_GROUP="GROUP BY ".$field[1].",day,terminatecauseid "; 82 82 }else{ 83 $FG_COL_QUERY=$field[1].', sum(sessiontime) AS calltime, sum(sessionbill) as cost, sum(buycost) as buy,terminatecause , count(*) as nbcall';84 $SQL_GROUP="GROUP BY ".$field[1].",terminatecause ";83 $FG_COL_QUERY=$field[1].', sum(sessiontime) AS calltime, sum(sessionbill) as cost, sum(buycost) as buy,terminatecauseid, count(*) as nbcall'; 84 $SQL_GROUP="GROUP BY ".$field[1].",terminatecauseid "; 85 85 } 86 86 … … 144 144 145 145 146 //To select just terminatecause =ANSWER147 if (!isset($terminatecause )){148 $terminatecause ="ANSWER";149 } 150 if ($terminatecause =="ANSWER") {146 //To select just terminatecauseid=ANSWER 147 if (!isset($terminatecauseid)){ 148 $terminatecauseid="ANSWER"; 149 } 150 if ($terminatecauseid=="ANSWER") { 151 151 if (strlen($FG_TABLE_CLAUSE)>0) $FG_TABLE_CLAUSE.=" AND "; 152 $FG_TABLE_CLAUSE.=" (terminatecause ='ANSWER' OR terminatecause='ANSWERED') ";152 $FG_TABLE_CLAUSE.=" (terminatecauseid=1) "; 153 153 } 154 154 … … 161 161 if ((isset($inputtopvar)) && ($inputtopvar!="") && (isset($topsearch)) && ($topsearch!="")){ 162 162 if ($grouped){ 163 $FG_COL_QUERY1=$field[1].', sum(sessiontime) AS sessiontime, sum(sessionbill) as sessionbill, sum(buycost) as buycost,substring(starttime,1,10) AS starttime,terminatecause , count(*) as nbcall';164 $SQL_GROUP1=" GROUP BY $field[1],starttime,terminatecause ";163 $FG_COL_QUERY1=$field[1].', sum(sessiontime) AS sessiontime, sum(sessionbill) as sessionbill, sum(buycost) as buycost,substring(starttime,1,10) AS starttime,terminatecauseid, count(*) as nbcall'; 164 $SQL_GROUP1=" GROUP BY $field[1],starttime,terminatecauseid"; 165 165 }else{ 166 $FG_COL_QUERY1=$field[1].', sum(sessiontime) AS sessiontime, sum(sessionbill) as sessionbill, sum(buycost) as buycost,terminatecause , count(*) as nbcall,starttime';167 $SQL_GROUP1=" GROUP BY $field[1],terminatecause ,starttime";166 $FG_COL_QUERY1=$field[1].', sum(sessiontime) AS sessiontime, sum(sessionbill) as sessionbill, sum(buycost) as buycost,terminatecauseid, count(*) as nbcall,starttime'; 167 $SQL_GROUP1=" GROUP BY $field[1],terminatecauseid,starttime"; 168 168 } 169 169 $QUERY = "CREATE TEMPORARY TABLE temp_result AS (SELECT $FG_COL_QUERY1 FROM $FG_TABLE_NAME WHERE $FG_TABLE_CLAUSE $SQL_GROUP1 ORDER BY nbcall DESC LIMIT $inputtopvar)"; … … 172 172 $FG_TABLE_NAME="temp_result"; 173 173 if ($grouped){ 174 $FG_COL_QUERY=$field[1].', sum(sessiontime) AS calltime, sum(sessionbill) as cost, sum(buycost) as buy,substring(starttime,1,10) AS day,terminatecause , nbcall';175 $SQL_GROUP=" GROUP BY ".$field[1].",day,terminatecause ,nbcall ";174 $FG_COL_QUERY=$field[1].', sum(sessiontime) AS calltime, sum(sessionbill) as cost, sum(buycost) as buy,substring(starttime,1,10) AS day,terminatecauseid, nbcall'; 175 $SQL_GROUP=" GROUP BY ".$field[1].",day,terminatecauseid,nbcall "; 176 176 $QUERY_TOTAL = "SELECT sum(sessiontime) AS calltime, sum(sessionbill) as cost, sum(buycost) as buy, sum(nbcall) as nbcall,substring(starttime,1,10) AS day FROM $FG_TABLE_NAME GROUP BY day"; 177 177 }else{ 178 $FG_COL_QUERY=$field[1].', sum(sessiontime) AS calltime, sum(sessionbill) as cost, sum(buycost) as buy,terminatecause , nbcall';179 $SQL_GROUP=" GROUP BY ".$field[1].",terminatecause ,nbcall ";178 $FG_COL_QUERY=$field[1].', sum(sessiontime) AS calltime, sum(sessionbill) as cost, sum(buycost) as buy,terminatecauseid, nbcall'; 179 $SQL_GROUP=" GROUP BY ".$field[1].",terminatecauseid,nbcall "; 180 180 $QUERY_TOTAL = "SELECT sum(sessiontime) AS calltime, sum(sessionbill) as cost, sum(buycost) as buy, sum(nbcall) as nbcall FROM $FG_TABLE_NAME"; 181 181 } … … 410 410 <td width="80%" class="fontstyle_searchoptions"> 411 411 <?php echo gettext("Answered Calls")?> 412 <input name="terminatecause " type="radio" value="ANSWER" <?php if((!isset($terminatecause))||($terminatecause=="ANSWER")){?>checked<?php }?> />412 <input name="terminatecauseid" type="radio" value="ANSWER" <?php if((!isset($terminatecauseid))||($terminatecauseid=="ANSWER")){?>checked<?php }?> /> 413 413 <?php echo gettext("All Calls")?> 414 <input name="terminatecause " type="radio" value="ALL" <?php if($terminatecause=="ALL"){?>checked<?php }?>/>414 <input name="terminatecauseid" type="radio" value="ALL" <?php if($terminatecauseid=="ALL"){?>checked<?php }?>/> 415 415 </td> 416 416 </tr> … … 518 518 <?php if (strtoupper($FG_TABLE_COL[$i][4])=="SORT"){?> 519 519 <a href="<?php echo $PHP_SELF."?s=1&t=0&stitle=$stitle&atmenu=$atmenu¤t_page=$current_page&order=".$FG_TABLE_COL[$i][1]."&sens="; if ($sens=="ASC"){echo"DESC";}else{echo"ASC";} 520 echo "&topsearch=$topsearch&inputtopvar=$inputtopvar&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&resulttype=$resulttype&terminatecause =$terminatecause&grouped=$grouped";?>">520 echo "&topsearch=$topsearch&inputtopvar=$inputtopvar&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&resulttype=$resulttype&terminatecauseid=$terminatecauseid&grouped=$grouped";?>"> 521 521 <span class="liens"><?php } ?> 522 522 <?php echo $FG_TABLE_COL[$i][0]?> … … 610 610 <?php if ($current_page>0){?> 611 611 <img src="<?php echo Images_Path;?>/fleche-g.gif" width="5" height="10"> <a href="<?php echo $PHP_SELF?>?s=1&t=0&order=<?php echo $order?>&sens=<?php echo $sens?>¤t_page=<?php echo ($current_page-1)?><?php if (!is_null($letter) && ($letter!="")){ echo "&letter=$letter";} 612 echo "&topsearch=$topsearch&inputtopvar=$inputtopvar&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&resulttype=$resulttype&terminatecause =$terminatecause&grouped=$grouped";?>">612 echo "&topsearch=$topsearch&inputtopvar=$inputtopvar&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&resulttype=$resulttype&terminatecauseid=$terminatecauseid&grouped=$grouped";?>"> 613 613 <?php echo gettext("Previous");?> </a> - 614 614 <?php }?> … … 616 616 <?php if ($current_page<$nb_record_max-1){?> 617 617 - <a href="<?php echo $PHP_SELF?>?s=1&t=0&order=<?php echo $order?>&sens=<?php echo $sens?>¤t_page=<?php echo ($current_page+1)?><?php if (!is_null($letter) && ($letter!="")){ echo "&letter=$letter";} 618 echo "&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&clidtype=$clidtype&resulttype=$resulttype&clid=$clid&terminatecause =$terminatecause&topsearch=$topsearch&inputtopvar=$inputtopvar&grouped=$grouped";?>">618 echo "&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&clidtype=$clidtype&resulttype=$resulttype&clid=$clid&terminatecauseid=$terminatecauseid&topsearch=$topsearch&inputtopvar=$inputtopvar&grouped=$grouped";?>"> 619 619 <?php echo gettext("Next");?></a> <img src="<?php echo Images_Path;?>/fleche-d.gif" width="5" height="10"> 620 620 </B></TD></SPAN> trunk/agent/Public/call-daily-load.php
r778 r1005 72 72 73 73 $FG_TABLE_COL[]=array (gettext("CardUsed"), "username", "11%", "center", "SORT", "", "30", "", "", "", "", "linktocustomer"); 74 $FG_TABLE_COL[]=array (gettext("terminatecause "), "terminatecause", "10%", "center", "SORT", "30");74 $FG_TABLE_COL[]=array (gettext("terminatecauseid"), "terminatecauseid", "10%", "center", "SORT", "30"); 75 75 $FG_TABLE_COL[]=array (gettext("IAX/SIP"), "sipiax", "6%", "center", "SORT", "", "list", $yesno); 76 76 //$FG_TABLE_COL[]=array ("DestID", "destID", "12%", "center", "SORT", "30"); … … 93 93 // This Variable store the argument for the SQL query 94 94 95 $FG_COL_QUERY='t1.starttime, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t1.terminatecause , t1.sipiax, t1.calledrate, t1.sessionbill';95 $FG_COL_QUERY='t1.starttime, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t1.terminatecauseid, t1.sipiax, t1.calledrate, t1.sessionbill'; 96 96 // t1.stoptime, 97 97 trunk/agent/Public/call-last-month.php
r857 r1005 4 4 include ("../lib/agent.smarty.php"); 5 5 6 if (! has_rights (ACX_CALL_REPORT)) {6 if (! has_rights (ACX_CALL_REPORT)) { 7 7 Header ("HTTP/1.0 401 Unauthorized"); 8 8 Header ("Location: PP_error.php?c=accessdenied"); … … 15 15 // graphtype = 1, 2, 3 , 4 16 16 // 1 : traffic - 2 : Profit - 3 : Sells - 4 : Buys 17 if (!isset ($current_page) || ($current_page == "")) {17 if (!isset ($current_page) || ($current_page == "")) { 18 18 $current_page=0; 19 19 } … … 45 45 $FG_TABLE_COL[]=array (gettext("Duration"), "sessiontime", "7%", "center", "SORT", "30", "", "", "", "", "", "display_minute"); 46 46 $FG_TABLE_COL[]=array (gettext("CardUsed"), "username", "11%", "center", "SORT", "", "30", "", "", "", "", "linktocustomer"); 47 $FG_TABLE_COL[]=array (gettext("terminatecause "), "terminatecause", "10%", "center", "SORT", "30");47 $FG_TABLE_COL[]=array (gettext("terminatecauseid"), "terminatecauseid", "10%", "center", "SORT", "30"); 48 48 $FG_TABLE_COL[]=array (gettext("IAX/SIP"), "sipiax", "6%", "center", "SORT", "", "list", $yesno); 49 49 $FG_TABLE_COL[]=array (gettext("InitialRate"), "calledrate", "10%", "center", "SORT", "30", "", "", "", "", "", "display_2dec"); … … 53 53 $FG_TABLE_DEFAULT_SENS = "DESC"; 54 54 55 $FG_COL_QUERY='t1.starttime, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t1.terminatecause , t1.sipiax, t1.calledrate, t1.sessionbill';55 $FG_COL_QUERY='t1.starttime, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t1.terminatecauseid, t1.sipiax, t1.calledrate, t1.sessionbill'; 56 56 57 57 $FG_COL_QUERY_GRAPH='t1.starttime, t1.sessiontime'; trunk/agent/Public/call-log-customers.php
r822 r1005 11 11 } 12 12 13 getpost_ifset(array('customer', 'entercustomer', 'enterprovider', 'entertariffgroup', 'entertrunk', 'enterratecard', 'posted', 'Period', 'frommonth', 'fromstatsmonth', 'tomonth', 'tostatsmonth', 'fromday', 'fromstatsday_sday', 'fromstatsmonth_sday', 'today', 'tostatsday_sday', 'tostatsmonth_sday', 'dsttype', 'srctype', 'clidtype', 'channel', 'resulttype', 'stitle', 'atmenu', 'current_page', 'order', 'sens', 'dst', 'src', 'clid', 'choose_currency', 'terminatecause ', 'choose_calltype'));13 getpost_ifset(array('customer', 'entercustomer', 'enterprovider', 'entertariffgroup', 'entertrunk', 'enterratecard', 'posted', 'Period', 'frommonth', 'fromstatsmonth', 'tomonth', 'tostatsmonth', 'fromday', 'fromstatsday_sday', 'fromstatsmonth_sday', 'today', 'tostatsday_sday', 'tostatsmonth_sday', 'dsttype', 'srctype', 'clidtype', 'channel', 'resulttype', 'stitle', 'atmenu', 'current_page', 'order', 'sens', 'dst', 'src', 'clid', 'choose_currency', 'terminatecauseid', 'choose_calltype')); 14 14 15 15 … … 78 78 $FG_TABLE_COL[]=array (gettext("CardUsed"), "username", "6%", "center", "SORT", "", "30", "", "", "", "", "linktocustomer"); 79 79 $FG_TABLE_COL[]=array (gettext("Trunk"), "trunkcode", "6%", "center", "SORT", "30"); 80 $FG_TABLE_COL[]=array ('<acronym title="'.gettext("Terminate Cause").'">'.gettext("TC").'</acronym>', "terminatecause ", "7%", "center", "SORT", "30");80 $FG_TABLE_COL[]=array ('<acronym title="'.gettext("Terminate Cause").'">'.gettext("TC").'</acronym>', "terminatecauseid", "7%", "center", "SORT", "30"); 81 81 $FG_TABLE_COL[]=array (gettext("Calltype"), "sipiax", "6%", "center", "SORT", "", "list", $list_calltype); 82 82 $FG_TABLE_COL[]=array (gettext("Buy"), "buycost", "8%", "center", "SORT", "30", "", "", "", "", "", "display_2bill"); … … 93 93 94 94 // This Variable store the argument for the SQL query 95 $FG_COL_QUERY='t1.starttime, t1.src, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t3.trunkcode, t1.terminatecause , t1.sipiax, t1.buycost, t1.sessionbill, case when t1.sessionbill!=0 then ((t1.sessionbill-t1.buycost)/t1.sessionbill)*100 else NULL end as margin,case when t1.buycost!=0 then ((t1.sessionbill-t1.buycost)/t1.buycost)*100 else NULL end as markup';95 $FG_COL_QUERY='t1.starttime, t1.src, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t3.trunkcode, t1.terminatecauseid, t1.sipiax, t1.buycost, t1.sessionbill, case when t1.sessionbill!=0 then ((t1.sessionbill-t1.buycost)/t1.sessionbill)*100 else NULL end as margin,case when t1.buycost!=0 then ((t1.sessionbill-t1.buycost)/t1.buycost)*100 else NULL end as markup'; 96 96 if (LINK_AUDIO_FILE) { 97 97 $FG_COL_QUERY .= ', t1.uniqueid'; … … 207 207 208 208 $FG_ASR_CIC_CLAUSE = $FG_TABLE_CLAUSE; 209 //To select just terminatecause =ANSWER210 if (!isset($terminatecause )) {211 $terminatecause ="ANSWER";212 } 213 if ($terminatecause =="ANSWER") {209 //To select just terminatecauseid=ANSWER 210 if (!isset($terminatecauseid)) { 211 $terminatecauseid="ANSWER"; 212 } 213 if ($terminatecauseid=="ANSWER") { 214 214 if (strlen($FG_TABLE_CLAUSE)>0) $FG_TABLE_CLAUSE.=" AND "; 215 $FG_TABLE_CLAUSE .= " (t1.terminatecause ='ANSWER' OR t1.terminatecause='ANSWERED') ";215 $FG_TABLE_CLAUSE .= " (t1.terminatecauseid=1) "; 216 216 } 217 217 … … 245 245 246 246 247 //************************************************************/248 // calculate nbr of success calls,nbr fail calls, max nbr of fail calls successfally /249 //************************************************************/250 251 $QUERY="CREATE TEMPORARY TABLE ASR_CIC_TEMP AS (SELECT substring(t1.starttime,1,10) AS day,case when t1.terminatecause='ANSWER' then 1 else 0 end as success,case when t1.terminatecause ='ANSWER' OR t1.terminatecause='ANSWERED' then 0 else 1 end as fail,0 as maxfail FROM $FG_TABLE_NAME WHERE ".$FG_TABLE_CLAUSE." ORDER BY day)";252 $max_fail=0;253 $max=0;254 $total_fail_succ=0;255 $total_max_succ=0;256 $update=array();257 if (!$nodisplay){258 $num = 0;259 $res = $DBHandle -> Execute($QUERY);260 $QUERY="SELECT * FROM ASR_CIC_TEMP order by day";261 $res = $DBHandle -> Execute($QUERY);262 if ($res)263 $num = $res -> RecordCount();264 $pos=0;265 for($i=0;$i<$num;$i++)266 {267 $asr_cic_list [] =$res -> fetchRow();268 if ($i>0)269 {270 if ($asr_cic_list[$i][0] == $asr_cic_list[$i-1][0] && $i<$num-1 && $asr_cic_list[$i][2]==1) {271 $max++;272 }else {273 if (($i==$num-1) && ($asr_cic_list[$i][2]==1)) $max++;274 if ($max > $max_fail) {275 $max_fail=$max;276 $asr_cic_list1[$pos][3]=$max_fail;277 $max=0;278 }279 if($asr_cic_list[$i][0] != $asr_cic_list[$i-1][0]){280 $pos++;281 $success=0;282 $fail=0;283 $max_fail=0;284 }285 }286 287 }elseif($asr_cic_list[$i][2]==1){288 $max++;289 }290 $success+=$asr_cic_list[$i][1];291 $fail+=$asr_cic_list[$i][2];292 $asr_cic_list1[$pos][0] = $asr_cic_list[$i][0];293 $asr_cic_list1[$pos][1] = $success;294 $asr_cic_list1[$pos][2] = $fail;295 296 if ($asr_cic_list[$i][2]==1){297 $total_fail_succ++;298 }elseif($total_fail_succ > $total_max_succ){299 $total_max_succ=$total_fail_succ;300 $total_fail_succ=0;301 }302 }303 }304 247 305 248 /************************/ … … 578 521 <td width="80%" class="fontstyle_searchoptions"> 579 522 <?php echo gettext("Answered Calls");?> 580 <input name="terminatecause " type="radio" value="ANSWER" <?php if((!isset($terminatecause))||($terminatecause=="ANSWER")){?>checked<?php }?> />523 <input name="terminatecauseid" type="radio" value="ANSWER" <?php if((!isset($terminatecauseid))||($terminatecauseid=="ANSWER")){?>checked<?php }?> /> 581 524 <?php echo gettext("All Calls");?> 582 <input name="terminatecause " type="radio" value="ALL" <?php if($terminatecause=="ALL"){?>checked<?php }?>/>525 <input name="terminatecauseid" type="radio" value="ALL" <?php if($terminatecauseid=="ALL"){?>checked<?php }?>/> 583 526 </td> 584 527 </tr> … … 657 600 <?php if (strtoupper($FG_TABLE_COL[$i][4])=="SORT"){?> 658 601 <a href="<?php echo $PHP_SELF."?customer=$customer&s=1&t=0&stitle=$stitle&atmenu=$atmenu¤t_page=$current_page&order=".$FG_TABLE_COL[$i][1]."&sens="; if ($sens=="ASC"){echo"DESC";}else{echo"ASC";} 659 echo "&entercustomer=$entercustomer&enterprovider=$enterprovider&entertrunk=$entertrunk&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&dsttype=$dsttype&srctype=$srctype&clidtype=$clidtype&channel=$channel&resulttype=$resulttype&dst=$dst&src=$src&clid=$clid&terminatecause =$terminatecause&choose_calltype=$choose_calltype";?>">602 echo "&entercustomer=$entercustomer&enterprovider=$enterprovider&entertrunk=$entertrunk&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&dsttype=$dsttype&srctype=$srctype&clidtype=$clidtype&channel=$channel&resulttype=$resulttype&dst=$dst&src=$src&clid=$clid&terminatecauseid=$terminatecauseid&choose_calltype=$choose_calltype";?>"> 660 603 <span class="liens"><?php } ?> 661 604 <?php echo $FG_TABLE_COL[$i][0]?> … … 778 721 <?php if ($current_page>0){?> 779 722 <img src="<?php echo Images_Path;?>/fleche-g.gif" width="5" height="10"> <a href="<?php echo $PHP_SELF?>?s=1&t=0&order=<?php echo $order?>&sens=<?php echo $sens?>¤t_page=<?php echo ($current_page-1)?><?php if (!is_null($letter) && ($letter!="")){ echo "&letter=$letter";} 780 echo "&customer=$customer&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&dsttype=$dsttype&srctype=$srctype&clidtype=$clidtype&channel=$channel&resulttype=$resulttype&dst=$dst&src=$src&clid=$clid&terminatecause =$terminatecause&choose_calltype=$choose_calltype&entercustomer=$entercustomer&enterprovider=$enterprovider&entertrunk=$entertrunk";?>">723 echo "&customer=$customer&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&dsttype=$dsttype&srctype=$srctype&clidtype=$clidtype&channel=$channel&resulttype=$resulttype&dst=$dst&src=$src&clid=$clid&terminatecauseid=$terminatecauseid&choose_calltype=$choose_calltype&entercustomer=$entercustomer&enterprovider=$enterprovider&entertrunk=$entertrunk";?>"> 781 724 <?php echo gettext("Previous");?> </a> - 782 725 <?php }?> … … 784 727 <?php if ($current_page<$nb_record_max-1){?> 785 728 - <a href="<?php echo $PHP_SELF?>?s=1&t=0&order=<?php echo $order?>&sens=<?php echo $sens?>¤t_page=<?php echo ($current_page+1)?><?php if (!is_null($letter) && ($letter!="")){ echo "&letter=$letter";} 786 echo "&customer=$customer&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&dsttype=$dsttype&srctype=$srctype&clidtype=$clidtype&channel=$channel&resulttype=$resulttype&dst=$dst&src=$src&clid=$clid&terminatecause =$terminatecause&choose_calltype=$choose_calltype&entercustomer=$entercustomer&enterprovider=$enterprovider&entertrunk=$entertrunk";?>">729 echo "&customer=$customer&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&dsttype=$dsttype&srctype=$srctype&clidtype=$clidtype&channel=$channel&resulttype=$resulttype&dst=$dst&src=$src&clid=$clid&terminatecauseid=$terminatecauseid&choose_calltype=$choose_calltype&entercustomer=$entercustomer&enterprovider=$enterprovider&entertrunk=$entertrunk";?>"> 787 730 <?php echo gettext("Next");?></a> <img src="<?php echo Images_Path;?>/fleche-d.gif" width="5" height="10"> 788 731 </SPAN> trunk/agent/Public/card-history.php
r822 r1005 4 4 include ("../lib/agent.smarty.php"); 5 5 6 if (! has_rights (ACX_CALL_REPORT)){ 6 7 if (! has_rights (ACX_CALL_REPORT)) { 7 8 Header ("HTTP/1.0 401 Unauthorized"); 8 9 Header ("Location: PP_error.php?c=accessdenied"); 9 10 die(); 10 11 } 11 12 13 12 14 13 … … 158 157 <!-- ** ** ** ** ** Part for the research ** ** ** ** ** --> 159 158 <center> 160 <FORM METHOD=POST ACTION="<?php echo $PHP_SELF?>?s=1&t=0&order=<?php echo $order?>&sens=<?php echo $sens?>¤t_page=<?php echo $current_page?>&terminatecause =<?php echo $terminatecause?>">159 <FORM METHOD=POST ACTION="<?php echo $PHP_SELF?>?s=1&t=0&order=<?php echo $order?>&sens=<?php echo $sens?>¤t_page=<?php echo $current_page?>&terminatecauseid=<?php echo $terminatecauseid?>"> 161 160 <INPUT TYPE="hidden" NAME="posted" value=1> 162 161 <INPUT TYPE="hidden" NAME="current_page" value=0> trunk/agent/Public/graph_statbar.php
r778 r1005 52 52 53 53 $FG_TABLE_COL[]=array (gettext("CardUsed"), "username", "11%", "center", "SORT", "30"); 54 $FG_TABLE_COL[]=array (gettext("terminatecause "), "terminatecause", "10%", "center", "SORT", "30");54 $FG_TABLE_COL[]=array (gettext("terminatecauseid"), "terminatecauseid", "10%", "center", "SORT", "30"); 55 55 $FG_TABLE_COL[]=array (gettext("IAX/SIP"), "sipiax", "6%", "center", "SORT", "", "list", $yesno); 56 56 //$FG_TABLE_COL[]=array ("DestID", "destID", "12%", "center", "SORT", "30"); trunk/agent/Public/graph_stat.php
r778 r1005 6 6 7 7 8 if (! has_rights (ACX_CALL_REPORT)) {8 if (! has_rights (ACX_CALL_REPORT)) { 9 9 Header ("HTTP/1.0 401 Unauthorized"); 10 10 Header ("Location: PP_error.php?c=accessdenied"); … … 53 53 54 54 $FG_TABLE_COL[]=array (gettext("CardUsed"), "username", "11%", "center", "SORT", "30"); 55 $FG_TABLE_COL[]=array (gettext("terminatecause "), "terminatecause", "10%", "center", "SORT", "30");55 $FG_TABLE_COL[]=array (gettext("terminatecauseid"), "terminatecauseid", "10%", "center", "SORT", "30"); 56 56 $FG_TABLE_COL[]=array (gettext("IAX/SIP"), "sipiax", "6%", "center", "SORT", "", "list", $yesno); 57 57 //$FG_TABLE_COL[]=array ("DestID", "destID", "12%", "center", "SORT", "30"); … … 74 74 // This Variable store the argument for the SQL query 75 75 76 $FG_COL_QUERY='t1.starttime, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t1.terminatecause , t1.sipiax, t1.calledrate, t1.sessionbill';76 $FG_COL_QUERY='t1.starttime, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t1.terminatecauseid, t1.sipiax, t1.calledrate, t1.sessionbill'; 77 77 // t1.stoptime, 78 78 $FG_COL_QUERY_GRAPH='t1.starttime, t1.sessiontime, t1.sessionbill-t1.buycost as profit, t1.sessionbill, t1.buycost'; … … 93 93 94 94 95 if ( is_null ($order) || is_null($sens) ) {95 if ( is_null ($order) || is_null($sens) ) { 96 96 $order = $FG_TABLE_DEFAULT_ORDER; 97 97 $sens = $FG_TABLE_DEFAULT_SENS;
