listtojs.jsp
资源名称:JSP-OA.rar [点击查看]
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:1k
源码类别:
Jsp/Servlet
开发平台:
Java
- <%@ page contentType="text/html;charset=utf-8"%>
- <%@ page import="cn.js.fan.web.*"%>
- <%@ page import="cn.js.fan.db.*"%>
- <%@ page import="cn.js.fan.util.*"%>
- <%@ page import="com.redmoon.forum.*"%>
- <%
- MsgDb md = new MsgDb();
- String boardcode = "sqzw";
- boardcode = ParamUtil.get(request, "boardcode");
- if (boardcode.equals(""))
- boardcode = "sqzw";
- int len = 10;
- try {
- len = ParamUtil.getInt(request, "len");
- }
- catch (ErrMsgException e) {
- }
- String sql = "select id from sq_thread where boardcode="+StrUtil.sqlstr(boardcode)+" and msg_level<=" + MsgDb.LEVEL_TOP_BOARD + " ORDER BY msg_level desc,redate desc";
- ThreadBlockIterator irmsg = md.getThreads(sql, boardcode, 0, len);
- while (irmsg.hasNext()) {
- md = (MsgDb)irmsg.next();
- %>
- document.write('<a href="<%=Global.getRootPath()%>/forum/showtopic.jsp?rootid=<%=md.getId()%>"><%=md.getTitle()%></a>' + ' [<a href="<%=Global.getRootPath()%>/userinfo.jsp?username=<%=StrUtil.UrlEncode(md.getName())%>"><%=md.getName()%></a> <%=DateUtil.format(md.getAddDate(), "yy-MM-dd HH:mm")%>]<br>');
- <%
- }
- %>
- //<script src="http://www.zjrj.cn/forum/listtojs.jsp?boardcode=sqzw&len=10"></script>