<!--#include file="../common/conn.asp"-->
<%
  strMsg=replace(trim(GetFormVariable("txtMsg")),"'","''")
  strUser=replace(trim(GetFormVariable("txtName")),"'","''")
  strMail=replace(trim(GetFormVariable("txtEmail")),"'","''")
  strDW=replace(trim(GetFormVariable("txtDw")),"'","''")
  strTel=replace(trim(GetFormVariable("txtTel")),"'","''")
  strAdrr=replace(trim(GetFormVariable("txtAdrr")),"'","''")
  strOICQ=replace(trim(GetFormVariable("txtOICQ")),"'","''")
  strMsg=replace(strMsg,VBcrlf,"<br>")
  
  isShow=GetKey("seeguest",WebUserID,"guestbook_" & GetVariable("mnid") )
  
	'添加信息
	strsql="Insert Into web_guestbook(g_Name,g_dw, g_email, g_addr,g_ip,g_msg,g_tel,g_oicq,mn_id) values("
	strSQL=strSQL & "'" & strUser & "',"
	strsql=strsql &	 "'" & strDW & "', "
	strsql=strsql &	 "'" & strMail & "', "
	strsql=strsql &	 "'" & strAdrr & "', "
	strsql=strsql &	 "'" & request.ServerVariables("REMOTE_ADDR") & "', "
	strsql=strsql &	 "'" & strMsg & "', "
	strsql=strsql &	 "'" & strTel & "', "
	strsql=strsql &	 "'" & strOICQ & "',"
	strsql=strsql &	 "" & GetVariable("mnid") & ")"
	conn.execute strsql,0,1
	
	'如果是不显示留言
	if isShow="none" then
		response.Write("<script language='javascript'>alert('留言成功，谢谢您的支持！　');history.back();</script>")
	else
		response.Redirect("../../lyShow.asp?mnid=" & GetVariable("mnid"))
	end if
%>
