搜索 | " size="40"> |  |  |

编号 | 报价单位 | 产品名称 | 公开 | 经销商 | 登记日期 |
<% page=request.querystring("page") key=request("skey") DIM totalPut DIM CurrentPage DIM TotalPages DIM i,j const MaxPerPage=10 if not isempty(request("selAnnounce")) then idlist=request("selAnnounce") if instr(idlist,",")>0 then dim idarr idArr=split(idlist) dim id for i = 0 to ubound(idarr) id=clng(idarr(i)) select case request.form("action") case "up_offer" call up_offer(id) case "del_offer" call del_offer(id) case "pas_offer" call pas_offer(id) case "vip_offer" call vip_offer(id) end select next else select case request.form("action") case "up_offer" call up_offer(clng(idlist)) case "del_offer" call del_offer(clng(idlist)) case "pas_offer" call pas_offer(clng(idlist)) case "vip_offer" call vip_offer(clng(idlist)) end select end if end if if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if dim rs dim sql pass=cstr(request.QueryString("pass")) if pass="2" or pass="False" then pass=False else pass=True end if vips=cstr(request.QueryString("vips")) if vips="2" or vips="True" then vips=True else vips=False end if set rs=server.createobject("adodb.recordset") if pass=False then sql = "select * from offer where pas=False and price like '%" & key & "%' order by idate desc" elseif vips=True then sql = "select * from offer where vip=True and price like '%" & key & "%' order by idate desc" else sql = "select * from offer where pas=True and vip=False and price like '%" & key & "%' order by idate desc" end if rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "

对不起，没有您要查询的信息

" 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 showContent totalput,MaxPerPage showpage totalput,MaxPerPage,"baojia.asp" else if (currentPage-1)*MaxPerPage
<%=rs("id")%> | <% set rs1=server.createobject("adodb.recordset") sql1 = "select com_id,company from com_user where com_id="&rs("com_id") rs1.open sql1,conn,1,1 if rs1.eof and rs1.bof then response.write "-" else Response.Write(""&rs1("company")&"") end if rs1.close set rs1=nothing %> | <% set rs2=server.createobject("adodb.recordset") sql2 = "select pro_name from products where pro_id="&rs("pro_id") rs2.open sql2,conn,1,1 if rs2.eof and rs2.bof then response.write "-" else Response.Write(rs2("pro_name")) end if rs2.close set rs2=nothing %> | <%=rs("price")%> | <%=rs("price_in")%> | <%=rs("idate")%> |
<% i=i+1 if i>=MaxPerPage then exit do rs.movenext loop %>
操作 | 更新 审核 特价 删除

<% 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 if CurrentPage<2 then response.write "

" response.write "
" response.write "

" response.write "共"&n&"页 第"&CurrentPage&"页 共检索到"&totalnumber&"条信息
" response.write "

" response.write "【最前页】【上一页】" else response.write "

" response.write "
" response.write "
" response.write "共"&n&"页 第"&CurrentPage&"页 共检索到"&totalnumber&"条信息 " response.write " | " response.write "【最前页】" response.write "【上一页】" end if if n-currentpage<1 then response.write "【下一页】【最后页】" else response.write "【" response.write "下一页】【最后页】" end if response.write " " response.write "
" response.write "

" end function %>

<% sub del_offer(id) dim rs,sql set rs=server.createobject("adodb.recordset") sql="delete from [offer] where id="&cstr(id) conn.execute sql if err.Number<>0 then err.clear response.write "删 除 失 败 !
" end if End sub sub pas_offer(id) dim rs,sql set rs=server.createobject("adodb.recordset") sql="update offer set pas=abs(abs(cint(pas))-1) where id="&cstr(id) conn.execute sql if err.Number<>0 then err.clear response.write "审 核 失 败 !
" end if End sub sub vip_offer(id) dim rs,sql set rs=server.createobject("adodb.recordset") sql="update offer set vip=abs(abs(cint(vip))-1) where id="&cstr(id) conn.execute sql if err.Number<>0 then err.clear response.write "设 置 特 价 失 败 !
" end if End sub sub up_offer(id) dim rs,sql set rs=server.createobject("adodb.recordset") sql="update offer set idate=now() where id="&cstr(id) conn.execute sql if err.Number<>0 then err.clear response.write "更 新 失 败 !
" end if End sub %>