call-log-customers.php

来自「asterisk用 的voip记费软件」· PHP 代码 · 共 1,042 行 · 第 1/4 页

PHP
1,042
字号
						 }else{						 		echo stripslashes($record_display);						 }						 						 ?></TD>				 		 <?php  } ?>                  					</TR>				<?php					 }//foreach ($list as $recordset)					 if ($ligne_number < $FG_LIMITE_DISPLAY)  $ligne_number_end=$ligne_number +2;					 while ($ligne_number < $ligne_number_end){					 	$ligne_number++;				?>					<TR bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$ligne_number%2]?>"> 				  		<?php for($i=0;$i<$FG_NB_TABLE_COL;$i++){ 				 		 ?>                 		 <TD vAlign=top class=tableBody>&nbsp;</TD>				 		 <?php  } ?>                 		 <TD align="center" vAlign=top class=tableBodyRight>&nbsp;</TD>									</TR>													<?php					 					 } //END_WHILE					 				  }else{				  		echo gettext("No data found !!!");				  }//end_if				 ?>                <TR>                   <TD class=tableDivider colSpan=<?php echo $FG_TOTAL_TABLE_COL?>><IMG height=1                               src="<?php echo Images_Path;?>/clear.gif"                               width=1></TD>                </TR>                <TR>                   <TD class=tableDivider colSpan=<?php echo $FG_TOTAL_TABLE_COL?>><IMG height=1                               src="<?php echo Images_Path;?>/clear.gif"                               width=1></TD>                </TR>              </TBODY>            </TABLE></td>        </tr>        <TR bgcolor="#ffffff">           <TD  class="bgcolor_005" height=16 style="PADDING-LEFT: 5px; PADDING-RIGHT: 3px"> 			<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">              <TBODY>                <TR>                   <TD align="right"><SPAN  class="fontstyle_003" >                    <?php if ($current_page>0){?>                    <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?>&current_page=<?php  echo ($current_page-1)?><?php  if (!is_null($letter) && ($letter!="")){ echo "&letter=$letter";} 					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&entercustomer=$entercustomer&enterprovider=$enterprovider&entertrunk=$entertrunk";?>">                    <?php echo gettext("Previous");?> </a> -                    <?php }?>                    <?php echo ($current_page+1);?> / <?php  echo $nb_record_max;?>                    <?php if ($current_page<$nb_record_max-1){?>                    - <a href="<?php echo $PHP_SELF?>?s=1&t=0&order=<?php echo $order?>&sens=<?php echo $sens?>&current_page=<?php  echo ($current_page+1)?><?php  if (!is_null($letter) && ($letter!="")){ echo "&letter=$letter";}					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&entercustomer=$entercustomer&enterprovider=$enterprovider&entertrunk=$entertrunk";?>">                    <?php echo gettext("Next");?></a> <img src="<?php echo Images_Path;?>/fleche-d.gif" width="5" height="10">                    </SPAN>                     <?php }?>                  </TD>              </TBODY>            </TABLE></TD>        </TR>      </table><?php  if (is_array($list) && count($list)>0 && 3==4){ ?><!-- ************** TOTAL SECTION ************* -->			<br/>			<div style="padding-right: 15px;">			<table cellpadding="1" bgcolor="#000000" cellspacing="1" width="<?php if ($_SESSION["is_admin"]==1){ ?>450<?php }else{?>200<?php }?>" align="right">				<tbody>                <tr class="form_head">                   									   				   <td width="33%" align="center" class="tableBodyRight" bgcolor="#600101" style="padding: 5px;"><strong><?php echo gettext("TOTAL COSTS");?></strong></td>				   <?php if ($_SESSION["is_admin"]==1){ ?><td width="33%" align="center" class="tableBodyRight" bgcolor="#600101" style="padding: 5px;"><strong><?php echo gettext("TOTAL BUYCOSTS");?></strong></td><?php }?>				   <?php if ($_SESSION["is_admin"]==1){ ?><td width="33%" align="center" class="tableBodyRight" bgcolor="#600101" style="padding: 5px;"><strong><?php echo gettext("DIFFERENCE");?></strong></td><?php }?>                </tr>				<tr>				  <td valign="top" align="center" class="tableBody" bgcolor="white"><b><?php echo $total_cost[0][0]?></td>				  <?php if ($_SESSION["is_admin"]==1){ ?><td valign="top" align="center" class="tableBody" bgcolor="#66FF66"><b><?php echo $total_cost[0][1]?></td><?php }?>				  <?php if ($_SESSION["is_admin"]==1){ ?><td valign="top" align="center" class="tableBody" bgcolor="#FF6666"><b><?php echo $total_cost[0][0]-$total_cost[0][1]?></td><?php }?>				</tr>			</table>			</div>			<br/><br/>					<!-- ************** TOTAL SECTION ************* --><?php  } ?><!-- ** ** ** ** ** Part to display the GRAPHIC ** ** ** ** ** --><br><?php if (is_array($list_total_day) && count($list_total_day)>0){$mmax=0;$totalcall==0;$totalminutes=0;$totalsuccess=0;$totalfail=0;foreach ($list_total_day as $data){		if ($mmax < $data[1]) $mmax=$data[1];	$totalcall+=$data[3];	$totalminutes+=$data[1];	$totalcost+=$data[2];	$totalbuycost+=$data[4];}$max_fail=0;foreach ($asr_cic_list1 as $asr_cic_data){		$totalsuccess+=$asr_cic_data[1];	$totalfail+=$asr_cic_data[2];}?><!-- 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("SUMMARY");?></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="95%"><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="13"><font class="fontstyle_003"><?php echo gettext("CALLING CARD MINUTES");?></font></td>    </tr>	<tr class="bgcolor_019">		<td align="center" class="bgcolor_020"><font class="fontstyle_003"><?php echo gettext("DATE");?></font></td>        <td align="center"><font class="fontstyle_003"><acronym title="<?php echo gettext("DURATION");?>"><?php echo gettext("DUR");?></acronym></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 LENGTH OF CALL");?>"><?php echo gettext("ALOC");?></acronym></font></td>		<td align="center"><font class="fontstyle_003"><acronym title="<?php echo gettext("ANSWER SEIZE RATIO");?>"><?php echo gettext("ASR");?></acronym></font></td>		<td align="center"><font class="fontstyle_003"><acronym title="<?php echo gettext("NUMBER OF FAIL CALLS");?>"><?php echo gettext("FAIL");?></acronym></font></td>		<td align="center"><font class="fontstyle_003"><acronym title="<?php echo gettext("MAX OF NUMBER FAIL CALLS SUCCESSIVELY");?>"><?php echo gettext("MFCS");?></acronym></font></td>		<td align="center"><font class="fontstyle_003"><acronym title="<?php echo gettext("RATE OF FAIL");?>"><?php echo gettext("ROF");?></acronym></font></td>		<td align="center"><font class="fontstyle_003"><?php echo gettext("SELL");?></font></td>		<td align="center"><font class="fontstyle_003"><?php echo gettext("BUY");?></font></td>		<td align="center"><font class="fontstyle_003"><?php echo gettext("PROFIT");?></font></td>		<td align="center"><font class="fontstyle_003"><?php echo gettext("MARGIN");?></font></td>		<td align="center"><font class="fontstyle_003"><?php echo gettext("MARKUP");?></font></td>                					<!-- LOOP -->	<?php  				$i=0;		$j=0;		foreach ($list_total_day as $data){		$i=($i+1)%2;				$tmc = $data[1]/$data[3];				if ((!isset($resulttype)) || ($resulttype=="min")){  			$tmc = sprintf("%02d",intval($tmc/60)).":".sprintf("%02d",intval($tmc%60));				}else{					$tmc =intval($tmc);		}				if ((!isset($resulttype)) || ($resulttype=="min")){  				$minutes = sprintf("%02d",intval($data[1]/60)).":".sprintf("%02d",intval($data[1]%60));		}else{				$minutes = $data[1];		}		if ($mmax>0) 	$widthbar= intval(($data[1]/$mmax)*150); 	?>		</tr><tr>		<td align="right" class="sidenav" nowrap="nowrap"><font class="fontstyle_003"><?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 $minutes?> </font></td>        <td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="left" nowrap="nowrap" width="<?php echo $widthbar+40?>">        <table cellspacing="0" cellpadding="0"><tbody><tr>        <td bgcolor="#e22424"><img src="<?php echo Images_Path;?>/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[3]?></font></td>        <td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php echo $tmc?> </font></td>        <td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php display_2dec ($asr_cic_list1[$j][1]/($data[3]))?> </font></td>        <td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php echo $asr_cic_list1[$j][2]?> </font></td>	<td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php echo $asr_cic_list1[$j][3]?> </font></td>	<td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php display_2dec_percentage(($asr_cic_list1[$j][2]/($data[3]))*100)?> </font></td>		<!-- SELL -->		<td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php  		display_2bill($data[2]) 		?>		</font></td>		<!-- BUY -->		<td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php  		display_2bill($data[4]) 		?>		</font></td>		<!-- PROFIT -->		<td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php  		display_2bill($data[2]-$data[4]) 		?>		</font></td>		<td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php  		if ($data[2]!=0){ display_2dec_percentage((($data[2]-$data[4])/$data[2])*100); }else{ echo "NULL";} 		?>		</font></td>		<td bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$i]?>" align="right" nowrap="nowrap"><font class="fontstyle_006"><?php  		if ($data[4]!=0){ display_2dec_percentage((($data[2]-$data[4])/$data[4])*100); }else{ echo "NULL";} 		?>		</font></td>     <?php 	 $j++;}	 	 		 			if ((!isset($resulttype)) || ($resulttype=="min")){  			$total_tmc = sprintf("%02d",intval(($totalminutes/$totalcall)/60)).":".sprintf("%02d",intval(($totalminutes/$totalcall)%60));							$totalminutes = sprintf("%02d",intval($totalminutes/60)).":".sprintf("%02d",intval($totalminutes%60));		}else{			$total_tmc = intval($totalminutes/$totalcall);					}	 	 ?>                   		</tr>	<!-- FIN DETAIL -->				<!-- FIN BOUCLE -->	<!-- TOTAL -->	<tr bgcolor="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 $totalminutes?> </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?></font></td>           	<td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php display_2dec($totalsuccess/$totalcall)?> </font></td>        	<td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php echo $totalfail?></font></td>		<td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php echo $total_max_succ?></font></td>		<td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php display_2dec_percentage(($totalfail/$totalcall)*100)?></font></td>		<td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php display_2bill($totalcost) ?></font></td>		<td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php display_2bill($totalbuycost) ?></font></td>		<td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php display_2bill($totalcost - $totalbuycost) ?></font></td>		<td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php if ($totalcost!=0){ display_2dec_percentage((($totalcost - $totalbuycost)/$totalcost)*100); }else{ echo "NULL";} ?></font></td>		<td align="center" nowrap="nowrap"><font class="fontstyle_003"><?php if ($totalbuycost!=0){ display_2dec_percentage((($totalcost - $totalbuycost)/$totalbuycost)*100);  }else{ echo "NULL";} ?></font></td>	</tr>	<!-- FIN TOTAL -->	  </tbody></table>	  <!-- Fin Tableau Global //--></td></tr></tbody></table><?php  }else{ ?>	<center><h3><?php echo gettext("No calls in your selection");?>.</h3></center><?php  } ?></center><?php	$smarty->display('footer.tpl');?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?