⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 orderok.jsp

📁 一个仿造淘宝的jsp网站。功能比较完善
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:useBean id="orderbean" class="com.jc.taobao.gjj.logic.OrderInfoBean" scope="session"/>
<%@ page import="com.jc.taobao.gjj.entity.*" %>
<%
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%>">
    
    <title>My JSP 'Orderok.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
   <link href="CSS/manager.css" rel="stylesheet" type="text/css">
   <style type="text/css">
<!--
.style1 {font-size: 14px}
-->
   </style>
  </head>
  
  <body>
     <div id="managerfrontrightnum2buttom">
	    <div id="managerfrontrightnum1">已确认订单</div>
		<div id="shoptopselect">
		<%!
				int intpagesize=7;//每页显示的记录数
				int intpagetotal;//总页数
				int currpagebegin;//起始记录索引
				int intpage;//要显示的页数
				String strpage;//用户请求的页数
				int count;//有多少条记录
			
			 	%>
			 		<%
			 		ArrayList al=orderbean.getqueryOrderOkbyOsid();
			 		
			 		if(!al.isEmpty()&&al!=null)
                    {
			 		count=al.size();//计算出有多少条记录
			 		intpagetotal=count%intpagesize==0?count/intpagesize:count/intpagesize+1;//计算出总页数
			 		strpage=request.getParameter("pagenumber");
			 		if(strpage==null)
			 		{
			 			intpage=1;
			 		}
			 		else
			 		{
			 			intpage=Integer.parseInt(strpage);
			 			if(intpage<1)
			 			{
			 				intpage=1;
			 			}
			 		}
			 		if(intpage>intpagetotal)
			 		{
			 		intpage=intpagetotal;
			 		}
			 	currpagebegin=intpage*intpagesize-intpagesize;
			 	 %>
	      <table width="698" height="64" border="0" cellpadding="0" cellspacing="0" style="border:1px solid  ">
             <tr bgcolor="#DCE2F0">
               <td width="62" align="center"><span class="style1">订单编号</span></td>
               <td width="137" align="center"><span class="style1">订单流水号</span></td>
               <td width="97" align="center"><span class="style1">收货人</span></td>
               <td width="126" align="center"><span class="style1">电话</span></td>
               <td width="163" align="center"><span class="style1">地址</span></td>
               <td width="113" align="center"><span class="style1">订单日期</span></td>
             </tr>
             <%
                  for(int i=currpagebegin;i<intpage*intpagesize && i<count;i++)
                 { 
                   OrderInfo order=(OrderInfo)al.get(i);
                 
              %>
             <tr bgcolor="#ECF4FF">
               <td align="center"><span class="style1"><%=order.getOid() %></span></td>
               <td align="center"><span class="style1"><%=order.getGlideid() %></span></td>
               <td align="center"><span class="style1"><%=order.getGetshopman() %></span></td>
               <td align="center"><span class="style1"><%=order.getTelephone() %></span></td>
               <td align="center"><span class="style1"><%=order.getAddress() %></span></td>
               <td align="center"><span class="style1"><%=order.getOrdertime() %></span></td>
             </tr>
              <%} }%>
             <tr bgcolor="#ECF4FF">
               <td colspan="6" style="border-top: 1px solid #66CCFF;">共<%=count %>条记录
      第<%= intpage %>页 共<%= intpagetotal %>页
			    <%if(intpage>1){ %>
			    <a href="Shopcontrol.jsp?pagenumber=<%=intpage-1 %>">上一页</a>
			    <%}else{ %>
			    上一页
			    <%} %>
			    <%if(intpage<intpagetotal){ %>
			    <a href="Shopcontrol.jsp?pagenumber=<%=intpage+1 %>">下一页</a>
			    <%}else{ %>
			    下一页
			    <%}%></td>
             </tr>
            
           </table>
		</div>
	 </div>
  </body>
</html>
  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -