<!DOCTYPE html>
<% language=javascript %>
<html>
<head lang="en">
    <meta charset="GB2312">
    <title></title>
    <link href="css/style.css" title="style" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.6.3.min.js"></script>

</head>
<body style="background: #F3F3F3">
<div class='type2072 empty' style=' margin: 10px;'>
  <table width="100%">
    <tr>
    <td width="300px" style="text-align: center;"><img src="img/ico-cyber.png" style="width: 60%;text-align: center;"></td>
    <td>
    <table width='100%'>
        <tr><td style='border: none'> <h1>空调监测</h1></td></tr>
        <tr><td style='width: 200px;'>基本信息</td><td>SID:<span class='SID2072'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr2072'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port2072'> </span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd2072'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State2072'> </span></td></tr>
    </table>
    <table width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>基本信息</h1></td></tr>
		<tr><td width='50%'>送风温度设定点: <span class='SupTemSet2072'></span></td><td width='50%'>空调类型: <span class='CfgType2072'></span></td></tr>
		<tr><td width='50%'>风机转速级别: <span class='FanSpeed2072'></span></td><td width='50%'>风机控制方式: <span class='FanCtrlMode2072'></span></td></tr>
		<tr><td width='50%'>机架入口最大温度: <span class='RackMaxTem2072'></span></td><td width='50%'>机架入口最小温度: <span class='RackMinTem2072'></span></td></tr>
		<tr><td>回风最大温度: <span class='RetAirMaxTem2072'></span></td><td width='50%'>回风最小温度: <span class='RetAirMinTem2072'></span></td></tr>
		<tr><td>机架入口温度: <span class='RackTem2072'></span></td><td width='50%'>送风温度: <span class='SupTem2072'></span></td></tr>
        <tr><td>回风温度: <span class='RetTem2072'></span></td><td> <span class='2072'></span></td></tr>
    </table>
    <table width='100%' style='margin-top: 30px'>
        <tr><td> <h1>报警状态</h1></td></tr>
		<tr><td>回风温度传感器1故障: <span class='ErrRetTemSen12072'></span></td><td>回风温度传感器2故障: <span class='ErrRetTemSen22072'></span></td></tr>
		<tr><td>送风温度传感器1故障: <span class='ErrSupTemSen12072'></span></td><td>送风温度传感器2故障: <span class='ErrSupTemSen22072'></span></td></tr>
		<tr><td>送风温度传感器3故障: <span class='ErrSupTemSen32072'></span></td><td>机架温度传感器故障: <span class='ErrRackTemSen12072'></span></td></tr>
    </table>
    </td>
    </tr>
  </table>
    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
</div>
<script>
var itype=2072;
var tescape= 5000,time;
  
<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbCyberInRowRD where SID="+sid,0);%>;
<% db_Close(); %>
	
$(function(){
   time=setInterval(ajax,tescape)
});
function ajax(){
    $.ajax({
        type: "POST",
        url: "omdev/smdat0.asp",
        data: "itype="+itype+"&sid="+sid,
        dataType:"json",
        success: function(msg){
            list3(msg); 
			
        }
    });
}

list3(json);
function list3(data){
    $.each(data.recs,function(i,n){
        $(".SID2072").html(n.SID);
        $(".Addr2072").html(n.Addr);
        $(".Port2072").html(n.Port%256);
        $(".DateUpd2072").html(n.DateUpd);
        $(".State2072").html(window.parent.parseState(n.State));
		
		$(".SupTemSet2072").html(n.SupTemSet+"℉");
		if (n.CfgType == 0)
			n.CfgType = "RACS";
		else if (n.CfgType == 1)
			n.CfgType = "Spot";
		else if (n.CfgType == 2)
			n.CfgType = "In-Row";
		else if (n.CfgType == 3)
			n.CfgType = "HACS";
		$(".CfgType2072").html(n.CfgType);
		if (n.FanSpeed == 0)
			n.FanSpeed = "Low";
		else if (n.FanSpeed == 1)
			n.FanSpeed = "Med-Low";
		else if (n.FanSpeed == 2)
			n.FanSpeed = "Med";
		else if (n.FanSpeed == 3)
			n.FanSpeed = "Med-High";
		else if (n.FanSpeed == 4)
			n.FanSpeed = "High";
		$(".FanSpeed2072").html(n.FanSpeed);
		$(".FanCtrlMode2072").html(n.FanCtrlMode ? "手动" : "自动");
		$(".RackMaxTem2072").html(n.RackMaxTem+"℉");
		$(".RackMinTem2072").html(n.RackMinTem+"℉");
		$(".RetAirMaxTem2072").html(n.RetAirMaxTem+"℉");
		$(".RetAirMinTem2072").html(n.RetAirMinTem+"℉");
		$(".RackTem2072").html(n.RackTem+"℉");
		$(".SupTem2072").html(n.SupTem+"℉");
		$(".RetTem2072").html(n.RetTem+"℉");
		
		$(".ErrRetTemSen12072").html(n.ErrRetTemSen1 ? "是" : "否");
		$(".ErrRetTemSen22072").html(n.ErrRetTemSen2 ? "是" : "否");
		$(".ErrSupTemSen12072").html(n.ErrSupTemSen1 ? "是" : "否");
		$(".ErrSupTemSen22072").html(n.ErrSupTemSen2 ? "是" : "否");
		$(".ErrSupTemSen32072").html(n.ErrSupTemSen3 ? "是" : "否");
		$(".ErrRackTemSen12072").html(n.ErrRackTemSen1 ? "是" : "否");
		
		
    })
	$("span:contains('故障'),span:contains('告警'),,span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
        $("span:contains('正常')").addClass("ger").removeClass("red");
    
}

</script>
</body>
</html>