Set rsCopyright = Server.CreateObject("ADODB.Recordset")
rsCopyright.ActiveConnection = MM_connForum_STRING
rsCopyright.Source = "SELECT * FROM tCopyright"
rsCopyright.CursorType = 0
rsCopyright.CursorLocation = 2
rsCopyright.LockType = 1
rsCopyright.Open()
rsCopyright_numRows = 0
%>
'验证请求信息
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("fUsername"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization="fAuthority"
MM_redirectLoginSuccess="deepbbs.asp"
MM_redirectLoginFailed="login_fail.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_connForum_STRING
MM_rsUser.Source = "SELECT fUsername, fPassword"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM tUsername WHERE fUsername='" & Replace(MM_valUsername,"'","''") &"' AND fPassword='" & Replace(Request.Form("fPassword"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And true Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
'注册用户
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/connForum.asp" -->
'添加数据
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) = "form2") Then
MM_editConnection = MM_connForum_STRING
MM_editTable = "tUsername"
MM_editRedirectUrl = "register_succeed.asp"
MM_fieldsStr = "fUsername|value|fPassword|value|fIP|value"
MM_columnsStr = "fUsername|',none,''|fPassword|',none,''|fIP|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页