亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? forum.java

?? 這是用JAVA做的論壇系統(tǒng) 老師給的 讓我們參考
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
package net.acai.forum;
/**
 * Title:        清清網(wǎng)絡(luò)
 * Description:
 * Copyright:    Copyright (c) 2002
 * Company:      www.SuperSpace.com
 * @author:       SuperSpace
 * @version 1.0
 */
import net.acai.database.*;
import java.sql.*;
import net.acai.filter.*;
import net.acai.util.*;
import net.acai.forum.*;
import net.acai.util.Format;
import java.util.Vector;
import javax.servlet.http.*;
//import net.acai.forum.util.*;
import java.util.regex.*;

public class Forum{

	int forumID,forumClass,lockForum,forumSkin,lastBbsNum;
	int lastTopicNum,strAllowForumCode,strAllowHTML,strIMGInPosts;
	int strIcons,strFlash,lastRootID,todayNum;
	int voteID;
	String forumType,readMe,forumMaster;
	String tableBack,tableTitle,tableBody,aTableBody,tableFont,tableContent;
	String alertFont,lastPostUser,lastPostTime,forumLogo,indexIMG,lastTopic,forumUser;
	Vector forumOLUsers;
	int forumTopicNum;
	int forumOLGuestUsersNum=0,forumOLMemberUsersNum=0,forumsOLUsersNum=0;
	int forumMSGsNum=0;
	ForumTopic forumMSGTopic;
	public Forum(){
	}
	public Forum(HttpServletRequest request,HttpServletResponse response,int forumID) throws ForumNotFoundException{
		init(forumID);
		SkinUtil.checkUserStats(request,response,this.forumType);
		this.getOnline();
	}

	public Forum(int forumID) throws ForumNotFoundException{
		init(forumID);

		this.getOnline();
	}

	public void init(int forumID) throws ForumNotFoundException{
		try{
			DBConnect dbc=new DBConnect("select * from bbs.board where boardid=?");
			dbc.setInt(1,forumID);
			ResultSet rs=dbc.executeQuery();
			rs.next();
			this.forumID=rs.getInt(1);
			forumType=rs.getString(2);
			forumClass=rs.getInt(3);
			readMe=rs.getString(4);
			forumMaster=rs.getString(5);
			lockForum=rs.getInt(6);
			forumSkin=rs.getInt(7);
			tableBack=rs.getString(8);
			tableTitle=rs.getString(9);
			tableBody=rs.getString(10);
			aTableBody=rs.getString(11);
			tableFont=rs.getString(12);
			tableContent=rs.getString(13);
			alertFont=rs.getString(14);
			lastPostUser=rs.getString(15);
			lastPostTime=rs.getString(16);
			lastBbsNum=rs.getInt(17);
			lastTopicNum=rs.getInt(18);
			strAllowForumCode=rs.getInt(19);
			strAllowHTML=rs.getInt(20);
			strIMGInPosts=rs.getInt(21);
			strIcons=rs.getInt(22);
			strFlash=rs.getInt(23);
			forumLogo=rs.getString(24);
			indexIMG=rs.getString(25);
			lastRootID=rs.getInt(26);
			lastTopic=rs.getString(27);
			todayNum=rs.getInt(28);
			forumUser=rs.getString(29);
			dbc.clearParameters();
			dbc.close();
		}
		catch(Exception e){
			e.printStackTrace();
			throw new ForumNotFoundException();
		}
	}

	public Vector getOnline() throws ForumNotFoundException{
		try{
			DBConnect dbc=new DBConnect();
			dbc.prepareStatement("select * from bbs.online order by id");
			ResultSet rs=dbc.executeQuery();
			forumsOLUsersNum=rs.getRow();
			forumOLUsers=new Vector();
			dbc.prepareStatement("select * from bbs.online where stats like ? order by id");
			String tempForumType="%"+forumType+"%";
			dbc.setBytes(1,(new String(tempForumType.getBytes("ISO-8859-1"),"GBK")).getBytes());
			rs=dbc.executeQuery();

			while(rs.next()){//&&this.forumType.equals(rs.getString(4).trim())){

				OLUser tempOLUser=new OLUser();
				tempOLUser.setUserID(rs.getInt(1));
				if("guest".equals(rs.getString(2)))
					forumOLGuestUsersNum++;
				else
					forumOLMemberUsersNum++;
				tempOLUser.setUserName(rs.getString(2));
				tempOLUser.setUserClass(rs.getString(3));
				tempOLUser.setStats(rs.getString(4));
				tempOLUser.setUserIP(rs.getString(5));
				tempOLUser.setStartTime(rs.getString(6));
				tempOLUser.setLastTimeBK(rs.getString(7));
				tempOLUser.setLastTime(rs.getString(8));
				tempOLUser.setBrowser(rs.getString(9));
				tempOLUser.setActForIP(rs.getString(10));
				tempOLUser.setComeFrom(rs.getString(11));
				tempOLUser.setActCome(rs.getString(12));
				forumOLUsers.add(tempOLUser);

			}

			dbc.close();
			return forumOLUsers;
		}
		catch(Exception e){
			e.printStackTrace();
			throw new ForumNotFoundException();
		}
	}

	public Vector getForumTopics  (int forumID,int start ,int Page) throws ForumTopicNotFoundException{
		try
		{
			//DBConnect dbc=new DBConnect(2,0);
			DBConnect dbc=new DBConnect();
			ResultSet rs=dbc.executeQuery("select count(announceid) from bbs.bbs1 where boardID="+forumID+" and parentID=0  and  locktopic!=2");
			rs.next();
			forumTopicNum=rs.getInt(1);

			String sql="select count(Announceid) from bbs.bbs1 where istop=1 and layer=1 and boardid="+forumID;
			rs=dbc.executeQuery(sql);
			rs.next();
			int topNum=rs.getInt(1);
			rs.close();
			int maxAnnouncePerPage=Integer.parseInt(ForumPropertiesManager.getString("MaxAnnouncePerPage"));

			/*if(Page>1)
				sql="select * from bbs1 where boardID="+forumID+" and parentID=0\n and times < (select all (times) from bbs1 where boardID="+forumID+" and istop=0 and parentID=0 order by times desc limit 0,"+((Page-1)*maxAnnouncePerPage-topNum)+")  and\n  locktopic!=2 ORDER BY istop desc,times desc,announceid desc limit\n 0,"+maxAnnouncePerPage;
			else*/
				sql="select * from bbs.bbs1 where boardID="+forumID+" and parentID=0  and  locktopic!=2\n ORDER BY istop desc,times desc,announceid desc\n";

			dbc.prepareStatement(sql);
			rs=dbc.executeQuery();
			int num1 = ((Page-1)*maxAnnouncePerPage) ;
			int num2 = (((Page-1)*maxAnnouncePerPage)+maxAnnouncePerPage) ;
			int i = 0 ;
			int n = 0 ;
			Vector forumTopics=new Vector();
			while(rs.next()){
			
					i++;
					if(i<num1)continue;

					n++;
					if(n>num2)break;

					ForumTopic theTopic=new ForumTopic(rs.getInt(12));
					theTopic.setAnnounceID(rs.getInt(1));
					theTopic.setParentID(rs.getInt(2));
					theTopic.setChildNum(rs.getInt(3));
					theTopic.setForumID(rs.getInt(4));
					theTopic.setUserName(rs.getString(5));
					theTopic.setUserEmail(rs.getString(6));
					theTopic.setTopic(rs.getString(7));
					theTopic.setBody(rs.getString(8));
					theTopic.setDateAndTime(rs.getString(9));
					theTopic.setHits(rs.getInt(10));
					theTopic.setLength(rs.getInt(11));
					theTopic.setRootID(rs.getInt(12));
					theTopic.setLayer(rs.getInt(13));
					theTopic.setOrders(rs.getInt(14));
					theTopic.setIsBest(rs.getInt(15));
					theTopic.setUserIP(rs.getString(16));
					theTopic.setExpression(rs.getString(17));
					theTopic.setTimes(rs.getInt(18));
					theTopic.setLockTopic(rs.getInt(19));
					theTopic.setSignFlag(rs.getInt(20));
					theTopic.setEmailFlag(rs.getInt(21));
					theTopic.setIsTop(rs.getInt(22));
					theTopic.setIsVote(rs.getInt(23));
					forumTopics.add(theTopic);

				}

			dbc.close();
			return forumTopics;
		}
		catch ( ForumTopicNotFoundException  oe )
		{
			oe.printStackTrace();
			return null;
		}
		catch ( SQLException s3 )
		{
			s3.printStackTrace();
			return null;
		}
		catch(Exception e)
		{
			e.printStackTrace();
			throw new ForumTopicNotFoundException();
		}
	}
	public Vector getForumBestTopics  (int forumID,int start ,int perPage) throws ForumTopicNotFoundException{
		try{
			//DBConnect dbc=new DBConnect(2,0);
			DBConnect dbc=new DBConnect();
			dbc.prepareStatement("select * from bbs.bbs1 where boardID=? and isBest=1 and locktopic!=2  ORDER BY bbs1.times desc,bbs1.announceid desc");
			dbc.setInt(1,forumID);
			ResultSet rs=dbc.executeQuery();
			if(rs.last())
			forumTopicNum=rs.getRow();
			rs.absolute(start);
			int i=0;
			Vector forumTopics=new Vector();
			do
				{

					ForumTopic theTopic=new ForumTopic(rs.getInt(12));
					theTopic.setAnnounceID(rs.getInt(1));
					theTopic.setParentID(rs.getInt(2));
					theTopic.setChildNum(rs.getInt(3));
					theTopic.setForumID(rs.getInt(4));
					theTopic.setUserName(rs.getString(5));
					theTopic.setUserEmail(rs.getString(6));
					theTopic.setTopic(rs.getString(7));
					theTopic.setBody(rs.getString(8));
					theTopic.setDateAndTime(rs.getString(9));
					theTopic.setHits(rs.getInt(10));
					theTopic.setLength(rs.getInt(11));
					theTopic.setRootID(rs.getInt(12));
					theTopic.setLayer(rs.getInt(13));
					theTopic.setOrders(rs.getInt(14));
					theTopic.setIsBest(rs.getInt(15));
					theTopic.setUserIP(rs.getString(16));
					theTopic.setExpression(rs.getString(17));
					theTopic.setTimes(rs.getInt(18));
					theTopic.setLockTopic(rs.getInt(19));
					theTopic.setSignFlag(rs.getInt(20));
					theTopic.setEmailFlag(rs.getInt(21));
					theTopic.setIsTop(rs.getInt(22));
					theTopic.setIsVote(rs.getInt(23));
					forumTopics.add(theTopic);
					i++;
					if(i==perPage)
					break;
				}
			while(rs.next());
			dbc.close();
			return forumTopics;
		}
		catch(Exception e)
		{
			e.printStackTrace();
			throw new ForumTopicNotFoundException();
		}
	}

