毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

基于ASP的BBS论坛论文(系统+源代码) 第8页

更新时间:2009-5-19:  来源:毕业论文
基于ASP的BBS论坛论文(系统+源代码) 第8页
源程序清单
'注册用户成功
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/connForum.asp" -->
<%
'调用数据库
Dim rsCopyright
Dim rsCopyright_numRows

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] 下一页

基于ASP的BBS论坛论文(系统+源代码) 第8页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。