?? user_login.asp
字號(hào):
<%
'===================================================================
'= ASP FILENAME : /user/user_login.asp
'= CREATED TIME : 2006-5-4
'= LAST MODIFIED: 2006-5-4
'= VERSION INFO : CCASP Framework Ver 2.0.1 ALL RIGHTS RESERVED BY www.cclinux.com
'= DESCRIPTION : 用戶登陸
'= Change Log:
'===================================================================
%>
<!-- #include file = "../inc/customer/include_customer_action_execute.asp" -->
<!-- #include file = "./user_inc.asp" -->
<!-- #include file = "../inc/inc_md5.asp" -->
<%
'========================================================
'== Action參數(shù)設(shè)置
'========================================================
'== 頁(yè)面名
Const CONST_PAGE_FILE = "user/user_login.asp"
'== 頁(yè)面標(biāo)題/功能
Const CONST_PAGE_TITLE = "用戶登陸"
'== 功能函數(shù)名字空間
Const CONST_ACTION_FUNC = "UserLoginCtl"
'== 相對(duì)根目錄路徑
GBL_strHomeURL = "../"
'== 頁(yè)面構(gòu)造
Call ActionBuild()
'== 請(qǐng)求校驗(yàn)與過(guò)濾
Call ActionFilter(CONST_PAGE_FILE,CONST_ACTION_FUNC)
'== 頁(yè)面析構(gòu)
Call ActionOver()
%>
<%
'===================================================================
'= Function : UserLoginCtl()
'= Time : Created At 2006-5-4
'= Input :
'= Description : 用戶登陸
'===================================================================
Function UserLoginCtl()
Dim strUserPwd,strUserName,strUserPassword
Dim strAddInfo
Dim intErrId
Dim intCookie
intErrId = 0
strUserName = Trim(Request("iptUserName"))
strAddInfo = "該用戶帳號(hào)"
intErrId = DataCheck("DT_FIX_LENGTH",strUserName,strAddInfo,"2|DTC_LESS_MORE_LEN|10|")
Call ResultExecute(intErrId,strAddInfo,"ES_ERR")
strUserPassword = Trim(Request("iptPassword"))
strAddInfo = "該用戶密碼"
intErrId = DataCheck("DT_FIX_LENGTH",strUserPassword,strAddInfo,"6|DTC_LESS_MORE_LEN|20|")
Call ResultExecute(intErrId,strAddInfo,"ES_ERR")
intCookie = Trim(Request.Form("iptCookie"))
If IsNumeric(intCookie) Then
intCookie = Cint(intCookie)
Select Case intCookie
Case 0 : intCookie = 0
Case 1 : intCookie = 1
Case 7 : intCookie = 7
Case 31: intCookie = 31
Case 365: intCookie = 365
Case Else : intCookie = 365
End Select
Else
intCookie = 0
End If
'== Encrypt user's pwd
strUserPassword = Md5(strUserPassword)
'== check username and pwd
If CheckPass(strUserName,strUserPassword,0) Then
'== set user login cookie
If intCookie > 0 Then
Response.Cookies(GBL_strCookieURL).Expires = Date + intCookie
Response.Cookies(GBL_strCookieURL)("user") = strUserName
Response.Cookies(GBL_strCookieURL)("pass") = strUserPassword
End If
End If
'== Successfully login and redirect homepage
Call ActionOver()
Response.Redirect GBL_strHomeURL & "user/user_info_show.asp?action=ShowUserAllInfo"
End Function
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -