area.asp 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!--#include file="Inc/common.asp"-->
  2. <!--#include file="Inc/MD5.asp"-->
  3. <!--#include file="Inc/Function.asp"-->
  4. <!--#include file="Admin_Common.asp"-->
  5. <%
  6. Dim uid, rse, width, rsRole, isAdmin
  7. uid = trim(request("uid"))
  8. if trim(Lcase(AdminName)) = "admin" then
  9. isAdmin = true
  10. else
  11. isAdmin = false
  12. end if
  13. Dim areaname, areaid, rschild
  14. areaid = request("id")
  15. set areaname = conn.execute("select classname from t_area where t_classid = " & areaid)
  16. areaname = areaname(0)
  17. set rschild = conn.execute("select child from t_area where t_classid = " & areaid)
  18. child = rschild(0)
  19. function getdClass(uid)
  20. dim rse2
  21. set rse2 = conn.execute("select devicename from t_dev_property where uid = '" & uid & "'")
  22. response.write "<strong>" & rse2(0) & "</strong>"
  23. end function
  24. dim sql
  25. %>
  26. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  27. <html xmlns="http://www.w3.org/1999/xhtml">
  28. <head>
  29. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  30. <title><%=systemPageTitle%></title>
  31. <link href="bs2010.css" rel="stylesheet" type="text/css" />
  32. <script type="text/javascript" src="js/share.js"></script>
  33. <script type="text/javascript" src="js/prototype.js"></script>
  34. <script language="javascript">
  35. function GetData()
  36. {
  37. url="alarm.asp";//调用页面
  38. var xmlhttp=null;
  39. if(window.XMLHttpRequest)
  40. {
  41. xmlhttp=new XMLHttpRequest();
  42. }
  43. if(!xmlhttp&&window.ActiveXObject)
  44. {
  45. try
  46. {
  47. xmlhttp=new ActiveXObject("Msxml2.XMLHTTP.5.0")
  48. }
  49. catch(e)
  50. {
  51. try
  52. {
  53. xmlhttp=new ActiveXObject("Msxml2.XMLHTTP.4.0")
  54. }
  55. catch(e){
  56. try
  57. {
  58. new ActiveXObject("Msxml2.XMLHTTP")
  59. }
  60. catch(e)
  61. {
  62. try{
  63. new ActiveXObject("Microsoft.XMLHTTP")
  64. }catch(e)
  65. {
  66. }
  67. }
  68. }
  69. }
  70. }
  71. if(!xmlhttp){alert("XMLHTTP不可用,请升级安装。");location="support/msxml.msi"}
  72. xmlhttp.open("GET",url,false);
  73. xmlhttp.send();
  74. var str = xmlhttp.responseText;
  75. document.getElementById("loadcontent").innerHTML=str;
  76. setTimeout("GetData()",<%=refreshRate%>);
  77. }
  78. </script>
  79. </head>
  80. <body onLoad="javascript:GetData();">
  81. <div class="mainbg">
  82. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  83. <tr>
  84. <td valign="top">
  85. <div id="loadcontent">
  86. <p></p>
  87. 数据载入中……</div>
  88. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  89. <tr>
  90. <td>&nbsp;</td>
  91. </tr>
  92. </table>
  93. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  94. <tr>
  95. <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  96. <tr>
  97. <td align="center">
  98. <%
  99. filename = "\images\area\"&areaid&".jpg"
  100. if not fso.fileExists(server.mappath(filename)) then
  101. response.write "<img src='images/area/area_eg.jpg'>"
  102. else
  103. response.write "<img src='images/area/"&areaid&".jpg'>"
  104. end if
  105. %>
  106. </td>
  107. </tr>
  108. </table></td>
  109. </tr>
  110. </table>
  111. </td>
  112. </tr>
  113. </table>
  114. </body>
  115. </html>
  116. <%
  117. Call CloseConn
  118. %>