call-daily-load.php
来自「asterisk用 的voip记费软件」· PHP 代码 · 共 562 行 · 第 1/2 页
PHP
562 行
<!-- ** ** ** ** ** Part for the research ** ** ** ** ** --> <center> <FORM METHOD=POST name="myForm" ACTION="<?php echo $PHP_SELF?>?s=<?php echo $s?>&t=<?php echo $t?>&order=<?php echo $order?>&sens=<?php echo $sens?>¤t_page=<?php echo $current_page?>"> <INPUT TYPE="hidden" NAME="posted" value=1> <table class="bar-status" width="80%" border="0" cellspacing="1" cellpadding="2" align="center"> <tbody> <tr> <td align="left" valign="top" class="bgcolor_004"> <font class="fontstyle_003"> <?php echo gettext("CUSTOMERS");?></font> </td> <td class="bgcolor_005" align="left"> <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> <td class="fontstyle_searchoptions"> <?php echo gettext("Enter the cardnumber");?>: <INPUT TYPE="text" NAME="entercustomer" value="<?php echo $entercustomer?>" class="form_input_text"> <a href="#" onclick="window.open('A2B_entity_card.php?popup_select=2&popup_formname=myForm&popup_fieldname=entercustomer' , 'CardNumberSelection','width=550,height=330,top=20,left=100,scrollbars=1');"><img src="<?php echo Images_Path;?>/icon_arrow_orange.gif"></a> </td> <td align="right" class="fontstyle_searchoptions"> <?php echo gettext("Provider");?>: <INPUT TYPE="text" NAME="enterprovider" value="<?php echo $enterprovider?>" size="4" class="form_input_text"> <a href="#" onclick="window.open('A2B_entity_provider.php?popup_select=2&popup_formname=myForm&popup_fieldname=enterprovider' , 'ProviderSelection','width=550,height=330,top=20,left=100,scrollbars=1');"><img src="<?php echo Images_Path;?>/icon_arrow_orange.gif"></a> <?php echo gettext("Trunk");?>: <INPUT TYPE="text" NAME="entertrunk" value="<?php echo $entertrunk?>" size="4" class="form_input_text"> <a href="#" onclick="window.open('A2B_entity_trunk.php?popup_select=2&popup_formname=myForm&popup_fieldname=entertrunk' , 'TrunkSelection','width=550,height=330,top=20,left=100,scrollbars=1');"><img src="<?php echo Images_Path;?>/icon_arrow_orange.gif"></a> </td> </tr></table></td> </tr> <tr> <td align="left" class="bgcolor_002"> <font class="fontstyle_003"> <?php echo gettext("SELECT DAY");?></font> </td> <td align="left" class="bgcolor_003"> <table width="100%" border="0" cellspacing="0" cellpadding="0" > <tr><td class="fontstyle_searchoptions"> <?php echo gettext("From");?> : <select name="fromstatsday_sday" class="form_input_select"> <?php for ($i=1;$i<=31;$i++){ if ($fromstatsday_sday==sprintf("%02d",$i)){$selected="selected";}else{$selected="";} echo '<option value="'.sprintf("%02d",$i)."\"$selected>".sprintf("%02d",$i).'</option>'; } ?> </select> <select name="fromstatsmonth_sday" class="form_input_select"> <?php $monthname = array( gettext("January"), gettext("February"),gettext("March"), gettext("April"), gettext("May"), gettext("June"), gettext("July"), gettext("August"), gettext("September"), gettext("October"), gettext("November"), gettext("December")); $year_actual = date("Y"); for ($i=$year_actual;$i >= $year_actual-1;$i--) { if ($year_actual==$i){ $monthnumber = date("n")-1; // Month number without lead 0. }else{ $monthnumber=11; } for ($j=$monthnumber;$j>=0;$j--){ $month_formated = sprintf("%02d",$j+1); if ($fromstatsmonth_sday=="$i-$month_formated") $selected="selected"; else $selected=""; echo "<OPTION value=\"$i-$month_formated\" $selected> $monthname[$j]-$i </option>"; } } ?> </select> </td></tr></table> </td> </tr> <tr> <td class="bgcolor_004" align="left" > <font class="fontstyle_003"> <?php echo gettext("DESTINATION");?></font> </td> <td class="bgcolor_005" align="left"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><td class="fontstyle_searchoptions"> <INPUT TYPE="text" NAME="dst" value="<?php echo $dst?>" class="form_input_text"></td> <td class="fontstyle_searchoptions" align="center"><input type="radio" NAME="dsttype" value="1" <?php if((!isset($dsttype))||($dsttype==1)){?>checked<?php }?>><?php echo gettext("Exact");?></td> <td class="fontstyle_searchoptions" align="center"><input type="radio" NAME="dsttype" value="2" <?php if($dsttype==2){?>checked<?php }?>><?php echo gettext("Begins with");?></td> <td class="fontstyle_searchoptions" align="center" ><input type="radio" NAME="dsttype" value="3" <?php if($dsttype==3){?>checked<?php }?>><?php echo gettext("Contains");?></td> <td class="fontstyle_searchoptions" align="center" ><input type="radio" NAME="dsttype" value="4" <?php if($dsttype==4){?>checked<?php }?>><?php echo gettext("Ends with");?></td> </tr></table></td> </tr> <tr> <td class="bgcolor_002" align="left"> </td> <td class="bgcolor_003" align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"> <input type="image" name="image16" align="top" border="0" src="<?php echo Images_Path;?>/button-search.gif" /> </td></tr></table> </td> </tr> </tbody></table> </FORM></center><!-- ** ** ** ** ** Part to display the GRAPHIC ** ** ** ** ** --><br><br><?php if (is_array($list) && count($list)>0){$table_graph=array();$table_graph_hours=array();$numm=0;foreach ($list_total as $recordset){ $numm++; $mydate= substr($recordset[0],0,10); $mydate_hours= substr($recordset[0],0,13); if (is_array($table_graph_hours[$mydate_hours])){ $table_graph_hours[$mydate_hours][0]++; $table_graph_hours[$mydate_hours][1]=$table_graph_hours[$mydate_hours][1]+$recordset[1]; }else{ $table_graph_hours[$mydate_hours][0]=1; $table_graph_hours[$mydate_hours][1]=$recordset[1]; } if (is_array($table_graph[$mydate])){ $table_graph[$mydate][0]++; $table_graph[$mydate][1]=$table_graph[$mydate][1]+$recordset[1]; }else{ $table_graph[$mydate][0]=1; $table_graph[$mydate][1]=$recordset[1]; }}$mmax=0;$totalcall==0;$totalminutes=0;foreach ($table_graph as $tkey => $data){ if ($mmax < $data[1]) $mmax=$data[1]; $totalcall+=$data[0]; $totalminutes+=$data[1];}?><!-- TITLE GLOBAL --><center> <table border="0" cellspacing="0" cellpadding="0" width="80%"><tbody><tr><td align="left" height="30"> <table cellspacing="0" cellpadding="1" bgcolor="#000000" width="50%"><tbody><tr><td> <table cellspacing="0" cellpadding="0" width="100%"><tbody> <tr><td class="bgcolor_019" align="left"><font class="fontstyle_003"><?php echo gettext("TOTAL");?></font></td></tr> </tbody></table> </td></tr></tbody></table> </td></tr></tbody></table> <!-- FIN TITLE GLOBAL MINUTES //--> <table border="0" cellspacing="0" cellpadding="0" width="80%"><tbody><tr><td bgcolor="#000000"> <table border="0" cellspacing="1" cellpadding="2" width="100%"><tbody> <tr> <td align="center" class="bgcolor_019"></td> <td class="bgcolor_020" align="center" colspan="4"><font class="fontstyle_003"><?php echo gettext("ASTERISK MINUTES");?></font></td> </tr> <tr class="bgcolor_019"> <td align="right" class="bgcolor_020"><font class="fontstyle_003"><?php echo gettext("DATE");?></font></td> <td align="center"><font class="fontstyle_003"><?php echo gettext("DURATION");?></font></td> <td align="center"><font class="fontstyle_003"><?php echo gettext("GRAPHIC");?></font></td> <td align="center"><font class="fontstyle_003"><?php echo gettext("CALLS");?></font></td> <td align="center"><font class="fontstyle_003"><acronym title="<?php echo gettext("Average Connection Time");?>"><?php echo gettext("ACT");?></acronym> </font></td> <!-- LOOP --> <?php $i=0; if ($FG_DEBUG == 3) print_r($table_graph); foreach ($table_graph as $tkey => $data){ $i=($i+1)%2; $tmc = $data[1]/$data[0]; $tmc_60 = sprintf("%02d",intval($tmc/60)).":".sprintf("%02d",intval($tmc%60)); $minutes_60 = sprintf("%02d",intval($data[1]/60)).":".sprintf("%02d",intval($data[1]%60)); if ((!$mmax) || (!$data[1])) $widthbar = 0; else $widthbar= intval(($data[1]/$mmax)*200); ?> </tr><tr> <td align="right" class="sidenav" nowrap="nowrap"><font class="fontstyle_006"><?php echo $tkey?></font></td> <td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php echo $minutes_60?> </font></td> <td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="left" nowrap="nowrap" width="<?php echo $widthbar+60?>"> <table cellspacing="0" cellpadding="0"><tbody><tr> <td bgcolor="#e22424"><img src="images/spacer.gif" width="<?php echo $widthbar?>" height="6"></td> </tr></tbody></table></td> <td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php echo $data[0]?></font></td> <td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php echo $tmc_60?> </font></td> <?php } $total_tmc_60 = sprintf("%02d",intval(($totalminutes/$totalcall)/60)).":".sprintf("%02d",intval(($totalminutes/$totalcall)%60)); $total_minutes_60 = sprintf("%02d",intval($totalminutes/60)).":".sprintf("%02d",intval($totalminutes%60)); ?> </tr> <!-- FIN DETAIL --> <!-- FIN BOUCLE --> <!-- TOTAL --> <tr class="bgcolor_019"> <td align="right" nowrap="nowrap"><font class="fontstyle_003"><?php echo gettext("TOTAL");?></font></td> <td align="center" nowrap="nowrap" colspan="2"><font class="fontstyle_003"><?php echo $total_minutes_60?></font></td> <td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php echo $totalcall?></font></td> <td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php echo $total_tmc_60?></font></td> </tr> <!-- FIN TOTAL --> </tbody></table> <!-- Fin Tableau Global //--></td></tr></tbody></table> <br> <IMG SRC="graph_statbar.php?min_call=<?php echo $min_call?>&fromstatsday_sday=<?php echo $fromstatsday_sday?>&days_compare=<?php echo $days_compare?>&fromstatsmonth_sday=<?php echo $fromstatsmonth_sday?>&dsttype=<?php echo $dsttype?>&srctype=<?php echo $srctype?>&clidtype=<?php echo $clidtype?>&channel=<?php echo $channel?>&resulttype=<?php echo $resulttype?>&dst=<?php echo $dst?>&src=<?php echo $src?>&clid=<?php echo $clid?>&userfieldtype=<?php echo $userfieldtype?>&userfield=<?php echo $userfield?>&accountcodetype=<?php echo $accountcodetype?>&accountcode=<?php echo $accountcode?>&customer=<?php echo $customer?>&entercustomer=<?php echo $entercustomer?>&enterprovider=<?php echo $enterprovider?>&entertrunk=<?php echo $entertrunk?>" ALT="Stat Graph"><!-- ** ** ** ** ** HOURLY LOAD ** ** ** ** ** --> <br/> <center><?php echo gettext("Select the hour interval to see the details");?> <FORM METHOD=POST ACTION="graph_hourdetail.php?posted=<?php echo $posted?>&min_call=<?php echo $min_call?>&fromstatsday_sday=<?php echo $fromstatsday_sday?>&days_compare=<?php echo $days_compare?>&fromstatsmonth_sday=<?php echo $fromstatsmonth_sday?>&dsttype=<?php echo $dsttype?>&srctype=<?php echo $srctype?>&clidtype=<?php echo $clidtype?>&channel=<?php echo $channel?>&resulttype=<?php echo $resulttype?>&dst=<?php echo $dst?>&src=<?php echo $src?>&clid=<?php echo $clid?>&userfieldtype=<?php echo $userfieldtype?>&userfield=<?php echo $userfield?>&accountcodetype=<?php echo $accountcodetype?>&accountcode=<?php echo $accountcode?>" target="superframe"> <!-- ** ** ** ** ** HOURLY LOAD ** ** ** ** ** --> <table class="bar-status" width="60%" border="0" cellspacing="1" cellpadding="2" align="center"> <tbody> <tr> <td align="left" class="bgcolor_004"> <font class="fontstyle_003"> <?php echo gettext("HOUR INTERVAL");?> :</font> </td> <td class="bgcolor_005" align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td> <select name="hourinterval" class="form_input_select"> <?php for ($i=0;$i<=23;$i++){ echo '<option value="'.sprintf("%02d",$i)."\"> Interval [".sprintf("%02d",$i).'h to '.sprintf("%02d",$i+1).'h] </option>'; } ?> </select> </td> </tr></table></td> </tr> <tr> <td align="left" class="bgcolor_002"> <font class="fontstyle_003"> <?php echo gettext("TYPE GRAPH");?> :</font> </td> <td class="bgcolor_003" align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td> <select name="typegraph" class="form_input_select"> <option value="fluctuation"><?php echo gettext("FLUCTUATION GRAPH");?></option> <option value="watch-call" selected> <?php echo gettext("WATCH CALLS GRAPH");?></option> </select> </td> </tr></table></td> </tr> <tr> <td class="bgcolor_004" align="left"> </td> <td class="bgcolor_003" align="center"> <input type="image" name="image16" align="top" border="0" src="<?php echo Images_Path;?>/button-search.gif" /> </td> </tr> </tbody></table> </FORM></center><br><center> <iframe name="superframe" src="graph_hourdetail.php?posted=<?php echo $posted?>&min_call=<?php echo $min_call?>&fromstatsday_sday=<?php echo $fromstatsday_sday?>&days_compare=<?php echo $days_compare?>&fromstatsmonth_sday=<?php echo $fromstatsmonth_sday?>&dsttype=<?php echo $dsttype?>&srctype=<?php echo $srctype?>&clidtype=<?php echo $clidtype?>&channel=<?php echo $channel?>&resulttype=<?php echo $resulttype?>&dst=<?php echo $dst?>&src=<?php echo $src?>&clid=<?php echo $clid?>&userfieldtype=<?php echo $userfieldtype?>&userfield=<?php echo $userfield?>&accountcodetype=<?php echo $accountcodetype?>&accountcode=<?php echo $accountcode?>&customer=<?php echo $customer?>&entercustomer=<?php echo $entercustomer?>&enterprovider=<?php echo $enterprovider?>&entertrunk=<?php echo $entertrunk?>" BGCOLOR=white width=770 height=800 marginWidth=0 marginHeight=0 frameBorder=0 scrolling=yes> </iframe></center></center><?php }else{ ?> <center><h3><?php echo gettext("No calls in your selection");?>.</h3></center><?php } ?><br><br><?php $smarty->display('footer.tpl');?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?