📄 login.asp
字号:
<%
LHB_GongHao=request("LHB_GongHao") '接受管理员用户名
LHB_MiMa=request("LHB_MiMa") '接受管理员密码
keys=request("keys")
%>
<!--#include file="config.asp"-->
<%
if LHB_GongHao<>"" and LHB_MiMa<>"" then
set Lours=Louconn.execute("select * from LHB_USER_DATA where LHB_GongHao='"& LHB_GongHao & "'") '判断是否存在该用户
if not (Lours.bof and Lours.eof) then
if Lours("LHB_DengLuQX")=0 then '判断是否有该权限
if Lours("LHB_MiMa")=LHB_MiMa then
session("LHB_MiMa")=Lours("LHB_MiMa")
session("LHB_GongHao")=Lours("LHB_GongHao") '为真则将该用户的该权限放入SESSION中
session("LHB_XingMing")=Lours("LHB_XingMing")
session("LHB_Group")=Lours("LHB_Group")
session("LHB_KeShiBM")=Lours("LHB_KeShiBM")
function GetIp()
'如果客户端用了代理服务器,则应该用ServerVariables("HTTP_X_FORWARDED_FOR")方法
dim clientIp : clientIp = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if clientIp = "" then
'如果客户端没用代理,应该用Request.ServerVariables("REMOTE_ADDR")方法
clientIp = Request.ServerVariables("REMOTE_ADDR")
end if
GetIp = clientIp
end function
dim L_log_ip : L_log_ip = GetIp()
dim L_log_GH : L_log_GH = Lours("LHB_GongHao")
dim L_log_date : L_log_date = now()
set savelog=Louconn.execute("insert into LHB_Log_data(L_log_GH,L_log_date,L_log_ip) values('"&L_log_GH&"','"&L_log_date&"','"&L_log_ip&"')")
set savelog=nothing
Response.Redirect "index.asp" '跳转到管理员管理页面
else
cwxx=1
end if
else
cwxx=2
end if
end if
end if
%>
<!--#include file="LHB_head.asp"-->
<br><br><br><br>
<table width="768" border="0" cellspacing="0" align="center">
<tr>
<td align="center"><img src="pic/sxyy_logo1.gif" alt="苏溪中心卫生院" width="111" height="111" /></td>
<td width="673"></td>
</tr>
</table>
<br><br>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0" class="table4">
<tr>
<td height="30" align="center" class=td2><!--#include file="LHB_Logo_Center.asp"--></td>
</tr>
</table><br><br>
<center>
<table width="300" border="0"><form action="login.asp" method="post" name="form2" id="form2">
<tr align="center"> </tr>
<tr>
<td colspan="2">
<%
if cwxx=1 then
Response.Write "<p class=p2>老大,想黑我,密码错了!</p>"
elseif cwxx=2 then
Response.Write "<p class=p2>对不起,您没有登录的权限,请联系楼宏标!</p>"
end if
%>
</td>
</tr>
<tr>
<td width="197" align="right">工 号:</td>
<td width="205"><input name="keys" type="hidden" value="submit">
<input name="LHB_GongHao" type="text" class="button1" size="20" maxlength="20" onfocus="this.select()" onmouseover="this.focus();"></td>
</tr>
<tr>
<td align="right">密 码:</td>
<td><input name="LHB_MiMa" type="password" class="button1" size="21" maxlength="20" onfocus="this.select()" onmouseover="this.focus();"></td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" name="Reg2" value="登录" class="button1">
<input type="reset" name="Submit32" value="重填" class="button1">
</td>
</tr></form>
</table>
</center>
<br>
<!--#include file="LHB_copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -