<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Function.asp"-->
<%
Call ChkLogin(session("WebAdminsUserName"))
Call ConnectionDataBase(2)
Action = Request("Action")
Select Case Action
	Case "AddNews"
		Call AddNews
End Select
'添加新闻
Sub AddNews()
	NewsCategory = Request.Form("NewsCategory")
	NewsTitle = Request.Form("NewsTitle")
	SortID = Request.Form("SortID")
	Content = Request.Form("Content")
	ID = Request.Form("ID")
	
	Call ChkIsNumber(ID,"参数类型错误!")
	Call ChkIsNumber(NewsCategory,"参数类型错误!")
	Call ChkIsNull(NewsTitle,"请输入标题!")
	Call ChkIsNumber(SortID,"参数类型错误!")
	strSql = "Select * From T_Affiche Where ID=" & ID	
	SetRs Rs,strSql,conn,1,3
	IF Rs.EOF Then	Rs.Addnew()
	Rs("ClassID") = NewsCategory
	Rs("NewsTitle") = NewsTitle		
	Rs("SortID") = SortID
	Rs("Content") = Content
	
	Rs.Update
	DisRs Rs
	Call CloseDatabase
	Call Success("信息提交成功!",Request.ServerVariables("HTTP_REFERER"))
End Sub
%>
