管理个人信息系统的设计与实现_第1页
管理个人信息系统的设计与实现_第2页
管理个人信息系统的设计与实现_第3页
管理个人信息系统的设计与实现_第4页
管理个人信息系统的设计与实现_第5页
已阅读5页,还剩59页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

图4-3数据库E-R逻辑模型第五章系统实现通过对系统的需求分析与设计,我们确定了本系统的功能与逻辑结构。系统实现就是把我们前面的设计翻译成机器能够运行的程序代码。5.1登录界面实现当管理员或者普通用户输入信息单击登录按钮后,系统将检查用户的输入是否合法,以避免用户的非法输入带来的安全隐患。通过验证后系统请求服务器查询数据库中的用户信息,若数据库中存在匹配的用户信息则表示验证通过,进入主界面,否则提示用户输入信息不正确。等待用户的进一步操作。初始化登录jsp页面的部分代码如下:publicvoid_jspInit(){_el_expressionfactory=_jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();_jsp_annotationprocessor=(org.apache.AnnotationProcessor)getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());}系统登录界面如图5-1所示:图5-1系统登录界面5.2系统主界面实现本系统中,主界面用户可以清楚看到当前系统的一些基本信息,同时用户点击右边选项后系统将切换到相应的界面。图5-2系统主界面5.3任务管理模块实现任务是用户进行工作安排的重要途径,任务管理功能也非常重要。任务可以分为所有任务,未完成任务、已完成任务。未完成任务完成后将归档到已完成任务项,用户还可以根据任务的性质来对任务进行分类,在调度任务时,可以按状态分组、按时间分组、按日期分组来查询。图5-3任务管理模块界面5.4笔记管理模块实现笔记管理模块主要可用来操作添加、修改、删除用户的笔记,可以将笔记进行分类保存。笔记模块界面如图5-4所示:图5-4笔记管理模块界面5.5相册管理模块实现相册管理模块分为本地上传、网络图片上传,可以相册图片进行保存、删除、移动、查看等操作。相册管理模块的界面如图5-5所示:图5-5相册管理模块界面5.6订阅管理模块实现订阅管理模块完成两个大的功能:一是添加订阅信息,管理员或用户录入所要添加的链接URL。二是删除失效的订阅信息,管理员或用户根据提供的信息可以在数据库中删除已经失效的链接信息。订阅管理模块的界面如图5-6所示:图5-6相册管理模块界面5.7文档管理模块实现文档管理模块的主要功能是上传文档和下载文档。可以对文档位置进行移动,删除文档和重命名文档操作。文档管理界面如图5-7所示:图5-7文档管理模块界面5.8账目管理模块实现账目管理模块的主要功能是完成查询、添加、修改、删除等操作,并对所有账目进行收支统计、收入统计、支出统计结算。账目管理界面如图5-8所示:图5-8账目管理模块界面5.9系统管理模块实现 系统管理模块的主要功能是用户查询和系统设置,用户可以添加用户、启用、停用、删除用户账号,系统设置可以用来配置邮箱服务器、邮箱密码、邮箱账号、成员资格、相册缩略图高度参数。图5-9系统管理模块界面第六章系统测试测试是软件开发流程中必不可少的一个环节。系统测试是保证系统质量和可靠性的关键步骤,是对系统开发过程中的系统分析、系统设计和实施的最后复查。系统测试是验证系统是否满足了需求规格的定义,找出与需求规格不相符合或与之矛盾的地方。6.1测试目的测试的目的就是希望能以最少的人力和时间发现潜在的各种错误和缺陷。系统测试中,应根据开发各阶段的需求、设计文档或程序的内部结构精心设计测试用例,并利用这些实例来运行程序,以便发现错误。本系统就是通过设计不同的测试用例(包括异常、不合理、意想不到的情况)来确定系统的稳定性以及潜在隐患,从而提高系统的质量。6.2测试内容登录界面测试包括合法输入和非法输入。合法输入又包括用户和密码正确及用户和密码不正确的情况。系统录入功能测试针对各个模块的录入功能进行测试,包括合法输入和非法输入,及空输入。系统信息删除功能测试选中待删除的信息,选择删除命令。系统修改信息功能测试选中待修改的记录,输入新的值。包括输入合法值和非法值。系统查询功能测试输入查询关键字,得到查询结果。系统的测试用例如表6-1所示:

表6-1测试用例表测试过程测试模块输入预期输出测试步骤测试结果验证方式测试结果验证登录界面正确的管理员用户名与密码进入系统主界面输入正确的用户名与密码进入系统主窗体通过错误的用户名与密码提示“只有管理员才可以登录”用户名以及密码重置输入错误的用户名与密码提示“用户名或者密码错误”用户名以及密码重置通过非法输入提示请重新输入信息用户名和密码中含有非数字和字母字符提示“用户名或者密码错误”通过信息查询功能查询界面根据条件输入正确的查询关键字根据对应的信息查询出对应的结果正确的输入所要查询的信息根据对应的信息查询出对应的结果通过信息录入功能在对应的文本框中输入对应的正确信息提示“添加成功”添加合法信息提示“添加成功”通过在对应文本框中输入对应的错误信息根据不同的情况给出提示添加非法信息提示“输入错误”通过信息删除功能待删除记录提示”删除成功”选中待删除的记录,删除记录删除成功通过信息修改功能待修改的记录提示”修改成功”选中待修改的记录,输入新的值,修改记录修改成功通过6.3测试结果6.4测试分析经过系统测试,系统在稳定性和健壮性等方面表现得还是相当不错。通过比较测试的实际结果和预期结果,发现系统还存在一些小缺陷。依据缺陷的表现症状,找到导致缺陷产生的根源所在,对系统进行进一步的完善,使系统运行起来更加稳定。从而达到了系统测试的目的。

结束语本系统采用JAVA作为程序开发语言,MySQL5.1.30作为后数据库,结合apache、phpmyadmin等多种当今流行的工具完成系统开发。本人首先进行了问题定义,明确系统是否值得开发;在做了详尽的需求调查以后,确定了系统的需求;紧接着完成了系统的设计;在代码实现阶段,依据设计阶段的结果,对系统的功能模块一一实现;最后对系统进行了测试。整个课程设计,使我将在课堂上学到的知识,运用到了社会实际生产中。这段时间中,我看着自己在一点一滴的进步。每当遇到问题时,我会积极查阅资料、和同学探讨并向老师寻求帮助,总之是会想法设法的去解决问题。我觉得这种精神在我以后的学习工作中会起到更大的作用。附工程代码index_jsp.javapackageorg.apache.jsp;importjavax.servlet.*;importjavax.servlet.http.*;importjavax.servlet.jsp.*;publicfinalclassindex_jspextendsorg.apache.jasper.runtime.HttpJspBaseimplementsorg.apache.jasper.runtime.JspSourceDependent{privatestaticfinalJspFactory_jspxFactory=JspFactory.getDefaultFactory();privatestaticjava.util.List_jspx_dependants;privatejavax.el.ExpressionFactory_el_expressionfactory;privateorg.apache.AnnotationProcessor_jsp_annotationprocessor;publicObjectgetDependants(){return_jspx_dependants;}publicvoid_jspInit(){_el_expressionfactory=_jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();_jsp_annotationprocessor=(org.apache.AnnotationProcessor)getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());}publicvoid_jspDestroy(){}publicvoid_jspService(HttpServletRequestrequest,HttpServletResponseresponse)throwsjava.io.IOException,ServletException{PageContextpageContext=null;HttpSessionsession=null;ServletContextapplication=null;ServletConfigconfig=null;JspWriterout=null;Objectpage=this;JspWriter_jspx_out=null;PageContext_jspx_page_context=null;try{response.setContentType("text/html;charset=UTF-8");pageContext=_jspxFactory.getPageContext(this,request,response, null,true,8192,true);_jspx_page_context=pageContext;application=pageContext.getServletContext();config=pageContext.getServletConfig();session=pageContext.getSession();out=pageContext.getOut();_jspx_out=out;out.write('\r');out.write('\n');if(true){_jspx_page_context.forward("/websrc/page/login.jsp");return;}}catch(Throwablet){if(!(tinstanceofSkipPageException)){out=_jspx_out;if(out!=null&&out.getBufferSize()!=0)try{out.clearBuffer();}catch(java.io.IOExceptione){}if(_jspx_page_context!=null)_jspx_page_context.handlePageException(t);}}finally{_jspxFactory.releasePageContext(_jspx_page_context);}}}login_jsp.javapackageorg.apache.jsp;importjavax.servlet.*;importjavax.servlet.http.*;importjavax.servlet.jsp.*;publicfinalclassindex_jspextendsorg.apache.jasper.runtime.HttpJspBaseimplementsorg.apache.jasper.runtime.JspSourceDependent{privatestaticfinalJspFactory_jspxFactory=JspFactory.getDefaultFactory();privatestaticjava.util.List_jspx_dependants;privatejavax.el.ExpressionFactory_el_expressionfactory;privateorg.apache.AnnotationProcessor_jsp_annotationprocessor;publicObjectgetDependants(){return_jspx_dependants;}publicvoid_jspInit(){_el_expressionfactory=_jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();_jsp_annotationprocessor=(org.apache.AnnotationProcessor)getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());}publicvoid_jspDestroy(){}publicvoid_jspService(HttpServletRequestrequest,HttpServletResponseresponse)throwsjava.io.IOException,ServletException{PageContextpageContext=null;HttpSessionsession=null;ServletContextapplication=null;ServletConfigconfig=null;JspWriterout=null;Objectpage=this;JspWriter_jspx_out=null;PageContext_jspx_page_context=null;try{response.setContentType("text/html;charset=UTF-8");pageContext=_jspxFactory.getPageContext(this,request,response, null,true,8192,true);_jspx_page_context=pageContext;application=pageContext.getServletContext();config=pageContext.getServletConfig();session=pageContext.getSession();out=pageContext.getOut();_jspx_out=out;out.write('\r');out.write('\n');if(true){_jspx_page_context.forward("/websrc/page/login.jsp");return;}}catch(Throwablet){if(!(tinstanceofSkipPageException)){out=_jspx_out;if(out!=null&&out.getBufferSize()!=0)try{out.clearBuffer();}catch(java.io.IOExceptione){}if(_jspx_page_context!=null)_jspx_page_context.handlePageException(t);}}finally{_jspxFactory.releasePageContext(_jspx_page_context);}}}header_jsp.javapackagemon;importjavax.servlet.*;importjavax.servlet.http.*;importjavax.servlet.jsp.*;importglobal.security.SessionUtils;importglobal.Constants;publicfinalclassheader_jspextendsorg.apache.jasper.runtime.HttpJspBaseimplementsorg.apache.jasper.runtime.JspSourceDependent{privatestaticfinalJspFactory_jspxFactory=JspFactory.getDefaultFactory();privatestaticjava.util.List_jspx_dependants;privatejavax.el.ExpressionFactory_el_expressionfactory;privateorg.apache.AnnotationProcessor_jsp_annotationprocessor;publicObjectgetDependants(){return_jspx_dependants;}publicvoid_jspInit(){_el_expressionfactory=_jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();_jsp_annotationprocessor=(org.apache.AnnotationProcessor)getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());}publicvoid_jspDestroy(){}publicvoid_jspService(HttpServletRequestrequest,HttpServletResponseresponse)throwsjava.io.IOException,ServletException{PageContextpageContext=null;HttpSessionsession=null;ServletContextapplication=null;ServletConfigconfig=null;JspWriterout=null;Objectpage=this;JspWriter_jspx_out=null;PageContext_jspx_page_context=null;try{response.setContentType("text/html;charset=UTF-8");pageContext=_jspxFactory.getPageContext(this,request,response, null,true,8192,true);_jspx_page_context=pageContext;application=pageContext.getServletContext();config=pageContext.getServletConfig();session=pageContext.getSession();out=pageContext.getOut();_jspx_out=out;out.write("\r\n");out.write("\r\n");out.write("\r\n");out.write("<html>\r\n");out.write("<head>\r\n");out.write("\t"); StringbaseUrl=request.getContextPath();out.write("\r\n");out.write("\t<metahttp-equiv=\"Content-Type\"content=\"text/html;charset=utf-8\"/>\r\n");out.write("\t<scripttype=\"text/javascript\">\r\n");out.write("\t\t$(document).ready(function(){\r\n");out.write("\t\t\tExt.state.Manager.setProvider(newExt.state.CookieProvider());\r\n");out.write("\t\t\t//主题\r\n");out.write("\t\t//varthemeFormPanel=newAnynote.themeComboBox({\r\n");out.write("\t\t//\trenderTo:'themeChangeDiv'\r\n");out.write("\t\t//});\r\n");out.write("\t\t$(\"#sayHelloSpan\").text(Anynote.sayHello());\r\n");out.write("\t\t$(\"#todayDate\").html(\"<ahref='javascript:openCalendar()'>\"+Anynote.getToday()+\"</a>\");\r\n");out.write("\t\t});\r\n");out.write("\r\n");out.write("\t\t//账户信息\r\n");out.write("\t\tfunctioneditUser(){\r\n");out.write("\t\t\teditUserWindow=newExt.Window({\r\n");out.write("\t\t\t\ttitle:'账户信息',\r\n");out.write("\t\t\t\twidth:350,\r\n");out.write("\t\t\t\theight:400,\r\n");out.write("\t\t\t\tmodal:true,\r\n");out.write("\t\t\t\tmaximizable:false,\r\n");out.write("\t\t\t\tresizable:false,\r\n");out.write("\t\t\t\tlayout:'fit',\r\n");out.write("\t\t\t\tplain:true,\r\n");out.write("\t\t\t\tautoLoad:{url:'");out.print(baseUrl);out.write("/websrc/page/user/editUser.jsp',scripts:true,nocache:true},\r\n");out.write("\t\t\t\tlisteners:{\r\n");out.write("\t\t\t\t\tclose:function(){\r\n");out.write("\t\t\t\t\t\tvarbuttonType=Ext.getCmp(\"buttonType\").getValue();\r\n");out.write("\t\t\t\t\t\tif(buttonType==\"save\"){\r\n");out.write("\t\t\t\t\t\t\tAnynote.changeTheme(Ext.getCmp(\"themeCombo\").getValue());\r\n");out.write("\t\t\t\t\t\t}else{\r\n");out.write("\t\t\t\t\t\t\tAnynote.changeTheme(\"");out.print(SessionUtils.getUserMeta().get("theme"));out.write("\");\r\n");out.write("\t\t\t\t\t\t}\r\n");out.write("\t\t\t\t\t}\r\n");out.write("\t\t\t\t}\r\n");out.write("\t\t\t});\r\n");out.write("\t\t\teditUserWindow.show();\r\n");out.write("\t\t}\r\n");out.write("\r\n");out.write("\t\t//修改密码\r\n");out.write("\t\tfunctioneditPassword(){\r\n");out.write("\t\t\tchangePwdWindow=newExt.Window({\r\n");out.write("\t\t\t\ttitle:'修改密码',\r\n");out.write("\t\t\t\twidth:300,\r\n");out.write("\t\t\t\theight:150,\r\n");out.write("\t\t\t\tmodal:true,\r\n");out.write("\t\t\t\tmaximizable:false,\r\n");out.write("\t\t\t\tresizable:false,\r\n");out.write("\t\t\t\tlayout:'fit',\r\n");out.write("\t\t\t\tplain:true,\r\n");out.write("\t\t\t\tautoLoad:{url:'");out.print(baseUrl);out.write("/websrc/page/user/changePwd.jsp',scripts:true,nocache:true}\r\n");out.write("\t\t\t});\r\n");out.write("\t\t\tchangePwdWindow.show();\r\n");out.write("\t\t}\r\n");out.write("\t\t\r\n");out.write("\t\t//用户退出\r\n");out.write("\t\tfunctionlogout(){\r\n");out.write("\t\t\tExt.Msg.confirm(\"警告\",\"确定要退出吗?\",function(btn){\r\n");out.write("\t\t\t\tif(btn==\"yes\"){\r\n");out.write("\t\t\t\t\t//发送请求\r\n");out.write("\t\t\t\t\tAnynote.ajaxRequest({\r\n");out.write("\t\t\t\t\t\tbaseUrl:'");out.print(baseUrl);out.write("',\r\n");out.write("\t\t\t\t\t\taction:'/loginAction.do?method=logout',\r\n");out.write("\t\t\t\t\t\tcallback:function(jsonResult){\r\n");out.write("\t\t\t\t\t\t\tExt.state.Manager.set('Anynote_autoLogin',false);\r\n");out.write("\t\t\t\t\t\t\tlocation.href=\"");out.print(baseUrl);out.write("\";\r\n");out.write("\t\t\t\t\t\t},\r\n");out.write("\t\t\t\t\t\tshowWaiting:true\r\n");out.write("\t\t\t\t\t});\r\n");out.write("\t\t\t\t}\r\n");out.write("\t\t\t});\r\n");out.write("\t\t}\r\n");out.write("\r\n");out.write("\t\t//锁定\r\n");out.write("\t\tfunctionlock(){\r\n");out.write("\t\t\tExt.Msg.confirm(\"警告\",\"确定要锁定吗?\",function(btn){\r\n");out.write("\t\t\t\tif(btn==\"yes\"){\r\n");out.write("\t\t\t\t\t//用户登录Form\r\n");out.write("\t\t\t\t\tvarlockFormPanel=newExt.FormPanel({\r\n");out.write("\t\t\t\tborder:false,\r\n");out.write("\t\t\t\tlabelWidth:40,\r\n");out.write("\t\t\t\tbodyStyle:'padding:10px5px0px5px;background-color:transparent;',\r\n");out.write("\t\t\t\turl:'");out.print(baseUrl);out.write("/loginAction.do?method=login',\r\n");out.write("\t\t\t\titems:[{//笔记标题\r\n");out.write("\t\t\t\t\txtype:'label',\r\n");out.write("\t\t\t\t\t\thtml:'系统正在使用,并被锁定,请输入密码解除锁定',\r\n");out.write("\t\t\t\t\t\tstyle:'font-size:12px;',\r\n");out.write("\t\t\t\t\t\tcls:'x-form-item-label'\r\n");out.write("\t\t\t\t\t\t},{\r\n");out.write("\t\t\t\tlayout:'column',\r\n");out.write("\t\t\t\tborder:false,\r\n");out.write("\t\t\t\tbodyStyle:'background-color:transparent;margin-top:10px;',\r\n");out.write("\t\t\t\titems:[{//分类ID\r\n");out.write("\t\t\t\t\t\tcolumnWidth:.8,\r\n");out.write("\t\t\t\t\t\t\t\tlayout:'form',\r\n");out.write("\t\t\t\t\t\t\t\tborder:false,\r\n");out.write("\t\t\t\t\t\t\t\tbodyStyle:'background-color:transparent;',\r\n");out.write("\t\t\t\t\t\titems:[newExt.form.TextField({//密码\r\n");out.write("\t\t\t\t\t\t\tinputType:'password',\r\n");out.write("\t\t\t\t\tname:'password',\r\n");out.write("\t\t\t\t\tfieldLabel:'密码',\r\n");out.write("\t\t\t\t\tanchor:'98%',\r\n");out.write("\t\t\t\t\tmaxLength:20,\r\n");out.write("\t\t\t\t\tlisteners:{\r\n");out.write("\t\t\t\t\t\t\t\t\t\tspecialKey:function(field,e){\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\tif(e.getKey()==Ext.EventObject.ENTER){\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\tExt.getCmp(\"lock-tick-button\").handler();\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t}\r\n");out.write("\t\t\t\t\t\t\t\t\t\t}\r\n");out.write("\t\t\t\t\t}\r\n");out.write("\t\t\t\t\t})]\r\n");out.write("\t\t\t\t\t},{//分类ID\r\n");out.write("\t\t\t\t\t\tcolumnWidth:.2,\r\n");out.write("\t\t\t\t\t\t\t\tlayout:'form',\r\n");out.write("\t\t\t\t\t\t\t\tborder:false,\r\n");out.write("\t\t\t\t\t\t\t\tbodyStyle:'background-color:transparent;',\r\n");out.write("\t\t\t\t\t\titems:[newExt.Button({\r\n");out.write("\t\t\t\t\t\t\tid:'lock-tick-button',\r\n");out.write("\t\t\t\t\t\t\t\ttext:'确定',\r\n");out.write("\t\t\t\t\t\t\t\t\ticonCls:'tick',\r\n");out.write("\t\t\t\t\t\t\t\t\thandler:function(){\r\n");out.write("\t\t\t\t\t\t\t\t\t\tvaruserId='");out.print(SessionUtils.getCurrentUserId());out.write("';\r\n");out.write("\t\t\t\t\t\t\t\tvarpassword=lockFormPanel.getForm().findField('password').getValue();\r\n");out.write("\t\t\t\t\t\t\t\tif(password!=''){\r\n");out.write("\t\t\t\t\t\t\t\t\t//发送请求\r\n");out.write("\t\t\t\t\t\t\t\t\tExt.getCmp('lockWindowStatusPanel').body.update(\" <imgsrc='");out.print(baseUrl);out.write("/websrc/js/ext-3.3.0/resources/images/default/shared/loading-balls.gif'/>\");\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\tExt.Ajax.request({\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\turl:'");out.print(baseUrl);out.write("/loginAction.do?method=loginCheck',\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\tparams:{userId:userId,password:password},\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\tcallback:function(options,success,response){\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\tvarjsonResult=Ext.decode(response.responseText);\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\tif(jsonResult.success==true){\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t\tExt.getCmp('lockWindow').close();\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t\t$('#lockDiv').hide();\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t\tExt.state.Manager.set('Anynote_hasLocked',false);\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.onbeforeunload=null;\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t\tvarmessage='发生异常.';\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(jsonResult.message&&jsonResult.message!=''){//后台设定的业务消息\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage=jsonResult.message;\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t\tExt.getCmp('lockWindowStatusPanel').body.update('<fontcolor=\"red\">'+message+'</font>');\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){Ext.getCmp('lockWindowStatusPanel').body.update('当前用户:");out.print(SessionUtils.getCurrentUserName());out.write("');},3000);\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t\t}\r\n");out.write("\t\t\t\t\t\t\t\t\t\t\t});\r\n");out.write("\t\t\t\t\t\t\t\t}else{\r\n");out.write("\t\t\t\t\t\t\t\t\tExt.getCmp('lockWindowStatusPanel').body.update('<fontcolor=\"red\">请输入密码.</font>');\r\n");out.write("\t\t\t\t\t\t\t\t\tsetTimeout(function(){Ext.getCmp('lockWindowStatusPanel').body.update('当前用户:");out.print(SessionUtils.getCurrentUserName());out.write("');},3000);\r\n");out.write("\t\t\t\t\t\t\t\t}\r\n");out.write("\t\t\t\t\t\t\t\t\t}\r\n");out.write("\t\t\t\t\t\t\t\t})]\r\n");out.write("\t\t\t\t\t}]\r\n");out.write("\t\t\t\t}]\r\n");out.write("\t\t\t\t});\r\n");out.write("\t\t\t\t\t$('#lockDiv').show();\r\n");out.write("\t\t\t\t\t//用户登录窗口\r\n");out.write("\t\t\t\t\tvarlockWindow=newExt.Window({\r\n");out.write("\t\t\t\t\t\tid:'lockWindow',\r\n");out.write("\t\t\t\t\t\trenderTo:'lockWindowDiv',\r\n");out.write("\t\t\t\t\t\ttitle:'系统已锁定',\r\n");out.write("\t\t\t\t\t\twidth:300,\r\n");out.write("\t\t\t\t\t\theight:120,\r\n");out.write("\t\t\t\t\t\tmaximizable:false,\r\n");out.write("\t\t\t\t\t\tresizable:false,\r\n");out.write("\t\t\t\t\t\tclosable:false,\r\n");out.write("\t\t\t\t\t\tdraggable:false,\r\n");out.write("\t\t\t\t\t\tlayout:'fit',\r\n");out.write("\t\t\t\t\t\tplain:true,\r\n");out.write("\t\t\t\t\t\titems:[lockFormPanel],\r\n");out.write("\t\t\t\t\t\tbbar:newExt.Panel({\r\n");out.write("\t\t\t\t\t\t\tid:'lockWindowStatusPanel',\r\n");out.write("\t\t\t\t\t\t\thtml:'当前用户:");out.print(SessionUtils.getCurrentUserName());out.write("',\r\n");out.write("\t\t\t\t\t\t\tborder:false,\r\n");out.write("\t\t\t\t\t\t\tbodyStyle:'background-color:transparent;padding:3px5px;'\r\n");out.write("\t\t\t\t\t\t})\r\n");out.write("\t\t\t\t\t}).show();\r\n");out.write("\t\t\t\t\tExt.state.Manager.set('Anynote_hasLocked',true);\r\n");out.write("\t\t\t\t\twindow.onbeforeunload=function(){\r\n");out.write("\t\t\t\t\t\treturn\"系统已锁定,离开页面将退出登录,确定吗?\";\r\n");out.write("\t\t\t\t\t}\r\n");out.write("\t\t\t\t}\r\n");out.write("\t\t\t});\r\n");out.write("\t\t}\r\n");out.write("\r\n");out.write("\t\tfunctionopenCalendar(){\r\n");out.write("\t\t\tvarcalendarWindow=newExt.Window({\r\n");out.write("\t\t\t\ttitle:'万年历',\r\n");out.write("\t\t\t\twidth:437,\r\n");out.write("\t\t\t\theight:550,\r\n");out.write("\t\t\t\tmodal:true,\r\n");out.write("\t\t\t\tmaximizable:false,\r\n");out.write("\t\t\t\tresizable:false,\r\n");out.write("\t\t\t\tlayout:'fit',\r\n");out.write("\t\t\t\tbodyStyle:'background-color:#ffffff;',\r\n");out.write("\t\t\t\thtml:'<iframesrc=\"");out.print(baseUrl);out.write("/websrc/page/common/calendar.jsp\"width=\"450px\"height=\"520px;\"style=\"margin-left:10px;\"frameborder=\"0\"></iframe>'\r\n");out.write("\t\t\t}).show();\r\n");out.write("\t\t}\r\n");out.write("\t</script>\r\n");out.write("</head>\r\n");out.write("<body>\r\n");out.write("\t<divid=\"headerDiv\">\r\n");out.write("\t\t<tablestyle=\"width:100%;height:100%;table-layout:fixed;\">\r\n");out.write("\t\t\t<tr>\r\n");out.write("\t\t\t\t<tdwidth=\"180px\"><ahref=\"");out.print(baseUrl);out.write("\"><imgsrc=\"");out.print(baseUrl);out.write("/websrc/image/Anynote-s.png\"></img></a></td>\r\n");out.write("\t\t\t\t<tdalign=\"center\"class=\"loginInfo\">\r\n");out.write("\t\t\t\t\t<spanstyle=\"padding:3px10px3px18px;\"class=\"user\"style=\"height:20px;\">\r\n");out.write("\t\t\t\t\t\t");out.print(SessionUtils.getCurrentUserName()+"("+Constants.ROLE_MAP.get(SessionUtils.getUserRole())+")");out.write(",<spanid=\"sayHelloSpan\"></span>\r\n");out.write("\t\t\t\t\t</span>\r\n");out.write("\t\t\t\t\t<spanstyle=\"padding:3px10px3px18px;\"class=\"user_edit\"style=\"height:20px;\"><ahref=\"javascript:editUser();\">账户信息</a></span>\r\n");out.write("\t\t\t\t\t<spanstyle=\"padding:3px10px3px18px;\"class=\"key\"style=\"height:20px;\"><ahref=\"javascript:editPassword();\">修改密码</a></span>\r\n");out.write("\t\t\t\t\t<spanstyle=\"padding:3px10px3px18px;\"class=\"lock\"style=\"height:20px;\"><ahref=\"javascript:lock();\">锁定</a></span>\r\n");out.write("\t\t\t\t\t<spanstyle=\"padding:3px10px3px18px;\"class=\"user_go\"style=\"height:20px;\"><ahref=\"javascript:logout();\">退出</a></span>\r\n");out.write("\t\t\t\t</td>\r\n");out.write("\t\t\t\t<tdwidth=\"180px\"align=\"right\"style=\"padding-right:5px;\"class=\"loginInfo\">\r\n");out.write("\t\t\t\t\t<divid=\"todayDate\"></div>\r\n");out.write("\t\t\t\t</td>\r\n");out.write("\t\t\t</tr>\r\n");out.write("\t\t</table>\r\n");out.write("</div>\r\n");out.write("</body>\r\n");out.write("</html>");}catch(Throwablet){if(!(tinstanceofSkipPageException)){out=_jspx_out;if(out!=null&&out.getBufferSize()!=0)try{out.clearBuffer();}catch(java.io.IOExceptione){}if(_jspx_page_context!=null)_jspx_page_context.handlePageException(t);}}finally{_jspxFactory.releasePageContext(_jspx_page_context);}}}indes.jsp页面<%@pagelanguage="java"pageEncoding="UTF-8"isELIgnored="false"%><%@includefile="/websrc/page/common/jsloader.jsp"%><%@pageimport="global.security.SessionUtils"%><%@pageimport="global.Constants"%><html><head> <%StringbaseUrl=request.getContextPath();%> <title>Anynote</title> <metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/> <scripttype="text/javascript"> $(document).ready(function(){ Ext.state.Manager.setProvider(newExt.state.CookieProvider()); Ext.QuickTips.init(); //如果处于锁定状态,直接退出页面 varhasLocked=Ext.state.Manager.get('Anynote_hasLocked'); if(hasLocked){ //发送请求 Anynote.ajaxRequest({ baseUrl:'<%=baseUrl%>', action:'/loginAction.do?method=logout', callback:function(jsonResult){ Ext.state.Manager.set('Anynote_autoLogin',false); location.href="<%=baseUrl%>"; } }); }else{ //实际改变风格样式的处理 Ext.util.CSS.swapStyleSheet('theme','/Anynote/websrc/js/ext-3.3.0/resources/css/<%=SessionUtils.getUserMeta().get("theme")%>'); Ext.state.Manager.set('Anynote_theme','<%=SessionUtils.getUserMeta().get("theme")%>'); //头部 Anynote.headerPanel=newExt.Panel({ region:'north', height:40, border:false, margins:'0005', bodyStyle:'background-color:transparent;',autoLoad:{url:'<%=baseUrl%>/websrc/page/common/header.jsp',scripts:true,nocache:true} }); //菜单面板 Anynote.menuPanel=newExt.Panel({ region:'west', title:'主菜单', split:true, width:240, minSize:175, maxSize:400, collapsible:true, margins:'0', layout:'accordion', layoutConfig:{ animate:true }, listeners:{collapse:function(){Anynote.resizeActiveTab();}} }); //添加主页菜单 varhomeAccordion=Menu.getHomeAccordion({ baseUrl:'<%=baseUrl%>', tabUrl:'<%=baseUrl+SessionUtils.getUserMeta().get("homePage")%>' }); Anynote.menuPanel.add(homeAccordion); //任务菜单 if("<%=SessionUtils.getUserMeta().get("showTodo")%>"=="<%=Constants.CHECK_TRUE%>"){ //参数 varparam={}; param.baseUrl='<%=baseUrl%>'; //任务菜单 vartodoAccordion=Menu.getTodoAccordion(param); Anynote.menuPanel.add(todoAccordion); } //笔记菜单 if("<%=SessionUtils.getUserMeta().get("showNote")%>"=="<%=Constants.CHECK_TRUE%>"){ //参数 varparam={}; param.baseUrl='<%=baseUrl%>'; //任务菜单 varnoteAccordion=Menu.getNoteAccordion(param); Anynote.menuPanel.add(noteAccordion); } //相册菜单 if("<%=SessionUtils.getUserMeta().get("showPic

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论