<%@ Language=VBScript %>
<%Option Explicit%>
<!-- #INCLUDE FILE = "../inc.asp" -->
<%Response.Buffer = True
Response.Expires = 0

Dim iGUID
iGUID = Request.QueryString("GUID")
%>
<html>
<head>
<script src="../inc.js" language="javascript"></script>
<script>document.write("<title>"+Title+"</title>");</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manager.css">
</head>
<body <%=g_BodyTag%>>
<%
If iGUID = Empty Then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>请您先登陆。</td>
  </tr>
</table>
<%
Else
	Dim oChat, rst
	Set oChat = Server.CreateObject("LSChat.Users")
	oChat.Configure g_SiteName, g_SiteDomain, g_DBString, g_ErrFile, g_ScriptName

	Set rst = oChat.GetChatUser(iGUID)
	If rst.EOF Then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>未找到该用户记录。</td>
  </tr>
</table>
<%
	Else
		Dim rstGroups, i, sGroupOptions
		Set rstGroups = oChat.GetChatGroups
		For i = 1 To rstGroups.RecordCount
			If rst("ChatGroup") = rstGroups("GroupName") Then
				sGroupOptions = sGroupOptions & "<option value=""" & rstGroups("GroupName") & """ selected>" & rstGroups("GroupName") & "</option>"
			Else
				sGroupOptions = sGroupOptions & "<option value=""" & rstGroups("GroupName") & """>" & rstGroups("GroupName") & "</option>"
			End If
			rstGroups.MoveNext
		Next
		rstGroups.Close
		Set rstGroups = Nothing
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="solid1">
  <form name="form" method="post" action="m_musergroup.asp">
    <tr> 
      <td bgcolor="#FFFFFF"> 
        <table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr align="center"> 
            <td colspan="2" background="images/admin_bg_1.gif"><font color="#FFFFFF"><b>查看用户资料</b></font></td>
          </tr>
          <tr align="left" bgcolor="#BCCBF5"> 
            <td colspan="2"><b>聊天室用户信息</b></td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td width="30%"> <b>昵称：</b> <br>
            </td>
            <td width="70%"><%=rst("NickName")%> </td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td><b>状态：</b></td>
            <td> 
              <select name="State">
                <%If rst("State") = 1 Then%>
                <option value="1" selected>正常</option>
                <option value="2">暂时禁用</option>
                <option value="0">完全禁用</option>
                <%ElseIf rst("State") = 0 Then%>
                <option value="1">正常</option>
                <option value="2">暂时禁用</option>
                <option value="0" selected>完全禁用</option>
                <%ElseIf rst("State") = 2 Then%>
                <option value="1">正常</option>
                <option value="2" selected>暂时禁用</option>
                <option value="0">完全禁用</option>
                <%End If%>
              </select>
            </td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td><b>组：</b></td>
            <td> 
              <select name="ChatGroup">
                <%=sGroupOptions%> 
              </select>
            </td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td> <b>性别：</b></td>
            <td> 
              <%If rst("Sex") Then%>
              男 
              <%Else%>
              女 
              <%End If%>
            </td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td><b>是否公开性别：</b></td>
            <td> 
              <%If rst("ShowSex") Then%>
              是 
              <%Else%>
              否 
              <%End If%>
            </td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td> <b>生日：</b></td>
            <td> <%=rst("Birthday")%> </td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td> <b>是否公开年龄：</b></td>
            <td> 
              <%If rst("ShowSex") Then%>
              是 
              <%Else%>
              否 
              <%End If%>
            </td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td> <b>电子邮件：</b></td>
            <td><%=rst("Email")%> </td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td><b>肖像：</b></td>
            <td><img src="<%="../" & rst("Portrait")%>"> </td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td><b>个性宣言：</b></td>
            <td><%=ConvertHTML(rst("AboutMe"))%></td>
          </tr>
          <tr bgcolor="#DEE5FA"> 
            <td colspan="2"> 该账号最后登陆时间是 <b><%=rst("LastLogin")%></b> ，登陆聊天 <b><%=rst("Logins")%></b> 
              次，在线 <b><%=rst("ChatMinutes")%></b> 分钟，共计发言 <b><%=rst("ChatWords")%></b> 
              字节。 </td>
          </tr>
          <tr bgcolor="#DEE5FA" align="right"> 
            <td colspan="2"> 
              <input type="hidden" name="GUID" value="<%=iGUID%>">
              <input type="button" name="back" value="返回" onClick="history.go(-1);">
              <input type="submit" name="Submit" value="提交">
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </form>
</table>
<%
	End If
	rst.Close
	Set rst = Nothing
	Set oChat = Nothing
End If
%>
<!-- #INCLUDE File = "../bottom.asp" -->
</body>
</html>