<!--#Include File="Connection.Asp"-->

<%
Dim Jahassign,Jacontent
Dim JaBlog,JaUpSQL
Dim JaCheckIsLog,B
Dim JiYu

Set JaBlog =  new q_zone
Jahassign = Trim(Request.Form("hassign"))
If Jahassign="yes" Then
Jahassign = 1
Else
Jahassign = 0
End if
Jacontent = JaBlog.JaKillStr(Trim(Request.Form("content")))
B = JaBlog.JaKillStr(Request.QueryString("JaUid"))
If B="" Then
B= "2"
End If

JaCheckIsLog = JaBlog.JaIsUser(B)
If JaCheckIsLog = "no" Or JaCheckIsLog = "IsRe" Then
Response.Write "<script language=javascript>alert('你没有权限观看该页面!');"
Response.Write "window.document.location.href='javascript:history.go(-1)';</script>"
Else

JiYu = JaBlog.GetBlogRe("JaMsg","JaMsg","JaUid='"&SESSION("VicNum")&"' and IsPub=1")
If JiYu(0,0) = "" Then
JaUpSQL = "(JaUid,JaMsg,JaReId,IsPub,JaSign) Values('"&B&"','"&Jacontent&"','"&SESSION("VicNum")&"',1,"&Jahassign&")"
JaBlog.JaInsert "JaMsg",JaUpSQL
Response.Write "<script language=javascript>alert('添加成功!');"
Response.Write "window.document.location.href='Message.asp?JaUid="&SESSION("VicNum")&"';</script>"
Else
JaBlog.JaVicBlog "JaMsg='"&Jacontent&"',JaSign="&Jahassign&"","JaMsg","JaUid='"&SESSION("VicNum")&"' and IsPub=1"
Response.Write "<script language=javascript>alert('修改成功!');"
Response.Write "window.document.location.href='Message.asp?JaUid="&SESSION("VicNum")&"';</script>"
End if
End if
Set JaBlog=Nothing
%>
