?? login.asp
字號(hào):
<!--#include file="conn.asp"-->
<!--#include file="functions.asp" -->
<META http-equiv=Content-Language content=zh-cn>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="images/style.css" type=text/css rel=stylesheet>
<%
randomize
yzm=int(8999*rnd()+1000)
%>
<script language="JavaScript">
function checkform(){
if (document.loginbox.userid.value.length ==0){
alert("出錯(cuò)了,您沒有填寫學(xué)號(hào)。");
document.loginbox.userid.focus();
return false;
}
if (document.loginbox.password.value.length==0){
alert("出錯(cuò)了,您沒有填寫密碼。");
document.loginbox.password.focus();
return false;
}
<% response.write "if (document.loginbox.yzm.value.length==0){ " %>
alert("出錯(cuò)了,您沒有填寫驗(yàn)證碼。");
document.loginbox.yzm.focus();
return false;
}
<% response.write "if (document.loginbox.yzm.value!="&yzm&"){" %>
alert("出錯(cuò)了,您填寫的驗(yàn)證碼不正確。");
document.loginbox.yzm.focus();
return false;
}
return true;
}
</script>
<%
'根據(jù)cookies判斷用戶是否已經(jīng)登陸
if request.cookies("userid")="" then
%>
<table border=0>
<form method="post" name="loginbox" action="checklogin.asp" onsubmit="return checkform();">
<tr><td height="20" colspan=2> 學(xué) 號(hào): <input alt="請(qǐng)?zhí)顚懸顷懙膶W(xué)號(hào)" style="BORDER-RIGHT: #ece2d2 1px solid; BORDER-TOP: #ece2d2 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ece2d2 1px solid; COLOR: #666666; BORDER-BOTTOM: #ece2d2 1px solid; FONT-FAMILY: verdana" maxlength=16 size=13 name="userid"></td>
</tr>
<tr><td height="20" colspan=2> 密 碼: <input alt="請(qǐng)?zhí)顚懻_的密碼" style="BORDER-RIGHT: #ece2d2 1px solid; BORDER-TOP: #ece2d2 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ece2d2 1px solid; COLOR: #666666; BORDER-BOTTOM: #ece2d2 1px solid; FONT-FAMILY: verdana" type=password maxlength=16 size=13 name="password">
<input type="hidden" name="login" value="ok">
</td></tr>
<tr><td height="20" colspan=2> 驗(yàn)證碼: <input alt="請(qǐng)根據(jù)右邊的圖片填寫驗(yàn)證碼" style="BORDER-RIGHT: #ece2d2 1px solid; BORDER-TOP: #ece2d2 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ece2d2 1px solid; COLOR: #666666; BORDER-BOTTOM: #ece2d2 1px solid; FONT-FAMILY: verdana" maxlength=4 size=4 name="yzm">
<%
a=int(yzm/1000)
b=int((yzm-a*1000)/100)
c=int((yzm-a*1000-b*100)/10)
d=int(yzm-a*1000-b*100-c*10)
response.write "<img align=top height=15 border=0 src=images/yzm/"&a&".gif><img align=top height=15 border=0 src=images/yzm/"&b&".gif><img align=top height=15 border=0 src=images/yzm/"&c&".gif><img align=top height=15 border=0 src=images/yzm/"&d&".gif>"
%></td>
</tr>
<tr><td height="20" colspan=2> 有效期: <select size="1" name="cook" alt="選擇登陸有效期">
<option selected value="0">不保存</option>
<option value="1">保存一天</option>
<option value="30">保存一月</option>
<option value="365">保存一年</option>
</select></td></tr>
<tr><td height="20" align="center" ><input alt="登陸" type=image src="images/login/denglu.gif" border=0 name="images"></td>
<td height="20" align="center" ><a class=c href="reg.asp"><img alt="注冊(cè)為本站學(xué)生" src="images/login/reg.gif" border=0></a></td>
</tr>
</form>
</table>
<%
else
call checklogin()
set rs=conn.execute("select * from [user] where UserId='"&request.cookies("userid")&"'")
session("usertype")=rs("usertype")
usertype=rs("usertype")
if usertype="2" then
usertype="管理員"
elseif usertype="3" then
usertype="班長"
elseif usertype="4" then
usertype="副班長"
elseif usertype="5" then
usertype="團(tuán)支書"
elseif usertype="6" then
usertype="委員級(jí)別"
else
usertype="普通學(xué)生"
end if
IP=Request.serverVariables("REMOTE_ADDR")
response.write"<table border=0 width='100%'>"
response.write "<tr><td>歡迎 <font color=red> "&rs("UserName")&"</font> 同學(xué)進(jìn)入學(xué)生信息中心!您是第 <font color=red>"&rs("totallogin")&"</font> 次登陸本站。</td></tr>"
response.write "<tr><td>您本次登陸IP為 <font color=red>"&IP&"</font></td></tr>"
response.write "<tr><td>您的職位為 <a href=admin_user.asp><font color=red>"&usertype&"</font></a></td></tr>"
response.write "</td></tr></table>"
'conn.close
'set conn=nothing
set rs=nothing
%>
<%end if%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -