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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? forum.java

?? 這是用JAVA做的論壇系統 老師給的 讓我們參考
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
package net.acai.forum;
/**
 * Title:        清清網絡
 * 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  ++ ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看免费亚洲| 欧美一级日韩不卡播放免费| 久久久99精品免费观看不卡| 经典三级一区二区| 国产日本亚洲高清| 国产suv精品一区二区三区| 国产精品久久久久久久久久久免费看| 99在线热播精品免费| 中文字幕一区二区日韩精品绯色| 91亚洲精品一区二区乱码| 亚洲午夜在线视频| 欧美一区二区三区日韩| 久久国产精品区| 国产女人18毛片水真多成人如厕| 99国产精品视频免费观看| 亚洲一区在线视频观看| 日韩一级大片在线观看| 国产成人夜色高潮福利影视| 亚洲欧美偷拍卡通变态| 欧美欧美欧美欧美| 国产精品一区二区三区网站| 国产精品第一页第二页第三页 | 日韩黄色小视频| 日韩午夜激情视频| 国产69精品久久777的优势| 18成人在线观看| 欧美日韩一级片网站| 极品销魂美女一区二区三区| 国产精品久久久久影视| 欧美高清精品3d| 国产黄色精品视频| 亚洲一区中文在线| 久久看人人爽人人| 欧美丝袜丝交足nylons| 国产在线视频一区二区| 亚洲一区二区高清| 久久久99精品免费观看| 欧美日韩和欧美的一区二区| 国产91富婆露脸刺激对白| 天堂精品中文字幕在线| 亚洲国产精品ⅴa在线观看| 7777精品伊人久久久大香线蕉的| 国产福利一区二区三区视频在线| 亚洲国产精品久久人人爱蜜臀| 国产三级精品视频| 欧美撒尿777hd撒尿| 不卡一卡二卡三乱码免费网站| 亚洲成人资源在线| 国产精品嫩草影院com| 日韩三级在线观看| 欧美私人免费视频| 丰满放荡岳乱妇91ww| 九色|91porny| 午夜精品久久久久久久99樱桃| 午夜激情一区二区| 1024成人网| 欧美激情在线看| 精品国产免费人成电影在线观看四季| 欧美亚洲高清一区二区三区不卡| 成人avav在线| 国产一区 二区| 久久草av在线| 免费的成人av| 日韩国产精品大片| 亚洲成人自拍一区| 亚洲午夜av在线| 亚洲女同一区二区| 国产精品免费网站在线观看| 国产亚洲精品久| 精品美女被调教视频大全网站| 欧美一区二区三区四区在线观看 | 亚洲成a人v欧美综合天堂| 亚洲男人天堂一区| 综合久久综合久久| 中文字幕一区二区三区av| 日本一区二区视频在线观看| 久久久影院官网| 久久久精品国产免大香伊 | 精品日韩在线观看| 精品噜噜噜噜久久久久久久久试看| 欧美精品黑人性xxxx| 欧美男人的天堂一二区| 欧美撒尿777hd撒尿| 欧美日韩成人高清| 欧美一激情一区二区三区| 欧美电影免费观看高清完整版在 | 精品一区二区三区香蕉蜜桃| 美女视频黄免费的久久 | 欧美精品一区二区三区一线天视频| 欧美性大战久久久| 欧美精品 国产精品| 在线播放国产精品二区一二区四区| 欧美丰满嫩嫩电影| 欧美一级免费观看| 久久久国产午夜精品| 亚洲国产高清aⅴ视频| 中文字幕一区二区三区色视频| 亚洲柠檬福利资源导航| 亚洲午夜羞羞片| 日韩av中文字幕一区二区| 黄网站免费久久| 99久久精品国产观看| 欧美制服丝袜第一页| 91精品国产麻豆国产自产在线 | 国产成人99久久亚洲综合精品| 99在线热播精品免费| 欧美色涩在线第一页| 精品少妇一区二区| 中文字幕av免费专区久久| 亚洲免费在线播放| 日日夜夜一区二区| 成人性生交大片免费看中文| 97久久精品人人澡人人爽| 欧美日韩高清在线播放| 欧美精品一区二区三区蜜臀| 中文字幕一区av| 日韩高清不卡一区二区三区| 国产91在线|亚洲| 精品视频一区二区三区免费| 久久综合精品国产一区二区三区| 国产精品久久久久毛片软件| 日韩国产在线观看| 成人激情黄色小说| 日韩欧美综合在线| 男男视频亚洲欧美| 成人av资源站| 欧美一区二区三区在| 中文字幕五月欧美| 久久精工是国产品牌吗| 91在线观看下载| 精品久久人人做人人爱| 一区二区三区在线观看视频| 国产乱码一区二区三区| 欧美高清dvd| 亚洲精品美国一| 国产在线播放一区三区四| 欧美日韩亚洲综合| 自拍偷拍亚洲综合| 国产一区二区美女诱惑| 欧美视频一区二| 中文字幕一区二区三区不卡在线| 精品在线观看免费| 欧美喷水一区二区| 亚洲一区二区三区自拍| 99久久综合精品| 久久久国产精品不卡| 日韩精品三区四区| 欧洲av在线精品| 亚洲同性同志一二三专区| 国产91精品露脸国语对白| 精品国产欧美一区二区| 日韩精品一二三区| 欧美裸体bbwbbwbbw| 亚洲精品一卡二卡| 波多野结衣一区二区三区 | 欧美一卡在线观看| 亚洲一线二线三线久久久| 91丨九色丨黑人外教| 国产午夜三级一区二区三| 精品中文字幕一区二区小辣椒| 91精品国产全国免费观看| 国产激情偷乱视频一区二区三区| 日韩欧美高清在线| 美女任你摸久久| 日韩一级大片在线| 爽爽淫人综合网网站| 欧美日本一道本在线视频| 亚洲国产精品久久久男人的天堂| 在线免费亚洲电影| 一区二区激情小说| 欧美色综合影院| 亚洲h动漫在线| 欧美精品黑人性xxxx| 免费看黄色91| 精品国免费一区二区三区| 国产一区二区三区四区五区入口| 久久影院午夜论| 福利91精品一区二区三区| 国产精品美女久久久久av爽李琼| 99麻豆久久久国产精品免费| 亚洲久本草在线中文字幕| 欧美婷婷六月丁香综合色| 午夜精品久久久久| 91精品久久久久久久91蜜桃| 免费成人在线观看| 久久久久亚洲蜜桃| 成人国产精品免费网站| 亚洲综合区在线| 欧美一区二区三区在线观看| 国产一区在线视频| 亚洲视频一区二区在线| 欧美视频一区二区三区四区| 美女视频一区在线观看| 国产日韩av一区二区| 日本高清成人免费播放| 三级久久三级久久| 中文字幕精品综合| 精品视频免费看| 国产精品综合网| 亚洲女子a中天字幕|