0){
//echo "
";
echo "";
}else{
echo "";
}
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "
";
//=====================================================================================|
//============================Function Flag============================================|
//=====================================================================================|
$Hide_Show_Function_On=0;
$DEBUG=0;
//=====================================================================================|
//============================Data From Index Page=====================================|
//=====================================================================================|
if(0)
{
$url_temp=$_SERVER["REQUEST_URI"];
echo "This page URL:$url_temp
";
echo "sel_date_from:$sel_date_from
";
echo "sel_date_to:$sel_date_to
";
}
//=====================================================================================|
//============================Define The Data==========================================|
//=====================================================================================|
$csta_field=array(
0=>"hlr_noti_mhc",
1=>"mhc_noti_hlr",
2=>"rep_att",
3=>"rep_suc",
4=>"rep_fail",
5=>"veri_att",
6=>"veri_suc",
7=>"veri_fail",
8=>"veri_del_att",
9=>"veri_del_suc",
10=>"veri_del_fail",
11=>"veri_dld_att",
12=>"veri_dld_suc",
13=>"veri_dld_fail",
14=>"mhc_msg_sent",
15=>"mhc_msg_recv",
);
$csta_show_field=array(
0=>"HLR Notify MHC",
1=>"MHC Notify HLR",
2=>"Replication Attempt",
3=>"Replication Success",
4=>"Replication Fail",
5=>"Verification Attempt",
6=>"Verification Success",
7=>"Verification Fail",
8=>"Verification Deleted Attempt",
9=>"Verification Deleted Success",
10=>"Verification Deleted Fail",
11=>"Verification Download Attempt",
12=>"Verification Download Success",
13=>"Verification Download Fail",
14=>"MHC Message Sent",
15=>"MHC Message Received",
);
//data define
for($i=0;$i";
echo "end_time:$end_time
";
echo "slot:$slot
";
echo "db:$csta_db
";
}
$sql_sum="";
for($i=0;$i0,6=>1,7=>2,8=>3,9=>4,10=>5,11=>6,12=>7,13=>8,14=>9,15=>10,16=>11);
for($day=0;$day<$slot;$day++)
{
$table_name="mhcDetail";
$temp=date("d",mktime(0,0,0,date("m"),date("d")-$sel_date_from+$day,date("Y")));
$table_name=$table_name."_".$temp;
//echo "table_name:$table_name
";
$from_time=date("Y-m-d H:i:s",mktime(0,0,0,date("m"),date("d")-$sel_date_from+$day,date("Y")));
$to_time=date("Y-m-d H:i:s",mktime(23,0,0,date("m"),date("d")-$sel_date_from+$day,date("Y")));
//echo "from:$from_time--to:$to_time
";
$select="select $sql_sum ";
$from="from $table_name ";
$service_where="and key_type=1 ";
$where="where csta_datetime >='$from_time' and csta_datetime <'$to_time' ".$service_where;
$group="group by key_type ";
$order="order by key_type ";
$sql=$select.$from.$where.$group.$order;
//echo "$sql
";
$result=@mysqli_query($pubConn,$sql);
$rows=@mysqli_fetch_array($result);
if(!$rows)
continue;
do{
$field_num=sizeof($csta_field);
for($tt=0;$tt<$field_num;$tt++)
{
$service_csta[$tt]+=$rows[$tt];
}
for($tt=0;$tt<16;$tt++)
{
for($i=0;$i<6;$i++)
{
$sync_csta[$tt][$i]+=$rows[$field_num+$tt*6+$i]+0;
}
}
}while($rows=mysqli_fetch_array($result));
}
//get the 0-hour of the day
for($day=0;$day<$slot;$day++)
{
$table_name="mhcDetail";
$temp=date("d",mktime(0,0,0,date("m"),date("d")-$sel_date_from+$day-1,date("Y")));
$table_name=$table_name."_".$temp;
//echo "table_name:$table_name
";
$from_time=date("Y-m-d H:i:s",mktime(23,0,0,date("m"),date("d")-$sel_date_from+$day-1,date("Y")));
$to_time=date("Y-m-d H:i:s",mktime(0,0,0,date("m"),date("d")-$sel_date_from+$day,date("Y")));
//echo "from:$from_time--to:$to_time
";
$select="select $sql_sum ";
$from="from $table_name ";
$service_where="and key_type=1 ";
$where="where csta_datetime >='$from_time' and csta_datetime <'$to_time' ".$service_where;
$group="group by key_type ";
$order="order by key_type ";
$sql=$select.$from.$where.$group.$order;
//echo "$sql
";
$result=@mysqli_query($pubConn,$sql);
$rows=@mysqli_fetch_array($result);
if(!$rows)
continue;
do{
$field_num=sizeof($csta_field);
for($tt=0;$tt<$field_num;$tt++)
{
$service_csta[$tt]+=$rows[$tt];
}
for($tt=0;$tt<16;$tt++)
{
for($i=0;$i<6;$i++)
{
$sync_csta[$tt][$i]+=$rows[$field_num+$tt*6+$i]+0;
}
}
}while($rows=mysqli_fetch_array($result));
}
//===================================================================================|
//=======================Show The Table-1============================================|
//===================================================================================|
//===table title
if($slot==1)
$table_title="Statistic Date:".$bgn_time;
else
$table_title="Statistic Date:".$bgn_time." to ".$end_time;
echo "$table_title";
echo "";
echo "";
echo "| Type | ";
echo "Value | ";
echo "
";
for($i=0;$i";
echo "{$csta_show_field[$i]} | ";
echo "{$service_csta[$i]} | ";
echo "";
}
echo "
";
echo "";
echo "";
echo "| Node Index | ";
echo "Synchronization Outgoing | ";
echo "Synchronization Incoming | ";
echo "
";
echo "";
echo "| Attempt | ";
echo "Success | ";
echo "Fail | ";
echo "Attempt | ";
echo "Success | ";
echo "Fail | ";
echo "
";
echo "";
for($i=0;$i<16;$i++)
{
echo "";
echo "| $i | ";
for($j=0;$j<6;$j++)
{
echo "{$sync_csta[$i][$j]} | ";
}
echo "
";
}
echo "
";
adjust_content_tail("down");
?>