a2b_detail_package.php

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

PHP
786
字号
		$nb_record_max=(intval($nb_record/$FG_LIMITE_DISPLAY));	}else{		$nb_record_max=(intval($nb_record/$FG_LIMITE_DISPLAY)+1);	}	}if ($FG_DEBUG == 3) echo "<br>Nb_record : $nb_record";if ($FG_DEBUG == 3) echo "<br>Nb_record_max : $nb_record_max";/*************************************************************/$instance_table_customer = new Table("cc_card", "id,  username, lastname");$FG_TABLE_CLAUSE = "";if ($_SESSION["is_admin"]==0){ 		$FG_TABLE_CLAUSE =" IDmanager='".$_SESSION["pr_reseller_ID"]."'";	}$list_customer = $instance_table_customer -> Get_list ($DBHandle, $FG_TABLE_CLAUSE, "id", "ASC", null, null, null, null);$nb_customer = count($list_customer);$instance_table_tariff = new Table("cc_package_offer", "id, label");$FG_TABLE_CLAUSE = "";$list_package = $instance_table_tariff -> Get_list ($DBHandle, $FG_TABLE_CLAUSE, "label", "ASC", null, null, null, null);$nb_package = count($list_package);?><?php	$smarty->display('main.tpl');?><script language="JavaScript" type="text/JavaScript"><!--function MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}//--></script><!-- ** ** ** ** ** Part for the research ** ** ** ** ** -->	<center>	<FORM METHOD=POST name="myForm" ACTION="<?php echo $PHP_SELF?>?s=1&t=0&order=<?php echo $order?>&sens=<?php echo $sens?>&current_page=<?php echo $current_page?>">	<INPUT TYPE="hidden" NAME="posted" value=1>	<INPUT TYPE="hidden" NAME="current_page" value=0>			<table class="bar-status" width="85%" border="0" cellspacing="1" cellpadding="2" align="center">			<tbody>			<?php  if ($_SESSION["pr_groupID"]==2 && is_numeric($_SESSION["pr_IDCust"])){ ?>			<?php  }else{ ?>			<tr>				<td align="left" valign="top" class="bgcolor_004">										<font class="fontstyle_003">&nbsp;&nbsp;<?php echo gettext("CUSTOMERS");?></font>				</td>								<td class="bgcolor_005" align="left">				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bgcolor_005"><tr>					<td>						<?php echo gettext("Enter the card ID");?>: <INPUT TYPE="text" NAME="enter_cardid" value="<?php echo $enter_cardid?>" class="form_input_text">						<a href="#" onclick="window.open('A2B_entity_card.php?popup_select=1&popup_formname=myForm&popup_fieldname=enter_cardid' , 'CardNumberSelection','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>						<?php  }?>			<tr>				<td align="left" valign="top" class="bgcolor_004">										<font class="fontstyle_003">&nbsp;&nbsp;<?php echo gettext("PACKAGE");?></font>				</td>								<td class="bgcolor_005" align="left">				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bgcolor_005"><tr>					<td>						<select NAME="enter_packageid" size="1" class="form_input_select">							<option class="input" value="">Select a package </option>							<?php					 							 foreach ($list_package as $recordset){ 						 							?>								<option class="input" value='<?php echo $recordset[0]?>'  <?php if ($enter_packageid==$recordset[0]) echo 'selected="selected"'?>><?php echo $recordset[1]?></option>							<?php } ?>						</select>											</td>									</tr></table></td>			</tr>					<tr>        		<td class="bgcolor_002" align="left">					<input type="radio" name="Period" value="Month" <?php  if (($Period=="Month") || !isset($Period)){ ?>checked="checked" <?php  } ?>> 					<font class="fontstyle_003"><?php echo gettext("Selection of the month");?></font>				</td>      			<td class="bgcolor_003" align="left">					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bgcolor_003"><tr><td>	  				<input type="checkbox" name="frommonth" value="true" <?php  if ($frommonth){ ?>checked<?php }?>>					<?php echo gettext("From");?> : <select name="fromstatsmonth" 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=="$i-$month_formated")	$selected="selected";							else $selected="";							echo "<OPTION value=\"$i-$month_formated\" $selected> $monthname[$j]-$i </option>";										   }						}					?>							</select>					</td><td>&nbsp;&nbsp;					<input type="checkbox" name="tomonth" value="true" <?php  if ($tomonth){ ?>checked<?php }?>> 					To : <select name="tostatsmonth" 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=="$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 align="left" class="bgcolor_004">					<input type="radio" name="Period" value="Day" <?php  if ($Period=="Day"){ ?>checked="checked" <?php  } ?>> 					<font class="fontstyle_003"><?php echo gettext("Selection of the day");?></font>				</td>      			<td align="left" class="bgcolor_005">					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bgcolor_005"><tr><td>	  				<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>&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">					<?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_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><br><br><!-- ** ** ** ** ** Part to display the CDR ** ** ** ** ** -->			<center><?php echo gettext("Calls with free minutes");?> : <?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 "&enter_cardid=$enter_cardid&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"> 

⌨️ 快捷键说明

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