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

📄 check.asp

📁 一套简单的教师办公系统,ASP+ACCESS开发
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="tcconn.asp" -->
<%
dim uid ,upwd
uid=trim(Request.Form("txt_id"))
upwd=trim(Request.Form("txt_pwd"))
uid = Replace(uid, "'", "")
upwd = Replace(upwd, "'", "")
ushf=request("shf")
if uid="" or upwd="" then
 	response.write "<script language=JavaScript>{window.alert('帐号和密码不能为空!');window.location.href='index.htm';}</script>"
    response.end
end if

set rs=server.createobject("adodb.recordset")
if ushf="admin" then
geturl="admin.asp"
flag="loginok"
sqltext="select * from admin where admin_name='" & uid & "' and admin_pwd='" & upwd & "'"
else if ushf="teacher" then
geturl="user.asp"
flag="teacher"
sqltext="select tc_id from tcinfor where tc_name='" & uid & "' and tc_pwd='" & upwd & "'"
end if
end if
rs.open sqltext,conn,1,1
if rs.recordcount >= 1 then 
  if ushf="teacher" then
uid = rs("tc_id")
end if
 response.cookies("flag") = flag
  response.cookies("adminuser") = uid
 Response.Redirect geturl
  rs.close
else
 	response.write "<script language=JavaScript>{window.alert('帐号和密码错误!');window.location.href='index.htm';}</script>"
    response.end
    rs.close
end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
</body>
</html>

⌨️ 快捷键说明

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