<% if trim(request("action"))="save" then pic=CheckStr(request("pic")) weburl=CheckStr(request("weburl")) classid=CheckStr(request("classid")) types=CheckStr(request("types")) if trim(request("id"))<>"" then set rs=Server.CreateObject("Adodb.Recordset") sql="select * from bad where id="&clng(request("id"))&"" rs.open sql,conn,1,3 rs("classid")=classid rs("types")=types rs("pic")=pic rs("weburl")=weburl rs.update rs.close set rs=nothing else set rs=Server.CreateObject("Adodb.Recordset") sql="select * from bad" rs.open sql,conn,1,3 rs.addnew rs("classid")=classid rs("types")=types rs("pic")=pic rs("weburl")=weburl rs("begindate")=now() rs.update rs.close set rs=nothing end if response.write("") end if if trim(request("action"))="del" then set rs=Server.CreateObject("Adodb.Recordset") sql="select pic from bad where id="&clng(request("id"))&"" rs.open sql,conn,1,1 pic=rs("pic") rs.close set rs=nothing sql="delete from bad where id="&clng(request("id"))&"" conn.execute(sql) if pic<>"" then set fo=Server.CreateObject("Scripting.FileSystemObject") if fo.fileexists(Server.mappath("../indexdata/pic/"&pic)) then fo.DeleteFile Server.mappath("../indexdata/pic/"&pic) end if response.write("") response.end end if function CheckStr(str) dim tstr,l,i,ch l=len(str) for i=1 to l ch=mid(str,i,1) if ch="'" then tstr=tstr+"'" end if tstr=tstr+ch next CheckStr=tstr end function %>
当前位置:管理首页 > 行业广告设置
筛选数据:
<% set rs = Server.CreateObject("ADODB.Recordset") sql ="select * from bad where 1=1" if request("classid")<>0 then sql=sql&" and classid="&clng(request("classid")) if request("types")<>0 then sql=sql&" and types="&clng(request("types")) sql=sql&" order by begindate desc" rs.Open sql, conn,1,1 if rs.bof and rs.eof then %> <% else total=rs.recordcount page=request.QueryString("page") if IsNumeric(page) then page=cint(page) if page<1 then page=1 else page=1 end if everypage=10 rs.pagesize=everypage page_count=rs.pagecount rs.AbsolutePage=page a=0 do while not rs.eof and a <% rs.movenext loop rs.close set rs=nothing %> <% webpage="bad.asp?1=1" %> <%end if%>
序号

行业

位置

图片

编辑
暂无图片
<%=everypage*(page-1)+a%> <%if rs("classid")=1 then%>机械<%elseif rs("classid")=2 then%>能源<%elseif rs("classid")=3 then%>服装<%elseif rs("classid")=4 then%>家居<%elseif rs("classid")=5 then%>家具<%elseif rs("classid")=6 then%>包装<%elseif rs("classid")=7 then%>电器<%elseif rs("classid")=8 then%>玩具<%elseif rs("classid")=9 then%>礼品<%elseif rs("classid")=10 then%>珠宝<%elseif rs("classid")=11 then%>建材<%elseif rs("classid")=12 then%>化工<%elseif rs("classid")=13 then%>纺织<%elseif rs("classid")=14 then%>箱包<%elseif rs("classid")=15 then%>运动<%elseif rs("classid")=16 then%>食品<%elseif rs("classid")=17 then%>汽配<%elseif rs("classid")=18 then%>安防<%elseif rs("classid")=19 then%>仪器<%elseif rs("classid")=20 then%>环保<%elseif rs("classid")=21 then%>纸制品<%elseif rs("classid")=22 then%>电子<%elseif rs("classid")=23 then%>服务<%elseif rs("classid")=24 then%>工程<%else%>未选<%end if%> <%if rs("types")=1 then response.write "通栏1(960*80)" end if%> <%if rs("types")=2 then response.write "通栏2(702*78)" end if%> <%if rs("types")=3 then response.write "通栏3(960*80)" end if%> <%if rs("types")=4 then response.write "通栏4(960*80)" end if%> <%if rs("types")=5 then response.write "通栏5(960*80)" end if%> <%if rs("types")=6 then response.write "通栏6(960*80)" end if%> <%if rs("types")=7 then response.write "小广告1(235*60)" end if%> <%if rs("types")=8 then response.write "小广告2(235*60)" end if%> <%if rs("types")=9 then response.write "小广告3(235*60)" end if%> <%if rs("types")=10 then response.write "小广告4(235*60)" end if%> <%if rs("types")=11 then response.write "小广告5(235*60)" end if%> <%if rs("types")=12 then response.write "小广告6(235*60)" end if%> <%if rs("types")=13 then response.write "小广告7(235*60)" end if%> <%if rs("types")=14 then response.write "小广告8(235*60)" end if%> <%if rs("types")=15 then response.write "小广告9(235*60)" end if%> <%if rs("types")=16 then response.write "小广告10(235*60)" end if%> <%if rs("types")=17 then response.write "小广告11(235*60)" end if%> <%if rs("types")=18 then response.write "小广告12(235*60)" end if%> <%if rs("types")=19 then response.write "小广告13(235*60)" end if%> <%if rs("types")=20 then response.write "小广告14(235*60)" end if%> <%if rs("types")=21 then response.write "小广告15(235*60)" end if%> <%if rs("types")=22 then response.write "小广告16(235*60)" end if%> <%if rs("types")=23 then response.write "内容页右侧小广告1(300*60)" end if%> <%if rs("types")=24 then response.write "内容页右侧小广告2(300*60)" end if%> <%if rs("types")=25 then response.write "内容页通栏(960*80)" end if%> <%if rs("types")=26 then response.write "内容页小广告1(235*60)" end if%> <%if rs("types")=27 then response.write "内容页小广告2(235*60)" end if%> <%if rs("types")=28 then response.write "内容页小广告3(235*60)" end if%> <%if rs("types")=29 then response.write "内容页小广告4(235*60)" end if%> <%if rs("types")=30 then response.write "小广告17(235*60)" end if%> <%if rs("types")=31 then response.write "小广告18(235*60)" end if%> <%if rs("types")=51 then response.write "底部小广告1(235*60)" end if%> <%if rs("types")=52 then response.write "底部小广告2(235*60)" end if%> <%if rs("types")=53 then response.write "底部小广告3(235*60)" end if%> <%if rs("types")=54 then response.write "底部小广告4(235*60)" end if%> " target="_blank"> " width="120" border="0" alt="点击放大">  &action=edit" class="black">修改 &action=del" class="black">刪除
<%if page=1 then%> [首页] [前一页] <%else%> [首页] [前一页] <%end if%> <%for j=page-2 to page-1%> <%if j>0 then%> <%=j%> <%end if%> <%next%> <%for j=page to page+4%> <% if j<=page_count then%> <%if j=page then%> <%=j%> <%else%> <%=j%> <%end if%> <%end if%> <%next%> <%if page [下一页] [尾页] <%else%> [下一页] [尾页] <%end if%> [<%=total%>]条记录 共[<%=page_count%>]页
<% if trim(request("action"))="edit" then set rs = Server.CreateObject("ADODB.Recordset") sql ="select * from bad where id="&clng(request("id"))&"" rs.Open sql, conn,1,1 id=rs("id") classid=rs("classid") types=rs("types") pic=rs("pic") weburl=rs("weburl") rs.close set rs=nothing end if %>
行业分类:  
位置:  
图片:  
链接地址:  (必须以 http://开头)