📄 userinfo_list.jsp
字号:
<%@ page contentType="text/html;charset=utf-8"%>
<%@ page import="java.sql.*"%>
<%@ page import="cn.js.fan.db.*"%>
<%@ page import="cn.js.fan.util.*"%>
<%@ page import="cn.js.fan.web.*"%>
<%@ page import="com.redmoon.forum.person.*"%>
<%@ page import="com.redmoon.forum.plugin.witkey.*"%>
<%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
<%
String skincode = UserSet.getSkin(request);
if (skincode.equals(""))
skincode = UserSet.defaultSkin;
SkinMgr skm = new SkinMgr();
Skin skin = skm.getSkin(skincode);
if (skin==null)
skin = skm.getSkin(UserSet.defaultSkin);
String skinPath = skin.getPath();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link href="../../<%=skinPath%>/skin.css" rel="stylesheet" type="text/css">
<title>威客列表</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
}
-->
</style></head>
<body>
<%@ include file="../../inc/header.jsp"%>
<jsp:useBean id="StrUtil" scope="page" class="cn.js.fan.util.StrUtil"/>
<jsp:useBean id="privilege" scope="page" class="com.redmoon.forum.Privilege"/>
<div id="newdiv" name="newdiv">
<%
String querystring = StrUtil.getNullString(request.getQueryString());
String privurl=request.getRequestURL()+"?"+StrUtil.UrlEncode(querystring,"utf-8");
if (!privilege.isUserLogin(request))
{
response.sendRedirect("../../../door.jsp");
return;
}
long msgId = ParamUtil.getLong(request, "msgId", -1);
if (msgId==-1) {
out.print(SkinUtil.makeErrMsg(request, "缺少贴子编号!"));
return;
}
MsgDb md = new MsgDb();
md = md.getMsgDb(msgId);
String sql = "select msg_root_id,user_name from plugin_witkey_user where msg_root_id=" + msgId + " order by add_date desc";
WitkeyUserDb wud = new WitkeyUserDb();
int pagesize = 10;
Paginator paginator = new Paginator(request);
int curpage = paginator.getCurPage();
ListResult lr = wud.listResult(sql, curpage, pagesize);
int total = lr.getTotal();
Vector v = lr.getResult();
Iterator ir = null;
if (v!=null)
ir = v.iterator();
paginator.init(total, pagesize);
// 设置当前页数和总页数
int totalpages = paginator.getTotalPages();
if (totalpages==0)
{
curpage = 1;
totalpages = 1;
}
boolean isOwner = privilege.getUser(request).equals(md.getName());
%>
<div align="center"><font color="#706AD9"><br>
<strong>报名威客列表</strong></font><strong><br>
<br>
</strong>返回任务:<a href="<%=request.getContextPath()%>/forum/showtopic.jsp?rootid=<%=msgId%>"><%=md.getTitle()%></a><br>
<br>
</div>
<TABLE width="98%" border=0 align=center cellPadding=0 cellSpacing=1 bgcolor="#edeced">
<TBODY>
<TR class="td_title">
<TD width=10% height=23 align="center">用户名</TD>
<TD width=10% align="center">真实姓名</TD>
<TD width=10% align="center">所在城市</TD>
<TD width=10% align="center">联系电话</TD>
<TD width=10% align="center">OICQ号码</TD>
<TD width=23% height=23 align="center">其他联系方式</TD>
<TD width=15% align="center">报名时间</TD>
<TD width=12% align="center">投稿情况</TD>
</TR>
<%
UserDb ud = new UserDb();
String contribution = "";
while (ir.hasNext())
{
wud = (WitkeyUserDb)ir.next();
ud = ud.getUser(wud.getUserName());
Timestamp ts = new Timestamp(Long.parseLong(wud.getAddDate()));
if(wud.getContributionCount() > 0)
contribution = "<a href='../../showtopic.jsp?rootid=" + msgId + "&pluginCode=" + WitkeyUnit.code + "&replytype=" + WitkeyReplyDb.REPLY_TYPE_CONTRIBUTION + "&userName=" + wud.getUserName() + "'>" + "已交稿" + Integer.toString(wud.getContributionCount()) + "次" + "</a>";
else
contribution = "还未交稿";
%>
<TR bgColor=#f8f8f8 align="center">
<TD height=23><a href="../../../userinfo.jsp?username=<%=StrUtil.UrlEncode(wud.getUserName())%>" target="_blank"><%=ud.getNick()%></a></TD>
<TD height=23><%=isOwner?wud.getRealName():"*****"%></TD>
<TD height=23><%=wud.getCity()%></TD>
<TD height=23><%=isOwner?wud.getTel():"******"%></TD>
<TD height=23><%=isOwner?wud.getOicq():"*****"%></TD>
<TD height=23><%=isOwner?wud.getOtherContact():"*****"%></TD>
<TD height=23><%=DateUtil.format(DateUtil.parse(ts.toString(), "yyyy-MM-dd HH:mm:ss"), "yyyy-MM-dd HH:mm:ss")%></TD>
<TD height=23><%=contribution%></TD>
</TR>
<%
}
%>
</TBODY>
</TABLE>
<table width="98%" align="center">
<tr>
<td align="right"><%
String querystr = "";
out.print(paginator.getCurPageBlock(request, "userinfo_list.jsp?"+querystr));
%></td>
</tr>
</table>
</div>
<br>
<br>
<%@ include file="../../inc/footer.jsp"%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -