<!--#include file="Connections.asp" -->
<%
Function rp(s)
s=Replace(s,"'","¡¯")
s=Replace(s,"<","&lt;")
s=Replace(s,">","&gt;")
s=Replace(s,"%","£¥")
s=Replace(s,"&","£¦")
rp=s
End Function

name=rp(Request("guest_name"))
from=rp(Request("guest_from"))
qq=rp(Request("guest_qq"))
email=rp(Request("guest_email"))
homepage=rp(Request("guest_homepage"))
title=rp(Request("guest_title"))
content=rp(Request("guest_content"))
If from="" Then from="Î´Öª"
If qq="" Then qq="Î´Öª"
If email="" Then email="Î´Öª"
If homepage="" Then homepage="Î´Öª"
ip=Request.ServerVariables("remote_addr")
If name<>"" And content<>"" And Title<>"" Then
	set guestbook = Server.CreateObject("ADODB.Recordset")
	guestbook.ActiveConnection = datalink
	guestbook.Source = "SELECT * FROM message"
	guestbook.CursorType = 1
	guestbook.CursorLocation = 2
	guestbook.LockType = 3
	guestbook.Open()

	guestbook.addnew
	guestbook("name")=name
	guestbook("from")=from
	guestbook("qq")=qq
	guestbook("email")=email
	guestbook("homepage")=homepage
	guestbook("title")=title
	guestbook("content")=content
	guestbook("sdate")=date
	guestbook("stime")=time
	guestbook("ip")=ip
	guestbook.Update
	guestbook.close()
	Response.Write("action=complete")
End If
%>