1、简述你完成的工作
撰写需求规格说明书的第三部分;
学习WSB图,形成博客;
制作状态图;
协助设计系统前端布局;
代码部分负责实现登录传输功能
2、你们小组总共的代码行数,你贡献的代码行数?相关代码链接?
总共的代码行数:5600
贡献的代码行数:800
我主要负责的是登录跳转部分
员工或管理员在登录界面输入账户口令后,后端根据其输入内容,确认其身份,然后进行跳转如图所示:
核心代码:
login.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!-- 功能介绍:系统登录界面 --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>公文传输系统</title> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #F0FFFF; } --> </style> <link href="css/css.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function commit() { if(form1.username.value=="") { alert("请您输入用户名!"); form1.username.focus(); return false; } if(form1.password.value=="") { alert("请您输入密码!"); form1.password.focus(); return false; } return true; } </script> </head> <body> <form action="files/login/check_login.jsp" method="post" name="form1" onsubmit="return commit()"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="147" background="images/1.gif" width="100%" ><img src="images/top.png" width="100%" /></td> </tr> </table> <center> <fieldset style="width:562px;align=center"> <table width="562" border="0" align="center" cellpadding="0" cellspacing="0" class="right-table03"> <tr> <td width="221"><table width="95%" border="0" cellpadding="0" cellspacing="0" class="login-text01"> <tr> <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="login-text01"> <tr> <td align="center"><img src="images/ico13.gif" width="107" height="97" /></td> </tr> <tr> <td height="40" align="center"> </td> </tr> </table></td> <td><img src="images/line01.gif" width="5" height="292" /></td> </tr> </table></td> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="31%" height="35" class="login-text02">帐 号 <br /></td> <td width="69%"><input name="username" id= "username" type="text" size="28" style="width:150px" /></td> </tr> <tr> <td height="35" class="login-text02">密 码 <br /></td> <td><input name="password" id="password" type="password" size="30" style="width:150px"/></td> </tr> <tr> <td height="35" class="login-text02">身 份 <br /></td> <td><input name="role" type="radio" value="0" />总管<input name="role" type="radio" value="1" />分管<input name="role" type="radio" value="2" />科员</td> </tr> <tr> <td height="35"> </td> <td><input name="Submit2" type="submit" class="right-button02" value="登 录" /> <input name="Submit2" type="submit" class="right-button02" value="登 录" /> <input name="reset232" type="reset"" class="right-button02" value="重 置" /></td> </tr> <% if("0".equals(request.getParameter("info"))){ %> <font color="red">密码错误,请重新填写!</font> <%}else if("1".equals(request.getParameter("info"))){ %> <font color="red">账号不存在,请重新填写!</font> <%}%> </table></td> </tr> </table> </fieldset> </center> </form> </body> </html>View Code
conn.jsp
<%@ page language="java" import="java.sql.*" pageEncoding="UTF-8"%> <% Connection conn = null; Statement stmt = null; Statement stmt1 = null; Statement stmt2 = null; Statement stmt3 = null; String sDBDriver = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://localhost:3306/filedb"; try { //加载数据库驱动 Class.forName(sDBDriver); //获取数据库链接 conn = DriverManager.getConnection(url, "admin", "1"); stmt = conn.createStatement(); //创建连接状态 } catch (Exception e) { e.printStackTrace(); System.err.println("数据库驱动注册错误信息: " + e.getMessage()); } %>View Code
index.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!-- 功能介绍:系统页面框架 --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>公文传输系统</title> </head> <%@ include file="files/db/conn.jsp"%> <frameset rows="59,*" cols="*" frameborder="no" border="0" framespacing="0"> <frame src="files/top.html" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" title="topFrame" /> <frameset cols="213,*" frameborder="no" border="0" framespacing="0"> <frame src="files/left.jsp" name="leftFrame" scrolling="no" noresize="noresize" id="leftFrame" title="leftFrame" /> <frame src="files/mainfra.html" name="mainFrame" id="mainFrame" title="mainFrame" /> </frameset> </frameset> <noframes><body> </body> </noframes></html>View Code
3、你们小组总共的文档数?你贡献的文档数?相关链接
小组共17篇文档,我参与贡献了6篇
https://www.cnblogs.com/tfhdm/p/16841548.html
https://www.cnblogs.com/tfhdm/p/16842378.html
https://www.cnblogs.com/tfhdm/p/16842381.html
https://www.cnblogs.com/tfhdm/p/16863918.html
https://www.cnblogs.com/tfhdm/p/16909289.html