bbs论坛详细设计说明书

上传人:简****9 文档编号:101765342 上传时间:2019-09-29 格式:DOC 页数:14 大小:278.48KB
返回 下载 相关 举报
bbs论坛详细设计说明书_第1页
第1页 / 共14页
bbs论坛详细设计说明书_第2页
第2页 / 共14页
bbs论坛详细设计说明书_第3页
第3页 / 共14页
bbs论坛详细设计说明书_第4页
第4页 / 共14页
bbs论坛详细设计说明书_第5页
第5页 / 共14页
点击查看更多>>
资源描述

《bbs论坛详细设计说明书》由会员分享,可在线阅读,更多相关《bbs论坛详细设计说明书(14页珍藏版)》请在金锄头文库上搜索。

1、BBS论坛详细设计说明书编写人: 田凯 日期: 2013年6月12日一、 背景BBS简介BBS的英文全称是:Bulletin Board System,译为“电子公告板”。BBS最早是用来公布股市价格等类信息的,一直到互联网与个人计算机普及后广泛流行于网络。目前,通过BBS系统开发出各种论坛、网上社区、交友中心等信息平台。电子公告板BBS在国内一般称作网络论坛,早期的BBS与一般街头和校园内的公告板性质相同,只不过是通过电脑来传播或获得消息而已。一直到个人计算机开始普及之后,有些人尝试将苹果计算机上的BBS转移到个人计算机上,BBS才开始渐渐普及开来。近些年来,由于爱好者们的努力,BBS的功能

2、得到了很大的扩充。目前,通过BBS系统可随时取得国际最新的软件及信息,也可以通过BBS系统来和别人讨论计算机软件、硬件、Internet、多媒体、程序设计以及医学等等各种有趣的话题,更可以利用BBS系统来刊登一些“征友”、“廉价转让”及“公司产品”等启事,而且这个园地就在你我的身旁。只要您拥有1台计算机、1只调制解调器和1条电话线,就能够进入这个“超时代”的领域,进而去享用它无比的威力! 二、 BBS论坛功能分析4管理模块3登录2.注册模块新用户注册界面完成注册登陆界面登陆错误登陆失败页面斑竹管理页面用户管理管理员管理登陆页面管理员页面退出更新论坛数据6发帖模块分论坛菜单浏览帖子在分论坛发新帖

3、子论坛发帖错误信息对指定帖子发言发帖结果修改帖子结果论坛系统应该能够在用户通过帐户密码验证登录论坛服务系统后,判断用户级别识别四类不同权限级别的用户。第一类是游客,拥有浏览文章,查询注册用户个体最基本信息的权限;第二类是一般用户,能够在论坛讨论区发表/浏览/回复主题,管理个人信息等;第三类是管理员,能够对相应主题进行删除/精华,对回复的帖子进行删除,封锁ID以及解除对一般用户的封锁;第四类是主管理员,拥有最高权限,能够在管理员的权限的基础上增加:管理员权限更改。三、 BBS前台的详细设计用户注册界面BBS前台用户的登陆关于前台的登录response.setContentType(text/ht

4、ml;charset=gb2312);PrintWriter out = response.getWriter();String username=request.getParameter(username);String pass=request.getParameter(password);System.out.println(aaaaaaa+username+ +pass);User u=UserDao.setUserInfo(username, pass);if(u!=null)request.getSession().setAttribute(user, u);request.get

5、RequestDispatcher(MPart).forward(request, response);elserequest.getRequestDispatcher(Login.jsp).forward(request, response);out.flush();out.close();BBS主板块界面关于代码response.setContentType(text/html;charset=gb2312);PrintWriter out = response.getWriter();Vector partdata=PDao.sqlPartAll();Vector vcomment=ne

6、w Vector(); for(int i=0;i12)String x=title.substring(0,12);x=x+.;c.setName(x);vcomment.addElement(c);catch(Exception e)e.toString();request.setAttribute(lastcomments, vcomment);/最后的回贴request.setAttribute(PartData, partdata);request.getRequestDispatcher(main.jsp).forward(request, response);BBS发贴界面 关于

7、代码request.setCharacterEncoding(gb2312);/修改 request编码方式 String type=request.getParameter(gototype);/通过标记判断跳转而来的页面 int id =Integer.parseInt(request.getParameter(partid);/获取版块id String title=request.getParameter(title); String text=request.getParameter(FCKBack); if(type.equals(0)/如果为0则表示从comment.jsp跳转而

8、来,要判断是否合法User u=(User)request.getSession().getAttribute(user);if(u=null)/未登录则跳转至登陆页面response.sendRedirect(Login.jsp);else/登录用户跳转至发帖页面request.setAttribute(partid,id);request.getRequestDispatcher(AddComment.jsp).forward(request,response);else/ 表示从AddComment.jsp跳转而来 Date d=new Date(); SimpleDateFormat

9、sdf=new SimpleDateFormat(yyyy-MM-dd HH:mm:ss); String time=sdf.format(d);/格式化日期 User u=(User)request.getSession().getAttribute(user); int uid=u.getId();/用户id DBConnect db=new DBConnect(); try String sql=insert into bbs_comment values(+title+,+text+,+uid+,+time+,+id+,0,1);/编写sql语句 int i=db.executeUpd

10、ate(sql); if(i0)/如果大于0则表示插入数据库成功 request.getRequestDispatcher(CommentServlet?partid=+id).forward( request, response); catch(Exception e) e.printStackTrace(); request.setCharacterEncoding(gb2312);/修改 request编码方式 String type=request.getParameter(gototype);/通过标记判断跳转而来的页面 int id =Integer.parseInt(reques

11、t.getParameter(partid);/获取版块id String title=request.getParameter(title); String text=request.getParameter(FCKBack); if(type.equals(0)/如果为0则表示从comment.jsp跳转而来,要判断是否合法User u=(User)request.getSession().getAttribute(user);if(u=null)/未登录则跳转至登陆页面response.sendRedirect(Login.jsp);else/登录用户跳转至发帖页面request.set

12、Attribute(partid,id);request.getRequestDispatcher(AddComment.jsp).forward(request,response);else/ 表示从AddComment.jsp跳转而来 Date d=new Date(); SimpleDateFormat sdf=new SimpleDateFormat(yyyy-MM-dd HH:mm:ss); String time=sdf.format(d);/格式化日期 User u=(User)request.getSession().getAttribute(user); int uid=u.getId();/用户id DBConnect db=new DBConnect(); try String sql=insert into bbs_comment values(+title+,+text+,+uid+,+time+,+id+,0,1);/编写sql语句 int i=db.executeUpdate(sql); if

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 管理学资料

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号