init web ems all
This commit is contained in:
126
wxc2_omc/fault/alarmList/alarmNumList.php
Executable file
126
wxc2_omc/fault/alarmList/alarmNumList.php
Executable file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>澯<EFBFBD><E6BEAF>ѯ<EFBFBD><D1AF><EFBFBD>²<EFBFBD>ҳ<EFBFBD>棬<EFBFBD><E6A3AC>ѯ<EFBFBD><D1AF>ʾ
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><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");
|
||||
$DEBUG = 0;
|
||||
getSerial();//get serial number
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$dbName = 'OMC_PUB';
|
||||
$defTable = 'sysAlarmConf';
|
||||
$logTable = 'sysAlarmLog';
|
||||
|
||||
$alarmNumArr[1][number] =0;
|
||||
$alarmNumArr[1][title] ="Critical Alarm";
|
||||
$alarmNumArr[1][bgcolor]="#FF0000";
|
||||
//$alarmNumArr[1][bgcolor]="#FF9900";
|
||||
|
||||
$alarmNumArr[2][number] =0;
|
||||
$alarmNumArr[2][title] ="Major Alarm";
|
||||
$alarmNumArr[2][bgcolor]="#FF9900";
|
||||
//$alarmNumArr[2][bgcolor]="#FFCC99";
|
||||
|
||||
$alarmNumArr[3][number] =0;
|
||||
$alarmNumArr[3][title] ="Minor Alarm";
|
||||
$alarmNumArr[3][bgcolor]="#FFFF99";
|
||||
|
||||
$alarmNumArr[4][number] =0;
|
||||
$alarmNumArr[4][title] ="Warning";
|
||||
$alarmNumArr[4][bgcolor]="#CCFFFF";
|
||||
|
||||
$alarmNumArr[5][number] =0;
|
||||
$alarmNumArr[5][title] ="Undefined Alarm";
|
||||
$alarmNumArr[5][bgcolor]="#99CCFF";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
|
||||
$showSql=" SELECT t2.alarmLevel,count(*) as number
|
||||
FROM $logTable as t1,$defTable as t2
|
||||
WHERE t1.clearTime = '0000-00-00 00:00:00'
|
||||
AND t1.sysTypeNo = t2.sysTypeNo
|
||||
AND t1.compCode = t2.compCode
|
||||
AND t1.alarmCode = t2.alarmCode
|
||||
GROUP BY t2.alarmLevel
|
||||
";
|
||||
if($DEBUG) echo "<br>showSql=$showSql";
|
||||
$result=@mysqli_query($pubConn,$showSql);
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
while($rows=@mysqli_fetch_array($result)){
|
||||
$alarmNumArr[$rows[alarmLevel]][number]=$rows[number];
|
||||
}
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
function refreshpage()
|
||||
{
|
||||
setInterval(ref,10000);
|
||||
}
|
||||
function ref()
|
||||
{
|
||||
window.location.href="./alarmNumList.php";
|
||||
}
|
||||
</script>
|
||||
|
||||
<body leftmargin="0" topmargin="0" onload="javascript:refreshpage();">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
A:link {text-decoration: none; color: #000000}
|
||||
A:visited {text-decoration: none; color: #000000}
|
||||
A:hover {text-decoration: none; color: #FFFFFF}
|
||||
-->
|
||||
</style>
|
||||
|
||||
<meta http-equiv="refresh" content="10 url=<?php echo "$PHP_SELF"; ?>">
|
||||
<meta http-equiv="pragma" content="no-cache">
|
||||
<div align="right">
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
<td width="55%" title="Serial Number">
|
||||
<?php
|
||||
echo "SN:<font color=\"$ttlSrlClr\">$ttlSerial</font>";
|
||||
?>
|
||||
</td>
|
||||
<td width="45%">
|
||||
<TABLE border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||||
<?
|
||||
//echo "<a href=\"../../fault/alarmList/alarmList_index.php\" >{$alarmNumArr[$i][number]}</a>";
|
||||
echo "<tr align=\"center\">";
|
||||
for($i=1;$i<=sizeof($alarmNumArr);$i++){
|
||||
echo "\n <td width=\"15%\" bgcolor=\"{$alarmNumArr[$i][bgcolor]}\" title=\"{$alarmNumArr[$i][title]}\">";
|
||||
echo "<b>{$alarmNumArr[$i][number]}</b>";
|
||||
echo "</td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
?>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user