📄 online.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="con" scope="page" class="numb1.com.db"/>
<jsp:useBean id="ht" scope="page" class="numb1.com.Dohtml"/>
<jsp:useBean id="onLine" scope="application" class="numb1.com.onLine"/>
<%@ include file = "include/config.jsp" %>
<%
String id =(String)session.getAttribute("id");id=ht.donull(id);
String root =(String)session.getAttribute("root");root=ht.donull(root);
String user = (String)request.getParameter("user");user=ht.donull(user);
if(root.compareTo("")==0){root="0";}
int step=Integer.parseInt(root);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>当前在线会员列表</title>
<style type="text/css">
<!--
p{text-indent:18pt;font-size:13px}
td{font-size:13px}
th{font-size:15px}
a:link{text-decoration:none;color:#0000ff}
a:visited{text-decoration:none;color:#0000ff}
a:hover{text-decoration:underline;color:#96CCFE}
.link {color:#585858}
.link a:link{text-decoration:none;color:#585858}
.link a:visited{text-decoration:none;color:#585858}
.link a:hover{text-decoration:underline;color:#96CCFE}
body {
margin-bottom: 2px;
margin-top: 0px;
}
.style7 {color: #FF0000}
-->
</style>
</head>
<body>
<table width="750" border="0" align="center" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<table width="750" border="0" align="center">
<tr>
<td height="50"><img src="img/mei.jpg" width="746" height="105"></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0">
<tr>
<td height="8" colspan="2"> </td>
</tr>
<tr>
<td width="63%" height="20" bgcolor="#f8f8f8"> <a href="first.jsp">论坛</a> > <span class="style7">在线会员</span> </td>
<td width="37%" bgcolor="#f8f8f8"><div align="right">当前再线人数:<%=onLine.gCount()%> 其中会员:<a href="<%=request.getRequestURI().substring(request.getRequestURI().lastIndexOf("/")+1)%>"><%=onLine.gUCount()%></a> 游客:<a href="?user=guest"><%=(onLine.gCount()-onLine.gUCount())%></a> </div></td>
</tr>
</table></td>
</tr>
<tr>
<td><hr></td>
</tr>
</table><!--
<table width="750" border="0" align="center">
<tr>
<td><div align="right">
<? if($pageall>1){ if($page>1){?><a
href="display.php?bdid=<? echo $bdid;?>&bbsid=<? echo $bbsid;?>">首页</a> <a
href="display.php?bdid=<? echo $bdid;?>&bbsid=<? echo $bbsid;?>&page=<? echo ($page-1);?>">上一页</a><? }
if($page<$pageall){?> <a href="display.php?bdid=<? echo $bdid;?>&bbsid=<? echo $bbsid;?>&page=<? echo ($page+1);?>">下一页</a> <a
href="display.php?bdid=<? echo $bdid;?>&bbsid=<? echo $bbsid;?>&page=<? echo $pageall;?>">尾页</a><? }}?>
第<? echo $page;?>页 共<? echo $pageall;?>页 回复<? echo $count;?>帖 </div></td>
</tr>
</table>-->
<%
String[] Str1=onLine.getuId();
String[] Str2=onLine.getuName();
String[] Str3=onLine.getuIP();
String[] Str4=onLine.getuPage();
String pName="",bdid="",sql="";
if(user.compareTo("guest")!=0){
%>
<table width="750" border="0" align="center" cellspacing="1" style="BORDER-LEFT: #d1d1df 1px solid; BORDER-RIGHT: #d1d1df 1px solid; BORDER-TOP: #d1d1df 1px solid">
<tr bgcolor="#e8e8e8">
<td width="116"><div align="center">用户</div></td>
<td width="126"><div align="center">加入好友</div></td>
<td width="168"><div align="center">发留言</div></td>
<td width="178"><div align="center">IP地址</div></td>
<td width="144"><div align="center">所在位置</div></td>
</tr>
</table>
<%
for(int i=0;i<Str1.length;i++){
if(Str1[i]=="guest"){continue;}
else{
if(Str4[i].compareTo("first.jsp")==0){pName="<a href="+Str4[i]+" target=_blank>论坛首页</a>";}else{
bdid=Str4[i].substring(Str4[i].lastIndexOf("=")+1);
sql="select name from board where id="+bdid;
ResultSet bdname=con.query(sql);bdname.next();
if(bdname.getRow()!=0){
pName="<a href="+Str4[i]+" target=_blank>"+con.getStr(bdname.getString(1))+"</a>";
}
}
%>
<table width="750" border="0" align="center" cellspacing="1" style="BORDER-LEFT: #d1d1df 1px solid; BORDER-RIGHT: #d1d1df 1px solid;">
<tr bgcolor="#f8f8f8">
<td width="115"><div align="center"><a href="aboutuser.jsp?id=<%=Str1[i]%>" target="_blank"><%=Str2[i]%></a></div></td>
<td width="128"><div align="center">加入</div></td>
<td width="168"><div align="center"><a href="massage/msend.php?id=<%=Str1[i]%>" target="_blank">发送</a></div></td>
<td width="181"><div align="center"><% if(step>2){out.print(Str3[i]);}else{out.print(Str3[i].substring(0,(Str3[i].lastIndexOf(".")+1))+"*");}%></div></td>
<td width="140"><div align="center"><%=pName%></div></td>
</tr>
</table>
<%
}
}
}else{
%>
<table width="750" border="0" align="center" cellspacing="1" style="BORDER-LEFT: #d1d1df 1px solid; BORDER-RIGHT: #d1d1df 1px solid; BORDER-TOP: #d1d1df 1px solid">
<tr bgcolor="#e8e8e8">
<td width="141"><div align="center">游客</div></td>
<td width="261"><div align="center"></div>
<div align="center">IP地址</div></td>
<td width="336"><div align="center">所在位置</div></td>
</tr>
</table><%
for(int j=0;j<Str1.length;j++){
if(Str1[j]!="guest"){continue;}
else{
if(Str4[j].compareTo("first.jsp")==0){pName="<a href="+Str4[j]+" target=_blank>论坛首页</a>";}else{
bdid=Str4[j].substring(Str4[j].lastIndexOf("=")+1);
sql="select name from board where id="+bdid;
ResultSet bdname=con.query(sql);bdname.next();
if(bdname.getRow()!=0){
pName="<a href="+Str4[j]+" target=_blank>"+con.getStr(bdname.getString(1))+"</a>";
}
}
%>
<table width="750" border="0" align="center" cellspacing="1" style="BORDER-LEFT: #d1d1df 1px solid; BORDER-RIGHT: #d1d1df 1px solid;">
<tr bgcolor="#f8f8f8">
<td width="142"><div align="center"><%=Str1[j]%></div></td>
<td width="260"><div align="center"><% if(step>2){out.print(Str3[j]);}else{out.print(Str3[j].substring(0,(Str3[j].lastIndexOf(".")+1))+"*");}%></div></td>
<td width="336"><div align="center"><%=pName%></div></td>
</tr>
</table>
<%
}
}
}
%>
<table width="750" border="0" align="center" style="BORDER-TOP: #d1d1df 1px solid">
<tr>
<td height="15"><div align="center"></div></td>
</tr>
</table>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20" bgcolor="#f0f0f0"><div align="center"></div></td>
</tr>
</table>
</body>
</html>
<%
//}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -