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

📄 user-users.asp

📁 简介:一个程序小巧而功能强大
💻 ASP
📖 第 1 页 / 共 2 页
字号:
				end if
				SqlUser = SqlUser & ") ORDER BY User_Name"
				rsUser.open sqlUser, adoConn, CMDText
				if not (rsUser.eof or rsUser.bof) then
					UserCnt = rsUser.recordcount
					UserData = rsUser.getrows()
				else
					UserCnt = 0
				end if
				rsUser.close
				set rsUser = nothing
				
				if UserCnt <> 0 then
					tempCnt = 0
					
					'Loop through all of the users that match the criteria
					do until tempCnt = UserCnt 
						%>
						<tr valign="top" class="body">
						<td>
						<%=UserData(1, tempCnt)%>
						</td>
						<td>
						<%=UserData(2, tempCnt)%>
						</td>
						<td align="center">
						<a href="user-users.asp?Action=Edit&User=<%=UserData(0, tempCnt)%>">Edit</a> - <a href="user-users.asp?Action=Confirm&User=<%=UserData(0, tempCnt)%>">Delete</a>
						</td>
						</tr>
						<%
						tempCnt = tempCnt + 1
					loop
				else
				%>
					<tr valign="top" class="body">
					<td colspan="3">No matches found. Please refine your search terms and try again...</td>
					</tr>
				<%
				end if
				%>
			</table>
		<%
		end if
	end if
	
	if Action = "Edit" then	
		'Grab users details
		set rsEdit = server.createobject("adodb.recordset")
		sqlEdit = "SELECT User_ID, User_Name, User_Email, User_Password, User_Join_Date, User_Laston_Date, User_LastURL, User_Signature, User_Title, User_Avatar, User_Posts, User_Location, User_ICQ, User_MSN, User_AIM, User_Website, User_Biography, User_Email_View, User_Online_View, User_Status, User_Activation, User_Admin_Email, User_DOB, User_IP, User_Last_Post FROM Forum_Users WHERE User_ID = "& int(request.querystring("User")) &";"
		rsEdit.open sqlEdit, adoConn, CMDText
		if not (rsEdit.eof or rsEdit.bof) then
			EditData = rsEdit.getrows()
		else
			noUser = true
		end if
		rsEdit.close
		set rsEdit = nothing
		
		strDOB = EditData(22,0)
		'Calculate specific parts of DOB
		if strDOB <> "" then
			strDay = left(strDOB, 2)
			strMonth = mid(strDOB, 3, 2)
			strYear = right(strDOB, 4)
		else 
			strYear = ""
		end if
		
		'There's been an error and the user couldn't be found.
		if noUser = true then
		%>
			<table border="0" cellspacing="1" cellpadding="2" align="center" class="main">
				<tr valign="middle" class="title">
				<td align="center"><%=Site_Name%> // Oops</td>
				</tr>
				<tr class="body">
				<td align="center">
				There's been an error and we could not locate the user that you are searching for. Please go back and try again.
				</td>
				</tr>
			</table>
		<%
		else
			'Display the users details
			%>
			<table border="0" cellspacing="1" cellpadding="2" align="center" class="main">
				<tr valign="middle" class="title">
				<td align="center" colspan="2"><%=Site_Name%> // <%=EditData(1,0)%> Details</td>
				</tr>
				<tr valign="middle" class="sub-title">
				<td align="left" colspan="2">>> User Details</td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">User Status:</td>
				<td><%if EditData(19,0) = 1 then response.write("<font color='#00CC00'>Active</font>") else response.write("<font color='#ff0000'>Inactive</font>") end if%></td>
				</tr>
				<tr valign="middle" class="body">
				<td>IP Address:</td>
				<td><%=EditData(23,0)%></td>
				</tr>
				<tr valign="middle" class="body">
				<td>Join Date:</td>
				<td><%=web_time(EditData(4,0), Site_Time_Format, "Long")%></td>
				</tr>
				<tr valign="middle" class="body">
				<td>Last On:</td>
				<td><%=web_time(EditData(5,0), Site_Time_Format, "Long")%></td>
				</tr>
				<tr valign="middle" class="body">
				<td>Last On:</td>
				<td><%=web_time(EditData(5,0), Site_Time_Format, "Long")%></td>
				</tr>
			</table>
			<table border="0" cellspacing="1" cellpadding="2" align="center" class="main">
				<form action="user-users.asp?Action=Submit&Update=<%=EditData(0,0)%>" method="post" onSubmit="this.button.disabled = true;">
				<tr valign="middle" class="sub-title">
				<td align="left" colspan="2">>> User Profile</td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">User ID:</td>
				<td><%=EditData(0,0)%></td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">User Name:</td>
				<td>
                <input name="Name" type="text" style="border: 1px solid black; width: 445px;" value="<%=EditData(1,0)%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td>Password:</td>
				<td>
                <input name="Password" type="text" style="border: 1px solid black; width: 445px;" value="<%=EditData(3,0)%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td>Email:</td>
				<td>
                <input name="Email" type="text" style="border: 1px solid black; width: 445px;" value="<%=EditData(2,0)%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td>Date of Birth</td>
				<td>
				<table width='200' border='0' cellspacing='0' cellpadding='0'>
					<tr align='center' valign='top'>
					<td width='33%' align='left'>Day</td>
					<td width='33%'>Month</td>
					<td width='33%' align='right'>Year</td>
					</tr>
					<tr align='center' valign='top'>
					<td width='33%' align='left'>
					<select name='day'>
						<option value='00' <%if strDay = "" then %>selected<%end if %>>N/A</option>
						<option value='01' <%if strDay = "01" then %>selected<%end if %>>1</option>
						<option value='02' <%if strDay = "02" then %>selected<%end if %>>2</option>
						<option value='03' <%if strDay = "03" then %>selected<%end if %>>3</option>
						<option value='04' <%if strDay = "04" then %>selected<%end if %>>4</option>
						<option value='05' <%if strDay = "05" then %>selected<%end if %>>5</option>
						<option value='06' <%if strDay = "06" then %>selected<%end if %>>6</option>
						<option value='07' <%if strDay = "07" then %>selected<%end if %>>7</option>
						<option value='08' <%if strDay = "08" then %>selected<%end if %>>8</option>
						<option value='09' <%if strDay = "09" then %>selected<%end if %>>9</option>
						<option value='10' <%if strDay = "10" then %>selected<%end if %>>10</option>
						<option value='11' <%if strDay = "11"then %>selected<%end if %>>11</option>
						<option value='12' <%if strDay = "12" then %>selected<%end if %>>12</option>
						<option value='13' <%if strDay = "13" then %>selected<%end if %>>13</option>
						<option value='14' <%if strDay = "14" then %>selected<%end if %>>14</option>
						<option value='15' <%if strDay = "15" then %>selected<%end if %>>15</option>
						<option value='16' <%if strDay = "16" then %>selected<%end if %>>16</option>
						<option value='17' <%if strDay = "17" then %>selected<%end if %>>17</option>
						<option value='18' <%if strDay = "18" then %>selected<%end if %>>18</option>
						<option value='19' <%if strDay = "19" then %>selected<%end if %>>19</option>
						<option value='20' <%if strDay = "20" then %>selected<%end if %>>20</option>
						<option value='21' <%if strDay = "21" then %>selected<%end if %>>21</option>
						<option value='22' <%if strDay = "22" then %>selected<%end if %>>22</option>
						<option value='23' <%if strDay = "23" then %>selected<%end if %>>23</option>
						<option value='24' <%if strDay = "24" then %>selected<%end if %>>24</option>
						<option value='25' <%if strDay = "25" then %>selected<%end if %>>25</option>
						<option value='26' <%if strDay = "26" then %>selected<%end if %>>26</option>
						<option value='27' <%if strDay = "27" then %>selected<%end if %>>27</option>
						<option value='28' <%if strDay = "28" then %>selected<%end if %>>28</option>
						<option value='29' <%if strDay = "29" then %>selected<%end if %>>29</option>
						<option value='30' <%if strDay = "30" then %>selected<%end if %>>30</option>
						<option value='31' <%if strDay = "31" then %>selected<%end if %>>31</option>
					</select>
					</td>
					<td width='33%'> 
					<select name='month'>
						<option value='00' <%if strMonth = "" then %>selected<%end if %>>N/A</option>
						<option value='01' <%if strMonth = "01" then %>selected<%end if %>>January</option>
						<option value='02' <%if strMonth = "02" then %>selected<%end if %>>February</option>
						<option value='03' <%if strMonth = "03" then %>selected<%end if %>>March</option>
						<option value='04' <%if strMonth = "04" then %>selected<%end if %>>April</option>
						<option value='05' <%if strMonth = "05" then %>selected<%end if %>>May</option>
						<option value='06' <%if strMonth = "06" then %>selected<%end if %>>June</option>
						<option value='07' <%if strMonth = "07" then %>selected<%end if %>>July</option>
						<option value='08' <%if strMonth = "08" then %>selected<%end if %>>August</option>
						<option value='09' <%if strMonth = "09" then %>selected<%end if %>>September</option>
						<option value='10' <%if strMonth = "10" then %>selected<%end if %>>October</option>
						<option value='11' <%if strMonth = "11" then %>selected<%end if %>>November</option>
						<option value='12' <%if strMonth = "12" then %>selected<%end if %>>December</option>
					</select>
					</td>
					<td width='33%' align='right'><input name='year' type='text' value="<%=strYear%>" size='4' maxlength='4' style="border: 1px solid black;"></td>
					</tr>
				</table>
				</td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">Posts:</td>
				<td>
                <input type="text" name="Posts" style="border: 1px solid black; width: 445px;" value="<%=EditData(10,0)%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">ICQ:</td>
				<td>
                <input type="text" name="ICQ" style="border: 1px solid black; width: 445px;" value="<%=EditData(12,0)%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">MSN:</td>
				<td>
                <input type="text" name="MSN" style="border: 1px solid black; width: 445px;" value="<%=EditData(13,0)%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">AIM:</td>
				<td>
                <input type="text" name="AIM" style="border: 1px solid black; width: 445px;" value="<%=EditData(14,0)%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">Title:</td>
				<td>
                <input type="text" name="Title" style="border: 1px solid black; width: 445px;" value="<%=EditData(8,0)%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">Avatar:</td>
				<td>
                <input type="text" name="Avatar" style="border: 1px solid black; width: 445px;" value="<%=EditData(9,0)%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">Signature:</td>
				<td>
                <input type="text" name="Signature" style="border: 1px solid black; width: 445px;" value="<%=htmlcode(EditData(7,0))%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td width="150">Location:</td>
				<td>
                <input type="text" name="Location" style="border: 1px solid black; width: 445px;" value="<%=EditData(11,0)%>" size="20"></td>
				</tr>
				<tr valign="top" class="body">
				<td>Biography:</td>
				<td>
                <textarea name="Biography" id="Biography" style="border: 1px solid black; width: 445px; height: 100px;" rows="1" cols="20"><%=EditData(16,0)%></textarea></td>
				</tr>
				<tr valign="middle" class="body">
				<td>Website:</td>
				<td>
                <input type="text" name="Website" style="border: 1px solid black; width: 445px;" value="<%=EditData(15,0)%>" size="20"></td>
				</tr>
				<tr valign="middle" class="body">
				<td>Show Email:</td>
				<td><input name="ShowEmail" type="checkbox" id="ShowEmail" value="1" <%if EditData(17,0) = 1 then response.write("checked") end if%>></td>
				</tr>
				<tr valign="middle" class="body">
				<td>Show Online:</td>
				<td><input name="ShowOnline" type="checkbox" id="ShowOnline" value="1" <%if EditData(18,0) = 1 then response.write("checked") end if%>></td>
				</tr>
				<tr valign="middle" class="body">
				<td>Accept Emails:</td>
				<td><input name="AcceptEmail" type="checkbox" id="AcceptEmail" value="1" <%if EditData(21,0) = 1 then response.write("checked") end if%>></td>
				</tr>
				<tr valign="middle" class="body">
				<td align="right" colspan="2"><input type="submit" name="button" value="Update"></td>
				</tr>
				</form>
			</table>
			<%
			if EditData(19,0) = 1 then
			%>
				<table border="0" cellspacing="1" cellpadding="2" align="center" class="main">
					<form action="user-users.asp?Action=Submit&Ban=<%=EditData(0,0)%>" method="post" onSubmit="this.button.disabled = true;">
					<tr valign="middle" class="sub-title"> 
					<td align="left" colspan="2">>> Ban User</td>
					</tr>
					<tr valign="middle" class="body"> 
					<td width="150">
					Ban IP:
					<br>
					(Check box to add IP address to banned list)
					</td>
					<td><input name="IP" type="checkbox" id="IP" value="1"></td>
					</tr>
					<tr valign="middle" class="body"> 
					<td align="right" colspan="2"><input name="Address" type="hidden" value="<%=EditData(23,0)%>"><input type="submit" name="button" value="Ban" style="width: 75px;"></td>
					</tr>
					</form>
				</table>
			<%
			end if
			
			if EditData(19,0) = 2 then
			%>
				<table border="0" cellspacing="1" cellpadding="2" align="center" class="main">
					<form action="user-users.asp?Action=Submit&Clear=<%=EditData(0,0)%>" method="post" onSubmit="this.button.disabled = true;">
					<tr valign="middle" class="sub-title"> 
					<td align="left" colspan="2">>> Remove Ban</td>
					</tr>
					<tr valign="middle" class="body"> 
					<td>Click the below button to remove the ban for this user.</td>								
					</tr>
					<tr valign="middle" class="body"> 
					<td align="right" colspan="2"><input type="submit" name="button" value="Clear" style="width: 75px;"></td>
					</tr>
					</form>
				</table>
			<%
			end if
		end if
	end if
	%>
	</td>
  	</tr>
</table>

</body>
</html>

⌨️ 快捷键说明

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