📄 productsseek.asp
字号:
<!--#include file="check_login.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="text.css" rel="stylesheet" type="text/css">
<%
set rs = server.createobject("adodb.recordset")
rs.source = "select * from DeepTree where parentid=0 order by id desc "
rs.open rs.source,conn,1,1
if trim(request.QueryString("pp"))="OKK" then
start_date=CDate(trim(request.QueryString("start_date")))
end_date=CDate(trim(request.QueryString("end_date")))
namework=trim(request.QueryString("namework"))
else
start_date=CDate(trim(request.Form("start_date")))
end_date=CDate(trim(request.Form("end_date")))
namework=trim(request.Form("namework"))
end if
if start_date>end_date then response.write"<script language=javascript> alert('开始时间不能大于结束时间!');history.back(-1);</script>"
if namework="" then
productsSQL="select id,LName,LSort,LSortname,LPH,LPrice,LPutout,LManufacturer,LSellManufacturer from Products where LAddtime>=#"&start_date&"# and LAddtime<=#"&end_date&"# order by LAddtime desc"
else
productsSQL="select id,LName,LSort,LSortname,LPH,LPrice,LPutout,LManufacturer,LSellManufacturer from Products where LName like '%"&namework&"%' and LAddtime>=#"&start_date&"# and LAddtime<=#"&end_date&"# order by LAddtime desc"
end if
'response.Write productsSQL
'response.End()
dim i,intPage,page,pre,last,filepath
set rsp = server.createobject("adodb.recordset")
rsp.PageSize = 12 '这里设定每页显示的记录数
rsp.CursorLocation = 3
rsp.Open productsSQL,conn,0,2,1 '这里执行你查询SQL并获得结果记录集
pre = true
last = true
page = trim(Request.QueryString("page"))
if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page)>=rsp.PageCount then
intpage = rsp.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not rsp.eof then
rsp.AbsolutePage = intpage
end if
%>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" <%=kkk%>>
<!--#include file="top/Ltop02.asp"-->
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" style='BORDER-BOTTOM:#666666 1px solid; BORDER-LEFT:#CECFCE 1px solid; BORDER-RIGHT:#CECFCE 1px solid; BORDER-TOP: #666666 0px solid;'>
<tr>
<td valign="top">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td height="26" bgcolor="#F2F2F2"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<form name="form1" method="post" action="ProductsSeek.asp">
<td>产品检索:从
<script language=javascript>
var myDate=new dateSelector();
myDate.year--;
myDate.inputName='start_date'; //注意这里设置输入框的name,同一页中日期输入框,不能出现重复的name。
myDate.display();
</script>
到
<script language=javascript>
myDate.year++;
myDate.inputName='end_date'; //注意这里设置输入框的name,同一页中的日期输入框,不能出现重复的name。
myDate.display();
</script>名称:
<input name="namework" type="text" id="namework" value="<%=namework%>" size="10">
<input type="submit" name="Submit" value="检索" class="btnadd_1">
</td>
</form>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" >
<tr>
<td width="62%" bgcolor="#CCCCCC" style='BORDER-BOTTOM:#666666 1px solid '><strong> 栏目列表:</strong><a href="ProductsAll.asp">首页</a><a href="ProductsAll.asp"></a> -> 产品查询 -> 关键字:<font color="#FF0000"><%=namework%></font></td>
<td width="38%" align="center" bgcolor="#CCCCCC" style='BORDER-BOTTOM:#666666 1px solid '> 操 作</td>
</tr>
<%
if not rs.EOF then
while not rs.eof
%>
<tr bgcolor="#F2F2F2" >
<td bgcolor="#F2F2F2" style='BORDER-BOTTOM:#CCCCCC 1px solid;'> ┣ <a href="ProductsAll2.asp?Lcalss=<%=rs("id")%>&CLassname=<%=rs("content")%>"><%=rs("content")%></a> [ID号:<%=rs("id")%>]</td>
<td style='BORDER-BOTTOM:#CCCCCC 1px solid;'> <%response.write "<a href='javascript:ConfirmDelA(" & rs("id") & ")'>"%>删除</a>
| <a href="ClassModify2.asp?operation=ModifyClassA&AClassA=<%=rs("id")%>">修改</a> | <a href="ProductsAdd2.asp?ModifyID=<%=rs("id")%>">添加产品</a> | <a href="ProductsAll2.asp?Lcalss=<%=rs("id")%>&CLassname=<%=rs("content")%>">产品列表/下级类别产品添加</A></td>
</tr>
<%
rs.movenext
wend
else
response.Write"<tr bgcolor='#e4f1d8' height='40'>"
response.Write"<td colspan='2'align='center' bgcolor='#F1FAF1' style='BORDER-BOTTOM:#CCCCCC 1px solid;'><font color=red>未设产品类别</font></td>"
response.Write"</tr>"
End if
rs.close
set rs=nothing
%>
</table>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td bgcolor="#CECFCE" style='BORDER-BOTTOM:#666666 1px solid '><strong> 产品列表:</strong><a href="ProductsAll.asp">首页</a> ("<font color="#0000FF"><B>√</B></font>"表示该产品已发布;"<font color="#0000FF"><B>×</B></font>"表示该产品已有数据未发布)</td>
</tr>
<tr>
<td bgcolor="#F1F1F1"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<form action="Products_Del.asp" method="post" name="form2" >
<input type="hidden" name="start_date">
<input type="hidden" name="end_date">
<input type="hidden" name="namework">
<tr bgcolor="#DEDBDE">
<td width="3%"> </td>
<td width="15%"> 产品编号</td>
<td width="33%" bgcolor="#DEDBDE"> 产品名称</td>
<td width="12%"> 产品价格</td>
<td width="19%"> 生产商</td>
<td height="26" colspan="2"> 操作 <input onclick="CheckAll(this.form)" name="All" type="button" value="全选" style=" FONT: 12px;HEIGHT: 18px;WIDTH: 30px;"> <input onclick="CheckOthers(this.form)" name="Others" type="button" value="反选" style=" FONT: 12px;HEIGHT: 18px;WIDTH: 30px;"></td>
</tr>
<%
if rsp.BOF then
response.write "<tr><td colspan='7' width='100%' height='50'' align='center'>无相关内容!</td>"
end if
for i=1 to rsp.PageSize
if rsp.EOF or rsp.BOF then exit for
dim Lpt,Lstr
Lpt=rsp("LPutout")
if Lpt=true then
Lstr="<font color='#0000FF'><b>√</b></font>"
else
Lstr="<font color='#0000FF'><b>×</b></font>"
end if
%>
<tr bgcolor="#F2F2F2" onMouseOver = "this.style.backgroundColor = '#EEEEEE'" onMouseOut = "this.style.backgroundColor = ''" style="CURSOR:hand">
<td> <%=Lstr%></td>
<td> <%=rsp("LPH")%></td>
<td> <%=rsp("LName")%></td>
<td> <%=rsp("LPrice")%></td>
<td> <%=rsp("LManufacturer")%></td>
<td width="8%"> <a href="ProductsUpdate.asp?idd=<%=rsp("id")%>&ModifyID=<%=rsp("LSort")%>">修改</a></td>
<td width="10%">
<input name="selectid" type="checkbox" id="selectid" value="<%=rsp("id")%>"></td>
</tr>
<%
rsp.movenext
next
%>
<tr bgcolor="#F2F2F2" onMouseOver = "this.style.backgroundColor = '#EEEEEE'" onMouseOut = "this.style.backgroundColor = ''" style="CURSOR:hand">
<td height="26" colspan="5"> </td>
<td height="26" colspan="2" align="center"><input name="Submit" type="button" id="Submit" value="删除所选" onclick="javascript:return ConfirmDelProductsSeek();"></td>
</tr>
</form>
</table>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" borderColorLight=#808080 borderColorDark=#ffffff bgcolor="#DEDBDE">
<tr>
<%if rsp.pagecount>0 then%>
<td width="13%" height="23" align="left">当前页<%=intpage%>/<%=rsp.PageCount%> </td>
<%else%>
<td width="15%" height="23" align="left">当前页0/0</td>
<%end if%>
<td width="26%" align="left">|共有<%=rsp.recordcount%>条记录,每页12条记录</td>
<td width="46%" align="right"> <a href="ProductsSeek.asp?page=1&start_date=<%=start_date%>&end_date=<%=end_date%>&namework=<%=namework%>&pp=OKK">首页</a>|
<%if pre then%>
<a href="ProductsSeek.asp?page=<%=intpage -1%>&start_date=<%=start_date%>&end_date=<%=end_date%>&namework=<%=namework%>&pp=OKK">上页</a>|
<%end if%>
<%if last then%>
<a href="ProductsSeek.asp?page=<%=intpage +1%>&start_date=<%=start_date%>&end_date=<%=end_date%>&namework=<%=namework%>&pp=OKK">下页</a>|
<%end if%>
<a href="ProductsSeek.asp?page=<%=rsp.PageCount%>&start_date=<%=start_date%>&end_date=<%=end_date%>&namework=<%=namework%>&pp=OKK">尾页</a>|转到第
<select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to rsp.PageCount
if i = intpage then%>
<option value="ProductsSeek.asp?page=<%=i%>&start_date=<%=start_date%>&end_date=<%=end_date%>&namework=<%=namework%>&pp=OKK" selected><%=i%></option>
<%else%>
<option value="ProductsSeek.asp?page=<%=i%>&start_date=<%=start_date%>&end_date=<%=end_date%>&namework=<%=namework%>&pp=OKK"><%=i%></option>
<%
end if
next
%>
</select>页</font>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -