|
<%if GuestbookAllow="1" then%>
<%if Trim(Request.Form("GB_Type"))="GB_Admin" then%>
<%
dim GB_Title,GB_UserName,GB_UserQQ,GB_UserEmail,GB_Content,GB_VisitIP,GB_VisitDateTime
if Trim(Request.Form("GB_Title"))="" or Trim(Request.Form("GB_Content"))="" then
Response.write "Please write the subject and message!"
elseif Len(Trim(Request.Form("GB_Content")))>GuestbookContentKB then
Response.write "Oops! Please keep your message within 200 characters."
elseif GuestbookValidationCode="1" and UCase(Trim(Request.Form("GuValidationCodeInput")))<>Request.Cookies("GuValidationCodeCookies") then
Response.write "Please fill in the correct validation code!"
else
GB_Title=Trim(Request.Form("GB_Title"))
GB_UserName=Trim(Request.Form("GB_UserName"))
GB_UserQQ=Trim(Request.Form("GB_UserQQ"))
GB_UserEmail=Trim(Request.Form("GB_UserEmail"))
GB_Content=Request.Form("GB_Content")
GB_Content=Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(GB_Content,"'",""),"<",""),">",""),"&",""),"?",""),"delete","Delete"),"update","Update"),"insert","Insert"),"select","Select")
dim rsGB1
set rsGB1=Server.CreateObject("Adodb.RecordSet")
GuSQL="select * from "&GuTablePrefix&"_Guestbook where (GB_ID is null)"
rsGB1.open GuSQL,GuConn,1,3
rsGB1.addnew
rsGB1("GB_Type")="GB_Admin"
rsGB1("GB_GuResourceName")=GB_Title
rsGB1("GB_UserName")=GB_UserName
rsGB1("GB_UserQQ")=GB_UserQQ
rsGB1("GB_UserEmail")=GB_UserEmail
rsGB1("GB_Content")=GB_Content
rsGB1("GB_GuResourceNameColor")="Black"
rsGB1("GB_UserIP")=Request.ServerVariables("REMOTE_ADDR")
rsGB1("GB_DateTime")=Now()
rsGB1.update
rsGB1.close
set rsGB1=nothing
if SendmailAllow="1" then
Gu_SendmailSubject=Trim(Request.Form("GB_Title"))
Gu_SendmailName=Trim(Request.Form("GB_UserName"))
Gu_SendmailAddressFrom=Trim(Request.Form("GB_UserEmail"))
Gu_SendmailBodyText=GB_Content
dim GuMail
Set GuMail=Server.CreateObject("JMail.Message")
GuMail.silent=true
GuMail.Logging=true
GuMail.Charset="gb2312"
GuMail.ContentType="text/html"
GuMail.Priority=3
GuMail.MailServerUserName=GuSMTPUsername
GuMail.MailServerPassword=GuSMTPPassword
GuMail.From=Gu_SendmailAddressFrom
GuMail.FromName=Gu_SendmailName
GuMail.AddRecipient(Gu_SendmailAddressTo)
GuMail.Subject=Gu_SendmailSubject
GuMail.Body=Gu_SendmailBodyText&Gu_SendmailBodyOther
GuMail.Send(GuSMTPServer)
set GuMail=nothing
end if
Response.write "Submit OK! Thanks for your comments! If you require a reply and have left the correct contact information, our staff will get back to you as soon as possible."
end if
%>
|
<%end if%>
<%else%>
| Sorry, the message board is closed somehow, please contact the administrator! |
<%end if%>
|
|