init web ems all

This commit is contained in:
agtuser
2024-09-27 17:13:36 +08:00
parent 81c97acbe9
commit 5cc56f8078
4263 changed files with 798779 additions and 0 deletions

View File

@@ -0,0 +1,145 @@
<?php
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
$DEBUG=0;
if(!isset($sel_date))
$sel_date=0;
if($DEBUG)
echo "sel_date=$sel_date<br>";
$fieldNameAttr=array("Incoming email attempt",
"Incoming email success",
"Outgoing email attempt",
"Outgoing email success",
"Incoming sms attempt",
"Incoming sms success",
"Outgoing sms attempt",
"Outgoing sms success",
"Total message length",
"Reserved data1",
"Reserved data2");
//get data from database
$db="CSTA_DB";
$table_name="smegDetail";
$temp=date("d",mktime(0,0,0,date("m"),date("d")-$sel_date,date("Y")));
$table_name=$table_name."_".$temp;
if($DEBUG)echo "table_name:$table_name<br>";
$from_time=date("Y-m-d H:i:s",mktime(0,0,0,date("m"),date("d")-$sel_date,date("Y")));
$to_time=date("Y-m-d H:i:s",mktime(0,0,0,date("m"),date("d")-$sel_date+1,date("Y")));
if($DEBUG)echo "from:$from_time--to:$to_time<br>";
$select="select key_sys_id,sum(in_email_att) as in_email_att,sum(in_email_suc) as in_email_suc,sum(out_email_att) as out_email_att,sum(out_email_suc) as out_email_suc,sum(in_sms_att) as in_sms_att,sum(in_sms_suc) as in_sms_suc,sum(out_sms_att) as out_sms_att,sum(out_sms_suc) as out_sms_suc ";
$from="from $table_name ";
$where="where csta_datetime >='$from_time' and csta_datetime <'$to_time' ";
$group="group by key_sys_id ";
$sql=$select.$from.$where.$group;
if($DEBUG)echo "$sql<br>";
$result=@mysqli_query($pubConn,$sql);
$rows=@mysqli_fetch_array($result);
//init
$in_email_att_sum=0;
$in_email_suc_sum=0;
$out_email_att_sum=0;
$out_email_suc_sum=0;
$in_sms_att_sum=0;
$in_sms_suc_sum=0;
$out_sms_att_sum=0;
$out_sms_suca_sum=0;
if($rows)
{
do{
$key_sys_id=$rows[key_sys_id];
$in_email_att_sum=$rows[in_email_att];
$in_email_suc_sum=$rows[in_email_suc];
$out_email_att_sum=$rows[out_email_att];
$out_email_suc_sum=$rows[out_email_suc];
$in_sms_att_sum=$rows[in_sms_att];
$in_sms_suc_sum=$rows[in_sms_suc];
$out_sms_att_sum=$rows[out_sms_att];
$out_sms_suca_sum=$rows[out_sms_suc];
}while($rows=mysqli_fetch_array($result));
}
//table title
echo "<center><b>";
$sel_date_title=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-$sel_date,date("Y")));
echo "$strSMSEG Statistic Date: $sel_date_title<br>";
echo "</b></center>";
//show the data
echo "<table border=\"1\" width=\"100%\" bordercolordark=\"#FFFFFF\" bordercolor=\"#808080\" cellspacing=\"0\">";
echo "<tr>";
echo "<td bgcolor=\"#E6E6E6\" width=15%><br></td>";
echo "<td bgcolor=\"#E6E6E6\" width=15%>Type</td>";
echo "<td bgcolor=\"#E6E6E6\" width=70%>Value</td>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor=\"#E6E6E6\" rowspan=2>Incoming email</td>";
echo "<td bgcolor=\"#E6E6E6\">Attempt</td>";
//Incoming email attempt
echo "<td>$in_email_att_sum</td></tr>";
echo "<tr><td bgcolor=\"#E6E6E6\">Success</td>";
//Incoming email success
echo "<td>$in_email_suc_sum</td></tr>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor=\"#E6E6E6\" rowspan=2>Outgoing email</td>";
echo "<td bgcolor=\"#E6E6E6\">Attempt</td>";
//Outgoing email attempt
echo "<td>$out_email_att_sum</td></tr>";
echo "<tr><td bgcolor=\"#E6E6E6\">Success</td>";
//Outgoing email success
echo "<td>$out_email_suc_sum</td></tr>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor=\"#E6E6E6\" rowspan=2>Incoming sms</td>";
echo "<td bgcolor=\"#E6E6E6\">Attempt</td>";
//Incoming sms attempt
echo "<td>$in_sms_att_sum</td></tr>";
echo "<tr><td bgcolor=\"#E6E6E6\">Success</td>";
//Incoming sms success
echo "<td>$in_sms_suc_sum</td></tr>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor=\"#E6E6E6\" rowspan=2>Outgoing sms</td>";
echo "<td bgcolor=\"#E6E6E6\">Attempt</td>";
//Outgoing sms attempt
echo "<td>$out_sms_att_sum</td></tr>";
echo "<tr><td bgcolor=\"#E6E6E6\">Success</td>";
//Outgoing sms success
echo "<td>$out_sms_suca_sum</td></tr>";
echo "<tr><td colspan=2 bgcolor=\"#E6E6E6\">Total message length</td>";
//Total message length
echo "<td>0</td></tr>";
echo "</tr>";
echo "</table>";
adjust_content_tail("down");
?>

View File

@@ -0,0 +1,20 @@
<?php
require("../../inc/header.inc");
?>
<frameset rows="75,*" frameborder=0 border=0>
<?php
echo "<frame scrolling=\"no\" name=\"smegCstaUp\" src=\"smegCstaUp.php\">";
echo "<frame name=\"smegCstaDown\" src=\"smegCstaDown.php\">";
?>
<noframes>
<body>
<p><3E><><EFBFBD><EFBFBD>ҳʹ<D2B3><CAB9><EFBFBD>˿<EFBFBD><CBBF>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD>ֿ<EFBFBD><D6BF>ܡ<EFBFBD></p>
</body>
</noframes>
</frameset>

View File

@@ -0,0 +1,65 @@
<?php
require("../../inc/header.inc");
?>
<script language="JavaScript">
function page_refresh()
{
var sel_date=document.up_form.sel_date.value;
parent.smegCstaDown.location.href="smegCstaDown.php?sel_date="+sel_date;
}
</script>
<base target="smegCstaDown">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('up');" onresize="javascript:adjust_frame('up');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
//title
adjust_head_frame("up");
adjust_title_head_frame("up");
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\" align=\"left\">";
echo "$strTitlePerformance > $strSMSEG";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">";
$helpId="3.9";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"50%\" align=\"left\">";
//date selection
echo "<form name=\"up_form\" action=\"smegCstaDown.php\" method=\"post\">";
$day0=date("Y-m-d",mktime(0,0,0,date("m"),date("d"),date("Y")));
$day1=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-1,date("Y")));
$day2=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-2,date("Y")));
$day3=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-3,date("Y")));
$day4=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-4,date("Y")));
$day5=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-5,date("Y")));
$day6=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-6,date("Y")));
echo "Date: <select name=\"sel_date\" onChange=\"javascript:page_refresh()\">";
for($i=0;$i<7;$i++)
{
if($i==$sel_date)
echo "<option selected value=$i>${day.$i}</option>";
else
echo "<option value=$i>${day.$i}</option>";
}
echo "</select>";
echo "</form>";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail_frame("up");
adjust_content_head_frame("up");
adjust_content_tail_frame("up");
?>