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

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

?? forum.java

?? JSP四酷全書是一本很好的學習JSP建網站的書籍
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
package net.acai.forum;
/**
 * Title:        清清網絡
 * Description:
 * Copyright:    Copyright (c) 2002
 * Company:      www.qingqing.com
 * @author:       qingqing
 * @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一区二区三区免费野_久草精品视频
国产欧美日韩在线| 欧美高清www午色夜在线视频| 国产精华液一区二区三区| 国产乱人伦精品一区二区在线观看 | 色综合一区二区| 欧美日韩五月天| 日韩精品影音先锋| 国产精品热久久久久夜色精品三区| 亚洲视频香蕉人妖| 毛片av一区二区三区| 国产在线国偷精品产拍免费yy | 91麻豆精品国产91久久久久| 精品乱码亚洲一区二区不卡| 中文字幕中文乱码欧美一区二区| 午夜精品免费在线观看| 成人午夜电影网站| 欧美日韩综合在线免费观看| 2欧美一区二区三区在线观看视频| 国产精品精品国产色婷婷| 青青草97国产精品免费观看| 成人影视亚洲图片在线| 欧美精品一区二区高清在线观看| 亚洲人精品一区| 99精品久久只有精品| 久久久国产一区二区三区四区小说 | 蜜桃视频一区二区| 欧美日韩的一区二区| 亚洲综合一区二区三区| 91丨九色丨国产丨porny| 国产片一区二区| 国产精品中文字幕日韩精品| 精品免费国产一区二区三区四区| 一区二区三区四区不卡在线| 处破女av一区二区| 国产精品日产欧美久久久久| 国产成人精品一区二区三区四区| 欧美一二三四在线| 午夜影视日本亚洲欧洲精品| 欧美日韩一级片在线观看| 一区二区三区精密机械公司| 欧美亚洲丝袜传媒另类| 日韩中文欧美在线| 国产偷国产偷亚洲高清人白洁| 国内外精品视频| 日韩一区中文字幕| 色婷婷久久一区二区三区麻豆| 一区二区三区**美女毛片| 欧美一区二区观看视频| 成人一区在线看| 亚洲一区二区成人在线观看| 精品奇米国产一区二区三区| 成人av动漫在线| 亚洲在线一区二区三区| 精品人在线二区三区| 一本色道久久综合亚洲精品按摩 | youjizz国产精品| 免费观看成人av| 国产精品乱子久久久久| 精品久久久久久亚洲综合网 | 国产精品久久久久永久免费观看 | 亚洲激情一二三区| 精品国产制服丝袜高跟| 欧美日韩一区 二区 三区 久久精品| 麻豆91精品91久久久的内涵| 亚洲情趣在线观看| 久久久精品一品道一区| 日韩一区二区三区av| 欧美婷婷六月丁香综合色| 色综合久久九月婷婷色综合| 国产又黄又大久久| 另类小说欧美激情| 亚洲成人av福利| 亚洲一区二区av电影| 国产精品美女视频| 精品少妇一区二区三区免费观看| av一区二区三区在线| 久久99国产精品久久99果冻传媒| 中文字幕乱码久久午夜不卡| 欧美一级xxx| 日韩精品一区二区三区蜜臀| 国产乱子轮精品视频| 婷婷一区二区三区| 午夜精品久久久久久久久久久 | 麻豆一区二区99久久久久| 午夜精品久久久久久久99水蜜桃| 亚洲美女少妇撒尿| 亚洲欧美自拍偷拍| 亚洲欧美一区二区久久| 亚洲精品在线网站| 久久久久国产精品麻豆| 久久综合狠狠综合久久激情| 久久久综合激的五月天| 精品乱码亚洲一区二区不卡| 日韩一区二区三区四区五区六区| 欧美一级国产精品| 欧美大白屁股肥臀xxxxxx| 日韩欧美在线1卡| 欧美精品一区二区三| 综合久久一区二区三区| 亚洲夂夂婷婷色拍ww47| 琪琪久久久久日韩精品| 奇米777欧美一区二区| 成人综合日日夜夜| 色偷偷88欧美精品久久久| 99vv1com这只有精品| 欧美专区日韩专区| 欧美成人激情免费网| 国产亚洲欧美色| 亚洲 欧美综合在线网络| 久久9热精品视频| 91豆麻精品91久久久久久| 精品国精品国产尤物美女| 午夜婷婷国产麻豆精品| 国产999精品久久久久久绿帽| 在线免费亚洲电影| 国产偷国产偷亚洲高清人白洁 | 极品美女销魂一区二区三区| 99re在线视频这里只有精品| 欧美成人一区二区三区片免费| 亚洲一区影音先锋| 高清国产一区二区| 国产亚洲一区二区三区四区| 香蕉av福利精品导航| 91啪亚洲精品| 亚洲人成精品久久久久久| 欧美伊人久久久久久久久影院| 国产精品色噜噜| 粉嫩高潮美女一区二区三区 | 无吗不卡中文字幕| 91国产精品成人| 亚洲一区二区在线免费观看视频| av成人免费在线| 亚洲欧美在线视频观看| 成人高清在线视频| 亚洲一区二区三区视频在线播放| 欧美性生交片4| 亚洲伊人伊色伊影伊综合网| 欧美亚洲免费在线一区| 亚洲va欧美va国产va天堂影院| 色哟哟一区二区在线观看 | 不卡的av中国片| 中文字幕亚洲在| 国产成人av一区二区| 亚洲国产精品尤物yw在线观看| 色综合咪咪久久| 亚欧色一区w666天堂| 欧美一级高清大全免费观看| 国产精品白丝av| 亚洲电影中文字幕在线观看| 在线播放中文字幕一区| 国产精品一级片在线观看| 自拍偷拍亚洲激情| 91精品国产综合久久精品| 91香蕉视频黄| 天天综合天天做天天综合| 久久久久久久久99精品| 欧美三级韩国三级日本三斤| 日韩高清在线一区| 日韩毛片一二三区| 日韩三级免费观看| 日本二三区不卡| 激情综合网av| 一区二区三区四区不卡视频 | 一区二区三区四区av| 国产女同互慰高潮91漫画| 欧美精品免费视频| 欧美影视一区在线| 欧美丝袜丝交足nylons图片| a亚洲天堂av| 成人h动漫精品一区二区| 国产一区二区三区日韩 | 欧美日本韩国一区二区三区视频| 国产999精品久久久久久绿帽| 久久精品国产久精国产| 日韩国产欧美在线视频| 午夜日韩在线观看| 亚洲一区二区三区国产| 亚洲欧洲国产专区| 亚洲男人电影天堂| 欧美经典一区二区| 国产清纯白嫩初高生在线观看91| 久久久综合九色合综国产精品| 精品第一国产综合精品aⅴ| 日韩一区二区在线观看视频| 337p亚洲精品色噜噜噜| 在线观看91av| 日韩一级高清毛片| 久久综合九色欧美综合狠狠| 亚洲精品一区二区三区蜜桃下载| 日韩欧美另类在线| 久久日韩粉嫩一区二区三区| 国产欧美日韩精品在线| 亚洲欧美日韩中文播放| 亚洲自拍与偷拍| 久久精品国产精品青草| 97久久精品人人爽人人爽蜜臀| 在线看国产日韩| 精品国产sm最大网站免费看| 欧美sm极限捆绑bd| 日韩伦理电影网|