<!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='type3072 empty' style=' margin: 10px;'>
    <table width='100%'>
        <tr><td style='border: none'> <h1>串口相机</h1></td></tr>
        <tr><td style='width: 200px;'>基本信息</td><td>SID:<span class='SID3072'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr3072'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port3072'> </span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd3072'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State3072'> </span></td></tr>
    </table>
    <div style='text-align: center;margin-top: 15px'>
        <img class='FileName3072' src='../images/"+ n.FileName+"'>
    </div>
    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
    </div>
<script>
var itype=3072;
var tescape= 5000,time;

<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbCam 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){
            $(".SID3072").html(n.SID);
            $(".Addr3072").html(n.Addr);
            $(".Port3072").html(n.Port%256);
            $(".DateUpd3072").html(n.DateUpd);
            $(".State3072").html(window.parent.parseState(n.State));
        });
        $("span:contains('故障'),span:contains('告警'),span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
        $("span:contains('正常')").addClass("ger").removeClass("red");
    }
</script>
</body>
</html>