<?php
/*********************************************************      
程序说明：         
    功能说明：话务统计数据的显示

    调用关系：调用:header.inc,lib.inc     
 
    变量说明：

    返回值：无

 作者：     
      
修改注释：      
NO.1      
姓名 ：            
时间：      
修改说明：      
*********************************************************/ 
require("../../inc/header.inc");
$db		=	$bss_db;
$table	=	"OMCR_BtsMeasurements";
$DEBUG = 0;
?>
</head>

<body>
<?php

if($DEBUG) echo "<br>$selected_field_list";
$select_sql_bgn = "SELECT  ";
$select_sql_end = "	FROM $table 
					WHERE CellIdentity = '$cell_id' 
					AND startTime >= '$date_bgn' 
					AND endTime <= '$date_end' 
					ORDER BY startTime,bssid 
				  ";
$fields_arr = explode('>',$selected_field_list);
$field_num = sizeof($fields_arr);
for($i=1; $i<$field_num; $i++){
	if($i < $field_num-1){
		$select_sql_bgn = $select_sql_bgn ." $fields_arr[$i],";
	}else{
		$select_sql_bgn = $select_sql_bgn ." $fields_arr[$i]  ";
	}
}
$select_sql = $select_sql_bgn.$select_sql_end;
if($DEBUG) echo "<br> $select_sql";
?>
<form method="POST" action="./data_list.php" name="selectform">
<TABLE border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">  
<?php
echo "<tr bgcolor=\"E6E6E6\" >";
for($i=1; $i<$field_num; $i++){
		 echo "<td>{$fields_arr[$i]}</td>";
}
echo "</tr>";
$result = mysqli_query($pubConn,$select_sql);
$rows = mysqli_fetch_array($result);
echo mysqli_error($pubConn);
while($rows){
	echo "<tr>";
	for($i=1; $i<$field_num; $i++){
		 echo "<td>{$rows[$i]}</td>";
	}
	echo "</tr>";
}
?>
</TABLE>
</form>

</body>

</html>
