⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.asp

📁 oracle9i程序事例集
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<%   
   dim connstr
   connstr="Driver={Microsoft ODBC for Oracle};server=mylink;uid=system;pwd=system;"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理员登录</title>
</head>
<%
dim address
address = left(cstr(request.servervariables("REMOTE_ADDR")),10)
if address<>"192.168.0." then 
%>
  您是外网用户,无权查看内部网站,五秒钟后自动返回,如果您的浏览器没有自动返回,请<a href="../admin/login.html">点击此处</a>。<BR>请不要重复测试,您的所作所为我们均有记录。
  <meta http-equiv="refresh" content="5;url=login.html">
<% else %>
<body>
    <%
    admin_id=lcase(trim(request("ADMIN_ID")))
    admin_pw=lcase(trim(request("ADMIN_PW")))
    if admin_id="" or admin_pw="" then
        errmsg=errmsg+"<br>"+"<li>管理员帐号和密码不能为空!"
        founderr=true
    else
        sql="select * from GSCOTT.ADMIN_TABLE where ADMIN_ID='"&admin_id&"'"
        set rs=Server.CreateObject("ADODB.recordset")
	    rs.open sql,connstr
      if rs.eof then
          errmsg=errmsg+"<br>"+"<li>您输入的管理员帐号不存在!"
          founderr=true
      else if admin_pw=rs("ADMIN_PW") then
              session("ADMIN_ID")=rs("ADMIN_ID")
			  session.Timeout=300
           else
              errmsg=errmsg+"<br>"+"<li>您输入的密码错误!"
              founderr=true
           end if
      end if 
      rs.close
      set rs=nothing
    end if
    if founderr=false then
	response.redirect "index.asp"
	else
%>
    <font><strong>错误!!!</strong></font><BR>
<%
    response.write(errmsg)
    end if
%>	
	<p><a href="javascript:history.go(-1)">重新登陆</a></p>
</body>
<% end if %>
</html>

⌨️ 快捷键说明

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