⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showdoc.java

📁 BBS-CS是采用JSP+JavaBean+Servlet开发的一套网络虚拟社区系统. 运行平台: Liunx + JDK + Apache + Tomcat + MYSQL 或 Window
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package com.laoer.bbscs.bbs;import java.sql.*;import java.io.*;import java.util.*;import com.laoer.bbscs.db.*;import com.laoer.bbscs.txthtml.*;import com.laoer.bbscs.admin.BBSConf;/** * <p>Title: BBS-CS</p> * <p>Description: BBS-CS(BBS式虚拟社区系统)</p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: loveroom.com.cn</p> * @author 龚天乙(laoer) * @version 3.0 */public class ShowDoc {  String SQL = "";  DbTrans DBSQL;  DoText myDoText;  ResultSet rs = null;  public ShowDoc() {      this.DBSQL = new DbTrans();      this.myDoText = new DoText();  }  public String getShowDoc(String recid,String bid,String pages,String strUserID, String strUserName,String strPost,int attrib,boolean isGuestUser,boolean isSuper,boolean isBulletin,boolean isBoardMaster,boolean isBoardsMaster,boolean isBoardsMaster1,boolean isBoardsMaster2) {      BBSConf myBBSConf = new BBSConf();      String strShowDoc = "";      setAddClick(recid);      String tabledarkcolor = myBBSConf.gettabledarkcolor();      String tablemaincolor = myBBSConf.gettablemaincolor();      String tabletintcolor = myBBSConf.gettabletintcolor();      SQL = "select * from forum where id2="+ recid +" and delsign = 0 order by id";      try {          rs = DBSQL.executeQuery(SQL);          while (rs.next()) {              strShowDoc += "<table width=98% border=0 align=center cellpadding=0 cellspacing=0>\n<tr>\n";              strShowDoc += "<td bgcolor="+tablemaincolor+" height=23> <font color=#FFFFFF>主题:"+myDoText.iso2gb(rs.getString("title"))+"</font></td>\n</tr>\n";              strShowDoc += "<tr>\n";              strShowDoc += "<td height=84 bgcolor="+tabletintcolor+">\n";              strShowDoc += "<table width=98% border=0 align=center>\n<tr>\n";              strShowDoc += "<td width=73%><img src='images/"+rs.getInt("bq")+".gif' align=absmiddle>";              if (rs.getInt("cannotdel")==1) {                  strShowDoc += "<font color=#8f0000>&nbsp;M</font>";              }              strShowDoc += " <span class=bt>作者:"+myDoText.iso2gb(rs.getString("name"))+"("+myDoText.iso2gb(rs.getString("nickname"))+") "+rs.getString("time")+"</td>\n";              strShowDoc += "<td width=25%>\n";              strShowDoc += "<div align=right>";              if (!isGuestUser) {                  strShowDoc += "<a href='vot.jsp?bid="+bid+"&recid="+rs.getInt("id")+"&mainid="+rs.getInt("id2")+"&pages="+pages+"&action=zc' target=mainFrame>";                  strShowDoc += "<img alt=赞成 border=0 height=16 src=images/app.gif width=16></a>:"+rs.getInt("zc");              }              else {                  strShowDoc += " <img alt=赞成 border=0 height=16 src=images/app.gif width=16>:"+rs.getInt("zc");              }              if (!isGuestUser) {                  strShowDoc += " <a href='vot.jsp?bid="+bid+"&recid="+rs.getInt("id")+"&mainid="+rs.getInt("id2")+"&pages="+pages+"&action=fd' target=mainFrame>";                  strShowDoc += "<img alt=反对 border=0 height=16 src=images/obj.gif width=16></a>:"+rs.getInt("fd");              }              else {                  strShowDoc += " <img alt=反对 border=0 height=16 src=images/obj.gif width=16>:"+rs.getInt("fd");              }              if (!isGuestUser) {              strShowDoc += " <a href='userinfo.jsp?UID="+rs.getInt("UID")+"' target=mainFrame><img alt=用户信息 border=0 height=16 src=images/per_info.gif width=16></a> ";              strShowDoc += "<a href='guestbook.jsp?Fname="+myDoText.iso2gb(rs.getString("name"))+"'target=new><img alt=发送短信 border=0 height=16 src=images/sendmsg.gif width=16></a> ";              }              else {              strShowDoc += " <img alt=用户信息 border=0 height=16 src=images/per_info.gif width=16> ";              strShowDoc += "<img alt=发送短信 border=0 height=16 src=images/sendmsg.gif width=16> ";              }              strShowDoc += "<img alt='用户IP:";              if (isSuper || isBoardMaster || isBoardsMaster || isBoardsMaster1 || isBoardsMaster2) {                  strShowDoc += rs.getString("ip");              }              else {                  strShowDoc += "隐藏";              }              strShowDoc += "' border=0 height=16 src=images/ip.gif width=16></div>\n</td>\n</tr>\n<tr>";              strShowDoc += "<td colspan=2>\n";              strShowDoc += "<div align=right><span class=bt>";              if ((isSuper || isBoardMaster || isBoardsMaster || isBoardsMaster1 || isBoardsMaster2) && (!isGuestUser)) {                  strShowDoc += "[<a href='cannotdel.jsp?recid="+ rs.getInt("id") +"&mainid="+ rs.getInt("id2") +"&bid="+ bid +"&pages="+ pages +"&UID="+ rs.getInt("UID") +"' target=mainFrame>保留标记</a>] ";              }              if ((isSuper || isBoardMaster || isBoardsMaster || isBoardsMaster1 || isBoardsMaster2) && (!isGuestUser)) {                  strShowDoc += "[<a href='jrjh.jsp?recid="+ rs.getInt("id") +"&mainid="+ rs.getInt("id2") +"&bid="+ bid +"&pages="+ pages +"&UID="+ rs.getInt("UID") +"' target=mainFrame>加入精华</a>] ";              }              if ((isSuper || isBoardMaster || isBoardsMaster || isBoardsMaster1 || isBoardsMaster2 || (rs.getString("name").equals(strUserName) && rs.getInt("cannotre") == 0)) && (!isGuestUser)) {                  strShowDoc += "[<a href='delforum.jsp?recid="+ rs.getInt("id") +"&bid="+ bid +"&pages="+ pages +"' target=mainFrame>删除</a>] ";              }              if (((rs.getString("name").equals(strUserName) && rs.getInt("cannotre") == 0) || isSuper || isBoardMaster || isBoardsMaster || isBoardsMaster1 || isBoardsMaster2) && (!isGuestUser)) {                  strShowDoc += "[<a href='change.jsp?bid="+ bid +"&recid="+ rs.getInt("id") +"&mainid="+ rs.getInt("id2") +"&pages="+ pages +"' target=mainFrame>修改</a>] ";              }              if (attrib!=2 && strPost.equals("0") && (!isGuestUser)) {                  strShowDoc += "[<a href='repost.jsp?bid="+bid+"&recid="+rs.getInt("id")+"&mainid="+rs.getInt("id2")+"&pages="+pages+"' target=mainFrame>回复</a>] ";              }              if (!isGuestUser) {                  strShowDoc += "[<a href='zhuantie.jsp?bid="+bid+"&recid="+rs.getInt("id")+"&mainid="+rs.getInt("id2")+"&pages="+pages+"' target=mainFrame>转贴</a>]</span></div>";              }              strShowDoc += "</td>\n</tr>\n";              strShowDoc += "<tr bgcolor=#FFFFFF>\n";              strShowDoc += "<td colspan=2 height=13>\n";              strShowDoc += "<table width=98% border=0 align=center cellpadding=2 cellspacing=3>\n";              strShowDoc += "<tr>\n";              strShowDoc += "<td>"+myDoText.iso2gb(myDoText.changeColor(rs.getString("detail")))+"<br>";              String sign = rs.getString("sign");              if (sign!=null && sign.length()>0) {                  strShowDoc += "<br><br>------<br>"+ myDoText.iso2gb(sign);              }              if (rs.getString("amend") != null && rs.getString("amend").length()>0) {                  strShowDoc += "<br>------<br><span class=bt><font color=#0099CC>"+myDoText.iso2gb(rs.getString("amend"))+"</font></span>";              }              strShowDoc += "</td>\n</tr>\n<tr>\n<td>\n";              strShowDoc += "<div align=right><a href=javascript:view1('send.jsp?recid="+rs.getInt("id")+"&bid="+bid+"'); target=mainFrame>将本文推荐给好友</a></div>\n";              strShowDoc += "</td>\n</tr>\n</table>\n</td>\n</tr>\n<tr>\n<td colspan=2>\n";              strShowDoc += "<div align=center><font face=Verdana, Arial, Helvetica, sans-serif><b><font size=2 color=#D40000>WWW.LOVEROOM.COM.CN</font></b></font></div>\n";              strShowDoc += "</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>\n<table width=615 border=0>\n<tr>\n<td  height=2></td>\n</tr>\n</table>\n";          }          rs.close();      }      catch (SQLException e) {      }      myBBSConf.close();      return strShowDoc;  }    public String getShowDoc(String recid,String bid,String pages,String strUserID, String strUserName,boolean isBoardsMaster,boolean isBoardsMaster1,boolean isBoardsMaster2) {      BBSConf myBBSConf = new BBSConf();      String strShowDoc = "";      //setAddClick(recid);      String tabledarkcolor = myBBSConf.gettabledarkcolor();      String tablemaincolor = myBBSConf.gettablemaincolor();      String tabletintcolor = myBBSConf.gettabletintcolor();      SQL = "select * from forum where id2="+ recid +" and delsign = 1 order by id";      try {          rs = DBSQL.executeQuery(SQL);          while (rs.next()) {              strShowDoc += "<table width=98% border=0 align=center cellpadding=0 cellspacing=0>\n<tr>\n";              strShowDoc += "<td bgcolor="+tablemaincolor+" height=23> <font color=#FFFFFF>主题:"+myDoText.iso2gb(rs.getString("title"))+"</font></td>\n</tr>\n";              strShowDoc += "<tr>\n";              strShowDoc += "<td height=84 bgcolor="+tabletintcolor+">\n";              strShowDoc += "<table width=98% border=0 align=center>\n<tr>\n";              strShowDoc += "<td width=73%><img src='images/"+rs.getInt("bq")+".gif' align=absmiddle>";              if (rs.getInt("cannotdel")==1) {                  strShowDoc += "<font color=#8f0000>&nbsp;M</font>";              }              strShowDoc += " <span class=bt>作者:"+myDoText.iso2gb(rs.getString("name"))+"("+myDoText.iso2gb(rs.getString("nickname"))+") "+rs.getString("time")+"</td>\n";              strShowDoc += "<td width=25%>\n";              strShowDoc += "<div align=right>";              //if (!isGuestUser) {              strShowDoc += " <a href='userinfo.jsp?UID="+rs.getInt("UID")+"' target=mainFrame><img alt=用户信息 border=0 height=16 src=images/per_info.gif width=16></a> ";              strShowDoc += "<a href='guestbook.jsp?Fname="+myDoText.iso2gb(rs.getString("name"))+"'target=new><img alt=发送短信 border=0 height=16 src=images/sendmsg.gif width=16></a> ";              //}              //else {              //strShowDoc += " <img alt=用户信息 border=0 height=16 src=images/per_info.gif width=16> ";              //strShowDoc += "<img alt=发送短信 border=0 height=16 src=images/sendmsg.gif width=16> ";              //}              strShowDoc += "<img alt='用户IP:";              if (isBoardsMaster || isBoardsMaster1 || isBoardsMaster2) {                  strShowDoc += rs.getString("ip");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -