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

📄 clientlist.jsp

📁 电子商务网站使用MVC模式B/S结构功能不是很全适合初学者看
💻 JSP
📖 第 1 页 / 共 2 页
字号:
					%>
          </TBODY>
        </TABLE>
      </DIV>

	<table cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
		<tr>
			<td>
				<img src="<%=request.getContextPath()%>/image/fh.gif" width="197">
			</td>
		</tr>
		<tr height="100">	
			<td bgcolor="#CCCCCC" height="100">	
				<marquee behavior="scroll" direction="up" loop="-1" height="120" id=zimu onmouseover=zimu.stop() onmouseout=zimu.start() scrollDelay=120>
<%	
					list=(ArrayList)(application.getAttribute("sentOrders".toUpperCase()));
					if(list!=null){	
						for(int i=0;i<list.size();i++){
							table=(Hashtable)list.get(i);
							String username="",orderID="",addDay="",totalPrice="",consignment="";	
							username=table.get("username".toUpperCase()).toString();
							orderID=table.get("orderID".toUpperCase()).toString();
							addDay=table.get("addDay".toUpperCase()).toString();
							totalPrice=table.get("totalPrice".toUpperCase()).toString();
							consignment=table.get("consignment".toUpperCase()).toString();
%>
						<a href="<%=request.getContextPath()%>/clientShowOneOrderListAction?orderID=<%=orderID%>" target="_blank"><font color="" size="2"><%=username%>在<%=addDay.substring(0,11)%>下的订单已发货</font></a><br>
<%
						}
					}	
%>		
				</marquee>
			</td>
		</tr>
	</table>
	
	</td>
    <td  valign="top" width="546" >
		<form action="print.jsp" name="form1" method="post" > 
  			<%	
				list=(ArrayList)(session.getAttribute("list".toUpperCase()));
				if(list!=null){	
					for(int i=0;i<list.size();i++){
						table=(Hashtable)list.get(i);
						card=table.get("card".toUpperCase()).toString();
						num=table.get("num".toUpperCase()).toString();
						model=table.get("model".toUpperCase()).toString();
						photo=table.get("photo".toUpperCase()).toString();
						net=table.get("net".toUpperCase()).toString();
						price=table.get("price".toUpperCase()).toString();
						price=price.substring(0,price.indexOf("."));
						special=table.get("special".toUpperCase()).toString();
						picture=request.getContextPath()+"/image/phone/"+card+"/"+num+"/"+table.get("picture".toUpperCase()).toString();
						describe=table.get("describe".toUpperCase()).toString();
						id=Integer.parseInt(table.get("id".toUpperCase()).toString());
						restNum=table.get("restNum".toUpperCase()).toString();
			%>
					<TABLE cellSpacing=1 cellPadding=0 width=554 bgColor=#6a6967 
						border=0>
						  <TBODY>
						  <TR vAlign=bottom>
							<TD bgColor=#c8cccf colSpan=3 height=20><input type="checkbox" name="id" value="<%=id%>">&nbsp;
							  <%=card%>&nbsp;<%=num%></SPAN></B></TD></TR>
						  <TR align=middle>
							<TD width=133 bgColor=#ffffff height=102><a href="<%=request.getContextPath()%>/clientShowOneCommodityAction?id=<%=id%>" target=_blank>
							<img src="<%=picture%>" width=100 height=108 title="查看详情"></a></TD>
							<TD width=292 bgColor=#f9f6ed>
							  <TABLE width=250>
								<TBODY>
								<TR>
								  <TD>网络制式:<%=net%><BR>手机类型:<%=model%><BR>拍照功能(万):<%=photo%>
								  </TD>
								</TR>
								<TR>
								  <TD width="164" height=25 align=middle><nobr>
									报价:<%=price%>(元)</TD>
								</TR>
								</TBODY>
							</TABLE></TD>
							<TD width=125 bgColor=#f9f6ed>
							  <TABLE cellSpacing=0 cellPadding=0 border=0>
								<TBODY>
								<TR>
								  <TD align=middle height=38><a href="<%=request.getContextPath()%>/searchAction?price=<%=price%>&&searchType=priceSearch">同价位商品<a></TD>
								  </TR>
								<TR>
								  <TD height="31" align=middle><a href="javascript:addCompareOne(<%=id%>)"><img width=80 height=20 src="<%=request.getContextPath()%>/image/addCompare.gif"></a></TD>
								</TR>
								</TBODY></TABLE></TD></TR></TBODY></TABLE>
			<%			
					}
				}
			%>
					<table>
						<tr>
							<td align="right" bgcolor="#CCCCCC" background="<%=request.getContextPath()%>/image/top01_3.gif" colspan="5">
									&nbsp;&nbsp;&nbsp;
									<a href="<%=request.getContextPath()%>/common/compareList.jsp" target="_blank">
									查看对比</a> 
									<a href="javascript:addCompare()"  >加入对比</a> 

									<a href="<%=request.getContextPath()%>/client/clientShopCar.jsp" target="_blank">
									查看购物车</a> 
									<a href="javascript:shop()" title="将本页面选中的商品放入购物车">放入购物车</a></span>
									<input type="button" name="chkother" value="反选" onclick="CheckOthers(this.form)" title="对本页面反向选择商品">
							</td>
						</tr> 
						<tr> 
						  	<td width="554" align="right" bgcolor="#CCCCCC" background="<%=request.getContextPath()%>/image/top01_3.gif" colspan="5">
                              <%						
						int dirPage=4;
						int startPage=1;
						int pageNumber=1;
						if(session.getAttribute("searchResultSize".toUpperCase())!=null) 
							out.println("共"+session.getAttribute("searchResultSize".toUpperCase())+"个记录");
						if(session.getAttribute("pageNumber".toUpperCase())!=null){
							pageNumber=Integer.parseInt(session.getAttribute("pageNumber".toUpperCase()).toString());
							if(pageNumber%4!=0){
								startPage=pageNumber/dirPage*dirPage+1;
							}else{
								startPage=(pageNumber-1)/dirPage*dirPage+1;
							}
							if(session.getAttribute("pages".toUpperCase()).toString().equals("0"))pageNumber=0;
%>
                              <b></b>
                              <%							
							if(startPage!=1){
								int prePageNumber=startPage-4;
%>
                              <span class="aindex"><a href="javascript:toResultPage(<%=prePageNumber%>)">上页</a>&nbsp;&nbsp;</span>
                              <%							}else {
%>
                              <span class="index">上页&nbsp;&nbsp;</span>
                              <%							}
						}
						if(session.getAttribute("pages".toUpperCase())!=null){
							int pages=Integer.parseInt(session.getAttribute("pages".toUpperCase()).toString());
							for(int i=startPage;i<startPage+dirPage&&i<=pages;i++){
								if(i!=pageNumber){
%>
                              <span class="aindex"><a href="javascript:toResultPage(<%=i%>)"><%=i%></a></span>&nbsp
                              <%								}else{
%>
                              <span class="currentindex"><a href="javascript:toResultPage(<%=i%>)"><%=i%></a></span>&nbsp;
                              <%								}
							}
				
							if(startPage/4<(pages-1)/4){
								int nextPageNumber=startPage+4;
%>
                              <span class="aindex"><a href="javascript:toResultPage(<%=nextPageNumber%>)">下页</a></span>
                              <%							}else {
%>
                              <span class="index">&nbsp;&nbsp;下页</span>
                              <%							}
						}
