<% dim act : act=trim(request.querystring("do")) if act="send" then msgname=FormEncode(request.form("msgname")) msgemail=FormEncode(request.form("msgemail")) msgtel=FormEncode(request.form("msgtel")) msgcont=FormEncode(request.form("msgcont")) call checknull(0,msgname,"姓名不能為空!","javascript:window.history.back();") call checklen(0,0,msgname,20,"姓名長度必須為20個字符以內!","javascript:window.history.back();") call checknull(0,msgtel,"聯系電話不能為空!","javascript:window.history.back();") if checknull(1,msgtel,"","")=1 then call checklen(0,0,msgtel,12,"聯系電話長度必須為12個字符以內!","javascript:window.history.back();") end if call checknull(0,msgcont,"說明內容不能為空!","javascript:window.history.back();") call checklen(0,0,msgcont,400,"說明內容已超過400個字符!","javascript:window.history.back();") dim send_email,send_title,send_body,return_send_email send_email= email send_title= webname &"【在線留言】" send_body=send_body & "留言時間:" & now() & "
" send_body=send_body & "留言IP:" & request.servervariables("REMOTE_ADDR") & "
" send_body=send_body & "姓名:" & server.HTMLEncode(msgname) & "
" send_body=send_body & "聯系電話:" & server.HTMLEncode(msgtel) & "
" send_body=send_body & "地址:" & server.HTMLEncode(msgadd) & "
" send_body=send_body & "留言內容:
" & replacebr(server.HTMLEncode(msgcont)) & "
" return_send_email=gw_send_email(send_email,send_title,send_body) if return_send_email=true then call alert("留言發送成功!","?") else call alert("錯誤:留言發送失??!","javascript:window.history.back();") end if end if %> 青青艹国产精品