<% on error resume next dim conn,rs,ps,PostIntervalTime,IpLists,LoginPassWord,OnlyShowReplay LoginPassWord = "wangxiaoping" '管理密码,请设置复杂的密码 ps = 10 '每页表单数 PostIntervalTime = 30 '同一个IP多长时间可以留一次言,单位是秒,5分钟可以用5*60表示,不限制请设置为0 OnlyShowReplay = 0 '表单是否有回复再显示,0为表单后立刻显示在表单列表中,1为需要回复后才显示在列表中。置顶的表单不受限制 IpLists = "192.168.|" '禁止表单的IP,例如: "127.0.|192.168.0.1" %> 山西天罡新材料科技有限公司 - ope体育_ope手机客户端_ope体育客户端 <% dim act,name,email,ss1,ss2,ss3,ss4,ss5,ss6,ss7,ss8,ss9,content,reply,gid,ip,isTop act = Request.form("act") name = Request.form("name") email = Request.form("email") ss1 = Request.form("ss1") ss2 = Request.form("ss2") ss3 = Request.form("ss3") ss4 = Request.form("ss4") ss5 = Request.form("ss5") ss6 = Request.form("ss6") ss7 = Request.form("ss7") ss8 = Request.form("ss8") ss9 = Request.form("ss9") content = Request.form("content") reply = Request.form("reply") gid = Request.form("gid") isTop = Request.form("isTop") if cstr(isTop) <> "1" then isTop = "0" ip = left(Request.ServerVariables("REMOTE_ADDR"),15) name = NoJapn(name) email = NoJapn(email) ss1 = NoJapn(ss1) ss2 = NoJapn(ss2) ss3 = NoJapn(ss3) ss4 = NoJapn(ss4) ss5 = NoJapn(ss5) ss6 = NoJapn(ss6) ss7 = NoJapn(ss7) ss8 = NoJapn(ss8) ss9 = NoJapn(ss9) content = NoJapn(content) reply = NoJapn(reply) if request.QueryString("action") = "loginout" then session("islogin") = "" end if if act = "login" then if trim(request.form("pws")) = trim(LoginPassWord) then session("islogin") = LoginPassWord end if end if Session.timeout = 20 function er(str,gourl)%>
<% = server.htmlencode(str) %>
<% Response.end end function set conn=Server.CreateObject("ADODB.Connection") conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=;Data Source=" & Server.MapPath("Data.mdb") if err.number<> 0 then er "Error, please contact your administrator","" end if dim MaxPerPage,totalPut,CurrentPage,TotalPages currentPage = Request.QueryString("page") if currentPage = "" or isnumeric(currentPage) = false then currentPage = 1 end if currentPage = int(currentPage) '提交问题///////////////////////////////////////// if act = "save" then if isForbid(ip) then conn.close set conn = nothing er "I'm sorry, you do not have the form permissions","" end if if len(name) = 0 then conn.close set conn = nothing er "Please enter a name","" end if if len(content) < 1 then conn.close set conn = nothing er "The content can not be empty","" end if if len(content) > 1000 then conn.close set conn = nothing er "The content is not more than 1000 characters","" end if if int(PostIntervalTime) > 0 then newDate = Dateadd("s",int(PostIntervalTime)*-1,Now) Set rs = conn.execute("select top 1 ip from BiaoDan where ip = '"& fixsql(ip) &"' and theDate > #"& newDate &"#") if not (rs.eof and rs.bof) then set rs = nothing conn.close set conn = nothing er "Please do not frequent form, such as minutes"& int(PostIntervalTime/60) &"Form!","" end if set rs = nothing end if dim InsertSql InsertSql = "insert into BiaoDan (name,email,ss1,ss2,ss3,ss4,ss5,ss6,ss7,ss8,ss9,content,ip) values('"& fixsql(name) &"','"& fixsql(email) &"','"& fixsql(ss1) &"','"& fixsql(ss2) &"','"& fixsql(ss3) &"','"& fixsql(ss4) &"','"& fixsql(ss5) &"','"& fixsql(ss6) &"','"& fixsql(ss7) &"','"& fixsql(ss8) &"','"& fixsql(ss9) &"','"& fixsql(content) &"','"& fixsql(ip) &"')" conn.execute(InsertSql) if err<> 0 then conn.close set conn = nothing er "The system is busy, please wait to submit","" else conn.close set conn = nothing dim okalt if int(OnlyShowReplay) = 1 then okalt = ",To display the form requires administrator Reply" else okalt = "。" end if er "Form has been submitted" & okalt,Request.ServerVariables("SCRIPT_NAME") end if end if if session("islogin") = LoginPassWord then '回复表单///////////////////////////////////////// if act = "re" then if isnumeric(gid) = false or gid = "" then conn.close set conn = nothing er "Parameter error","" end if if len(reply) > 1000 then conn.close set conn = nothing er "Reply to no more than 1000 characters","" end if updateSql = "update BiaoDan set content = '"& fixsql(content) &"',reply = '"& fixsql(reply) &"',isTop = "& int(isTop) &",replydate = now() where id = " & gid conn.execute(updateSql) if err<> 0 then conn.close set conn = nothing er "The system is busy, please wait to submit","" else conn.close set conn = nothing er "Operation was successful。",Request.ServerVariables("SCRIPT_NAME") & "?page=" & currentPage end if end if '删除表单///////////////////////////////////////// if act = "del" then if isnumeric(gid) = false or gid = "" then conn.close set conn = nothing er "Parameter error","" end if delSql = "delete from BiaoDan where id = " & gid conn.execute(delSql) if err<> 0 then conn.close set conn = nothing er "The system is busy, please wait to submit","" else conn.close set conn = nothing er "Has been deleted。",Request.ServerVariables("SCRIPT_NAME") & "?page=" & currentPage end if end if end if if int(OnlyShowReplay) = 0 or (session("islogin") = LoginPassWord) then sql = "select * from BiaoDan order by IsTop desc,ID desc" else sql = "select * from BiaoDan where len(reply) > 0 or IsTop = 1 order by IsTop desc,ID desc" end if set rs=Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 %>
<% if rs.eof and rs.bof then %> <% else %>
ShanXi Sino-Scienc TianGang Feedback
<% if isForbid(ip) then Response.write "You do not have the permissions of the form" else%> " name="HwForm0" onSubmit="return(ckform())">
*Content[<=1000]:
*Name:
*E-mail:
Address:
Company:
*Tel:

<%end if%>
<% rs.pagesize=ps totalput=rs.recordcount totalpages=rs.pagecount maxperpage=rs.pagesize if currentpage < 1 then currentpage = 1 end if if currentpage > totalpages then currentpage=totalpages end if if currentPage=1 then showContent else if (currentPage-1)*MaxPerPage < totalPut then rs.move (currentPage-1)*MaxPerPage dim bookmark bookmark=rs.bookmark showContent end if end if rs.close set rs=nothing sub showContent dim i dim k k=(totalPut-MaxPerPage*(currentPage-1))+1 i=0 do while not (rs.eof or err) k=k-1 %> <%if i > 0 then%>
<%end if%> <%if session("islogin") = LoginPassWord then%> " name="HwForm<% = rs("ID") %>"> "> <%else%> <%end if%>
Name:
<% = server.htmlencode(rs("name")) %> <% = rs("theDate") %>
Address:" id="ss1" onClick="document.getElementById('ss1').style.background='#FFFFE1'" onBlur="document.getElementById('ss1').style.background='#FFF'">
Company:" id="ss3" onClick="document.getElementById('ss3').style.background='#FFFFE1'" onBlur="document.getElementById('ss3').style.background='#FFF'">
*Tel:" id="ss8" onClick="document.getElementById('ss8').style.background='#FFFFE1'" onBlur="document.getElementById('ss8').style.background='#FFF'">
Content:
Personal Information: E-mail:"><% = server.htmlencode(rs("email")) %> / IP:"><% = rs("ip") %>
Reply:
" value="1"<%if Cstr(rs("IsTop"))="1" then%> checked<%end if%>> .act.value='del';document.HwForm<% = rs("ID") %>.submit();}" style="color:red;" value="Delete">
<% i=i+1 if i>=MaxPerPage then exit do rs.movenext loop end sub end if %>
<%showpages()%>
<% logintable()%>
<% conn.close set conn = nothing Function NoJapn(byVal iStr) if isnull(iStr) or isEmpty(iStr) then NoJapn="" Exit function end if dim F F=array(chr(-23116),chr(-23124),chr(-23122),chr(-23120),chr(-23118),chr(-23114),chr(-23112),chr(-23110),chr(-23099),chr(-23097),chr(-23095),chr(-23075),chr(-23079),chr(-23081),chr(-23085),chr(-23087),chr(-23052),chr(-23076),chr(-23078),chr(-23082),chr(-23084),chr(-23088),chr(-23102),chr(-23104),chr(-23106),chr(-23108)) NoJapn=iStr for i=0 to 25 NoJapn=replace(NoJapn,F(i),"") next End Function function fixsql(str) dim newstr newstr = str if isnull(newstr) or len(newstr) = 0 then fixsql = newstr exit function end if newstr = Replace(newstr,"'","''") fixsql = newstr end function function isForbid(sip) dim Iplist,Iparr,Ipi Iplist = "|"& IpLists &"|" Iparr = split(Iplist,"|") for Ipi = 0 to ubound(Iparr) if len(Iparr(Ipi)) > 0 and instr("|" & sip,"|" & Iparr(Ipi)) > 0 then isForbid = true exit function end if next isForbid = false end function sub showpages() pageurl = Request.ServerVariables("SCRIPT_NAME") & "?" %> <% if len(totalput) = 0 then totalput = 0 end if if totalpages<2 then if int(totalpages) > 0 then response.write "In total:"&totalput&" " end if else dim Page_First,Page_Previous,Page_Next,Page_Last Page_First = "DefaultPage" Page_Previous = "PreviousPage" Page_Next = "NextPage" Page_Last = "FinalPage" %> >> <%if int(currentPage) = 1 Then%> <% = Page_First %> <% = Page_Previous %> <% = Page_Next %> <% = Page_Last %> <%elseif int(currentPage) = int(totalpages) Then%> <% = Page_First %> <% = Page_Previous %> <% = Page_Next %> <% = Page_Last %> <%else%> <% = Page_First %> <% = Page_Previous %> <% = Page_Next %> <% = Page_Last %> <%end if%> 页次:<%=currentPage%>/<%=totalpages%> 页 转到  页 共 <%=totalput%>个表单  <%end if%><% end sub function logintable() %> ">
<%if session("islogin") = LoginPassWord then%> Exit management <%elseif request("action") = "login" then%> Please enter a password: Cancel <%else%> Management <%end if%>
<%end function%>