📄 member_profile.asp
字号:
<% @ Language=VBScript %>
<% Option Explicit %>
<!--#include file="common.asp" -->
<!--#include file="functions/functions_date_time_format.asp" -->
<!--#include file="functions/functions_format_post.asp" -->
<!--#include file="language_files/pm_language_file_inc.asp" -->
<%
'****************************************************************************************
'** Copyright Notice
'**
'** Web Wiz Forums(TM)
'** http://www.webwizforums.com
'**
'** Copyright (C)2001-2008 Web Wiz(TM). All Rights Reserved.
'**
'** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'WEB WIZ'.
'**
'** IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN 'WEB WIZ' IS UNWILLING TO LICENSE
'** THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE
'** AND DERIVATIVE WORKS IMMEDIATELY.
'**
'** If you have not received a copy of the license with this work then a copy of the latest
'** license contract can be found at:-
'**
'** http://www.webwizguide.com/license
'**
'** For more information about this software and for licensing information please contact
'** 'Web Wiz' at the address and website below:-
'**
'** Web Wiz, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, BH15 4JD, England
'** http://www.webwizguide.com
'**
'** Removal or modification of this copyright notice will violate the license contract.
'**
'****************************************************************************************
'*************************** SOFTWARE AND CODE MODIFICATIONS ****************************
'**
'** MODIFICATION OF THE FREE EDITIONS OF THIS SOFTWARE IS A VIOLATION OF THE LICENSE
'** AGREEMENT AND IS STRICTLY PROHIBITED
'**
'** If you wish to modify any part of this software a license must be purchased
'**
'****************************************************************************************
'Set the response buffer to true as we maybe redirecting
Response.Buffer = True
Dim lngProfileNum 'Holds the profile number of the user we are getting the profile for
Dim strUsername 'Holds the users username
Dim intUsersGroupID 'Holds the users group ID
Dim strEmail 'Holds the new users e-mail address
Dim blnShowEmail 'Boolean set to true if the user wishes there e-mail address to be shown
Dim strLocation 'Holds the new users location
Dim strHomepage 'Holds the new users homepage if they have one
Dim strAvatar 'Holds the avatar image
Dim strICQNum 'Holds the users ICQ Number
Dim strAIMAddress 'Holds the users AIM address
Dim strMSNAddress 'Holds the users MSN address
Dim strYahooAddress 'Holds the users Yahoo Address
Dim strOccupation 'Holds the users Occupation
Dim strInterests 'Holds the users Interests
Dim dtmJoined 'Holds the joined date
Dim lngNumOfPosts 'Holds the number of posts the user has made
Dim dtmDateOfBirth 'Holds the users Date Of Birth
Dim dtmLastVisit 'Holds the date the user last came to the forum
Dim strGroupName 'Holds the group name
Dim intRankStars 'Holds the rank stars
Dim strRankCustomStars 'Holds the custom stars image if there is one
Dim blnProfileReturned 'Boolean set to false if the user's profile is not found in the database
Dim blnGuestUser 'Set to True if the user is a guest or not logged in
Dim blnActive 'Set to true of the users account is active
Dim strRealName 'Holds the persons real name
Dim strMemberTitle 'Holds the members title
Dim blnIsUserOnline 'Set to true if the user is online
Dim strPassword 'Holds the password
Dim strSignature 'Holds the signature
Dim strSkypeName 'Holds the users Skype Name
Dim intArrayPass 'Holds the array loop
Dim intAge 'Holds the age of the user
Dim strAdminNotes 'Holds the admin notes on the user
Dim blnAccSuspended 'Holds if the user account is suspended
Dim strOnlineLocation 'Holds the users location in the forum
Dim strOnlineURL 'Holds the users online location URL
Dim blnNewsletter 'set to true if user is signed up to newsletter
Dim strGender 'Holds the users gender
'Initalise variables
blnProfileReturned = True
blnGuestUser = False
blnShowEmail = False
blnModerator = False
blnIsUserOnline = False
lngNumOfPosts = 0
'If the user is using a banned IP address then don't let the view a profile
If bannedIP() Then blnActiveMember = False
'Read in the profile number to get the details on
lngProfileNum = CLng(Request.QueryString("PF"))
'If the user has logged in then the Logged In User ID number will be more than 0
If intGroupID <> 2 Then
'First see if the user is a in a moderator group for any forum
'Initalise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT " & strDbTable & "Permissions.Moderate " & _
"FROM " & strDbTable & "Permissions " & _
"WHERE (" & strDbTable & "Permissions.Group_ID = " & intGroupID & " OR " & strDbTable & "Permissions.Author_ID = " & lngLoggedInUserID & ") AND " & strDbTable & "Permissions.Moderate=" & strDBTrue & ";"
'Query the database
rsCommon.Open strSQL, adoCon
'If a record is returned then the user is a moderator in one of the forums
If NOT rsCommon.EOF Then blnModerator = True
'Clean up
rsCommon.Close
'Read the various forums from the database
'Initalise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT " & strDbTable & "Author.*, " & strDbTable & "Group.Name, " & strDbTable & "Group.Stars, " & strDbTable & "Group.Custom_stars "
strSQL = strSQL & "FROM " & strDbTable & "Author, " & strDbTable & "Group "
strSQL = strSQL & "WHERE " & strDbTable & "Author.Group_ID = " & strDbTable & "Group.Group_ID AND " & strDbTable & "Author.Author_ID = " & lngProfileNum
'Query the database
rsCommon.Open strSQL, adoCon
'Read in the details if a profile is returned
If NOT rsCommon.EOF Then
'Read in the new user's profile from the recordset
strUsername = rsCommon("Username")
strRealName = rsCommon("Real_name")
intUsersGroupID = CInt(rsCommon("Group_ID"))
strEmail = rsCommon("Author_email")
strGender = rsCommon("Gender")
blnShowEmail = CBool(rsCommon("Show_email"))
strHomepage = rsCommon("Homepage")
strLocation = rsCommon("Location")
strAvatar = rsCommon("Avatar")
strMemberTitle = rsCommon("Avatar_title")
strICQNum = rsCommon("ICQ")
strAIMAddress = rsCommon("AIM")
strMSNAddress = rsCommon("MSN")
strYahooAddress = rsCommon("Yahoo")
strOccupation = rsCommon("Occupation")
strInterests = rsCommon("Interests")
If isDate(rsCommon("DOB")) Then dtmDateOfBirth = CDate(rsCommon("DOB"))
dtmJoined = CDate(rsCommon("Join_date"))
lngNumOfPosts = CLng(rsCommon("No_of_posts"))
dtmLastVisit = rsCommon("Last_visit")
strGroupName = rsCommon("Name")
intRankStars = CInt(rsCommon("Stars"))
strRankCustomStars = rsCommon("Custom_stars")
blnActive = CBool(rsCommon("Active"))
strSignature = rsCommon("Signature")
strSkypeName = rsCommon("Skype")
strAdminNotes = rsCommon("Info")
blnAccSuspended = CBool(rsCommon("Banned"))
If isNull(rsCommon("Newsletter")) = False Then blnNewsletter = CBool(rsCommon("Newsletter")) Else blnNewsletter = False
'Else no profile is returned so set an error variable
Else
blnProfileReturned = False
End If
'Reset Server Objects
rsCommon.Close
'Clean up email link
If strEmail <> "" Then
strEmail = formatInput(strEmail)
End If
If blnActiveUsers Then
'Call active users function
saryActiveUsers = activeUsers(strTxtViewing & " " & strTxtProfile, "‘" & strUsername & "’ " & strTxtProfile, "member_profile.asp?PF=" & lngProfileNum, 0)
'Get the users online status
For intArrayPass = 1 To UBound(saryActiveUsers, 2)
If saryActiveUsers(1, intArrayPass) = lngProfileNum Then
blnIsUserOnline = True
strOnlineLocation = saryActiveUsers(6, intArrayPass)
strOnlineURL = saryActiveUsers(7, intArrayPass)
End If
Next
End If
'Else the user is not logged in
Else
'Set the Guest User boolean to true as the user must be a guest
blnGuestUser = True
'If active users is enabled update the active users application array
If blnActiveUsers Then
'Call active users function
saryActiveUsers = activeUsers(strTxtViewing & " " & strTxtProfile & " [" & strTxtAccessDenied & "]", "", "", 0)
End If
End If
'If no avatar then use generic
If strAvatar = "" OR blnAvatar = false Then strAvatar = "avatars/blank_avatar.jpg"
'Set bread crumb trail
strBreadCrumbTrail = strBreadCrumbTrail & strNavSpacer & strTxtProfile
%>
<!-- #include file="includes/browser_page_encoding_inc.asp" -->
<title><% = strTxtProfile %></title>
<meta name="generator" content="Web Wiz Forums" />
<meta name="robots" content="noindex, follow">
<%
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
Response.Write("<!--//" & _
vbCrLf & "/* *******************************************************" & _
vbCrLf & "Software: Web Wiz Forums(TM) ver. " & strVersion & "" & _
vbCrLf & "Info: http://www.webwizforums.com" & _
vbCrLf & "Copyright: (C)2001-2008 Web Wiz(TM). All rights reserved" & _
vbCrLf & "******************************************************* */" & _
vbCrLf & "//-->")
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
%>
<link href="<% = strCSSfile %>default_style.css" rel="stylesheet" type="text/css" />
<!-- #include file="includes/header.asp" -->
<!-- #include file="includes/status_bar_header_inc.asp" -->
<table class="basicTable" cellspacing="0" cellpadding="3" align="center">
<tr>
<td align="left"><h1><% = strTxtProfile %></h1></td>
</tr>
</table>
<br /><%
'If there is a problem then display error message
If blnProfileReturned = False OR blnGuestUser OR blnActiveMember = False OR blnBanned Then
%><table class="errorTable" cellspacing="1" cellpadding="3" align="center">
<tr>
<td><img src="<% = strImagePath %>error.png" alt="<% = strTxtError %>" /> <strong><% = strTxtError %></strong><%
'If no profile can be found then display the appropriate message
If blnProfileReturned = False Then
Response.Write ("<br /><br />" & strTxtNoUserProfileFound)
'If the user is a guest then tell them they must register or login before they can view other users profiles
ElseIf blnGuestUser OR blnActiveMember = False OR blnBanned Then
Response.Write ("<br /><br />" & strTxtRegisteredToViewProfile)
'If mem suspended display message
If blnBanned Then
Response.Write("<br /><br />" & strTxtForumMemberSuspended)
'Else account not yet active
ElseIf blnActiveMember = false Then
Response.Write("<br /><br />" & strTxtForumMembershipNotAct)
If blnMemberApprove = False Then Response.Write("<br /><br />" & strTxtToActivateYourForumMem)
'If admin activation is enabled let the user know
If blnMemberApprove Then
Response.Write("<br /><br />" & strTxtYouAdminNeedsToActivateYourMembership)
'If email is on then place a re-send activation email link
ElseIf blnEmailActivation AND blnLoggedInUserEmail Then
Response.Write("<br /><br /><a href=""javascript:winOpener('resend_email_activation.asp" & strQsSID1 & "','actMail',1,1,475,300)"">" & strTxtResendActivationEmail & "</a>")
End If
End If
End If
Response.Write("<br /><br /><a href=""javascript:history.back(1)"">" & strTxtReturnToDiscussionForum & "</a>")
%>
</td>
</tr>
</table><%
End If
'If guest user let the user login
If blnGuestUser Then
%><!--#include file="includes/login_form_inc.asp" --><%
Else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -