用户登录  | 
首 页技术文章软件发布广告价格
当前位置:传奇游戏服务端下载站传奇站长论坛资源网站程序技术文章文章资讯传奇架设教程传奇架设技术

龙族私服经验归0的ASP代码

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2014-10-03 09:53:51

以下是ASP代码
<%
        Dim DBHost,DBUser,DBPass,DB1,DB2,MaxLev
        DBHost = "127.0.0.1"     '把127.0.0.1改成你的数据库IP,本机可用127.0.0.1
        DBUser = "sa"            '数据库用户名
        DBPass = "12345"        '数据库密码
        DB1 = "TotalDB"          '帐号数据库
        DB2 = "DragonRajaDB"     '角色数据库
        MaxLev = 100             '清经验最低所要等级
        if Request.QueryString("Action") = "Exp" then
                Dim rs,rs1,Conn,Conn1,Account,PassWord,User


                Account = Request.Form("Account")
                PassWord = Request.Form("PassWord")
                User = Request.Form("User")
                if Account = "" or PassWord = "" or User = "" or Instr(Account,"'") or

 

Instr(PassWord,"'") or Instr(User,"'") then
                        Response.Write "<script>alert('所有项目不能为空并不能包含非法字

 

符!');location.href='ExpClear.asp'</script>"
                        Response.End()
                end if
                Set Conn = Server.CreateObject("ADODB.Connection")
                Set Conn1 = Server.CreateObject("ADODB.Connection")
                Conn.open "Provider=SQLOLEDB.1;UID="&  DBUser  &";PWD="&  DBPass 

 

&";database="  &  DB1  &";server="  &  DBHost
                Conn1.open "Provider=SQLOLEDB.1;UID="&  DBUser  &";PWD="&  DBPass 

 

&";database="  &  DB2  &";server="  &  DBHost 
                '检查用户名和密码
                Set rs = Server.CreateObject("ADODB.RecordSet")
                rs.open "Select * from Chr_log_info where login_id ='" & Account & "' and

 

passwd ='" & PassWord & "'",Conn,1,1
                if not rs.eof then
                        '用户名密码正确检查角色
                        Set rs1 = Server.CreateObject("ADODB.RecordSet")
                        rs1.open "Select * from Chr_Info where login_id ='" & Account & "'

 

and name='" & User & "'",Conn1,1,3
                        if not rs1.eof then
                                '验证等级
                                if rs1("Lev") < MaxLev then
                                        Response.Write "<script>alert('角色等级不

 

够!');history.back(-1)</script>"
                                        Response.End()
                                else
                                        rs1("Exp") = 0
                                        rs1.update
                                        Response.Write "<script>alert('经验清空成

 

功!');location.href='ExpClear.asp'</script>"
                                        Response.End()
                                end if
                        else
                                Response.Write "<script>alert('角色不正确!');history.back(-

 

1)</script>"
                                Response.End()
                        end if
                else
                        Response.Write "<script>alert('帐号或密码不正确!');history.back(-1)

 

</script>"
                        Response.End()
                end if
        end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

 

"">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>经验清0服务</title>
<style type="text/css">
<!--
body, td, th {
        font-family: 宋体;
        font-size: 12px;
        color: #000000;
}
body {
        margin-left: 0px;
        margin-top: 0px;
        margin-right: 0px;
        margin-bottom: 0px;
        background-color: #00CFFF;
}
a {
        font-size: 12px;
}
.style3 {
        font-size: 14;
        font-weight: bold;
        color: #FFFF00;
}
-->
</style></head>

 

<body>
<br>
<br>
<br>
<form name="form1" method="post" action="?Action=Exp">
  <table width="235" border="0" align="center" cellpadding="0" cellspacing="1"

 

bgcolor="#0000FF">
    <tr align="center" bgcolor="#3399FF">
      <td height="30"><span class="style3">经验清0服务(所需等级:<%=MaxLev%>)</span></td>
    </tr>
    <tr bgcolor="#00CFFF">
      <td height="25" align="center">帐号:
        <input name="Account" type="text" id="Account" size="15" maxlength="14" style="font

 

-family: 宋体; font-size: 12px; border: 1px solid #0000FF; background-color: #00CFFF"></td>
    </tr>
    <tr bgcolor="#00CFFF">
      <td height="25" align="center">密码:
      <input name="PassWord" type="password" id="PassWord" size="15" maxlength="14"

 

style="font-family: 宋体; font-size: 12px; border: 1px solid #0000FF; background-color:

 

#00CFFF"></td>
    </tr>
    <tr bgcolor="#00CFFF">
      <td height="25" align="center">角色:
      <input name="User" type="text" id="User" size="15" maxlength="10" style="font-family:

 

宋体; font-size: 12px; border: 1px solid #0000FF; background-color: #00CFFF"></td>
    </tr>
    <tr align="center" bgcolor="#00CFFF">
      <td height="40"><input type="submit" name="Submit" value="提交">
        <input type="reset" name="Submit" value="重置"></td>
    </tr>
  </table>
</form>
</body>
</html>

 

 

Tags:

作者:佚名

文章评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
传奇资源网提供最新传奇开区一条龙版本下载,本站声明:只更新最新最好的传奇服务端分享给大家。