call-log-customers.php

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

PHP
1,042
字号
					<tr><td class="fontstyle_searchoptions">	  				<input type="checkbox" name="fromday" value="true" <?php  if ($fromday){ ?>checked<?php }?>> <?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 	$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><td class="fontstyle_searchoptions">&nbsp;&nbsp;					<input type="checkbox" name="today" value="true" <?php  if ($today){ ?>checked<?php }?>> 					<?php echo gettext("To");?>  :					<select name="tostatsday_sday" class="form_input_select">					<?php  						for ($i=1;$i<=31;$i++){							if ($tostatsday_sday==sprintf("%02d",$i)){$selected="selected";}else{$selected="";}							echo '<option value="'.sprintf("%02d",$i)."\"$selected>".sprintf("%02d",$i).'</option>';						}					?>											</select>				 	<select name="tostatsmonth_sday" class="form_input_select">					<?php 	$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 ($tostatsmonth_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_002" align="left">								<font class="fontstyle_003">&nbsp;&nbsp;<?php echo gettext("DESTINATION");?></font>				</td>								<td class="bgcolor_003" align="left">				<table width="100%" border="0" cellspacing="0" cellpadding="0">					<tr><td>&nbsp;&nbsp;<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 align="left" class="bgcolor_004">										<font class="fontstyle_003">&nbsp;&nbsp;<?php echo gettext("SOURCE");?></font>				</td>								<td class="bgcolor_005" align="left">				<table width="100%" border="0" cellspacing="0" cellpadding="0" >				<tr><td>&nbsp;&nbsp;<INPUT TYPE="text" NAME="src" value="<?php echo "$src";?>" class="form_input_text"></td>				<td class="fontstyle_searchoptions" align="center" ><input type="radio" NAME="srctype" value="1" <?php if((!isset($srctype))||($srctype==1)){?>checked<?php }?>><?php echo gettext("Exact");?></td>				<td class="fontstyle_searchoptions" align="center" ><input type="radio" NAME="srctype" value="2" <?php if($srctype==2){?>checked<?php }?>><?php echo gettext("Begins with");?></td>				<td class="fontstyle_searchoptions" align="center" ><input type="radio" NAME="srctype" value="3" <?php if($srctype==3){?>checked<?php }?>><?php echo gettext("Contains");?></td>				<td class="fontstyle_searchoptions" align="center" ><input type="radio" NAME="srctype" value="4" <?php if($srctype==4){?>checked<?php }?>><?php echo gettext("Ends with");?></td>				</tr></table></td>			</tr>															<!-- Select Option : to show just the Answered Calls or all calls, Result type, currencies... -->						<tr>			  <td class="bgcolor_002" align="left" ><font class="fontstyle_003">&nbsp;&nbsp;<?php echo gettext("OPTIONS");?></font></td>			  <td class="bgcolor_003" align="center"><div align="left">			  			  <table width="100%" border="0" cellspacing="0" cellpadding="0">				<tr>					<td width="20%"  class="fontstyle_searchoptions">						<?php echo gettext("SHOW");?> :  										   </td>				   <td width="80%"  class="fontstyle_searchoptions">				   		<?php echo gettext("Answered Calls");?>  						<input name="terminatecause" type="radio" value="ANSWER" <?php if((!isset($terminatecause))||($terminatecause=="ANSWER")){?>checked<?php }?> /> 						<?php echo gettext("All Calls");?>  						<input name="terminatecause" type="radio" value="ALL" <?php if($terminatecause=="ALL"){?>checked<?php }?>/>					</td>				</tr>				<tr class="bgcolor_005">					<td  class="fontstyle_searchoptions">						<?php echo gettext("RESULT");?> : 				   </td>				   <td  class="fontstyle_searchoptions">						<?php echo gettext("mins");?><input type="radio" NAME="resulttype" value="min" <?php if((!isset($resulttype))||($resulttype=="min")){?>checked<?php }?>> - <?php echo gettext("secs")?> <input type="radio" NAME="resulttype" value="sec" <?php if($resulttype=="sec"){?>checked<?php }?>>					</td>				</tr>				<tr>					<td  class="fontstyle_searchoptions">						<?php echo gettext("CURRENCY");?> :					</td>					<td  class="fontstyle_searchoptions">						<select NAME="choose_currency" size="1" class="form_input_select">							<?php								$currencies_list = get_currencies();								foreach($currencies_list as $key => $cur_value) {							?>								<option value='<?php echo $key ?>' <?php if (($choose_currency==$key) || (!isset($choose_currency) && $key==strtoupper(BASE_CURRENCY))){?>selected<?php } ?>><?php echo $cur_value[1].' ('.$cur_value[2].')' ?>								</option>							<?php 	} ?>						</select>					</td>				</tr>				</table>			  </td>			  </tr>			<!-- Select Option : to show just the Answered Calls or all calls, Result type, currencies... -->									<tr>        		<td class="bgcolor_004" align="left" > </td>				<td class="bgcolor_005" 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><!-- ** ** ** ** ** Part to display the CDR ** ** ** ** ** --><center><?php echo gettext("Number of call");?> : <?php  if (is_array($list) && count($list)>0){ echo $nb_record; }else{echo "0";}?></center>      <table width="<?php echo $FG_HTML_TABLE_WIDTH?>" border="0" align="center" cellpadding="0" cellspacing="0">		<TR bgcolor="#ffffff">           <TD  class="bgcolor_021" height=16 style="PADDING-LEFT: 5px; PADDING-RIGHT: 3px">             <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">              <TBODY>                <TR>                   <TD><SPAN  class="fontstyle_003"><?php echo $FG_HTML_TABLE_TITLE?></SPAN></TD>                  <TD align=right> <IMG alt="Back to Top" border=0 height=12 src="<?php echo Images_Path;?>/btn_top_12x12.gif" width=12>                   </TD>                </TR>              </TBODY>            </TABLE></TD>        </TR>        <TR>           <TD> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"><TBODY>                <TR  class="bgcolor_008"> 				  <TD width="<?php echo $FG_ACTION_SIZE_COLUMN?>" align=center class="tableBodyRight" style="PADDING-BOTTOM: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px"></TD>									                    <?php 				  	if (is_array($list) && count($list)>0){									  	for($i=0;$i<$FG_NB_TABLE_COL;$i++){ 					?>								  					                  <TD width="<?php echo $FG_TABLE_COL[$i][2]?>" align=middle class="tableBody" style="PADDING-BOTTOM: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px">                     <center><strong>                     <?php  if (strtoupper($FG_TABLE_COL[$i][4])=="SORT"){?>                    <a href="<?php  echo $PHP_SELF."?customer=$customer&s=1&t=0&stitle=$stitle&atmenu=$atmenu&current_page=$current_page&order=".$FG_TABLE_COL[$i][1]."&sens="; if ($sens=="ASC"){echo"DESC";}else{echo"ASC";} 					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";?>">                     <span class="liens"><?php  } ?>                    <?php echo $FG_TABLE_COL[$i][0]?>                     <?php if ($order==$FG_TABLE_COL[$i][1] && $sens=="ASC"){?>                    &nbsp;<img src="<?php echo Images_Path;?>/icon_up_12x12.GIF" width="12" height="12" border="0">                     <?php }elseif ($order==$FG_TABLE_COL[$i][1] && $sens=="DESC"){?>                    &nbsp;<img src="<?php echo Images_Path;?>/icon_down_12x12.GIF" width="12" height="12" border="0">                     <?php }?>                    <?php  if (strtoupper($FG_TABLE_COL[$i][4])=="SORT"){?>                    </span></a>                     <?php }?>                    </strong></center></TD>				   <?php } ?>						   <?php if ($FG_DELETION || $FG_EDITION){ ?>				                     				   <?php } ?>		                </TR>                <TR>                   <TD bgColor=#e1e1e1 colSpan=<?php echo $FG_TOTAL_TABLE_COL?> height=1><IMG                               height=1                               src="<?php echo Images_Path;?>/clear.gif"                               width=1></TD>                </TR>				<?php					  				  	 $ligne_number=0;					 					 //print_r($list);				  	 foreach ($list as $recordset){ 						 $ligne_number++;				?>				               		 <TR bgcolor="<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$ligne_number%2]?>"  onMouseOver="bgColor='#C4FFD7'" onMouseOut="bgColor='<?php echo $FG_TABLE_ALTERNATE_ROW_COLOR[$ligne_number%2]?>'"> 						<TD vAlign=top align="<?php echo $FG_TABLE_COL[$i][3]?>" class=tableBody><?php  echo $ligne_number+$current_page*$FG_LIMITE_DISPLAY.".&nbsp;"; ?></TD>							 				  		<?php for($i=0;$i<$FG_NB_TABLE_COL;$i++){ ?>												  						<?php 								if ($FG_TABLE_COL[$i][6]=="lie"){									$instance_sub_table = new Table($FG_TABLE_COL[$i][7], $FG_TABLE_COL[$i][8]);									$sub_clause = str_replace("%id", $recordset[$i], $FG_TABLE_COL[$i][9]);																																										$select_list = $instance_sub_table -> Get_list ($DBHandle, $sub_clause, null, null, null, null, null, null);																											$field_list_sun = split(',',$FG_TABLE_COL[$i][8]);									$record_display = $FG_TABLE_COL[$i][10];																		for ($l=1;$l<=count($field_list_sun);$l++){																				$record_display = str_replace("%$l", $select_list[0][$l-1], $record_display);										}															}elseif ($FG_TABLE_COL[$i][6]=="list"){									$select_list = $FG_TABLE_COL[$i][7];									$record_display = $select_list[$recordset[$i]][0];														}else{									$record_display = $recordset[$i];							}																					if ( is_numeric($FG_TABLE_COL[$i][5]) && (strlen($record_display) > $FG_TABLE_COL[$i][5])  ){								$record_display = substr($record_display, 0, $FG_TABLE_COL[$i][5]-3)."";  																						}																		 		 ?>                 		 <TD vAlign=top align="<?php echo $FG_TABLE_COL[$i][3]?>" class=tableBody><?php 						 if (isset ($FG_TABLE_COL[$i][11]) && strlen($FG_TABLE_COL[$i][11])>1){						 		call_user_func($FG_TABLE_COL[$i][11], $record_display);

⌨️ 快捷键说明

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