<!-- #Include File="../Include/Config.asp" -->
<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V3.0》，简称“AsaiMHV3”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

Response.Expires = 0
'Call ChkPostAgent()

Dim Cookies_True
Cookies_True = True
If Cls.Cookies_Get("cookies_true")<>"yes" Then
	Cls.Cookies_Set "cookies_true","yes"
	Cookies_True = False
End If	
'载入网站统计
If Cookies_True Then Call Cls.LoadUserInfo()
'显示用户短信
If int(login_msg)>0 Then
	    Dim msg_id,msg_name,msg_topic,MsgStr
	    SQL="select top 1 id,send_u,topic from AsaiMHUserMail where accept_u='"&login_username&"' and types=1 and isread=0"
	    Set Rs=Cls.Exec(SQL,1)
	    If not rs.eof then
			msg_id=Rs(0)
			msg_name=Rs(1)
			msg_topic=Rs(2)
Response.Write VbCrlf & "window.onload = getMsg;"
Response.Write VbCrlf & "window.onresize = resizeDiv;"
Response.Write VbCrlf & "window.onerror = function(){}"
MsgStr = MsgStr & "<DIV id=eMeng style=""BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: 180px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: 116px; BACKGROUND-COLOR: #c9d3f3"">"
MsgStr = MsgStr & "<TABLE style=""BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid"" cellSpacing=0 cellPadding=0 width=""100%"" bgColor=#cfdef4 border=0>"
MsgStr = MsgStr & "<TBODY>"
MsgStr = MsgStr & "<TR>"
MsgStr = MsgStr & "<TD style=""FONT-SIZE: 12px; BACKGROUND-IMAGE: url("&Cls.Web_Dir&"Images/Msg/MsgTopBg.gif); COLOR: #0f2c8c"" vAlign=center width=30 height=24></TD>"
MsgStr = MsgStr & "<TD style=""FONT-WEIGHT: normal; FONT-SIZE: 9pt; BACKGROUND-IMAGE: url("&Cls.Web_Dir&"Images/Msg/MsgTopBg.gif); COLOR: #1f336b; PADDING-TOP: 4px"" vAlign=center width=""100%""> 短消息提示：</TD>"
MsgStr = MsgStr & "<TD style=""BACKGROUND-IMAGE: url("&Cls.Web_Dir&"Images/Msg/MsgTopBg.gif); PADDING-TOP: 2px"" vAlign=center align=right width=19><IMG title=关闭 style=""CURSOR: hand"" onclick=closeDiv() hspace=3 src="""&Cls.Web_Dir&"Images/Msg/MsgClose.jpg""><bgsound src='"&Cls.Web_Dir&"Images/Msg/Message.wav'></TD>"
MsgStr = MsgStr & "</TR>"
MsgStr = MsgStr & "<TR>"
MsgStr = MsgStr & "<TD style=""PADDING-RIGHT: 1px; BACKGROUND-IMAGE: url("&Cls.Web_Dir&"Images/Msg/MsgBottomBg.jpg); PADDING-BOTTOM: 1px"" colSpan=3 height=90>"
MsgStr = MsgStr & "<DIV style=""BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 13px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 13px; FONT-SIZE: 9pt; PADDING-BOTTOM: 13px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 18px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%"">您有 <font color=red>"&login_msg&"</font> 封新短消息<br />短信标题：<font class=blue>"&msg_topic&"</font><br /> "
MsgStr = MsgStr & "<DIV align=center style=""word-break:break-all""><a href="""&Cls.Web_Dir&"User/Mail.asp?action=msg_view&id="&msg_id&"""><font color=red>查看"&msg_name&"给您的短信</font></a></DIV>"
MsgStr = MsgStr & "</DIV></TD></TR></TBODY></TABLE></DIV>"
MsgStr = Replace(Replace(MsgStr,vbCrlf,"\n"),Chr(34),"\" & Chr(34))
Response.write VbCrlf & "document.write (""" & MsgStr & """);"
	    End if
	    Rs.Close
End If

Sub ChkPostAgent()
		On Error Resume Next
		Dim server_v1, server_v2
		Dim m_blnAgent,m_strAgent
		m_blnAgent = False
		server_v1 = CStr(Request.ServerVariables("HTTP_REFERER"))
		server_v2 = CStr(Request.ServerVariables("SERVER_NAME"))
		If Mid(server_v1, 8, Len(server_v2)) = server_v2 Then
			m_blnAgent = True
		End If
		If m_blnAgent Then
			m_strAgent = Request.ServerVariables("HTTP_USER_AGENT")
			If Left(m_strAgent, 7) = "Mozilla" Or Left(m_strAgent, 5) = "Opera" Then
				m_blnAgent = True
			End If
		End If
		If m_blnAgent = False Then
			'Response.Status = "302 Object Moved"
			Response.End
		End If
End Sub
%>
