急求JSP网上购物系统代码??

商品后台管理界面(包括商品查询,删除,修改,添加功能); 会员管理界面(会员查询,删除)源代码……
新手提问,分数不多,还请各位高手帮帮忙!!!

看懂这个,就OK了,实现会员管理界面(会员查询,删除)
呵呵,注意下面两点,我标志的

<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ page import="java.sql.*"%>
<%@ page import="Bean.QueryBean"%>
<jsp:useBean id="query" scope="page" class="Bean.QueryBean"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
admincontrol
</title>
</head>
<%!
ResultSet rs=null;
String sql,login;
int code;
int pagesize=3;
int rowcount=0;
int pagecount=1,n;
int showpage=1;
%>
<script language="javascript">
function check_delete()
{if (confirm("你确定它删除吗?"))
return true;
else
return false;}
</script>

<body bgcolor="#ffffff">
<a href="index.jsp">返回首页<a>
<table border="1" width="786" align="center"bordercolor="#FFFFFF" cellpadding="0" cellspacing="0"bordercolordark="#333333" bordercolorlight="#FFFFFF">
<tr>
<td width="786" align="center" colspan="6" height="32">用户管理</td>
</tr>
<form name="form1" method="post" action="">
<tr>
<td width="18%" align="center"height="27">用户ID</td>
<td width="17%" align="center"height="27">用户名</td>
<td width="17%" align="center"height="27">用户身份</td>
<td width="17%" align="center"height="27">注册时间</td>
<td width="17%" align="center"height="27">管理</td>
</tr>
<%
sql="select * from userinfo order by addtime desc";//会员查询
try
{
rs=query.executeQuery(sql);
if(!rs.next())
{
%>
<script language="javascript">
alert("没有用户信息");
</script>
<%
}else
{
rs.last();
rowcount=rs.getRow();
pagecount=((rowcount%pagesize)==0?(rowcount/pagesize):(rowcount/pagesize)+1);
String topage=request.getParameter("topage");
if(topage!=null)
{
showpage=Integer.parseInt(topage);
if(showpage>pagecount){
showpage=pagecount;
}else if(showpage<=0){
showpage=1;
}
}
rs.absolute((showpage-1)*pagesize+1);
for(int i=1;i<=pagesize;i++)
{
code=rs.getInt("id");
%>
<tr>
<td width="17%" align="center" height="27"><%=code%></td>
<td width="17%" align="center"height="27"><%=rs.getString("username")%></td>
<td width="17%" align="center"height="27"><%=rs.getString("logrole")%></td>
<td width="18%" align="center"height="27"><%=rs.getString("addtime")%></td>
<td width="17%" align="center"height="27"><a href="Userdel?id=<%=code%>" onclick="return check_delete();">删除</a> </td>
</tr>//删除功能
<%
if(!rs.next())
break;
}}
}catch(Exception e)
{out.println("查询异常!!!");}
%>
<tr>
<td width="786" height="30" colspan="9" align="right">
<table width="786" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="786" height="30" colspan="6" align="right">
<div align="center">共<%=pagecount%>页  
<a href="admincontrol.jsp?topage=<%=1%>">第一页</a>
<a href="admincontrol.jsp?topage=<%=showpage-1%>">上一页</a>  
<a href="admincontrol.jsp?topage=<%=showpage+1%>">下一页</a>  
<a href="admincontrol.jsp?topage=<%=pagecount%>">最后一页</a>
</div>
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</body>
</html>
温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网