<!-- #Include File=chkpass.asp -->
<!-- #Include File=Conn.asp -->
<!-- #Include File=inc/prompt.inc -->
<%
dim subid,successmess
dim newtype
action=trim(request("action"))
id=trim(request("id"))
'backurl="ad_main.asp"


select case action
	case "del"
		sql="delete * from link  where id="&id
		conn.execute(sql)
		conn.close
		set conn=nothing		
		successmess="删除成功！"
		call successclose()		
	case "deltype"
		sql="delete * from linktype  where typeid="&request("typeid")
		conn.execute(sql)
		sql="delete * from link  where type="&request("typeid")
		conn.execute(sql)
		conn.close
		set conn=nothing
		successmess="删除类型成功！"
		backurl="ad_type.asp"
		call success()
	case "add"
		
		newtype=trim(request("newtype"))
		sql="insert into linktype(type) values ('"&newtype&"')"
		conn.Execute(sql)
		Conn.Close
		Set Conn=Nothing
		successmess="添加类型成功！"
		backurl="ad_type.asp"
		call success()	
end select
'==========================================
'程序制做:迅捷网络.    http://www.soonhost.com
'迅捷主机网 -- 域名注册、主机租用、网站建设、脚本开发
'网址：http://www.soonhost.com
'msn:soonhost@hotmail.com
'请保留以上版权信息，谢谢合作！
'==========================================
%>