	public static Vector getFollowTopics (int forumID,int rootID){
			Vector followTopics=new Vector();
			try{
				String sql="select announceID,layer,bbs.bbs1.boardID,rootID,topic,body,userName,child,hits from bbs.bbs1,bbs.board where bbs.bbs1.boardid="+forumID+" and bbs.bbs1.rootid="+rootID+" and bbs.bbs1.announceid<>"+rootID+" and bbs.bbs1.boardid=bbs.board.boardid and  bbs.bbs1.locktopic!=2 order by bbs.bbs1.rootid desc,bbs.bbs1.orders";
				//DBConnect dbc=new DBConnect(2,0);
				DBConnect dbc=new DBConnect();
				ResultSet rs=dbc.executeQuery(sql);

				while(rs.next()){
					ForumTopic theMSG=new ForumTopic();
					theMSG.setAnnounceID(rs.getInt("announceID"));
					theMSG.setLayer(rs.getInt("layer"));
					theMSG.setForumID(rs.getInt("boardID"));
					theMSG.setRootID(rs.getInt("rootID"));
					theMSG.setAnnounceID(rs.getInt("announceID"));

					/*
					if(rs.getString("topic")==null||rs.getString("topic").trim().equals("")){
						String m=rs.getString("body");
						if(rs.getString("body").length()>22)
							theMSG.setTopic(m.substring(0,22).replaceAll("\\n|\\r"," ").replaceAll(">", "&gt;").replaceAll("<", "&lt;"));
						else{

							theMSG.setTopic(m.replaceAll("\\r|\\n"," ").replaceAll(">", "&gt;").replaceAll("<", "&lt;"));
						}
					}
					else*/
					theMSG.setTopic(rs.getString("topic"));
					theMSG.setBody(rs.getString("body"));
					theMSG.setUserName(rs.getString("userName"));
					theMSG.setChildNum(rs.getInt("child"));
					theMSG.setHits(rs.getInt("hits"));

					followTopics.add(theMSG);
				}
				dbc.close();

			}
			catch(Exception e){
				e.printStackTrace();
			}

			return followTopics;

	}
	public ForumMSG getForumMSGTopic(){
		return this.forumMSGTopic;
	}
	public Vector getForumMSGs  (int forumID,int rootID,int announceID,int start ,int perPage) throws ForumMSGNotFoundException{
		try{
			DBConnect dbc=new DBConnect();
			ResultSet rs=dbc.executeQuery("select topic,istop,isbest,username,hits,times from bbs.bbs1 where announceID="+rootID);
			rs.next();
			forumMSGTopic=new ForumTopic();
			forumMSGTopic.setTopic(rs.getString(1));
			forumMSGTopic.setIsTop(rs.getInt(2));
			forumMSGTopic.setIsBest(rs.getInt(3));
			forumMSGTopic.setUserName(rs.getString(4));
			forumMSGTopic.setHits(rs.getInt(5));
			forumMSGTopic.setTimes(rs.getInt(6));
			forumMSGTopic.setAnnounceID(rootID);
			rs.close();


			String sql="Select B.AnnounceID,B.boardID,B.UserName,B.Topic,B.dateandtime,B.body,"+
				"B.Expression,B.ip,B.rootid,B.signflag,B.isbest,B.isvote,"+
				"U.username,U.useremail,U.homepage,U.oicq,U.sign,U.userclass,"+
				"U.title,U.width,U.height,U.article,U.face,U.addDate,"+
				"U.userWealth,U.userEP,U.userCP,B.hits,B.isTop,B.lockTopic"+
				" from bbs.bbs1 B inner join bbs.myuser U on U.username=B.username "+
				"where B.boardid="+forumID+" and B.rootid="+rootID+" and B.lockTopic!=2 order by announceid";

			rs=dbc.executeQuery(sql);

			//if(rs.last())				forumMSGsNum=rs.getRow();
			forumMSGsNum = 0 ;
			while(rs.next())
			{
				forumMSGsNum  ++ ;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米亚洲午夜久久精品| 欧美日韩一本到| 亚洲精品一区在线观看| 久久精品国产第一区二区三区| 69精品人人人人| 蜜臀av一区二区三区| 欧美一区二区视频在线观看| 久久精品999| 国产日韩欧美亚洲| 一本在线高清不卡dvd| 成人激情小说网站| 亚洲欧洲一区二区在线播放| 色又黄又爽网站www久久| 亚洲成人免费影院| 精品久久久久久无| 91网站视频在线观看| 亚洲v日本v欧美v久久精品| 欧美岛国在线观看| 成人福利电影精品一区二区在线观看 | 欧美色老头old∨ideo| 日韩精品久久久久久| 国产丝袜在线精品| 91视频免费看| 久久成人免费电影| 中文字幕一区在线观看视频| 在线播放一区二区三区| 国产乱码精品一品二品| 夜夜亚洲天天久久| 精品少妇一区二区三区日产乱码 | 精品99一区二区三区| 99精品久久久久久| 日韩av中文字幕一区二区三区| 久久精品综合网| 欧美日韩在线播放一区| 国产ts人妖一区二区| 一二三四社区欧美黄| 国产亚洲一二三区| 欧美日本精品一区二区三区| 成人妖精视频yjsp地址| 奇米色一区二区| 一区二区三区波多野结衣在线观看 | 久久狠狠亚洲综合| 一区二区在线看| 国产拍揄自揄精品视频麻豆| 91精品国产色综合久久| 色又黄又爽网站www久久| 国产精品亚洲一区二区三区在线 | 欧美亚洲愉拍一区二区| 福利91精品一区二区三区| 日本aⅴ亚洲精品中文乱码| 亚洲人成精品久久久久久 | av电影一区二区| 国产高清精品网站| 麻豆精品国产传媒mv男同| 亚洲午夜在线视频| 亚洲欧美日韩小说| 国产精品三级电影| 久久综合国产精品| 日韩精品中文字幕一区| 91精品国产综合久久久蜜臀图片| 欧美大片顶级少妇| 欧美男人的天堂一二区| 日本高清视频一区二区| 99re热这里只有精品免费视频| 国产精品夜夜爽| 韩国精品一区二区| 老司机免费视频一区二区| 日本aⅴ免费视频一区二区三区 | 精品国产一区二区三区久久久蜜月| 欧美日韩一区二区三区免费看| 一本大道综合伊人精品热热| 91在线国产福利| 一本久道中文字幕精品亚洲嫩 | 国产福利一区二区三区在线视频| 日本视频一区二区| 秋霞av亚洲一区二区三| 奇米影视一区二区三区| 奇米精品一区二区三区四区| 美国十次了思思久久精品导航| 日本午夜精品视频在线观看| 毛片一区二区三区| 国产一区二区免费看| 国产高清一区日本| av亚洲精华国产精华精华| 91天堂素人约啪| 欧美亚洲动漫制服丝袜| 欧美美女黄视频| 精品国产乱码久久久久久影片| 久久女同互慰一区二区三区| 国产精品婷婷午夜在线观看| 综合色天天鬼久久鬼色| 亚洲国产成人tv| 青青草97国产精品免费观看无弹窗版| 久久精品国产一区二区| 国产在线视视频有精品| 成人黄色片在线观看| 欧洲在线/亚洲| 日韩美女天天操| 中文字幕乱码久久午夜不卡 | 日韩一区二区免费在线电影| 欧美变态口味重另类| 国产精品视频九色porn| 亚洲影院久久精品| 美国三级日本三级久久99| 成人精品视频一区二区三区尤物| 91久久精品一区二区三区| 日韩亚洲欧美在线观看| 亚洲国产高清aⅴ视频| 亚洲午夜一区二区| 国产真实乱偷精品视频免| 色伊人久久综合中文字幕| 日韩欧美一区中文| 日韩一区在线播放| 奇米在线7777在线精品| av不卡免费电影| 欧美一区二区性放荡片| 国产精品无码永久免费888| 五月天国产精品| 成人短视频下载| 91精品国产麻豆| 亚洲欧美偷拍三级| 国内不卡的二区三区中文字幕| 91麻豆123| 久久麻豆一区二区| 午夜不卡在线视频| 成人av一区二区三区| 日韩精品一区国产麻豆| 福利91精品一区二区三区| 欧美欧美欧美欧美首页| 中文字幕亚洲一区二区va在线| 六月丁香综合在线视频| 欧美中文一区二区三区| 国产欧美一区二区三区鸳鸯浴| 天天综合色天天综合| av午夜精品一区二区三区| 久久综合九色综合欧美亚洲| 亚洲国产精品一区二区www| 成人美女视频在线观看| 日韩精品综合一本久道在线视频| 一区二区三区日韩欧美| 成人免费av资源| 久久亚洲一级片| 美女视频黄 久久| 欧美日本精品一区二区三区| 亚洲色欲色欲www| 成人动漫视频在线| 久久久久久夜精品精品免费| 免费在线观看一区二区三区| 欧美视频在线不卡| 亚洲精品国产高清久久伦理二区| 成人一区二区视频| 2019国产精品| 韩日av一区二区| 日韩一区二区电影在线| 日韩国产欧美三级| 欧美精品一卡二卡| 偷窥国产亚洲免费视频| 欧美午夜精品一区| 亚洲综合久久久| 欧美偷拍一区二区| 亚洲一区二区三区小说| 欧美系列亚洲系列| 亚洲成av人片在www色猫咪| 欧美主播一区二区三区美女| 亚洲精品久久嫩草网站秘色| thepron国产精品| 日韩理论片网站| 日本道在线观看一区二区| 亚洲精品国产视频| 欧美三级中文字幕| 丝袜亚洲另类丝袜在线| 欧美一区二区成人6969| 麻豆视频观看网址久久| 欧美xxxxxxxx| 国产毛片一区二区| 国产精品无人区| 91久久奴性调教| 日韩国产精品大片| 欧美精品一区二区三区蜜臀| 国产91高潮流白浆在线麻豆 | 中文天堂在线一区| www.欧美亚洲| 亚洲欧美日韩成人高清在线一区| 91麻豆精品一区二区三区| 亚洲午夜久久久久久久久电影网| 欧美中文字幕一二三区视频| 天堂精品中文字幕在线| 精品三级在线观看| www.亚洲色图.com| 亚洲国产视频直播| 欧美变态口味重另类| 成人国产亚洲欧美成人综合网| 亚洲欧美视频在线观看视频| 欧美日韩1234| 国产一区视频网站| 亚洲黄色录像片| 欧美xxxxx裸体时装秀| 91影视在线播放| 蜜桃精品视频在线| 亚洲欧洲日产国码二区|