ITPub博客

首页 > 应用开发 > IT综合 > 一种新的编程思路(下):附 bbs之forum.jsp (转)

一种新的编程思路(下):附 bbs之forum.jsp (转)

原创 IT综合 作者:worldblog 时间:2007-12-12 10:03:21 0 删除 编辑
一种新的编程思路(下):附 bbs之forum.jsp (转)[@more@]

forum.JSP

--------------------------------------------------------------------------

<%@page contentType="text/html;charset=GBK" %>
<%@include file="head.jsp"%>

<%@include file="ntGBDP2002_Define.jsp" %>
<%
  file://全局变量定义
  globalTableName = "bbs_article";
  parentKey  = "帖子";
  parentValue  = "";
  dbName  = "mhoa";
%>

<%
  int forumId = 0;
  if( request.getParameter("forumId") == null )
  {
  out.println("");
  return;
  }
  forumId = Integer.parseInt(request.getParameter("forumId"));
 
  sql =
  " select top "+ maxReturnRows +" * from " + globalTableName + "_datetime " +
  "  where k ='改贴时间' "+
  "  and pid in ( select id from " + globalTableName + "_main "+
  "  where k='"+parentKey+"' and v='"+parentValue+"' ) "+
  "  and pid in ( select pid from " + globalTableName + "_int "+
  "  where k='论坛id' and v = "+ forumId +" ) "+
  "  and pid in ( select pid from " + globalTableName + "_int "+
  "  where k='父贴id' and v = 0 ) "+
  "  order by v desc "+
  ""; 
  ntP.executeQuery( dbName , sql);
 
  file://校正次序
 
 
  out.println("<!-- "+ sql +" -->");
%>

<%@include file="ntPage.jsp"%>



闵行办公自动化<A href="tag-165-1.html">系统</A>BBS




 
 
 


 
 
 

 
  title=Search
  src="images/top10.gif"
  align=absMiddle border=0 name=search width="15" height="15"> 注册
  |   title=Search
  src="images/userlist.gif"
  align=absMiddle border=0 name=search width="16" height="16"> 个人资料
  |   title="Members List"
  src="images/yj.gif"
  align=absMiddle border=0 name=members width="16" height="16"> 用户登入
  |   title=Search
  src="images/icon_search.gif"
  align=absMiddle border=0 name=search width="16" height="15"> 论坛搜索
  |   title=Search
  src="images/gohome.gif"
  align=absMiddle border=0 name=search width="15" height="15"> 返回论坛首页
  |   title=Search
  src="images/gohome.gif"
  align=absMiddle border=0 name=search width="15" height="15"> 返回OA首页  
 

 


 
 
 
 
 
 
 
 
 
 
 
 
 
  RM name="form1" method="post" action="">
 

  <%@include file="forum_jump_select.jsp"%>
 

 
">  

 

 
 
 
 
 

 
 
 
 
 
 

 

 
 <%= nt.getKV( dbName,"forumDefine", forumId ,"论坛名称") %> > ( 版主: <%= nt.getKV( dbName,"forumDefine", forumId ,"斑竹") %> )

 

 
 
 
 
 

 
 
 
 
 
 
 
 
<% 
  for(int i=iStart;i  int _pid = Integer.parseInt( ntP.data(i,"pid"));

  String _name = nt.getKV( dbName,globalTableName ,_pid ,"贴子标题");
  if( _name.equals("") )
  _name = "( 空 )";
  if( !nt.getKV( dbName,globalTableName+"_int" ,_pid ,"父贴id").equals("0") )
  _name = "  "+_name; 
%>
 
 


 
 
 
 
 
 
 
<% } %> 
 
 
 
 

 
主 题

 

 
作者

 

 
回复数

 

 
人气指数

 

 
最后发表

 

 
 
<%= _name %> 
  <%=
  nt.getKV( dbName,"bbs_users" ,nt.getKV( dbName,globalTableName+"_int" ,_pid ,"发贴人id"),"用户名")
  %>
 

 
<%=
  nt.executeQuery( dbName,
  " select * from bbs_article_int where k ='父贴id' and v= "+ _pid +" ")
%>

 

 
<%= nt.getKV( dbName,globalTableName+"_int" , _pid ,"人气") %>

 

 
<%= nt.getKV( dbName,globalTableName+"_datetime" ,_pid ,"发贴时间",0,19) %>

 


  <%@include file="ntPageShow.jsp"%>
 

 

 

  <%@include file="forum_jump_select.jsp"%>
 

 
">  

 






来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10752043/viewspace-991643/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    6241
  • 访问量
    2410641