📄 ad_delhw.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("admin_name")="" then
response.redirect "ad_login.asp"
end if
set rs=server.createobject("adodb.recordset")
%>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<link href=img/css.css rel=STYLESHEET type=text/css>
</head>
<%
if request("action")="del" then
sql="select * from hw where hw_id="&request("hw_id")
rs.open sql,conn,3,3
if rs.eof then
response.redirect "ad_delhw.asp"
else
rs.delete
rs.update
end if
rs.close
response.write "Deletion Complete!"
response.write "<br>"
response.write "<a href=ad_delhw.asp>Back</a>"
else
%>
<div align="center">
<center>
<table width="550" border="0" cellspacing="0" cellpadding="0" bgcolor="#DBC2B0" style="border-collapse: collapse" bordercolor="#111111" >
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" height="32" align="center">
<tr>
<td bgcolor="#DBC2B0" height="21" width="140">
<div align="center"><font color="#FFFFFF">Product Name</font></div>
</td>
<td bgcolor="#DBC2B0" height="21" width="94">
<div align="center"><font color="#FFFFFF">Isbn</font> </div>
</td>
<td bgcolor="#DBC2B0" height="21" width="51">
<div align="center"><font color="#FFFFFF">Member Price</font></div>
</td>
<td bgcolor="#DBC2B0" height="21" width="106">
<div align="center"><font color="#FFFFFF">Point</font></div>
</td>
<td bgcolor="#DBC2B0" height="21" width="76">
<div align="center"><font color="#FFFFFF">Date</font></div>
</td>
<td bgcolor="#DBC2B0" height="21" colspan="2">
<div align="center"><font color="#FFFFFF">Change/Del</font></div>
</td>
</tr>
<%
page=request.querystring("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
sql="select * from hw order by hw_id DESC"
rs.open sql,conn,3,3
if rs.eof then
response.write "No product!"
response.end
else
rs.pagesize=100
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
'rs.absolutepage=page
i=0
dim hw_id(),hw_name(),hw_cash(),hw_pic(),hw_date(),sort_id(),isbn(),hw_sn(),Nsort_ind()
do while not rs.eof and (i<rs.pagesize)
i=i+1
redim preserve hw_id(i),hw_name(i),hw_cash(i),hw_pic(i),hw_date(i),sort_id(i),isbn(i),hw_sn(i),Nsort_id(i)
hw_id(i)=rs("hw_id")
hw_name(i)=rs("hw_name")
hw_cash(i)=rs("hw_cash")
hw_pic(i)=rs("hw_pic")
hw_date(i)=rs("hw_date")
sort_id(i)=rs("sort_id")
isbn(i)=rs("isbn")
hw_sn(i)=rs("hw_sn")
Nsort_id(i)=rs("Nsort_id")
rs.movenext
loop
end if
rs.close
%>
<%for i = 1 to ubound(hw_id)%>
<tr bgcolor="#FFFFFF">
<td height="22" width="140"><%=hw_name(i)%> </td>
<td height="22" width="94">
<div align="center"><%=hw_sn(i)%></div>
</td>
<td height="22" width="51">
<div align="center"><%=hw_cash(i)%></div>
</td>
<td height="22" width="106">
<div align="center"><%=isbn(i)%></div>
</td>
<td height="22" width="76">
<div align="center"><%=hw_date(i)%></div>
</td>
<td height="22" width="30">
<div align="center"> <a href="ad_delhw.asp?hw_id=<%=hw_id(i)%>&action=del">Delete</a></div>
</td>
<td height="22" width="45">
<div align="center"><a href="ad_changehw.asp?hw_id=<%=hw_id(i)%>&sort_id=<%=sort_id(i)%>&Nsort_id=<%=Nsort_id(i)%>">Change</a>
</div>
</td>
</tr>
<%next%>
</table>
</td>
</tr>
</table>
</center>
</div>
<table border="0" width="500" cellspacing="0" height="10" align="center">
<tr>
<td>
<p align="left">Total Page:<font color=red><%=totalpage%></font> Page:<%=page%> <font color=666666>
<%if page-1>0 then%>
<a href="ad_delhw.asp?page=<%=page-1%>">Last</a>
<%else%>
<font color=666666>Last</font>
<%end if%>
<%if page+1<=totalpage then%>
<a href="ad_delhw.asp?page=<%=page+1%>">Next</a>
<%else%>
<font color=666666>Next</font>
<%end if%>
</font></p>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
<%end if
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -