<!--#include file="../conn/conn1.asp"-->
<!--#include file="inc.asp"-->
<!--#include file="../config.asp"-->
<!--#include file="../inc/articlechar.inc"-->

<%
set rs=server.createobject("adodb.recordset")
if request("add")<>"" then
call newfilm()
elseif request("edit")<>"" then
call editfilm()
else
call delfilm()
end if
sub newfilm()
sql="select * from type where (typeid is null)"
rs.open sql,conn,1,3
rs.addnew
rs("type")=request("type")
rs.update
end sub
sub editfilm()
sql="select * from type where typeid="&request("id")
rs.open sql,conn,1,3
rs("type")=request("type")
rs.update
end sub
sub delfilm()
sql="DELETE * from type where typeid="&request("id")
rs.open sql,conn,1,3
rs.update
end sub

rs.close
set rs=nothing
conn.close
set conn=nothing

Response.Redirect("lei.asp")

%>
