[求助]50元现金求帮助 帮忙给后台文章加入 点选删除 和全部删除功能 并写一个产品前台列表 具体联系QQ531338054 支付宝交易
这个是后台产品列表页 和 前台的产品搜索结果列表页
后台产品列表页
<!--
-->
<!--#include file="wbk_conn.asp"-->
<!--#include file="wbk_function.asp"-->
<%
call admin()
page=Request.QueryString("page")
if page="" or page<0 then page=1
key=request.QueryString("key")
if key<>"" then
sql="select * from chanpin where xinghao like '"&key&"%'"
else
sql="select * from chanpin"
end if
set rscp=server.createobject("ADOdb.recordset")
rscp.open sql,myconn,1,1
rsrow=20
rscp.pagesize = rsrow
if not rscp.eof then rscp.absolutepage=page
%>
<HTML>
<link href="image/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #000000}
-->
</style>
<link href="images/css.css" rel="stylesheet" type="text/css">
<HEAD><TITLE>后台管理-添加二级分类</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content=index,follow name=Robots>
<META content=电子 name=keywords>
<META content=电子,旺兴 name=Description>
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
</HEAD>
<BODY>
<table width="766" border="0" align="center" cellpadding="0" cellspacing="0" class="table_box">
<tr>
<td>
<TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD width="100%" bgColor=#000000 height=1></TD>
</TR>
<TR>
<TD width="100%" background=images/2dot.gif
height=4><img src="images/title1.jpg" width="850" height="170"></TD>
</TR>
</TBODY>
</TABLE>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="177" height="21"> </td>
<td width="623" valign="top"><div align="right"><a href="data.asp">添加数据</a> |<a href="wbk_action.asp?action=loginout"></a> <a href="wbk_addfenlei.asp">修改数据</a> | <a href="wbk_pass.asp">修改密码</a> |<a href="wbk_piliang.asp"> 数据上传</a> | <a href="wbk_dingdan.asp">查阅订单</a> |<a href="wbk_action.asp?action=loginout"> 安全退出 </a> </div></td>
</tr>
</table>
<table width="100%" height="187" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" height="168" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="1" cellspacing="1" class="table02">
<form action="wbk_addfenlei.asp" method="get">
<tr class="tr3">
<td colspan="2" align="center"> 查询数据
<input type="text" name="key" size="30"></td>
<td><input type="submit" value="查询"></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr></form>
<tr class="tr3">
<td><div align="center">型号 </div></td>
<td><div align="center">厂家</div></td>
<td><div align="center">批号</div></td>
<td><div align="center">封装 </div></td>
<td><div align="center">参考价</div></td>
<td width="13%"><div align="center">数量 </div></td>
<td width="10%"><div align="center">修改</div></td>
<td width="7%"><div align="center">删除</div></td>
<%
i=1
do while not rscp.eof and rsrow>0
rsrow=rsrow-1
i=-i
if i>0 then
myclass="#ffffff"
else
myclass="#F2F2F2"
end if%>
<form action="wbk_action.asp?action=editcp&id=<%=rscp("id")%>" method="post">
<tr bgcolor=<%=myclass%> onmouseover="mOvr(this,'#F0F9FF');"
onmouseout="mOut(this,'<%=myclass%>');">
<td width="15%"> <input name="xinghao<%=rscp("id")%>" type="text" id="xinghao<%=rscp("id")%>" value="<%=rscp("xinghao")%>" size="15"></td>
<td width="16%"> <input name="changjia<%=rscp("id")%>" type="text" id="pinpai<%=rscp("id")%>" value="<%=rscp("changjia")%>" size="15"></td>
<td width="8%"> <input name="pihao<%=rscp("id")%>" type="text" id="nianfen<%=rscp("id")%>" value="<%=rscp("pihao")%>" size="5"></td>
<td width="10%"> <input name="fengzhuang<%=rscp("id")%>" type="text" id="fengzhuang<%=rscp("id")%>" value="<%=rscp("fengzhuang")%>" size="10"></td>
<td width="9%"> <input name="cankaojia<%=rscp("id")%>" type="text" id="danwei<%=rscp("id")%>" value="<%=rscp("cankaojia")%>" size="10"></td>
<td> <input name="shuliang<%=rscp("id")%>" type="text" id="shuliang<%=rscp("id")%>" value="<%=rscp("shuliang")%>" size="10"> </td>
<td><div align="center"><span class="style1">
<input type="submit" name="Submit" value="修改">
</span></div></td>
<td><div align="center"><span class="style1"><a href="wbk_action.asp?action=delchanpin&id=<%=rscp("id")%>" onClick="{if(confirm('确定删除吗?')){return true;}return false;}">删除</a></span></div></td>
</tr>
</form>
<% rscp.movenext
loop %>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tr01"><%
url="wbk_addfenlei.asp?bid="&bid&"&"
response.Write(ExportPageInfo(rscp,page,url))%><form action="wbk_action.asp?action=page&bid=<%=bid%>" method="post">跳转到:
<input name="page" type="text" id="page" value="<%=request.QueryString("page")%>" size="5">
页
<input type="submit" name="Submit2" value="跳转">
</form>
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
</table>
<%rscp.close
set rscp=nothing
%>
</BODY></HTML>
<SCRIPT language=JavaScript1.2>
function checkForm()
{
bid=form2.bid.value
location.href="wbk_addfenlei.asp?bid="+bid
//form2.submit();
}
</script>
<% Function ExportPageInfo(ByRef rs,curpage,LinkFile)
Dim retval, j, pageNumber, BasePage
retval = "<strong>" & curpage & "/" & rs.pagecount & "</strong> "
retval = retval & "共" & rs.recordcount & "条/" & rs.pagecount &"页"
If curpage = 1 Then
retval = retval & " <-第一页 <<上一页 "
Else
retval = retval & "<a href=" & LinkFile & "page=1><-第一页</a> <a href=" & LinkFile & "page=" & (int(curpage) - 1) & "><<上一页</a> "
End If
If int(curpage) = rs.pagecount Then
retval = retval & "下一页>> 最后一页-> "
Else
retval = retval & "<a href=" & LinkFile & "page=" & cstr(curpage + 1) & ">下一页>></a> <a href=" & LinkFile & "page=" & cstr(rs.pagecount) & ">最后一页-></a>"
End if
ExportPageInfo = retval
End Function %>
[此贴子已经被作者于2007-10-22 12:09:36编辑过]