图书馆管理系统完整代码

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

index.jsp%@pagelanguage=javaimport=java.util.*pageEncoding=UTF-8%!DOCTYPEHTMLPUBLIC-//W3C//DTDHTML4.01Transitional//ENhtmlheadtitle图书馆管理系统/title/headbodytableborder=0width=751height=62align=centertbodytrtd imgborder=0src=Images/banner.pngwidth=1300height=200/td/tr/tbody/tablebrtableborder=0width=1300height=76tbodytrtdalign=right ahref=queryBook.jsp图书检索/a/tdtdalign=center ahref=login.jsp用户登陆/a/tdtdahref=logon.jsp用户注册/a/td/tr/tbody/tablebr/body/htmllogin.jsp%@pagepageEncoding=UTF-8contentType=text/html;charset=UTF-8%htmlheadtitle用户登录/titlescriptlanguage=javascriptfunctioncheck(theForm){if(theForm.userName.value==){alert(用户名不能为空);returnfalse;}elseif(theForm.passWord.value==){alert(密码不能为空);returnfalse;}else{returntrue;}}/script/headbodydivalign=centerpfontsize=6用户登录/font/pformmethod=postaction=verify.jspname=loginonsubmit=javascript:returncheck(this);scope=sessiondivalign=right/divtableheight=150border=0align=centerwidth=300tbodytrtdalign=right用户名:/tdtd inputtype=textname=userName/td/trtrtdalign=right密码: br/tdtd inputtype=passwordname=passWord/td/trtrtdvalign=topalign=rightinputtype=submitvalue=登录name=login/tdtdvalign=topalign=center inputtype=resetvalue=清空name=empty/td/tr/tbody/table/form%Stringwarning=request.getParameter(warning);if(warning!=null)out.println(h3+warning+,请重新登录!/h3);Stringwarning3=request.getParameter(warning3);if(warning3!=null)out.println(h3+warning3+/h3);Stringlogin=request.getParameter(login);if(login!=null)out.println(h3+login+/h3);%/div/body/htmllogon.jsp%@pagelanguage=javacontentType=text/html;charset=UTF-8pageEncoding=UTF-8%!DOCTYPEhtmlPUBLIC-//W3C//DTDHTML4.01Transitional//EN=JavaScriptfunctioncheck(){if(myform.username.value==){alert(请输入用户名!);returnfalse;}if(myform.truename.value==){alert(请输入真实姓名!);returnfalse;}if(myform.password.value.length6){alert(密码的长度应大于等于6位!);returnfalse;}if(myform.password.value!=myform.password2.value){alert(两次输入的密码不一致!);returnfalse;}varage=myform.age.value;for(i=0;iage.length;i++){if(age.charAt(i)0){alert(请输入有效年龄!);returnfalse;}elseif(age.charAt(i)9){alert(请输入有效年龄!);returnfalse;}}if(myform.idcard.value==){alert(请输入身份证号!);returnfalse;}varphone=myform.phone.value;for(i=0;iphone.length;i++){if(phone.charAt(i)0){alert(请输入有效电话!);returnfalse;}elseif(phone.charAt(i)9){alert(请输入有效电话!);returnfalse;}}varem,index;em=myform.email.value;index=myform.email.value.indexOf('@');if(index=0||index=em.length-1){alert(请输入合法的电子邮件地址!);returnfalse;}}/scriptheadtitle用户注册/title/headbodydivalign=centerh2用户注册/h2%!Stringsex=null;%formaction=dealLogon.jspmethod=postonSubmit=returncheck()name=myformtableheight=100%border=1align=centerwidth=90%tbodytrtdalign=right用户名:br/tdtdalign=leftinputtype=textname=username/td/trtrtdalign=right真实姓名:br/tdtdalign=leftinputtype=textname=truename/td/trtrtdalign=right密码:/tdtdalign=leftinputtype=passwordname=password/td/trtrtdalign=right确认密码:/tdtdalign=leftinputtype=passwordname=confirmPassword/td/trtrtdalign=right年龄:/tdtdalign=leftinputtype=textname=age/td/trtrtdalign=right性别:/tdtdalign=leftinputtype=radioname=sexvalue=男%if(sex.equals(男))out.println(checked);%imgsrc=Images/boy.gifwidth=24height=24男inputtype=radioname=sexvalue=女%if(sex.equals(女))out.println(checked);%imgsrc=Images/girl.gifwidth=26height=26女/td/trtrtdalign=right身份证号:/tdtdalign=leftinputtype=textname=IDcard/td/trtrtdalign=right电话号码:/tdtdalign=leftinputtype=textname=phone/td/trtrtdalign=right电子邮箱:br/tdtdalign=leftinputtype=textname=email/td/trtrtdalign=right地址:br/tdtdalign=leftinputtype=textname=address/td/trtrtdcolspan=2align=centerinputtype=submitvalue=注册    inputtype=resetvalue=取消/td/tr/tbody/table/form/div/body/htmllogout.jsp%session.invalidate();response.sendRedirect(login.jsp);%admin.jsp%@pageimport=java.sql.ResultSet%%@pagelanguage=javacontentType=text/html;charset=UTF-8pageEncoding=UTF-8%jsp:useBeanid=connclass=dbBean.DBBeanscope=session/jsp:useBeanid=spageclass=spage.ShowPagescope=session/!DOCTYPEhtmlPUBLIC-//W3C//DTDHTML4.01Transitional//EN图书信息/title/headbodyahref=readerAll.jsp读者信息/abrahref=borrowedBook.jsp借阅信息/abrahref=queryBook.jsp图书检索/abrahref=addBook.jsp添加图书/abr您好,管理员ahref=logout.jsp退出登录/abrdivalign=centerh2图书信息/h2/divtableheight=20%border=1align=centerwidth=100%tbodytrtdalign=center书名/tdtdalign=center作者/tdtdalign=center出版社/tdtdalign=centerISBN号/tdtdalign=center出版日期/tdtdalign=center总数br/tdtdalign=center剩余br/tdtdalign=cent

1 / 38
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功