%>
                              <b><span class="index"><%=pageNumber%>/<%=session.getAttribute("pages".toUpperCase()).toString()%></span></b> <span class="index">到第
                              <input type="text" size=3 name="pageNumber2" onKeyUp="if(/\D/.test(this.value)){alert('只能输入数字');this.value='';}">      
                              页 <IMG  title=到指定的页面  alt=翻指定的页码 
src="<%=request.getContextPath()%>/image/searchPage.gif" onClick="javascript:checkPageNumber(this.form.pageNumber.value)"></span> 
							</td>
						</tr>
					</table>	
		</form>
	</td>
</tr>
</table>		
<script language="javascript">
	function shop(){
		form1.action="<%=request.getContextPath()%>/clientShopAction";
		form1.submit();
	}
	function shopOne(str){
		for (var i=0;i<form1.elements.length;i++){
			var e = form1.elements[i];
//		if (e.name != 'chkall')
			if(e.value == str)
				e.checked=true;
				// form.chkall.checked;
		}
		//document.form1.str.checked=true;
		form1.action="<%=request.getContextPath()%>/clientShopAction";
		form1.submit();
	}
	function addCompare(){
		form1.action="<%=request.getContextPath()%>/addCompareAction";
		form1.submit();
	}

	function addCompareOne(str){
		for (var i=0;i<form1.elements.length;i++){
			var e = form1.elements[i];
			if(e.value == str)
				e.checked=true;
		}
		form1.action="<%=request.getContextPath()%>/addCompareAction";
		form1.submit();
	}

	function checkPageNumber(str){
		//检查价格
		if(isNaN(parseInt(str))){
			alert("页码必须是数字.");
			//document.form1.pageNumber.focus();
			return false;
		}
		form1.action="<%=request.getContextPath()%>/clientListAction?pageNumber="+str;
		form1.submit();
	}
	function CheckOthers(form){
		for (var i=0;i<form.elements.length;i++){
			var e = form.elements[i];
			if (e.checked==false){
				e.checked = true;
			}
			else{
			e.checked = false;
			}
		}
	}
</script>
</body>
  

⌨️ 快捷键说明

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