处理用的文件代码
<!--#include file="conn.asp" -->
pF='jj51
<%
pF='jj51
Dim URL
pF='jj51
If DateDiff("s",Request.Cookies("KevanTM")("vitistime"),Now())<2 Then
pF='jj51
URL=Request.ServerVariables("Http_REFERER")
pF='jj51
Response.Write("<meta http-equiv=""refresh"" content=""2;URL="&URL&""">")
pF='jj51
Response.Write("网站启动页面防刷新功能,两秒后自动跳转......")
pF='jj51
Response.end
pF='jj51
End IF
pF='jj51
Response.Cookies("KevanTM")("vitistime")=Now()
pF='jj51
%>
pF='jj51
<%
pF='jj51
if not instr(1,Request.ServerVariables("http_Referer"),Request.ServerVariables ("SERVER_NAME"),1)=8 then
pF='jj51
response.write "<b>请不要从非本服务器的页面提交信息</b>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
ps_loginname=trim(request.form("id_loginid"))
pF='jj51
charname=trim(request.form("charname"))
pF='jj51
charname1=left(trim(request.form("charname1")),6)
pF='jj51
password=trim(request.form("password"))
if instr(ps_loginname,"'")<>0 or instr(ps_loginname,"=")<>0 or instr(ps_loginname,"&")<>0 or instr(ps_loginname,"%")<>0 then
pF='jj51
response.write "<script language=javascript>alert('您输入的用户名不符合要求!');history.back();</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
if instr(charname,"'")<>0 or instr(charname,"=")<>0 or instr(charname,"&")<>0 or instr(charname,"%")<>0 then
pF='jj51
response.write "<script language=javascript>alert('您输入的用户名不符合要求!');history.back();</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
if charname = charname1 then
pF='jj51
response.write "<script language=javascript>alert('您输入的用户名不符合要求!');history.back();</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
if len(charname) > 16 then
pF='jj51
response.write "<script language=javascript>alert('您设定的用户名太长,服务器不能接受!');history.back();</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
if len(charname1) > 16 then
pF='jj51
response.write "<script language=javascript>alert('您设定的用户名太长,服务器不能接受!');history.back();</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
if instr(charname1,"'")<>0 or instr(charname1,"=")<>0 or instr(charname1,"&")<>0 or instr(charname1,"%")<>0 or instr(charname1,"*")<>0 then
pF='jj51
response.write "<script language=javascript>alert('您输入的用户名不符合要求!');history.back();</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
if password="" then
pF='jj51
response.write "<script language=javascript>alert('请您输入密码!');history.back();</script>"
pF='jj51
response.end
pF='jj51
end if
set rs1 = Server.CreateObject("ADODB.Recordset")
pF='jj51
sql="select * from chr_log_info where id_loginid = '"&ps_loginname&"'"
rs1.open sql,dbconn,1,1
if rs1.eof then
response.write "<script language=JavaScript>" & chr(13) & "alert('用户名不存在');" & "history.back()" & "</script>"
pF='jj51
response.end
else
pF='jj51
if rs1("id_passwd")<>password then
pF='jj51
response.write "<script language=JavaScript>" & chr(13) & "alert('您的原始密码错误!');" & "history.back()" & "</script>"
pF='jj51
response.end
pF='jj51
else
pF='jj51
editid=rs1("propid")
pF='jj51
rs1.close
pF='jj51
set rs1=nothing
'检测账号是否在线
pF='jj51
set rs10 = Server.CreateObject("ADODB.Recordset")
pF='jj51
sql="select * from logintable where user_id = '"&ps_loginname&"'"
pF='jj51
rs10.open sql,dbconn,1,1
pF='jj51
if not rs10.eof then
pF='jj51
response.write "<script language=JavaScript>" & chr(13) & "alert('角色在线无法更改名字!');" & "history.back()" & "</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
rs10.close
pF='jj51
set rs10=nothing
'检测结束
pF='jj51
'===============================================================================
pF='jj51
if charname<>"" then
pF='jj51
'----------------------------角色更名功能-------------------------------
pF='jj51
'先检测一下想改的名字是否已经被占用
pF='jj51
set rs9 = Server.CreateObject("ADODB.Recordset")
pF='jj51
sql9="select * from charname_1 where charname='"&charname1&"'"
pF='jj51
rs9.open sql9,dbconn,1,1
pF='jj51
'检测用户名是否已经存在
pF='jj51
if not rs9.bof then
pF='jj51
response.write "<script language=JavaScript>" & chr(13) & "alert('对不起角色名字已经被占用了!');" & "history.back()" & "</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
rs9.close
pF='jj51
set rs9=nothing
pF='jj51
'检测结束
pF='jj51
set rs = Server.CreateObject("ADODB.Recordset")
pF='jj51
sql="select * from charname_1 where propid="&editid&" and charname='"&charname&"'"
pF='jj51
rs.open sql,dbconn,1,1
pF='jj51
if rs.bof then
pF='jj51
response.write "<script language=JavaScript>" & chr(13) & "alert('对不起你想改的角色名字不存在!');" & "history.back()" & "</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
editids=rs("charpropid")
pF='jj51
rs.close
pF='jj51
set rs=nothing
pF='jj51
'更改角色表名字开始
pF='jj51
set rs = Server.CreateObject("ADODB.Recordset")
pF='jj51
sql1="select * from CharInfo where charPropID="&editids&""
pF='jj51
rs.open sql1,conn,1,3
pF='jj51
if not rs.bof then
pF='jj51
if rs("Lv") > 3 then
pF='jj51
response.write "<script language=JavaScript>" & chr(13) & "alert('对不起只允许战斗等级三级以前的角色更改名字!');" & "history.back()" & "</script>"
pF='jj51
response.end
pF='jj51
end if
'如果检测无误就开始更改两个表里面的角色名称
pF='jj51
rs("charname")=charname1
pF='jj51
rs("Expr1")=charname1
pF='jj51
rs.update
pF='jj51
rs.close
pF='jj51
set rs=nothing
pF='jj51
'更改charname_1表中的名字
pF='jj51
set rs7 = Server.CreateObject("ADODB.Recordset")
pF='jj51
sql7="select * from charname_1 where propid="&editid&" and charname='"&charname&"'"
pF='jj51
rs7.open sql7,dbconn,1,3
pF='jj51
rs7("charname")= charname1
pF='jj51
rs7.update
pF='jj51
rs7.close
pF='jj51
set rs7=nothing
pF='jj51
else
pF='jj51
response.write "<script language=JavaScript>" & chr(13) & "alert('您输入的角色名称不存在!');" & "history.back()" & "</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
rs.close
pF='jj51
set rs=nothing
'----------------------------角色更名功能-------------------------------
pF='jj51
end if
pF='jj51
'===============================================================================
dbconn.close
pF='jj51
set dbconn=nothing
pF='jj51
conn.close
pF='jj51
set conn=nothing
pF='jj51
response.write "<script language=JavaScript>" & chr(13) & "alert('更名成功!');" & "history.back()" & "</script>"
pF='jj51
response.end
pF='jj51
end if
pF='jj51
end if
pF='jj51
%>