好文档 - 专业文书写作范文服务资料分享网站

基于JSP网上书店系统的设计与实现课程设计

天下 分享 时间: 加入收藏 我要投稿 点赞

<%

rs=stmt.executeQuery(\ if(i_currentpage>i_totalpage) i_currentpage=i_totalpage;

int i_position=(i_currentpage-1)*pagenum; if(i_position==0) rs.beforeFirst(); else

rs.absolute(i_position); for(int i=0;i

s_createid=(rs.getString(\s_subject=(rs.getString(\s_datel=(rs.getString(\):\

s_context=(rs.getString(\s_employeeid=(rs.getString(\:\

s_date2=(rs.getString(\):\

s_advice=(rs.getString(\请等待工作人员处理]\

<%=s_datel%> <%=s_createid%> <%=s_subject%> <%=s_context%> <%=s_date2%> <%=s_advice%>

<% }//if }//for %> <% if(s_userid!=null){%>

name=\

type=\

name=\

\

CheckSubmit;\

<%}else{%>

<%}%>

图4-6 读者留言

7.

管理员身份验证功能模块设计

a.管理员身份验证bookshop/admin/index.jsp代码:

<%@ page contentType=\<%@ page import=\<%

request.setCharacterEncoding(\ Class.forName(\ Connection

conn=DriverManager.getConnection(\ Statement stmt=conn.createStatement

(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);

ResultSet rs=null;

String op=request.getParameter(\ if(op!=null&&op.equals(\

String s_employeeid=request.getParameter(\ String s_password=request.getaparameter(\ rs=stmt.executeQuery(\

employee

where

employeeid='\ if(rs.next()){

session.setAttribute(\ reponse.sendRedirect(\

else{response.sendRedirect(\用户名或密码不正确!\;}}

%>%

密码

name=\

type=\

onClick=\

CheckSubmit();\登陆\》

图4-7 管理员身份验证

8.

订单处理功能模块设计

a.订单处理orderdit.jsp代码:

<%@ page contenttype=\<%@ page import=\<%

Class.forName(\ Connection conn=DriverManager.

getConnection(\Statement

stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_

READ_ONLY); ResultSet rs=null;

String s_admin=(String)session.getAttribute(\

if(s_admin==null)( response.sendRedirect(\ String s_currentpage-request.getParameter(\ String s_orderid-request.getParameter(\ String s_state=request.getParameter(\

stmt.executeUpdate(\orderform set state=\where orderid=\ rs=stmt.executeQuery(\orderid='\ while(rs.next()){

String s_bookid=rs.getString(\ int i_ordernum-rs.getInt(\ Statement stmt2=conn.createStatement

(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); stmt2.executeUpdate(\book

set *

from

orderdetail

where

quantity=quantity-\ response.sendRedirect(\op=show¤tpage=\%>

基于JSP网上书店系统的设计与实现课程设计

<%rs=stmt.executeQuery(\if(i_currentpage>i_totalpage)i_currentpage=i_totalpage;inti_position=(i_currentpage-1)*pagenum;if(i_position==0)rs.beforeFirst();else
推荐度:
点击下载文档文档为doc格式

精选图文

热门排序

推荐文章

热门标签

92ofo08f0g7g2499ip734mu7526k9200fnc
领取福利

微信扫码领取福利

微信扫码分享