init web ems all
This commit is contained in:
246
wxc2_omc/performance/iwfCsta/dataQueryDown.php
Executable file
246
wxc2_omc/performance/iwfCsta/dataQueryDown.php
Executable file
@@ -0,0 +1,246 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD>ѯ,<2C><>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ʱ<EFBFBD>䣺
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$db=$csta_db;
|
||||
$showDate = date("d",mktime(0,0,0,date("m"),date("d")-$sel_date,date("Y")));
|
||||
$showDate = omc_keep_length($showDate,0,2);
|
||||
?>
|
||||
|
||||
<body leftmargin=0 topmargin=0>
|
||||
<?php
|
||||
$sort_field = 'csta_datetime'; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>
|
||||
$sort_direction = 'DESC'; //<2F><><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
|
||||
$number_records_to_display = 200; //ÿҳ<C3BF><D2B3>¼<EFBFBD><C2BC>
|
||||
$time_column = "csta_datetime";
|
||||
$table_name='aucDetail'."_".$showDate;
|
||||
$sel_field_list= @mysql_list_fields($db,$table_name);
|
||||
if(!$sel_field_list)
|
||||
{
|
||||
echo "<br>$strNotFindRecord.";
|
||||
exit();
|
||||
}
|
||||
|
||||
$where = isset($where) ? urldecode($where) : ''; //<2F><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>url<72><6C>
|
||||
$where = isset($where) ? stripslashes($where) : ''; //<2F><><EFBFBD><EFBFBD>һЩ'/'
|
||||
//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if($delete){
|
||||
$sql_query="DELETE FROM $table_name ".$where;
|
||||
$sql_query=urlencode($sql_query); //<2F><><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룬<EFBFBD>ʺϴ<CABA><CFB4><EFBFBD>
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=./csta_del.php?del_sql=$sql_query\"> ";
|
||||
}//end of delete
|
||||
?>
|
||||
<script LANGUAGE="JavaScript">
|
||||
function goto(){
|
||||
var url_1,url_2,url_3,url_4,url_5,initial_record,gotopage,number_records_to_display,where,number_of_records,sort_field,sel_date;
|
||||
gotopage=document.selectform.gotopage.value;
|
||||
number_records_to_display=<?php echo $number_records_to_display; ?>;
|
||||
where=document.selectform.where.value;
|
||||
initial_record=number_records_to_display*(gotopage-1);
|
||||
number_of_records=document.selectform.number_of_records.value;
|
||||
sort_field=document.selectform.sort_field.value;
|
||||
sel_date=document.selectform.sel_date.value;
|
||||
url_1='<?php echo $PHP_SELF;?>?initial_record='+initial_record;
|
||||
url_2="&where="+where;
|
||||
url_3="&number_of_records="+number_of_records;
|
||||
url_4="&sort_field="+sort_field;
|
||||
url_5="&sel_date="+sel_date;
|
||||
window.location.href=url_1+url_2+url_3+url_4+url_5;
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (!$number_of_records){//<2F><>תҳ<D7AA>治<EFBFBD><E6B2BB><EFBFBD>г<EFBFBD>ʼ<EFBFBD><CABC>
|
||||
//-------ȷ<><C8B7><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD>Χ-----
|
||||
if($sel_date<0){
|
||||
$bgn_date=date("Y-m-d H:i:s", mktime(0,0,0,date("m"),date("d")-6,date("Y")));
|
||||
$end_date=date("Y-m-d H:i:s", mktime());
|
||||
}elseif($sel_date>0){
|
||||
if($sel_time){
|
||||
$bgn_date=date("Y-m-d H:i:s", mktime($hou_1,$mid_1,$sec_1,date("m"),date("d")-$sel_date,date("Y")));
|
||||
$end_date=date("Y-m-d H:i:s", mktime($hou_2,$mid_2,$sec_2,date("m"),date("d")-$sel_date,date("Y")));
|
||||
}else{
|
||||
$bgn_date=date("Y-m-d H:i:s", mktime(0,0,0,date("m"),date("d")-$sel_date,date("Y")));
|
||||
$end_date=date("Y-m-d H:i:s", mktime(0,0,0,date("m"),date("d")-$sel_date+1,date("Y")));
|
||||
}
|
||||
}else{
|
||||
if($sel_time){
|
||||
$bgn_date=date("Y-m-d H:i:s", mktime($hou_1,$mid_1,$sec_1,date("m"),date("d")-$sel_date,date("Y")));
|
||||
$end_date=date("Y-m-d H:i:s", mktime($hou_2,$mid_2,$sec_2,date("m"),date("d")-$sel_date,date("Y")));
|
||||
}else{
|
||||
$bgn_date=date("Y-m-d H:i:s", mktime(0,0,0,date("m"),date("d"),date("Y")));
|
||||
$end_date=date("Y-m-d H:i:s", mktime());
|
||||
}
|
||||
}
|
||||
|
||||
/* where<72><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɲ<EFBFBD><C9B2><EFBFBD>Ϊ$w1,ϵͳid<69><64><EFBFBD><EFBFBD>Ϊ$w2 */
|
||||
$w1=" $time_column >='$bgn_date' AND $time_column <= '$end_date'";
|
||||
|
||||
//<2F>ϳ<EFBFBD>where<72><65><EFBFBD><EFBFBD>
|
||||
$where=" WHERE".$w1;
|
||||
|
||||
$initial_record = 0;//<2F><>ʼ<EFBFBD><CABC>¼<EFBFBD><C2BC>
|
||||
|
||||
$str_sql_all="SELECT count(*) as number_of_records FROM $table_name ".$where;
|
||||
$csta_result= mysqli_query($pubConn,$str_sql_all);
|
||||
$record = mysql_fetch_object($csta_result);
|
||||
$number_of_records = $record->number_of_records;
|
||||
if(!$number_of_records)
|
||||
{
|
||||
echo "<br>$strNotFindRecord";
|
||||
exit();
|
||||
}
|
||||
|
||||
}//endif
|
||||
|
||||
$page_num= ($initial_record / $number_records_to_display) +1; //<2F><>ҳҳ<D2B3><D2B3>
|
||||
$all_page_num= ceil($number_of_records / $number_records_to_display); //<2F><>ҳ<EFBFBD><D2B3>
|
||||
if ($number_of_records >= 1){
|
||||
$next_index = $initial_record + $number_records_to_display; //<2F><>ҳ<EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD>Ŀ
|
||||
if ($next_index > $number_of_records)
|
||||
{
|
||||
$next_index = $number_of_records;
|
||||
}
|
||||
$t1 = $initial_record + 1;
|
||||
$prev_index = $initial_record - $number_records_to_display;
|
||||
if ($prev_index < 0){
|
||||
$prev_index = 0;
|
||||
}
|
||||
}
|
||||
$show_initital_record=$initial_record+1;
|
||||
?>
|
||||
<TABLE border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||||
<TR>
|
||||
<TD width="50%"><?php echo "$strDisplayRecords:<FONT color=#0000ff> $show_initital_record - $next_index</FONT>, ($strTotalRecords:$number_of_records ) "; ?></TD>
|
||||
<TD width="100" align="center">
|
||||
<?php
|
||||
//$number_of_records_on_current_page = mysqli_num_rows($csta_result);
|
||||
//echo "$number_of_records_on_current_page<br>";
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>Ʒ<EFBFBD>ҳ<EFBFBD><D2B3>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>
|
||||
if ($initial_record != 0)
|
||||
{
|
||||
$t1 = "initial_record=$prev_index&number_of_records=$number_of_records&table_name=$table_name&sel_date=$sel_date";
|
||||
$where=urlencode($where); //<2F><><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룬<EFBFBD>ʺϴ<CABA><CFB4><EFBFBD>
|
||||
echo "<a href=\"$PHP_SELF?$t1&where=$where&now_date=$end_date&last_date=$bgn_date&call_type=$call_type\">";
|
||||
?>
|
||||
<IMG alt=ǰһҳ src="../../images/pre_page.gif" border="0"></a>
|
||||
<?php
|
||||
}
|
||||
// NEW: Display a link for the next set of records.
|
||||
if ($next_index != $number_of_records && $number_of_records >0 && $number_of_records > $number_records_to_display )
|
||||
{
|
||||
$t1 = "initial_record=$next_index&number_of_records=$number_of_records&table_name=$table_name&sel_date=$sel_date";
|
||||
$where=urlencode($where); //<2F><><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룬<EFBFBD>ʺϴ<CABA><CFB4><EFBFBD>
|
||||
echo "<a href=\"$PHP_SELF?$t1&where=$where&now_date=$end_date&last_date=$bgn_date&call_type=$call_type\">";
|
||||
?>
|
||||
<IMG alt=<3D><>һҳ src="../../images/next_page.gif" border="0"></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</TD>
|
||||
<form name="selectform" method="post" action="<?php echo "$PHP_SELF?initial_record=$prev_index&number_of_records=$number_of_records&where=$where&table_name=$table_name&call_type=$call_type";?>"
|
||||
>
|
||||
<TD align="center">
|
||||
<?php echo "$strPage"; ?>
|
||||
<select size="1" name="gotopage" onChange="javascript:goto()">
|
||||
<?php
|
||||
for($i=1;$i<=$all_page_num;$i++){
|
||||
if($i== $page_num ){
|
||||
echo "<option selected value=\"$i\" >$i</option>";
|
||||
}else{
|
||||
echo "<option value=\"$i\">$i</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select></td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<?php
|
||||
$where = isset($where) ? urldecode($where) : ''; //<2F><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>url<72><6C>
|
||||
$where = isset($where) ? urldecode($where) : ''; //<2F><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>url<72><6C>
|
||||
$where = isset($where) ? stripslashes($where) : ''; //<2F><><EFBFBD><EFBFBD>һЩ'/'
|
||||
|
||||
//<2F><>ѯ<EFBFBD><D1AF><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD><EFBFBD><EFBFBD>myrows<77><73><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD>
|
||||
//<2F>ϳ<EFBFBD>sql<71><6C><EFBFBD><EFBFBD>
|
||||
$order=" ORDER BY $sort_field $sort_direction";
|
||||
$limit=" LIMIT $initial_record, $number_records_to_display";
|
||||
|
||||
$csta_sql="SELECT * FROM $table_name"."\n".$where.$order.$limit;
|
||||
//echo "$csta_sql<br>";
|
||||
$csta_result = mysqli_query($pubConn,$csta_sql);
|
||||
$csta_rows = mysqli_fetch_array($csta_result);
|
||||
?>
|
||||
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
|
||||
<tr bgcolor="#E6E6E6" align="center">
|
||||
<td rowspan="2"><?php echo $strSystem; ?></td>
|
||||
<td colspan="2"><?php echo $strAUCAuthorization; ?></td>
|
||||
<td colspan="2"><?php echo $strAUCCreateCustomer; ?></td>
|
||||
<td colspan="2"><?php echo $strAUCDeleteCustomer; ?></td>
|
||||
<td colspan="2"><?php echo $strHLRCreateCustomer; ?></td>
|
||||
<td colspan="2"><?php echo $strHLRDeleteCustomer; ?></td>
|
||||
<td colspan="2"><?php echo $strInterrogateSubscriber; ?></td>
|
||||
<td rowspan="2"><?php echo $strTime; ?></td>
|
||||
</tr>
|
||||
<tr bgcolor="#E6E6E6" align="center">
|
||||
<td><?php echo $strSuccess; ?></td>
|
||||
<td><?php echo $strFailure; ?></td>
|
||||
<td><?php echo $strSuccess; ?></td>
|
||||
<td><?php echo $strFailure; ?></td>
|
||||
<td><?php echo $strSuccess; ?></td>
|
||||
<td><?php echo $strFailure; ?></td>
|
||||
<td><?php echo $strSuccess; ?></td>
|
||||
<td><?php echo $strFailure; ?></td>
|
||||
<td><?php echo $strSuccess; ?></td>
|
||||
<td><?php echo $strFailure; ?></td>
|
||||
<td><?php echo $strSuccess; ?></td>
|
||||
<td><?php echo $strFailure; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
do
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td align="center"><?php
|
||||
echo "AUC"."$csta_rows[0]";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[auc_auth_suc] ";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[auc_auth_fail] ";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[auc_created_sub_suc]";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[auc_created_sub_fail]";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[auc_del_sub_suc] ";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[auc_del_sub_fail] ";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[hlr_created_sub_suc]";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[hlr_created_sub_fail]";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[hlr_del_sub_suc] ";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[hlr_del_sub_fail] ";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[int_sub_suc] ";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[int_sub_fail] ";?></td>
|
||||
<td align="center"><?php echo "$csta_rows[csta_datetime] ";?></td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}while($csta_rows= mysqli_fetch_array($csta_result));
|
||||
?>
|
||||
</table>
|
||||
<input type="hidden" name="where" value="<?php echo $where; ?>">
|
||||
<input type="hidden" name="number_of_records" value="<?php echo $number_of_records; ?>">
|
||||
<input type="hidden" name="sort_field" value="<?php echo $sort_field; ?>">
|
||||
<input type="hidden" name="sel_date" value="<?php echo $sel_date; ?>">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user