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

📄 loginchk.asp

📁 这是用数据库语言编写的仓库管理系统
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<% response.buffer=true %>
<html>
<head>
<title>登录检查</title>
<link rel="stylesheet" type="text/css" href="forum.css">
</head>
<body topmargin=0>
<!--#include file="opendb.inc"-->
<!--#include file="myPrg.asp"-->
<% 
showtitle("登录检查")
session("logname")=request("username")
dim user,password,selstorage
user=request("username")
password=request("password")
selstorage=request("selstorage")

sql="select * from user where username='"&user&"' and password='"&password&"'"
rs.open sql,conn,3,2

if not rs.eof then

rs("isonline")=True
rs("login_time")=now()
rs("ip")=Request.ServerVariables("REMOTE_HOST")
rs.update

 if (rs("in_storage")>0 and rs("in_storage")-selstorage=0) or rs("in_storage")=0 then
   session("userlogin")="true"
   session("storage")=selstorage
   session("username")=user
   response.cookies("adminok")=true
  if rs("viewother") then
    response.cookies("guestok")=true
  else
    response.cookies("guestok")=""
  end if
  if rs("in_storage")=0 then
    response.cookies("guestok")=true
  end if
    response.redirect "manage.asp"
 else
   if rs("viewother")=True then
     response.cookies("guestok")="true"
    %><center><font color=red>你无权操作该仓库,不过你可以</font><p>[ <a href=all.asp>查看库存</a> | <a href='' onclick=history.go(-1)>重新登录</a> ]<%

   else
     ShowError("您无权操作该仓库") 
   end if
 end if
else
  session("storage")=0
  ShowError("用户名或密码错误!")
end if
rs.close
%>
<!--#include file="copyright.asp"-->
</body>
</html>

⌨️ 快捷键说明

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