在二十一世纪,地球因为互联网的存在,早已变成一个村落。人们在互联网世界里尽情的遨游,享受着Internet带来的无限乐趣。我们习惯了上网看新闻、去论坛看帖、网上购物、撰写自己的网络日志等等。当然,最离不开的,还是各种搜索引擎,帮我们找到想要的信息。总之,互联网已经成为我们的一种生活方式,一个巨大的知识库。
这篇设计论文,围绕如何构建网上论坛系统展开研究。网上论坛系统是最常见的网络形式,其主要功能是给网友一个交流的平台,大家畅所欲言,互相学习和帮助。论文分为六个部分。从系统的需求分析开始,一直到系统详细设计、系统测试与维护,详细论述了系统的整个开发过程。本系统基于B/S模式,采用流行的JSP+JavaBean+后台数据库三层架构。在设计过程中,将页面显示与功能逻辑实现分离开来,提高了代码的重用,有利于日后系统的维护和升级。本系统设计完成后可实现简单的看帖、发帖功能,经作者测试可在多个平台使用。
关键词:BBS系统;B/S模式;JavaBean;帖子
In the 21th, the Earth becomes a village, Because the presence of the Internet. People traveling around in Internet world, and enjoy themselves in it. We used to watch news , browse topics in web forum , go shopping on E-business websit, write our blog and so on . Of course, The most necessary are numbers of searching engines which help us find the desired information. In a word, Internet turns to a type of our life style, a huge repository.
This dissertation focusing on how to build a simple online forum system. Online forum system is one of the most common form of network, and its main function is giving Internet users a platform to exchange, communicating, learning and helping each other. The dissertation include six parts, which Beginning with system desiring analysis and end of system test, and make a detailed analysis of the whole development. The development of the forum including the interface of front and management systems of background. The system based on the B/S model, using the popular Three-tier Model (JSP+JavaBean+ database) .In the design process, I separate the display of pages from the functional logic, in order to make the system is conducive to the maintenance and upgrading. After the completion of the design, the forum can realize a simple function of watch/post topic, and run in a number of platforms.
Keywords: Web forum system,B/S mode,JavaBean,Topic
目 录
摘 要 1
ABSTRACT 2
第一章 概述 3
1.1 国内外发展趋势 4
1.2研究的目的和意义 4
第二章 系统分析 6
2.1 系统可行性分析 6
2.1.1 应用可行性 6
2.1.2技术可行性分析 7
2.2 需求分析 10
2.2.1 系统的综合要求 10
2.2.2 系统的数据要求 11
2.2.3 系统的逻辑模型 13
第三章 系统设计 15
3.1 系统概要设计 15
3.1.1 数据库的设计 15
3.1.2具体表的说明 16
3.1.2 系统结构的设计 19
3.2 系统详细设计 21
3.2.1 基本算法 21
第四章 系统的实现 23
4.1实现超文本信息输入和显示 23
4.2 用AJAX技术验证 26
4.3用户注册功能实现 30
第五章 总结 42
第六章 致谢 44
参考文献 45
(1)管理员表
编号 | 字段名 | 数据结构 | 说明 |
1 | name | 文本 | 用户名 |
2 | Pswd | 文本 | 密码 |
3 | bd | 数字 | 权限标示 |
(2)用户表
编号 | 字段名 | 数据结构 | 说明 |
1 | Userid | 数字 | 用户序号 |
2 | Name | 文本 | 用户名 |
3 | Pswd | 文本 | 密码 |
4 | Userinfo | 文本 | 用户信息 |
5 | Grade | 数字 | 等级 |
6 | Topicnum | 数字 | 总发帖数 |
7 | Lasttime | 日期/时间 | 最后登陆时间 |
8 | Tnum | 数字 | 当天发帖数 |
9 | Wnum | 数字 | 周发帖数 |
10 | Friend | 文本 | 好友 |
11 | favorites | 文本 | 爱好 |
(3)帖子表
编号 | 字段名 | 数据结构 | 说明 |
1 | Id | 数字 | 帖子ID |
2 | Bd | 数字 | 所属版块 |
3 | Topic | 文本 | 主题 |
4 | Tinfo | 文本 | 内容 |
5 | Userid | 数字 | 用户ID |
6 | Posttime | 日期/时间 | 发表时间 |
7 | Type | 数字 | 帖子类型 |
8 | Hits | 数字 | 查看数 |
9 | Retime | 日期/时间 | 最后回复时间 |
10 | Renum | 数字 | 回复数 |
(4)投票表
编号 | 字段名 | 数据结构 | 说明 |
1 | Id | 数字 | 序号 |
2 | Content | 文本 | 内容 |
3 | Votnum | 数字 | 投票数 |
4 | Type | 数字 | 类型 |
5 | Outtime | 日期/时间 | 投票时间 |
6 | Voteduser | 文本 | 投票者 |
(5)上传文件表
编号 | 字段名 | 数据结构 | 说明 |
1 | Id | 数字 | 序号 |
2 | Bbsid | 数字 | BBS序号 |
3 | Filename | 文本 | 文件名称 |
4 | Filetype | 数字 | 类型 |
5 | Uploadtime | 日期/时间 | 上传时间 |
6 | Name | 文本 | 名字 |
7 | url | 文本 | 上传地址 |
8 | Hits | 数字 | 查看数 |
9 | Filesize | 数字 | 文件大小 |
(6)版块表
编号 | 字段名 | 数据结构 | 说明 |
1 | Id | 数字 | 版块ID |
2 | Fid | 数字 | 所属ID |
3 | Bdinfo | 文本 | 版块信息 |
4 | Todaynum | 数字 | 当日发帖数 |
5 | Topicnum | 数字 | 置顶数 |
6 | Allnum | 数字 | 总帖子数 |
7 | Lastinfo | 文本 | 最后发表信息 |
8 | Type | 数字 | 版块类型 |
9 | Admin | 文本 | 版主 |
(7)短信表
编号 | 字段名 | 数据结构 | 说明 |
1 | Id | 数字 | 编号 |
2 | Fuserid | 数字 | 发信人 |
3 | Tuserid | 数字 | 收信人 |
4 | Content | 文本 | 内容 |
5 | Posttime | 日期/时间 | 发送时间 |
(8)在线用户表
编号 | 字段名 | 数据结构 | 说明 |
1 | Userid | 数字 | 用户ID |
2 | Name | 文本 | 名称 |
3 | Ip | 数字 | 登陆IP |
4 | Lasttime | 日期/时间 | 登陆时间 |
5 | Face | 数字 | 等级 |
6 | Onbd | 数字 | 所在版块ID |
7 | Place | 文本 | 用户所在地 |
(9)封锁IP表
编号 | 字段名 | 数据结构 | 说明 |
1 | Id | 数字 | 序号 |
2 | Srartip | 数字 | 开始IP |
3 | Endip | 数字 | 结束IP |
(10)论坛公告表
编号 | 字段名 | 数据结构 | 说明 |
1 | Id | 数字 | 序号 |
2 | Bd | 数字 | 所属ID |
3 | Content | 文本 | 内容 |
(11)精华版块表
编号 | 字段名 | 数据结构 | 说明 |
1 | Id | 数字 | 序号 |
2 | Name | 文本 | 名字 |
3 | Bd | 数字 | 所属ID |