<%@ Language=VBScript %>
<%Option Explicit%>
<!-- #INCLUDE FILE = "inc.asp" -->
<%
Dim oChat, rst
Dim i, iBound, j, sTemp
Set oChat = Server.CreateObject("LSChat.ChatRooms")
oChat.Configure g_SiteName, g_SiteDomain, g_DBString, g_ErrFile, g_ScriptName

Set rst = oChat.GetChatGroups

iBound = rst.RecordCount

Function checkBox(iFunctionCode, sGroup)
	Dim aRights, k
    checkBox = False
    If sGroup <> Empty Then
		If InStr(sGroup, ",") = 0 Then
            If CInt(sGroup) = iFunctionCode Then checkBox = True
        Else
            aRights = Split(sGroup, ",")
            For k = 0 To UBound(aRights)
				If iFunctionCode = CInt(aRights(k)) Then
					checkBox = True
					Exit For
				End If
            Next
        End If
    End If
End Function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script src="inc.js" language="javascript"></script>
<script>document.write("<title>"+Title+" - 级别查看页面</title>");</script>
<link rel="stylesheet" href="common.css" type="text/css">
</head>
<body <%=g_BodyTag%>>
<!-- #INCLUDE File = "top.asp" -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td bgcolor="#000000" background="images/titlebg.gif">
        <table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr> 
            <th colspan="14"><font color="#FFFFFF">聊天室组列表</font></th>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td align="center">组名</td>
            <td align="center">改组</td>
            <td align="center">广告Ⅰ</td>
            <td align="center">广告Ⅱ</td>
            <td align="center">帮助</td>
            <td align="center">HTML</td>
            <td align="center">图片</td>
            <td align="center">踢人</td>
            <td align="center">封杀</td>
            <td align="center">漫游</td>
            <td align="center">拯救</td>
            <td align="center">音乐</td>
            <td align="center">大字体</td>
            <td align="center">状态</td>
          </tr>
          <%For i = 1 To iBound%>
          <tr bgcolor="#DEE5FA"> 
            <td align="center">
            <%=rst("GroupName") & " （" & rst("Priority") & "级）"%>
            </td>
            <%sTemp = Empty
            For j = 0 To 12
				sTemp = sTemp & "<td align=""center"">"
				If checkBox(j, rst("Authorities")) Then
					sTemp = sTemp & "<font color=""green"">√</font>"
				Else
					sTemp = sTemp & "<font color=""red"">×</font>"
				End If
			Next
			  Response.Write sTemp
            %>
          </tr>
          <%
          rst.MoveNext
          Next%>
          <tr bgcolor="#DEE5FA"> 
            
          <td align="center">聊天命令</td>
            <td align="center">/chgrp</td>
            <td align="center">/ad</td>
            <td align="center">/adc</td>
            <td align="center">/help</td>
            <td align="center">/html</td>
            <td align="center">/img</td>
            <td align="center">/kick</td>
            <td align="center">/kill</td>
            <td align="center">/message</td>
            <td align="center">/rescue</td>
            <td align="center">/sing</td>
            <td align="center">/size</td>
            <td align="center">/status</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
<!-- #INCLUDE File = "bottom.asp" -->
</body>
</html>
<%
rst.Close
Set rst = Nothing
Set oChat = Nothing
%>