?? d07022d3ef46001c1160e657ddb92502
字號:
<%@ page language="java" import= "java.io.*,java.util.*" pageEncoding="GBK"%>
<%@ page import= "hall.collect" %>
<%@ page import= "hall.products" %>
<jsp:useBean id="serchProduct" class="hall.opProduct" scope="page"></jsp:useBean>
<jsp:useBean id="collectBean" class = "hall.opCollect" scope="page"> </jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>無標題文檔</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:200px;
height:299px;
z-index:1;
top: 287px;
left: 22px;
}
#Layer2 {
position:absolute;
left:241px;
top:180px;
width:622px;
height:412px;
z-index:2;
}
#Layer3 {
position:absolute;
left:244px;
top:310px;
width:485px;
height:32px;
z-index:3;
}
#Layer4 {
position:absolute;
left:244px;
top:355px;
width:488px;
height:128px;
z-index:4;
}
#Layer5 {
position:absolute;
left:245px;
top:497px;
width:488px;
height:113px;
z-index:5;
}
.STYLE8 {font-size: small}
.STYLE9 {font-size: medium}
-->
</style>
</head>
<BODY text=#000000 bgProperties=fixed leftMargin=0 background=images/background.jpg topMargin=0 onLoad="MM_preloadImages('IMAGES/skin8/dh-new.gif','IMAGES/skin8/dh-bbs.gif')">
<CENTER>
<img src="images/title1.jpg" width="760" height="160">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="760" height=70">
<param name="movie" value="list.swf">
<embed src="list.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="70"></embed>
</object>
<h2>
<td>
<%
String productItem = request.getParameter("producItem");
int item = Integer.parseInt(productItem);
String name = "";
String id[] = session.getValueNames();
for(int i= 0;i<id.length;i++){
if(!id[i].equals("rand")&&!id[i].equals("basket")){
name = (String)session.getValue(id[i]);
}
}
if(name== null||name ==""){
%>
<center>
<p> <A HREF = "index.jsp"><STRONG>你還沒有登陸,請現登陸,謝謝</STRONG></A> </p>
<%
} else{
if(!collectBean.addCollect(name,item)){
%>
<p> <A HREF = "afterlogin.jsp?userid=<%=name %>"><STRONG>添加到數據庫失敗,請返回重新收藏</STRONG></A> </p>
<%
} else{
if(!collectBean.showCollect(name)){
%>
<p> <A HREF = "afterlogin.jsp?userid=<%=name %>"><STRONG>查詢數據庫失敗,請返回</STRONG></A> </p>
<%
}else{
String intipage =request.getParameter("page");
int totalpage =collectBean.getPageCount();
int curpage;
if(intipage == null){
curpage=totalpage;
}else{
curpage = Integer.parseInt(intipage);
if(curpage<1)curpage = 1;
else if(curpage>totalpage)curpage=totalpage;
}
collectBean.setPage(curpage);
collectBean.showCollect(name);
Vector collect = collectBean.getCollectList();
%>
<table width="100%" height="80%" border="10" cellspacing="1">
<tr><td align = "center">序列號</td><td align = "center">名稱</td><td align = "center">類型</td><td align = "center">日期</td><td align = "center">詳細</td><td align = "center">刪除</td></tr>
<%
for(int j= 0;j<collect.size();j++){
serchProduct.showProduct(((collect)collect.get(j)).getItem());
Vector prod = serchProduct.getProducts();
%>
<tr><td align = "center"><%=((collect)collect.get(j)).getItem() %></td><td align = "center"><%=((products)prod.get(0)).getProductorName() %></td><td align = "center"><%=((products)prod.get(0)).getType() %></td><td align = "center"><%=((collect)collect.get(j)).getCollDate() %></td>
<td align = "center"><font color="#ff0080"><a href="showdetail.jsp?producItem=<%=((collect)collect.get(j)).getItem() %> ">详细</a></font></td><td align = "center"><font color="#ff0080"><a href="deleteCollect.jsp?username=<%=name %>&producItem=<%=((collect)collect.get(j)).getItem() %> ">删除</a></font></td>
</tr>
<%
}
%>
<tr>
<td colspan=2 align=center>
第<%=curpage%>頁 共<%=totalpage%>頁
<%if(curpage<totalpage ){%>
<a href="collect.jsp?page=<%=curpage+1%>&producItem=-2">下一頁</a><%
}
%>
<%if(curpage>1){%>
<a href="collect.jsp?page=<%=curpage-1%>&producItem=-2">上一頁</a><%
}
%>
</td>
<th>
<%
for(int k = 0;k<totalpage;k++){
if(k+1==curpage){
%>
<%=k+1%>
<%
}else{
%>
<a href="collect.jsp?page=<%=k+1%>&producItem=-2"><%=k+1%></a>
<%
}
}
%>
</th>
<td align = "center"><a href= "afterlogin.jsp?userid=<%= name %> ">返回主頁</a> </td>
</tr>
</table>
<%
}
}
}
%>
</td>
<TABLE class=grayline cellPadding=0 width=800 align=center
bgColor=#ffffff border=0>
<div id="Layer1"></div>
<body leftMargin="0" topMargin="0" marginheight="0" marginwidth="0" onload="showMenu()">
<p>
<!-- 網頁頭部開始 -->
<style type="text/css">
<!--
*{margin:0;padding:0;border:0;}
body {
font-family: arial, 宋体, serif;
font-size:12px;
}
#nav {
width:180px;
line-height: 24px;
list-style-type: none;
text-align:left;
/*定义整个ul菜单的行高和背景色*/
}
/*==================一级目录===================*/
#nav a {
width: 160px;
display: block;
padding-left:20px;
/*Width(一定要),否则下面的Li会变形*/
}
#nav li {
background:#CCC; /*一级目录的背景色*/
border-bottom:#FFF 1px solid; /*下面的一条白边*/
float:left;
/*float:left,本不应该设置,但由于在Firefox不能正常显示
继承Nav的width,限制宽度,li自动向下延伸*/
}
#nav li a:hover{
background:#CC0000; /*一级目录onMouseOver显示的背景色*/
}
#nav a:link {
color:#666; text-decoration:none;
}
#nav a:visited {
color:#666;text-decoration:none;
}
#nav a:hover {
color:#FFF;text-decoration:none;font-weight:bold;
}
/*==================二级目录===================*/
#nav li ul {
list-style:none;
text-align:left;
}
#nav li ul li{
background: #EBEBEB; /*二级目录的背景色*/
}
#nav li ul a{
padding-left:20px;
width:160px;
/* padding-left二级目录中文字向右移动,但Width必须重新设置=(总宽度-padding-left)*/
}
/*下面是二级目录的链接样式*/
#nav li ul a:link {
color:#666; text-decoration:none;
}
#nav li ul a:visited {
color:#666;text-decoration:none;
}
#nav li ul a:hover {
color:#F3F3F3;
text-decoration:none;
font-weight:normal;
background:#CC0000;
/* 二级onmouseover的字体颜色、背景色*/
}
/*==============================*/
#nav li:hover ul {
left: auto;
}
#nav li.sfhover ul {
left: auto;
}
#content {
clear: left;
}
#nav ul.collapsed {
display: none;
}
-->
#PARENT{
width:300px;
padding-left:20px;
} </style>
</body>
</TABLE>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -