<%@ LANGUAGE="VBSCRIPT" %> <% DbPath = SERVER.MapPath("../database/topboy-2002.mdb") Set conn = Server.CreateObject("ADODB.Connection") conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath %> <% result=Instr(1,request.ServerVariables("http_referer"),request.servervariables("http_host"),1) if result = 0 or result = null then response.redirect "manager-login.asp" end if if session("sid") <> "top" then response.redirect "manager-login.asp" end if %>
增加新的信息类别>>> 返回信息管理中心>>>
<% set rs=server.createobject("adodb.recordset") sql="select * from topboy_type order by id" B1=Request("B1") If request("imagedel.x") = "" Then rs.open sql,conn,adOpenkeyset,adlockoptimistic,adcmdtext set id=rs("id") set mtype=rs("mtype") If Not RS.Eof Then %>
<% Do While Not rs.EOF and s<20 s=s+1 %> <% rs.Movenext loop %>
查询结果:本次查询共查询到 <% =RS.recordcount %> 条记录。
删除
ID 编 号
信息类别
修改
<% if rs("id") <> 1 then %> <% else response.write " / " end if %>
<% =id %>
<% =mtype %>

<% if rs.recordcount > 1 then %> <% else %> 至少要有一种信息类别,删除操作不能进行! <% end if %>       

<% end if else %>
记录已经被删除。按此返回......
<% i=request("hidden") sql="delete FROM topboy_type WHERE ccur(id) ='"&request("idname")&"'" conn.Execute(sql) end if %>