📄 manage.asp
字号:
<!--#include file="../manage/check-0.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link href="../conn/css.css" rel="stylesheet" type="text/css">
</head>
<!--#include file="../conn/conn.asp"-->
<%
const MaxPerPage=10
dim totalPut
dim CurrentPage
dim TotalPages
dim title
title=request("title")
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim sql
dim rs
%>
<body>
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" valign="middle"> 点击相关产品察看及修改产品资料,删除产品请选中相关产品然后点击删除,如果该产品上传过图片删除产品的同时<br>
将自动删除该产品上传的图片<FONT color="#FF9933">
</FONT>
<table width="600" border="0" align="center" cellpadding="2" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<form method=Post action="manage-del.asp"><tr bgcolor="#CCCCCC">
<td height="20" colspan="4" align="center"> <%
if title<>"" then
sql="select * from sia_product where code like '%"&trim(title)&"%' or proname like '%"&trim(title)&"%' or info like '%"&trim(title)&"%' order by proid desc"
else
sql="select * from sia_product order by proid desc"
end if
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'> 还没有产品 </p>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxPerPage,"manage.asp"
showContent
showpage totalput,MaxPerPage,"manage.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"manage.asp"
showContent
showpage totalput,MaxPerPage,"manage.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"manage.asp"
showContent
showpage totalput,MaxPerPage,"manage.asp"
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
i=0
%> <input name="submit2" type='submit' class=textbox-1 value='删 除'>
</td>
</tr>
<%do while not rs.eof%>
<tr bgcolor="#f1f1f1">
<td width="80">
<p align="center"><%=rs("proid")%> </td>
<td width="120">
<p><a href="edit.asp?page=<%=CurrentPage%>&proid=<%=rs("proid")%>"><%=rs("code")%></a> </td>
<td width="350"><%=rs("proname")%><font color="#FF3333"><% If rs("hide")=true Then Response.Write("[隐藏]") end if%></font></td>
<td width="50">
<p align="center">
<input name='selAnnounce' type='checkbox' value='<%=cstr(rs("proid"))%>'>
</td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<tr bgcolor="#CCCCCC" align="center">
<td height="11" colspan="4"> <DIV align="center">
<CENTER>
</CENTER>
</DIV>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<p align='center'> "
if CurrentPage<2 then
response.write "首页 上一页 "
else
response.write "<a href="&filename&"?page=1&title="&title&">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&title="&title&">上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页 尾页"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&title="&title&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&title="&title&">尾页</a>"
end if
response.write " 页次:"&CurrentPage&"/"&n&"页 "
response.write " 共"&totalnumber&"个产品 "&maxperpage&"个产品/页"
end function
%> <input name="submit" type='submit' class=textbox-1 value='删 除'>
<input name="page" type="hidden" id="page" value=<%=CurrentPage%>> </td>
</tr></form>
</table>
<form name="searchsoft" method="POST" action="manage.asp">
<div align="center">查找产品:
<input class=textbox type="text" name="title" size="20">
<input class=textbox-1 type="submit" value="查 询" name="title">
</div>
</form></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -