%@ 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") sqlp="select * from topboy_type where ccur(id) = '"&request("id")&"'" rs.open sqlp,conn,adOpenkeyset,adlockoptimistic,adcmdtext if request("hf") = "y" then insertnum=0 if rs.recordcount=0 then numb = "1" else numb = cstr(rs.recordcount)+1 end if sqltext="update topboy_type set mtype='"&request("mtype")&"' where ccur(id) = '"&request("pid")&"'" conn.execute sqltext response.redirect"manager-news-type.asp" response.end else %>