<!--#include file="config.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="code.asp"-->
<%
set rs = server.createobject("adodb.recordset")
dim names,ip,gameid,daikuan,renshu,startdate,Stime,addr,xingzhi,main,homepage,download
names=htmlencode(request("name"))
ip=htmlencode(request.form("ip"))
gameid=htmlencode(trim(request.form("gameid")))
daikuan=htmlencode(trim(request.form("daikuan")))
Service=htmlencode(trim(request.form("Service")))
renshu=htmlencode(trim(request.form("renshu")))
Sdate=request.form("Sdate")
addr=htmlencode(request.form("addr"))
xingzhi=htmlencode(request.form("xingzhi"))
main=htmlencode(request.form("main"))
addname=htmlencode(request.form("addname"))
email=htmlencode(request.form("email"))
homepage=htmlencode(request.form("homepage"))
download=htmlencode(request.form("download"))
if name="" or ip="" or gameid="" or daikuan="" or Service="" or  renshu="" or Sdate="" or main="" or xingzhi="" or addr="" then
  response.write "<script>alert('带*的选项必须填写或选择,请返回检查后再提交');history.back()</script>"
  response.end
end if
if int(daikuan)>ubound(split(dsign,",")) or int(renshu)>ubound(split(rsign,",")) or int(Service)>ubound(split(Ssign,",")) then
  response.write "<script>alert('非法数据,请勿试图提交非法参数');history.back()</script>"
  response.end
end if
if ip="下载专用登陆器" then
   call addsf()
else
   sql="SELECT * FROM sfdata where ip='"&ip&"'"
   rs.open sql,conn,1,1
   flag=rs.RecordCount
   if flag>0 then
      response.write "<script>alert('当前提交的服务器IP在数据库里已经存在\n请重新检查后提交,请不要提交重复信息');history.back()</script>"
   else
      call addsf()
   end if
end if
'定义写入记录的函数sddsf()
function addsf()
   sql="select * from sfdata" 
   rs.open sql,conn,1,3
   rs.addnew
   rs("name")=name
   rs("ip")=ip
   rs("gameid")=gameid
   rs("daikuan")=daikuan
   rs("Service")=Service
   rs("renshu")=renshu
   rs("Sdate")=Sdate
   rs("addr")=addr
   rs("xingzhi")=xingzhi
   rs("main")=main
   rs("addname")=addname
   rs("email")=email
   rs("homepage")=homepage
   rs("download")=download
   rs("ulock")=SFUlock   '1:前台添加私服时自动通过审核;0:前台发布私服后需在后台审核后才能显示。
   rs("top")=0
   rs.update
   response.write "<script>alert('服务器"&names&"提交成功\n请等待管理员审核。\n请不要重复发布信息!\n如果信息发布错误需要修改,\n请直接联系管理员。');location.replace('index.asp')</script>"
end function      
rs.close
rs.nothing
call closeconn
%>
这段程序有时候用的挺好的,但是有的时候就不行了,点击了提交以后出现没有反映的问题,不知道为什么,希望能帮我解决一下谢谢!
[此贴子已经被作者于2005-12-3 22:07:44编辑过]