<%if session("adminname")="" then
response.Redirect "../login.asp"
end if
%>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/user.asp"-->
<!--#include file="../../conn/config.asp"-->
<script language="Javascript" src="/js/user.js"></script>
<link href="../css.css" REL="stylesheet" TYPE="text/css">
<%Response.Expires=0
nickname=Session("hxf_u_nickname")
grade=Int(Session("hxf_u_grade"))
if nickname="" or Session("hxf_u_inthechat")<>"1" then Response.Redirect "manerr.asp?id=100"
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
sj=n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
page=Request.QueryString("page")
if page="" then page=1
if Not(IsNumeric(page)) then page=1
page=int(page)
totalrec=Application("wsaxhxf_c_chatrs")
if totalrec/10=Int(totalrec/10) then
 totalpage=Int(totalrec/10)
else
 totalpage=Int(totalrec/10)+1
end if
if page<1 then page=1
p=(page-1)*10+1
onbeg=(page-1)*80+1
onend=onbeg+79
onlinelist=Application("wsaxhxf_c_onlinelist")
if onend>UBound(onlinelist) then onend=UBound(onlinelist)
dim show()
js=1
for i=onbeg to onend step 8
 Redim Preserve show(js),show(js+1),show(js+2),show(js+3),show(js+4),show(js+5),show(js+6)
 show(js)=onlinelist(i)
 show(js+1)=onlinelist(i+1)
 show(js+2)=onlinelist(i+2)
 show(js+4)=onlinelist(i+4)
 show(js+5)=onlinelist(i+5)
 show(js+6)=onlinelist(i+6)
 js=js+7
next
set onlinelist=nothing
qx = Split(Application("wsaxhxf_c_grade" & grade), "{]")
%>
<html>
<head>
<title>聊友信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="readonly/style.css">
<script Language=JavaScript>
var automanname = "<%=Application("wsaxhxf_c_automanname")%>";
var myn = "<%=nickname%>";
function cz(id){
document.kblform.uid.value=id;
}
function kbl(v){
 un = document.kblform.uid.value;
 if(un == ""){
  alert("请输入用户名！");
  return false
 }
 if(un == myn){
  alert("不能对自己执行管理操作！");
  return false
 }
 if(un == automanname){
  alert("不能对机器人执行管理操作！");
  return false
 }
 if(un == "大家"){
  alert("不能对大家执行管理操作！");
  return false
 }
 if(v == 1){
  window.open("exitchat2.asp?id=" + un, "", "width=380,height=120");
 }
 if(v == 2){
  window.open("lockip.asp?id=" + un, "", "width=380,height=120");
 }
 if(v == 3){
  window.open("manbomb.asp?id=" + un, "", "width=380,height=120");
 }
}
</script>
</head>
<body bgcolor="#FFFFFF" class=p150>
<div align="center">
<font color="0099FF">【聊友信息】</font>
<a href="javascript:history.go(0)">刷新</a> </div>
<hr noshade size="1" color=009900>
<table width="100%" border="0">

<tr><form name="kblform" action="" onSubmit="return false">
    <td> <b>［在线人员］</b>共 <font color=red><%=totalrec%></font> 人
    <td align="left">用户名：<input type="text" name="uid" maxlength="10" size="9" readOnly>
<input type="button" name="kick" value="踢人(S)" onClick="javascript:kbl(1)" accesskey="S"></td>
</form>
    
</tr>

</table>
<hr noshade size="1" color=009900>
本页刷新时间：<font color="#FF0000"><%=sj%></font><br>
<div align=center>
<%for i=1 to totalpage
if page=i then
 Response.Write " [" & i & "]"
else
Response.Write " <a href=maninfo.asp?page=" & i & ">[" & i & "]</a>"
end if
next%></div>
<table width="700" border="0" align="center" cellpadding="4" cellspacing="1" bordercolor="#639AFF" bordercolorlight="#999999" bordercolordark="#FFFFFF" bgcolor="#639AFF">
  <tr bgcolor="#639AFF"> 
    <td width="40" height="21"><font color="#FFFFFF">序号</font></td>
    <td width="119" height="21"><font color="#FFFFFF">用户昵称</font></td>
    <td><font color="#FFFFFF">性别</font></td>
    <td width="125" height="21"><font color="#FFFFFF">ＩＰ地址</font></td>
    <td width="211" height="21"><font color="#FFFFFF">进入时间</font></td>
    <td width="63" height="21"><font color="#FFFFFF">已停留</font></td>
    <td width="44" height="21"><font color="#FFFFFF">操作</font></td>

  </tr>
<%
if totalrec>0 then
j=0
for i=1 to UBound(show) step 7%>
  <tr onMouseOut="this.bgColor='#F0F0F0';"onmouseover="this.bgColor='#DFEFFF';" bgcolor="#f0f0f0"> 
    <td height="21"> 
    <%Response.Write p+j
j=j+1%>    </td>
	<%
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open "select * from snsn_user where username='"&show(i+1)&"'",conn,1,1
	%>
    <td height="21"><a href="javascript:;" onClick="showmenuie5('<%=rs("url")%>','<%=rs("id")%>','<%=rs("username")%>')" ><%=rs("username")%></A> </td>
    <td height="21"><%=rs("ch")%></td>
    <td height="21"> 
    <%
 showip = show(i+2) 
 if grade<12 then
  If qx(4) <> "4" Then 
    sip = Split(show(i+2) , ".") 
     if qx(4) = 0 then showip = "" 
     if qx(4) = 1 then showip = sip(0) & ".*.*.*" 
     if qx(4) = 2 then showip = sip(0) & "." & sip(1) & ".*.*" 
     if qx(4) = 3 then showip = sip(0) & "." & sip(1) & "." & sip(2) & ".*" 
  else
  showip = show(i+2)
 end if
 else
 showip = show(i+2)
 end if
    %> 
<%=showip%>    </td> 
    <td height="21"> 
    <% starttime = show(i+4)
    If grade < 12 Then
       If qx(1) <> "1" then
         starttime = ""
         else
         starttime = show(i+4)
       end if
     else
     starttime = show(i+4) 
     end if %> 
    <%=starttime%>    </td> 
    <td height="21"> 
    <%If grade < 12 Then
         if qx(3) <> "1" then
         stoptime = ""
         else
         stoptime = DateDiff("n", show(i+4), sj) & " 分"
         end if
       else
       stoptime = DateDiff("n", show(i+4), sj) & " 分"
     end if%> 
    <%=stoptime%>    </td> 
    <td height="21"><a href="javascript:cz('<%=show(i+1)%>')" onMouseOver="window.status='踢人。';return true" onMouseOut="window.status='';return true" title="踢人">KEL</a></td> 
   
  </tr> 
  <%next 
end if 
%> 
</table> 
<hr noshade size="1" color=009900> 
<div align=center class=cp></div>
</body> 
</html> 
 
 
 
 
 
 
 
 
 
