<%@ Language=VBScript %> <% response.buffer=true Response.Expires=0 Set rs9 = Server.CreateObject("ADODB.Recordset") sql9 ="SELECT * From about Order By id DESC" RS9.open sql9,Conn,3,3 %> <% dim rs dim sql dim page Set rs = Server.CreateObject("ADODB.Recordset") sql = "Select * FROM enet Order By dateandtime Desc" rs.open sql,conn,1,1 IF not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Then page=1 Else Page=Int(Abs(Request("page"))) End if rs.pagesize =5 total = rs.RecordCount mypagesize=rs.pagesize rs.absolutepage = page %> <% if request("test")="insert" then txtname=left(request("txtname"),30) txtemail=left(request("txtemail"),30) txthomepage=left(request("txthomepage"),50) txtoicq=left(request("txtoicq"),10) if request.form("xxx")="" then pic="images/1.gif" else pic=request.form("xxx") end if txtcome=left(request("txtcome"),20) sex=request("sex") txtcontent=left(request("txtcontent"),500) if txtoicq="" then txtoicq="打死我也不说" if txtcome="" then txtcome="保密" if txthomepage="" or txthomepage="http://" then txthomepage="还没有呢!" if txtname="" then response.write "" & VbCRLF response.end end if If txtemail="" or IsValidEmail(txtemail)=false then response.write "" & VbCRLF response.end end if if txtcontent="" then response.write "" & VbCRLF response.end 'else 'response.write txtcontent 'response.end end if function IsValidEmail(email) dim names, name, i, c IsValidEmail = true names = Split(email, "@") if UBound(names) <> 1 then IsValidEmail = false exit function end if for each name in names if Len(name) <= 0 then IsValidEmail = false exit function end if for i = 1 to Len(name) c = Lcase(Mid(name, i, 1)) if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then IsValidEmail = false exit function end if next if Left(name, 1) = "." or Right(name, 1) = "." then IsValidEmail = false exit function end if next if InStr(names(1), ".") <= 0 then IsValidEmail = false exit function end if i = Len(names(1)) - InStrRev(names(1), ".") if i <> 2 and i <> 3 then IsValidEmail = false exit function end if if InStr(email, "..") > 0 then IsValidEmail = false end if end function function IsLongStr(str) dim longStrs,longstr IsLongStr = true longStrs = Split(str,"") for each longStr in longStrs if len(longstr) >50 then ISlongStr = false end if next end function txtname=server.htmlencode(txtname) txtcome=server.htmlencode(txtcome) txtemail=server.htmlencode(txtemail) txtcome=server.htmlencode(txtcome) txthomepage=txthomepage txtoicq=server.htmlencode(txtoicq) txtcontent=server.htmlencode(txtcontent) reply = "没有" Set rs= Server.CreateObject("ADODB.Recordset") sql="select * from enet" rs.open sql,conn,3,2 rs.addnew rs("name")=txtname rs("email")=txtemail rs("homepage")=txthomepage rs("come")=txtcome rs("oicq")=txtoicq rs("content")=txtcontent rs("head")=pic rs("dateandtime")=now() rs("reply")=reply rs("ip")=Request.ServerVariables("REMOTE_HOST") rs("writename")=txt_writename rs("sex")=cstr(sex) rs.update rs.close response.redirect "index.asp" end if %> 东盛电力
" width=100%> <% dim i i=1 do while not rs.eof and mypagesize>0 id=rs("gbookid") name=rs("name") email=rs("email") homepage=rs("homepage") oicq=rs("oicq") head=rs("head") content=rs("content") content=Autolink(content) dateandtime=rs("dateandtime") reply=rs("reply") sex=rs("sex") %> <% mypagesize=mypagesize-1 i=i+1 rs.movenext loop %>
" rowspan=2 width=80>


<%=name%>
" height=20>
 发表于:<%=dateandtime%> <%=name%来自<%=rs("come")%> border=0 height=16 src="images/icon_profile.gif" width=16> 发信> 的QQ号是:<%=oicq%>> 的主页> <%=name%的IP地址是:<%=rs("ip")%> height=16 src="images/icon_ip.gif" width=16>
" height=80>
<%=content%>
<%if reply<>"没有" then%>

版主回复:<%=reply%> <%end if%>
" colspan=2 height=18 valign=bottom>
<%=rs.pagecount%><%=total%>條留言 當前第<%=page%>首頁 <%if page>1 then%> class="black">上一頁 <%else%> 上一頁 <%end if%> <%if page class="black">下一頁 <%else%> 下一頁 <%end if%> class="black">尾頁
姓名
Email
主页
oicq
来自
个人形象代表 头像
版权所有:东盛电力