<%set book=conn.execute("select * from book_setup") sitename=book("sitename") admin=book("admin") password=book("password") maxlength=cint(book("maxlength")) view=book("view") pages=cint(book("pages")) html=cint(book("html")) mailyes=cint(book("mailyes")) book_jianju=cint(book("book_jianju")) huifutishi=cstr(book("huifutishi")) huifucolor=cstr(book("huifucolor")) bad=cstr(book("bad")) set book=nothing set rs=conn.execute("select * from web_config") if not rs.eof then Response.Cookies("config").Path = webdir '不加密用户名,使登录的时候直接返回用户名.减少用户输入. web_title = rs(0) web_url = rs(1) web_defaultclass=rs(2) web_logo = rs(3) web_banner=rs(4) web_keyword = rs(5) web_content = rs(6) Web_bottom = rs(7) gonggao = rs(8) end if rs.close '检查用户输入的内容中是否含有非法字符 function checktxt(txt) chrtxt="33|34|35|36|37|38|39|40|41|42|43|44|47|58|59|60|61|62|63|91|92|93|94|96|123|124|125|126|128" chrtext=split(chrtxt,"|") for c=0 to ubound(chrtext) txt=replace(txt,chr(chrtext(c)),"") next checktxt=txt end function if request("send")="ok" then username=trim(request.form("username")) usermail=trim(request.form("usermail")) if username="" or request.form("Comments")="" then response.write "" response.end end if if checktxt(request.form("username"))<>request.form("username") then response.write "" response.end end if if mailyes=0 then '邮箱为必填时检查邮箱是否合法 if checktxt(request.form("usermail"))<>request.form("usermail") then response.write "" response.end end if if Instr(usermail,".")<=0 or Instr(usermail,"@")<=0 or len(usermail)<10 or len(usermail)>50 then response.write "" response.end end if end if if len(request.form("Comments"))>maxlength then response.write "" response.end end if Comments1=request.form("Comments") bad1=split(bad,"/") '过滤脏话 for t=0 to ubound(bad1) Comments1=replace(Comments1,bad1(t),"***") next if request.form("Comments")<>Comments1 then response.write "" response.end end if getcode=oa.sqlrequest("checkcode") if getcode<>session("getcode") then oa.msgshow("验证码错误!请返回重新输入!") set rs=Server.CreateObject("ADODB.RecordSet") sql="select * from Feedback where online='1' order by Postdate desc" rs.open sql,conn,1,3 rs.Addnew rs("username")=Request("username") rs("comments")=Request("comments") rs("usermail")=Request("usermail") rs("face")=Request("face") rs("pic")=Request("pic") rs("url")=Request("url") rs("qq")=Request("qq") rs("cszyz")="cszyz" rs("zyzbook")=oa.sqlrequest("checkcode") view=cstr(view) if view<>"0" then view="1" rs("online")=view rs("IP")=Request.serverVariables("REMOTE_ADDR") rs.Update rs.close set rs=nothing response.write "" response.end end if %>

· 当前位置:网站首页 >> 在线留言
在线留言

    
您的姓名:
*
您的邮箱:
<%if mailyes=0 then%> * <%end if%>
电话:
其它联系方式:
(如QQ、MSN等)
留言内容:
(<%=maxlength%>字以内)
请选择表情:

请选择头像:

验证码:
请在左边输入 验证码,看不清楚?请点击刷新验证码