<!--#include file="Conn.asp"-->
<!--#include file="Product_Sub.asp"-->
<!--#include file="../Inc/Ubbcode.asp"-->
<!--#include file="JsInc/Function.asp"-->
<html>
<head>
<titel></titel>
<LINK href="admin/admin.css" type=text/css rel=stylesheet>
</head>
<body>
<%
If Request.QueryString("action")="update" Then
id = Request("id")
Set pp = Conn.Execute("Select * From [About_Manage] Where ID="&Clng(id))
If pp.Bof and pp.Eof Then
Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('没有该信息!');" & Chr(13)
		Response.write "window.document.location.href='Manage_Manage.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
Response.End
Else
If Request.Form("update")="修改" Then
content = ubbcode(Trim(Request.Form("Content")))
ClassName = Trim(Request.Form("ClassName"))
UpdateTime = Request.Form("UpdateTime")
Sql = " Update [About_Manage] Set [Content]='"&content&"',[ManageType]='"&ClassName&"', "
        If UpdateTime<>"" and IsDate(UpdateTime)=true then
		UpdateTime=CDate(UpdateTime)
	Else
		UpdateTime=date()
	End if
Sql = Sql & " [InfoTime]='"&UpdateTime&"' Where ID="&Clng(id)
Conn.Execute (Sql)
JaSys("管理员" & session("ManagerUser") & "<font color=red>修改介绍类别["&ClassName&"]内容</font>成功")
Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('更新成功!');" & Chr(13)
		Response.write "window.document.location.href='Manage_Manage.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
Response.End
End if
End if
End if

If Request.QueryString("action")="del" Then
id = Request("id")
Set del=Conn.Execute("Delete * From [About_Manage] Where ID=" & CLng(id))
JaSys("管理员" & session("ManagerUser") & "<font color=red>删除介绍类别ID为"&id&"的内容</font>成功")
	Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('删除成功!');" & Chr(13)
		Response.write "window.document.location.href='Manage_Manage.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
        Response.End
End if
%>
</body>
</html>