login.asp

来自「核心惊云下载系统」· ASP 代码 · 共 134 行

ASP
134
字号
<%@ LANGUAGE = "vbscript" %>
<%
JyDownLoginTitle="用户登陆"
if request("JyDownType")="logout" then
JyDownLoginTitle="退出登陆"
JyDownLoginMgs="成功:退出登陆成功!"
if Session("JyDownAdminName")<>"" then
Session("JyDownAdminName")  =""
Session("JyDownAdminDj")=""
response.cookies("JyDownUserSoftUrl")=""
end if
if request.cookies("JyDownUserName")<>"" then
response.cookies("JyDownUserName")  =""
response.cookies("JyDownUserDj")=""
end if
elseif request("JyDownType")="login" then
server_vv=len(Request.ServerVariables("SERVER_NAME"))
server_v1=left(Cstr(Request.ServerVariables("HTTP_REFERER")),server_vv)
server_v2=left(Cstr("http://"&Request.ServerVariables("SERVER_NAME")),server_vv)
if server_v1<>server_v2 or server_v1="" or server_v1="" then
response.write("<script>alert('错误:禁止从站点外部提交数据!.')</script>")
response.end
end if
  if request.form("user")<>"" and request.form("pwd")<>"" then
%>

<!--#include file="mdb_path_user.asp"-->
<!--#include file="config.asp"-->
<%user=replace(request("user")," ","+++ close")
  pwd=replace(request("pwd")," ","+++ close")
  set rs=server.createobject("adodb.recordset")
  rs.open "select * from UserInfo where user='"&user&"' and pwd='"&pwd&"'",conn,1,1
  if not rs.eof then
    if pwd=rs("pwd") and user=rs("user") then
      JyDownDj=rs("dj")
      if JyDownDj=0 or JyDownDj=1 or JyDownDj=2 or JyDownDj=3 then
        if rs("lock")=1 then
          JyDownLoginMgs="错误:帐号 "&user&" 已被锁定,你不能登陆!"
        else
          JyDownLoginMgs="成功:帐号 "&user&" 登录成功!"
          if JyDownDj=0 then SF="普通会员"
          if JyDownDj=1 then SF="高级会员"
          if JyDownDj=2 then SF="系统管理员"
          if JyDownDj=3 then SF="站长"
          response.cookies("JyDownUserName")=rs("user")
          response.cookies("JyDownUserDj")=rs("dj")
          if JyDownDj=2 or JyDownDj=3 then
            if rs("softurl")<>"" then
            response.cookies("JyDownUserSoftUrl")=rs("softurl")
            end if
            Session("JyDownAdminName")=rs("user")
            Session("JyDownAdminDj")=rs("dj")
            Session("JyDownAdminAdmin")=rs("admin")
          end if
        end if
      else
        JyDownLoginMgs="错误:你的用户等级错误,不能登陆,请与站长联系!"
      end if
    else
      JyDownLoginMgs="错误:用户名或密码错误!"
    end if
  else
    JyDownLoginMgs="错误:用户名或密码错误!"
  end if
  rs.close
  set rs=nothing
  conn.close
  set conn=nothing
  else
    JyDownLoginMgs="错误:用户名和密码都不能为空!"
  end if
end if
%>
<html>
<head>
<title>雅异网络--源码下载中心--<%=JyDownLoginTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<meta name=keywords content="站长,站长资源,闪讯,im63,im63.com,asp源码,cgi源码,php源码,jsp源码,.net源码,网站素材,网页素材,网页模板,韩国模板,欧美模板,商业模板,免费模板,常用软件,注册版,破解版,免费LOGO,娱乐,flash动画,网络编程,网络学院,站长资源,网站联盟,精品网址,图片,壁纸,桌面,书籍教程,asp编程,cgi编程,php编程,平面设计,多媒体设计,服务器架设,服务器软件,电子图书,LOGO模板,PNG源文件,PSD源文件,精品字体,字体下载,软件下载">
<LINK href="../style.css" rel=stylesheet>
</head>
<body><center>
<script language=javascript src="../head.js"></script>
  <table border="0" cellpadding="0" cellspacing="0" width="770" bgcolor="#FFFFFF">
    <tr>
      <td width="770" height="4"></td>
    </tr>
  </table>
<table border="0" cellpadding="0" cellspacing="1" width="770" bgcolor="#EEEEEE" height="26">
      <tr>
        <td width="100%" bgcolor="#F4F4F4">&nbsp;当前位置:&nbsp;<a href="../">下载首页</a>&nbsp;>>&nbsp;用户登陆&nbsp;[<a href="reg.asp">我要注册</a>]</td>
      </tr></table>&nbsp;
<table border="0" cellpadding="2" cellspacing="1" width="300" bgcolor="#E6E6E6">
  <form method="post" action="login.asp?JyDownType=login" target="_top">
  <tr>
    <td width="100%" bgcolor="#3FAEE4" height="26">&nbsp;<b><font color="#FFFFFF"><%=JyDownLoginTitle%></font></b></td>
  </tr>
<%if JyDownLoginMgs<>"" then%>
  <tr>
    <td width="100%" bgcolor="#FFFFFF">
    <font color="#FF0000">·</font><%=JyDownLoginMgs%>
    <%if SF<>"" then%><br><font color="#FF0000">·</font>身份:<font color="#008080"><%=SF%></font><%     
    if JyDownDj="2" or JyDownDj="3" then%>
    <br><font color="#FF0000">·</font><a href="index.asp">进入系统管理中心</a><%else
    %><br><font color="#FF0000">·</font><a href="../">返回首页</a><%end if%>
    <br><font color="#FF0000">·</font><%if webuseredit="1" then%><a href="edit.asp"><%end if%>修改个人资料</a>
    <br><font color="#FF0000">·</font><a href="login.asp?JyDownType=logout">退出登陆</a>
    <%else%><%if request("JyDownType")<>"logout" then%><br><font color="#FF0000">·</font><%if webreg="1" then%><a href="reg.asp"><%end if%>注册帐号</a><%end if%>     
    <br><font color="#FF0000">·</font><a href="login.asp">重新登陆</a><%end if%></td>
  </tr>
<%else%>
  <tr>
    <td width="100%" bgcolor="#FFFFFF">
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr>
        <td width="100%" align="center">用户名:<input name="user" maxlength="20" size="16"></td>
      </tr>
      <tr>
        <td width="100%" align="center">密&nbsp;&nbsp;码:<input type="password" name="pwd" maxlength="20" size="16"></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="100%" bgcolor="#F7F7F7">
    <p align="center"><input type="submit" name="Submit" value="登 陆">&nbsp;    
    <input type="button" name="Submit1" <%if webreg="1" then%>onclick="javascript:location.href='reg.asp'"<%else%>disabled<%end if%> value="注 册"></td>
  </tr>
<%end if%></form>
</table> 
 <script language=javascript src="../foot.js"></script></center>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?