📄 productlist.asp
字号:
<% response.buffer=true %>
<!--#include file="conn.asp"-->
<!-- #include file="adovbs.inc" -->
<!--#include file="error.asp"-->
<%
'johnson code
user=session("user")
pwd=session("pwd")
chkuser user,pwd
%>
<%
on error resume next
dim currentPage,rowCount,i,idd
idd=request("idd") '产品小类型号
hot=request("hot")
state=request("state")
pid=request("pid") '产品大类型号
if state="" then
if hot="" then
' sql="select product.id,product.title,product.state,product.picname,kind.title as classname from product,kind where product.class="&idd&" and kind.class="&pid&" and product.class=kind.rdclass order by product.addtime desc"
sql="select product.id,product.title,product.state,product.picname,kind.title as classname from product,kind where kind.id="&pid&" and product.class=kind.id order by product.addtime desc"
else
sql="select product.id,product.title,product.state,product.picname,kind.title as classname from product,kind where kind.id="&pid&" and product.state ="&hot&" and product.class=kind.id order by product.addtime desc"
'sql="select product.id,product.title,product.state,product.picname,kind.title as classname from product,kind where product.class="&idd&" and kind.class="&pid&" and state ="&hot&" and product.class=kind.rdclass order by product.addtime desc"
end if
else
sql="select product.id,product.title,product.state,product.picname,kind.title as classname from product,kind where kind.id="&pid&" and product.state ="&state&" and product.class=kind.id order by product.addtime desc"
'sql="select product.id,product.title,product.state,product.picname,kind.title as classname from product,kind where product.class="&idd&" and kind.class="&pid&" and state ="&state&" and product.class=kind.rdclass order by product.addtime desc"
end if
'response.Write sql
'response.End() '& request("currentPage")
'---------------------------------------------------------connect_recordset---begin--
currentPage=trim(request("currentPage"))
if currentPage="" then
currentPage=1
end if
currentPage=cINT(currentPage)
set rs=Server.CreateObject("ADODB.Recordset")
rs.PageSize=15 '-----每页15条记录---
rs.CursorType = adOpenStatic '---*-
rs.CursorLocation = adUseServer '--*--
rs.open Sql,Conn,adOpenStatic
'---------------------------------------------------------connect_recordset---end--
%>
<html>
<head>
<title>- 信息浏览 - </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css">
<!-- #include file="select.js" -->
</head>
<body bgcolor="#FEFBF1" background="images/sky2.gif" leftmargin=5 topmargin=0>
<p align="center"></p>
<p align="center"></p>
<div align="center"><br>
<%
dim a,b
a=1
b=2
if a=b then 'not if null
showerr "没有信息,请点返回增加!","product.asp?idd="&idd&"&pid="&pid
response.End()
else
if currentPage>rs.PageCount then
currentPage=rs.PageCount
end if
rs.AbsolutePage=cINT(currentPage)
%>
<font color="0099FF"> 公司产品管理---[<%=trim(rs("classname"))%>] </font></div>
<div align=center>
<table width=742 background="images/sky2.gif"><tr>
<td bgcolor=#FEFBF1>
<form name="f_member" action="productlist.asp?idd=<%=idd%>&pid=<%=pid%>" method="post">
<% ShowPage %>
<% ShowTitle %>
<%
rowCount=0
k=0
while not rs.eof and rowCount<rs.PageSize
k=k+1
T_Id=rs("Id")
title=trim(rs("title"))
pic=trim(rs("picname"))
content=trim(rs("content"))
type_id=rs("class")
DisplayData
rowCount=rowCount+1
rs.MoveNext
wend
%>
<% ShowFunction %>
</form>
<% ShowSubmitForm %>
<%
end if
%>
<table cellspacing=0 cellpadding=0 border=0><tr><td height=1 bgcolor=black></td></tr></table>
</td>
</tr></table>
<table width="56%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="10"> <div align="center"></div></td>
</tr>
<tr>
<td height="10"> <div align="center"><font size="2" face="宋体" color="#CCCCCC"><font color="#999999">CBUBS科技有限公司提供技术支持</font></font></div></td>
</tr>
<tr>
<td height="20"><div align="center"></div></td>
</tr>
</table>
</div>
<% Sub ShowPage()%>
<table width="742" cellpadding="0" cellspacing="1" bordercolor="#000000" border="0" >
<tr bgcolor="#FFFFFF">
<td height=25 colspan=8 align="right" valign="top" bgcolor="#B5E6FD" class="bfont">
<font color='#000000'>
<%
if currentPage<>1 then
response.write("<a href=newlist.asp?currentPage=1&idd="&idd&"&pid="&pid&">首页</a> ")
response.write("<a href=newlist.asp?currentPage="& (currentPage-1) &"&idd="&idd&"&pid="&pid&">上一页</a> ")
else
response.write("首页 上一页 ")
end if
if currentPage<>rs.PageCount then
response.write("<a href=newlist.asp?currentPage="& (currentPage+1) &"&idd="&idd&"&pid="&pid&">下一页</a> ")
response.write("<a href=newlist.asp?currentPage="& rs.PageCount &"&idd="&idd&"&pid="&pid&">末页</a> ")
else
response.write("下一页 末页 ")
end if
%>
</font> 页次:<strong><font color='red'><%=currentPage%></font></strong>/<%=rs.pagecount%>页
共:<font color='red'><b><%=rs.RecordCount%></b></font>个产品 输入页次:
<input type="text" name="currentPage" size="3" value=<%=currentPage%>>
<input type="submit" name="Submit" value="跳转">
</td>
</tr></table>
<% end sub %>
<% Sub ShowTitle() %>
<table width="742" height="11%" cellpadding="1" cellspacing="1">
<tr bgcolor="#f2f2f2">
<td height=16 nowrap class="bfont" width="20"> </td>
<td height=16 nowrap class="bfont" width="51"> <div align=center>序号</div></td>
<td width="374" height=16 class="bfont"> <div align="center">产品名</div></td>
<td width="62" class="bfont">物价产品</td>
<td height=16 nowrap class="bfont" width="91"> <div align="center"> 图片</div></td>
<td height=16 nowrap class="bfont" width="60"> <div align="center">操作</div></td>
<td height=16 nowrap class="bfont" width="60"> <div align="center">操作</div></td>
</tr>
</table>
<% end sub %>
<% Sub DisplayData() %>
<table width="742" cellpadding="2" cellspacing="1" bgcolor=#E9EEF3>
<%
if(k mod 2)<>0 then
response.write"<tr bgcolor='#FFFFFF'>"
else
response.write"<tr bgcolor='#eeeeee'>"
end if
%>
<td width="20" nowrap class="bfont"> <input type="checkbox" name="SelectMemberId<%=rowCount%>" value="<%=T_Id%>">
</td>
<td nowrap class="bfont" width="45"> <div align="center"><%=k%></div></td>
<td width="373" nowrap class="bfont" > <div align=left><a href=javascript:OMDL("<%=T_Id%>")>
</a><div align="center"><a href=productedit.asp?idd=<%=idd%>&idno=<%=T_Id%>&pid=<%=pid%>><%=title%></a></div></div>
</td>
<td nowrap class="bfont" width="60"> <div align="center">
<%
if rs("state")=1 then
response.Write("<font color=#00CC00>是</font>")
else
response.Write("否")
end if
%></div></td>
<td class="bfont" nowrap width="91"> <div align="center">
<%
response.write "<a target=_blank href=photo/"& pic &">"&pic&"</a>"
%>
</div></td>
<td class="bfont" nowrap width="56"> <div align="center"><a href="productedit.asp?idd=<%=idd%>&idno=<%=T_Id%>&pid=<%=pid%>">[编辑]</a></div></td>
<td class="bfont" nowrap width="59"> <div align="center"><a href="javascript:OMDD('<%=T_Id%>')">[删除]</a></div></td>
</tr>
</table>
<% end sub %>
<%Sub ShowFunction() %>
<table width="742" height="1%" cellpadding="0" cellspacing="0">
<tr bgcolor="#DAFDFE">
<td height=11 colspan=8 align="right" valign="top" bgcolor="#B5E6FD" class="bfont">
<div align="right">〖
<input type="checkbox" name="allbox" onClick="CA()">
<font size="2" class="bfont">全部选中 </font> 〗 〖<a href='javascript:MDD()'><font size="2" class="bfont">删除选中的产品</font></a>〗
<% if hot="" then%>
〖<a href='productlist.asp?hot=1&idd=<%=idd%>&pid=<%=pid%>'><font size="2" class="bfont">管理特价产品</font></a>〗
<% else %>
〖<a href='javascript:MDD()'><font size="2" class="bfont">取消热点产品</font></a>〗
〖<a href='productlist.asp?idd=<%=idd%>&pid=<%=pid%>'><font size="2" class="bfont">管理所有产品</font></a>〗
<% end if%>
〖 <a href="product.asp?idd=<%=idd%>&pid=<%=pid%>"><font size="2" class="bfont">增加产品</font></a>
〗 </div></td>
</tr></table>
<% end sub %>
<%Sub ShowSubmitForm() %>
<form name="showMemberdetail" action="productlist.asp?pclass=<%=idd%>&pid=<%=pid%>" method="POST">
<input type="hidden" name="MemberIdUni">
</form>
<%if hot="" then%>
<form name="deleteMemberdetail" action="productdele.asp?pclass=<%=idd%>&pid=<%=pid%>" method="POST">
<%else%>
<form name="deleteMemberdetail" action="productdele.asp?hot=1&pclass=<%=idd%>&pid=<%=pid%>" method="POST">
<%end if%>
<input type="hidden" name="MemberIdUni">
</form>
<form name="editMemberdetail" action="productedit.asp?idd=<%=idd%>&pid=<%=pid%>" method="POST">
<input type="hidden" name="MemberIdUni">
</form>
<%end sub%>
<%
set rs=nothing
conn.close
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -