📄 product_check.asp
字号:
<%
if request.cookies("sp_name")="" then
response.redirect "login.asp"
end if
%>
<!--#include file="conn.asp"-->
<html>
<head>
<title>商家管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE>
BODY {
FONT-SIZE: 10pt;
margin-top: 0px;
background-color: #FF6600;
margin-bottom: 0px;
}
TD {
FONT-SIZE: 10pt; LINE-HEIGHT: 150%
}
A {
TEXT-DECORATION: none
}
A:hover {
TEXT-DECORATION: underline
}
.blueone {
CURSOR: crosshair;
FILTER: glow(color=blue,strength=10);
WIDTH: auto;
FILTER: glow(color=blue,strength=10);
FONT-SIZE: 20pt;
color:#FFFFFF;
LINE-HEIGHT: 200%;
font-family: "长城新艺体";
font-weight: bolder;
text-decoration: blink;
}
</STYLE>
<script language="javascript">
function confirmdel(id,page){
if (confirm("真的要删除这种产品?"))
window.location.href="del_product.asp?id="+id+"&page="+page
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" height="80">
<tr>
<td background="pic/topnew.gif">
<table width="778" border="0" cellspacing="0" cellpadding="0" height="45">
<tr>
<td width="319"> </td>
<td width="431" height="35">
<div class="blueone" align="center"><%=request.cookies("sp_name")%></div></td>
<td width="28"> </td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" height="1" bgcolor="#CCCCCC">
<tr>
<td></td>
</tr>
</table>
<table width="778" height="1" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td></td>
</tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" height="455">
<tr>
<td width="158" bgcolor="#FF9900" height="395" valign="top">
<div align="center"><br><br>
<table width="145" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="355">
<table width="146" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="390"> <table width="120" border="1" align="center" cellpadding="1" cellspacing="5" bordercolorlight="#FFCC99" bordercolordark="#FFCC99">
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="default.asp"><font color="#FFFFFF">统计信息</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="shop.asp"><font color="#FFFFFF">基本资料</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="../shop/default.asp?shop_name=<%=request.cookies("sp_name")%>" target="_blank"><font color="#FFFFFF">网站预览</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="moban.asp"><font color="#FFFFFF">选择模板</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="Classification.asp"><font color="#FFFFFF">商品分类</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="myweb.asp"><font color="#FFFFFF">网站维护</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="xinxi.asp"><font color="#FFFFFF">综合资讯</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="product_check.asp"><font color="#FFFFFF">我的商品</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="pic.asp"><font color="#FFFFFF">商品添加</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="travelline_check.asp"><font color="#FFFFFF">我的线路</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="travelline.asp"><font color="#FFFFFF">添加线路</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="http://www.0701.com.cn/web.business/ads/ads.htm" target="_blank"><font color="#FFFFFF">相关服务</font></a></div></td>
</tr>
<tr>
<td bgcolor="#FF6600"> <div align="center"><font color="#FFFFFF">☆ </font><a href="end.asp"><font color="#FFFFFF">退出管理</font></a></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</div> </td>
<td width="1" bgcolor="#CCCCCC" height="366"></td>
<td width="604" height="366" valign="top" bgcolor="#FFCC00"><br>
<%
dim shop_name1
shop_name1=request.cookies("sp_name")
set rs=server.createobject("adodb.recordset")
sqltext="select * from Product where p_shop='" & shop_name1 & "'order by Product_NO desc"
rs.open sqltext,conn,1,1
dim MaxPerPage
MaxPerPage=14
'假如没有数据时
If rs.eof and rs.bof then
response.write "<p align='center'><font color='#ff0000'>你还没任何商品资料,请点击“商品添加”后按照提示添加新商品</font></p>"
End if
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
call list
If Rs.recordcount > MaxPerPage then
call showpages
end if
'显示帖子的子程序
Sub list()%>
<table width="590" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFF00">
<tr class=main1 bgcolor="#FF9900">
<td width="201" align="center"><font color="#FFFFFF">商 品 名 称</font></td>
<td width="100" align="center"><font color="#FFFFFF">类 别</font></td>
<td width="69" align="center"><font color="#FFFFFF">会员价</font></td>
<td width="73" align="center"><font color="#FFFFFF">市场价</font></td>
<td width="65" align="center"><font color="#FFFFFF">操 作</font></td>
<td width="61" align="center"><font color="#FFFFFF">操 作</font></td>
</tr>
<%
if not rs.eof then
i=0
do while not rs.eof
%>
<tr class=main1 bgcolor="#FFFFCC">
<td width="201" align="center"><a href="../ProductDetail.asp?Product_id=<%=rs("Product_id")%>" target="_blank"><%=rs("Product_Name")%></a></td>
<td width="100" align="center"><%=rs("Class_2")%></td>
<td width="69" align="center"><%=rs("P_newprice")%></td>
<td width="73" align="center"><%=rs("P_oldprice")%></td>
<td width="65" align="center">
<%response.write "<a href='product_modify.asp?ID="&rs("product_no")&"&page="&CurrentPage&"'><font color=#0000FF>编辑</font></a>"
%> </td>
<td width="61" align="center">
<%response.write "<a href='javascript:confirmdel(" & rs("Product_id") & ","& CurrentPage&")'><font color=#0000FF>删除</font></a>" %> </td>
</tr>
<%
i=i+1
if i >= MaxPerpage then exit do
rs.movenext
loop
end if
%>
</table>
<%
End sub
rs.close
conn.close
%> </td>
</tr>
</table>
<table width="778" height="1" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td></td>
</tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0" height="80" align="center">
<tr>
<td height="30" bgcolor="#FFCC00">
<div align="center"> 版权所有:鹰潭便民网 E-mail: style@0701.com.cn </div></td>
</tr>
</table>
<%
'显示翻页的子程序
sub showpages()%>
<table border="0" cellPadding="0" cellSpacing="0" width="590" align="center" >
<form method=Post action='product_check.asp'>
<tr>
<td>
<table border="0" cellPadding="0" cellSpacing="3" width="590" align="center">
<tr>
<td class=main1 bgcolor="#C1C1C1">
<p align="center">
<%
If currentpage > 1 Then
response.write "<a href='product_check.asp?&page="+cstr(1)+"'>首页</a><font color='#ffffff'><b>-</b></font>"
Response.write "<a href='product_check.asp?page="+Cstr(currentpage-1)+"'>前页</a><font color='#ffffff'><b>-</b></font>"
Else
Response.write "首页<font color='#ffffff'><b>-</b></font>"
Response.write "前页<font color='#ffffff'><b>-</b></font>"
End if
If currentpage < Rs.PageCount Then
Response.write "<a href='product_check.asp?page="+Cstr(currentPage+1)+"'>后页</a><font color='#ffffff'><b>-</b></font>"
Response.write "<a href='product_check.asp?page="+Cstr(Rs.PageCount)+"'>尾页</a> "
Else
Response.write "后页-"
Response.write "尾页 "
End if
Response.write "页次:" & "<font color=#FF0000>" & Cstr(CurrentPage) & "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font> "
Response.write "<font color=#ffffff>" & Cstr(MaxPerPage) & "</font>" & "种产品/页 " & "共" & "<font color=#ffffff>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>种产品</font> "
response.write "</td><td align='right' bgcolor='#C1C1C1'>"
response.write "<font class=main1>转到:<input type='text' name='page' size=4 maxlength=4 class=smallInput value="&Currentpage&"> "
response.write "<input class=buttonface type='submit' value='Go' name='cndok' style='background-color: #E6E4C4'></span> "
%>
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<%end sub%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -