⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_register.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!-- #include file="includes/admin_header_inc.asp" -->
<div align="center"><h1><% If strMode = "edit" Then Response.Write("Update Member") Else Response.Write("Register New User") %></h1><br />
  <span class="text"><a href="admin_menu.asp<% = strQsSID1 %>">Control Panel Menu</a><br />
  <br /><%
  
'If member API enabled then display a message to the user
If blnMemberAPI AND strMode = "new" Then 
	Response.Write("  This option is not available if the Member API is enabled.<br /><br />After logging in through your own login system, members will be added to the forum using the Member API when they enter the forum.")
Else
	Response.Write("  From here you can register a new member or update current members on the forum.")
End If
%>
<br /><br /></span>
</div><%
  
'If member API enabled do not show the form
If blnMemberAPI = False OR strMode = "edit" Then 

%>
<form method="post" name="frmRegister" action="admin_register.asp<% = strQsSID1 %>" onReset="return confirm('Are you sure you want to reset the form?');">
<table width="98%" height="14" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
  <tr class="tableLedger">
    <td colspan="2">Registration Details</td>
  </tr>
  <tr >
    <td width="50%" class="tableRow">Username*<br />
      <span class="smText">This is the name displayed when you use the forum</span></td>
    <td width="50%" class="tableRow"><input name="name1" type="text" size="15" maxlength="20" value="<% = strUsername %>"<% If strMode ="edit" AND (blnMemberAPI OR blnDemoMode) Then Response.Write(" disabled=""disabled""") %> /></td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Password*</td>
    <td width="50%" valign="top" class="tableRow"><input name="password1" type="password" size="15" maxlength="15" autocomplete="off"<% If strMode = "edit" AND blnDemoMode Then Response.Write(" disabled=""disabled""") %> /></td>
  </tr>
  <tr >
    <td width="50%"  height="2" class="tableRow">Retype Password*</td>
    <td width="50%" height="2" valign="top" class="tableRow"><input name="password2" type="password" size="15" maxlength="15" autocomplete="off"<% If strMode = "edit" AND blnDemoMode Then Response.Write(" disabled=""disabled""") %> /></td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Email Address <br />
      <span class="smText">Not required, but useful if you wish to be notified when someone answers one of your posts or if you lose your password.</span><br />    </td>
    <td width="50%" valign="top" class="tableRow"><input type="text" name="email" size="30" maxlength="60" value="<% = strEmail %>" />
    &nbsp;</td>
  </tr><%
   
	'If Newsletter is enabled
	If blnWebWizNewsPad Then
        		%>
   <tr class="tableRow">
    <td width="50%"><% = strTxtNewsletterSubscription %><br /><span class="smText"><% = strTxtSignupToRecieveNewsletters & " " & strWebsiteName %></span></td>
    <td width="50%" valign="top"><% = strTxtYes %><input type="radio" name="newsletter" id="newsletter" value="True" <% If blnNewsletter = True Then Response.Write "checked" %> />&nbsp;&nbsp;<% = strTxtNo %><input type="radio" name="newsletter" id="newsletter" value="False" <% If blnNewsletter = False Then Response.Write "checked" %> /></td>
   </tr><%
   
	End If
%>
  <tr class="tableLedger">
    <td colspan="2">Profile Information (not required)</td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Real Name</td>
    <td width="50%" class="tableRow"><input name="realName" type="text" value="<% = strRealName %>" size="30" maxlength="27" /></td>
  </tr>
  <tr class="tableRow">
    <td width="50%">Gender</td>
    <td width="50%">
     <select name="gender" id="gender" tabindex="11">
      <option value=""<% If strGender = "" Or strGender = null Then Response.Write(" selected") %>>Private</option>
      <option value="<% = strTxtMale %>"<% If strGender = strTxtMale Then Response.Write(" selected") %>><% = strTxtMale %></option>
      <option value="<% = strTxtFemale %>"<% If strGender = strTxtFemale Then Response.Write(" selected") %>><% = strTxtFemale %></option>
     </select>
    </td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Homepage</td>
    <td width="50%" class="tableRow"><input name="homepage" type="text" value="<% If strHomepage = "" Then Response.Write "http://" Else Response.Write(strHomepage) %>" size="30" maxlength="48" /></td>
  </tr>
  <tr>
    <td height="2" valign="top" class="tableRow">Select Avatar <br />
      <span class="smText">This is the small icon shown next to your posts. Type the path to your own avatar in to the text box provided (must be 64 x 64  pixels).</span></td>
    <td height="2" valign="top" class="tableRow" ><table width="290" border="0" cellspacing="0" cellpadding="1">
        <tr>
          <td width="168">&nbsp;</td>
          <td width="122" align="center"><img src="<% = strImagePath %>blank.gif" name="avatar" width="64" height="64" id="avatar" />
            <input type="hidden" name="oldAvatar" value="<% = strAvatar %>" /></td>
        </tr>
        <tr>
          <td width="168"><input type="text" name="txtAvatar" id="txtAvatar" size="30" maxlength="95" value="<%

		'If the avatar is the persons own then display the link
		If InStr(1, strAvatar, "http://") > 0 Then
			Response.Write(strAvatar)
		Else
			Response.Write("http://")
		End If
        %>" onchange="oldAvatar.value=''" />
          </td>
          <td width="122"><input type="button" name="preview" value="Preview" onclick="avatar.src = txtAvatar.value" />
          </td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="2" valign="top" class="tableRow">Signature<br />
      <span class="smText">Enter a signature that you would like shown at the bottom of your Forum Posts&nbsp;(max 200 characters)</span><br />
      <br />
      <br />
    <a href="javascript:winOpener('BBcodes.asp<% = strQsSID1 %>','codes',1,1,610,500)" class="smLink">Forum Codes</a> can be used in your signature</td>
    <td height="2" valign="top" class="tableRow"><textarea name="signature" cols="30" rows="3" onkeydown="DescriptionCharCount();" onkeyup="DescriptionCharCount();"><% = strSignature %></textarea>
      <br />
      <input size="3" value="0" name="countcharacters" maxlength="3" />
      <input onclick="DescriptionCharCount();" type="button" value="Character Count" name="Count" />
    &nbsp;&nbsp;<span class="smText"><a href="javascript:OpenPreviewWindow('signature_preview.asp<% = strQsSID1 %>', document.frmRegister)" class="smLink">Signature Preview</a> </td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Always attach my signature to posts</td>
    <td width="50%" valign="top" class="tableRow"><input type="radio" name="attachSig" value="true" <% If blnAttachSignature = True Then Response.Write "checked" %> />&nbsp;&nbsp;No<input type="radio" name="attachSig" value="false" <% If blnAttachSignature = False Then Response.Write "checked" %> /></td>
  </tr>
  <tr class="tableLedger">
    <td colspan="2">Forum Preferences</td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Show my Email Address <br />
    Hide your email address if you want it kept private from other users.</td>
    <td width="50%" valign="top" class="tableRow">Yes<input type="radio" name="emailShow" id="emailShow" value="True" <% If blnShowEmail = True Then Response.Write "checked" %> />&nbsp;&nbsp;No<input type="radio" name="emailShow" id="emailShow" value="False" <% If blnShowEmail = False Then Response.Write "checked" %> /></td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Notify me of replies to posts <br />
      <span class="smText">Sends an email when someone replies to a topic you have posted in. This can be changed whenever you post.</span></td>
    <td width="50%" valign="top" class="tableRow">Yes<input type="radio" name="replyNotify" id="replyNotify" value="True" <% If blnReplyNotify = True Then Response.Write "checked" %> />&nbsp;&nbsp;No<input type="radio" name="replyNotify" id="replyNotify" value="False" <% If blnReplyNotify = False Then Response.Write "checked" %> /></td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Notify me by email when I receive a Private Message</td>
    <td width="50%" valign="top" class="tableRow">Yes<input type="radio" name="pmNotify" id="pmNotify" value="True" <% If blnPMNotify = True Then Response.Write "checked" %> />&nbsp;&nbsp;No<input type="radio" name="pmNotify" id="pmNotify" value="False" <% If blnPMNotify = False Then Response.Write "checked" %> /></td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Enable the WYSIWYG post editor <br />
      <span class="smText">Only browsers that are detected as being Rich Text Enabled will have this feature available when posting.</span></td>
    <td width="50%" valign="top" class="tableRow">Yes<input type="radio" name="ieEditor" id="ieEditor" value="True" <% If blnWYSIWYGEditor = True Then Response.Write "checked" %> />&nbsp;&nbsp;No<input type="radio" name="ieEditor" id="ieEditor" value="False" <% If blnWYSIWYGEditor = False Then Response.Write "checked" %> /></td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Automatically log me in when I return to the Forum</td>
    <td width="50%" valign="top" class="tableRow">Yes<input type="radio" name="Login" id="Login" value="True" <% If blnAutoLogin = True Then Response.Write "checked" %> />&nbsp;&nbsp;No<input type="radio" name="Login" id="Login" value="False" <% If blnAutoLogin = False Then Response.Write "checked" %> /></td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Time offset from forum time <br />
      <span class="smText">Present server date and time is:<%

	'Get the current server time
	dtmServerTime = Now()

	'Make sure that the time and date format function isn't effected by the server time off set
	If strTimeOffSet = "-" Then
		dtmServerTime = DateAdd("h", + intTimeOffSet, dtmServerTime)
	ElseIf strTimeOffSet = "+" Then
		dtmServerTime = DateAdd("h", - intTimeOffSet, dtmServerTime)
	End If

	'Display the current server time
	Response.Write(stdDateFormat(dtmServerTime, True) & " " & strTxtAt & " " & TimeFormat(dtmServerTime))

%></span></td>
    <td valign="top">
     <select name="serverOffSet" id="serverOffSet">
      <option value="+" <% If strTimeOffSet = "+" Then Response.Write("selected") %>>+</option>
      <option value="-" <% If strTimeOffSet = "-" Then Response.Write("selected") %>>-</option>
     </select>
    <select name="serverOffSetHours"><%

	'Create list of time off-set
	For lngLoopCounter = 0 to 24
		Response.Write(VbCrLf & "      <option value=""" & lngLoopCounter & """")
		If intTimeOffSet = lngLoopCounter Then Response.Write("selected")
		Response.Write(">" & lngLoopCounter & "</option>")
	Next

%>
     </select>
    hours</td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Date Format</td>
    <td width="50%" valign="top" class="tableRow">
     <select name="dateFormat">
      <option value="dd/mm/yy" <% If saryDateTimeData(0,0) = "dd/mm/yy" Then Response.Write("selected") %>>Day/Month/Year</option>
      <option value="mm/dd/yy" <% If saryDateTimeData(0,0) = "mm/dd/yy" Then Response.Write("selected") %>>Month/Day/Year</option>
      <option value="yy/mm/dd" <% If saryDateTimeData(0,0) = "yy/mm/dd" Then Response.Write("selected") %>>Year/Month/Day</option>
      <option value="yy/dd/mm" <% If saryDateTimeData(0,0) = "yy/dd/mm" Then Response.Write("selected") %>>Year/Day/Month</option>
     </select>
    </td>
  </tr>
  <tr class="tableLedger">
    <td colspan="2">Admin and Moderator Functions</td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">User is active</td>
    <td width="50%" valign="top" class="tableRow">Yes<input type="radio" name="active" id="active" value="True" <% If blnUserActive = True Then Response.Write "checked" %>>&nbsp;&nbsp;No<input type="radio" name="active" id="active" value="False" <% If blnUserActive = False Then Response.Write "checked" %> /></td>
  </tr>
  <tr class="tableRow">
    <td width="50%">Suspend User</td>
    <td width="50%">Yes<input type="radio" name="banned" id="banned" value="True" <% If blnSuspended = True Then Response.Write "checked" %>>&nbsp;&nbsp;No<input type="radio" name="banned" id="banned" value="False" <% If blnSuspended = False Then Response.Write "checked" %> /></td>
   </tr>
  <%
     			'Get the forum groups from the database so admin can change the members group
	
	                'Initlise SQL query
	                strSQL = "SELECT " & strDbTable & "Group.* FROM " & strDbTable & "Group;"
	
	                'Query the database
	                rsCommon.Open strSQL, adoCon
	
	                'If there are groups then disply them
	                If NOT rsCommon.Eof Then
		

     %>
  <tr>
    <td width="50%" class="tableRow">Group</td>
    <td width="50%" valign="top" class="tableRow"><select name="group">
        <%

	                        'Loop round to display all the groups
	                        Do While NOT rsCommon.EOF
	
	                                Dim intSelGroupID
	                                Dim strSelGroupName
	                                Dim blnSelSpecialGroup
	                                Dim lngSelMinimumRankPosts
	                                Dim blnStartGroup
	
	                                'Read in the recordset
	                                intSelGroupID = CInt(rsCommon("Group_ID"))
	                                strSelGroupName = rsCommon("Name")
	                                blnSelSpecialGroup = CBool(rsCommon("Special_rank"))
	                                lngSelMinimumRankPosts = CLng(rsCommon("Minimum_posts"))
	                                blnStartGroup = CBool(rsCommon("Starting_group"))
	
	                                'Display the selection
	                                Response.Write("<option value=""" & intSelGroupID & """")
	                                
	                                'If this is the group the member is part of then have it slected
	                                If intUsersGroupID = intSelGroupID Then 
	                                	Response.Write(" selected")
	                                'If this is starting group then select it
	                                ElseIf blnStartGroup AND strMode = "new" Then 
	                                	Response.Write(" selected")
	                                End If
	
	                                'Display the end of the select option
	                                If blnSelSpecialGroup Then
	                                        Response.Write(">" & strSelGroupName & " - Non Rank Group</option>" & vbCrLf)
	                                Else
	                                        Response.Write(">" & strSelGroupName & " - Ladder Group - Min. Posts " & lngSelMinimumRankPosts & "</option>" & vbCrLf)
	                                End If
	
	                                'Move to the next record
	                                rsCommon.MoveNext
	
	                        Loop
%>
      </select>
    </td>
  </tr>
  <%
		End If
		
%>
  <tr>
    <td width="50%" class="tableRow">Member Title</td>
    <td width="50%" valign="top" class="tableRow"><input name="memTitle" type="text" value="<% = strMemberTitle %>" size="30" maxlength="40" /></td>
  </tr>
  <tr>
    <td width="50%" class="tableRow">Number of posts</td>
    <td width="50%" valign="top" class="tableRow"><input name="posts" type="text" value="<% = lngPosts %>" size="4" maxlength="7" /></td>
  </tr>
  <tr class="tableRow">
    <td valign="top">Admin Notes<br /><psan class="smText">These are notes left by Admin and Moderators, about this member, such as any warnings the member has been given (max 250 characters).</span></td>
    <td><textarea name="notes" id="notes" cols="30" rows="4" onKeyDown="characterCounter('notesChars', 'notes');" onKeyUp="characterCounter('notesChars', 'notes');"><% = strAdminNotes %></textarea>
     <br />
     <input size="3" value="0" name="notesChars" id="notesChars" maxlength="3" />
     <input onclick="characterCounter('notesChars', 'notes');" type="button" value="<% = strTxtCharacterCount %>" name="Count" />
   </td>
  </tr>
  <tr>
    <td height="2" colspan="2" align="center" valign="top" class="tableBottomRow"><input type="hidden" name="postBack" value="True" />
      <input type="hidden" name="PF" id="PF" value="<% = lngUserProfileID %>" />
      <input type="submit" name="Submit" id="Submit" value="<% If strMode = "edit" Then Response.Write("Update Member") Else Response.Write("Add New Member") %>" onclick="return CheckForm();" />
      <input type="reset" name="Reset" id="Reset" value="Reset Form" />
    </td>
  </tr>
</table>
</form><%

End If

%>
<br />
<%

'Clean up
Call closeDatabase()

'If the username is already gone diaply an error message pop-up
If blnUsernameOK = False Then
        Response.Write("<script  language=""JavaScript"">")
        Response.Write("alert('Sorry, the Username you requested is already taken.\n\nPlease choose another Username.');")
        Response.Write("</script>")

End If
%>
<!-- #include file="includes/admin_footer_inc.asp" -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -