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

📄 account.asp

📁 简介:一个程序小巧而功能强大
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--#include file="Includes/site-dataconn.asp" -->
<!--#include file="Includes/func-common.asp" -->
<!--#include file="Includes/site-config.asp" -->
<!--#include file="Includes/inc-common.asp" -->
<!--#include file="Includes/func-aspcode.asp" -->
<!--#include file="Includes/func-htmlcode.asp" -->
<%
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>
<html>

<head>
<title>// <%=Site_Name%> //</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK REL=stylesheet TYPE="text/css" HREF="Includes/site-style.css">
</head>

<body>
<!--#include file="Includes/inc-header.asp" -->
<%
'navigation trail
response.write("<table border='0' cellspacing='0' cellpadding='2' align='center' class='plain'><tr><td valign='top'><a href='default.asp'>"& Site_Name &"</a> >> Account<br>"& Site_Description &"</td></tr></table>")

if isnull(session("userid")) = true or session("userid") = "" then
	strMessage = " 请先登录到 "& Site_Name &" forums."
	strRedirectURL = "default.asp"	
end if

Action = request.querystring("Action")

if Action = "" or (Action <> "Home" and Action <> "Profile" and Action <> "Options" and Action <> "UpdateProfile" and Action <> "UpdateOptions")  then
	Action = "Home"
end if 

if strMessage <> "" then
	'Display error message
	%>
	<table border="0" cellspacing="1" cellpadding="2" align="center" class="main">
		<tr valign="middle" class="title">
		<td align="center"><%=Site_Name%> // 错误</td>
		</tr>
		<tr valign="top" class="body">
		<td align="center"><%=strMessage%></td>
		</tr>
	</table>
	<META HTTP-EQUIV="Refresh" CONTENT="5; URL=<%=strRedirectURL%>">
	<%
else
	'Display User Account and Options
	%>
	<table border="0" cellspacing="1" cellpadding="2" align="center" class="main">
		<tr valign="middle" class="title">
		<td width="33%"><a href="account.asp?Action=Home">个人资料</a></td>
		<td width="33%"><a href="account.asp?Action=Profile">修改资料</a></td>
		<td width="33%"><a href="account.asp?Action=Options">设置</a></td>
		</tr>
	</table>
	<%
	if Action = "Home" then
		'Grab all user details and whack them on the screen!
		set rsdetails = server.createobject("adodb.recordset")
		sqlDetails = "SELECT User_Name, User_Join_Date, User_Laston_Date, User_LastURL, User_Location, User_Posts, User_DOB, User_Last_Post, User_Biography, User_ICQ, User_MSN, User_AIM, User_Email, User_Website FROM Forum_Users WHERE User_ID = "& session("userid") &";"
		rsDetails.open sqlDetails, adoConn, adCMDText
		if not (rsDetails.eof or rsDetails.bof) then
			strUserName = rsDetails("User_Name")
			strJoined = rsDetails("User_Join_Date")
			strLastVisit = rsDetails("User_Laston_Date")
			strLastURL = rsDetails("User_LastURL")
			strLastPost = rsDetails("User_Last_Post")
			strLocation = rsDetails("User_Location")
			strPosts = rsDetails("User_Posts")
			strBiography = rsdetails("User_Biography")
			strDOB = rsDetails("User_DOB")
			strICQ = rsDetails("User_ICQ")
			strMSN = rsDetails("User_MSN")
			strAIM = rsDetails("User_AIM")
			strEmail = rsDetails("User_Email")
			strWebsite = rsDetails("User_Website")
			if instr(1, strLastURL, "default", 1) = 0 or instr(1, strLastURL, "displaycategory", 1) < 0 or instr(1, strLastURL, "displayforum", 1) < 0  or instr(1, strLastURL, "displaytopic", 1) < 0  or instr(1, strLastURL, "newreply", 1) < 0 then
				if instr(1, strLastURL, "newreply", 1) = 1 then
					strLastURL = replace( strLastURL, "newreply", "displaytopic")
				else
					strlastURL = "default.asp"
				end if
			end if
		end if
		rsDetails.close
		set rsDetails = nothing	
		
		'User summary
		response.write("<table width='100%' border='0' cellspacing='1' cellpadding='3' align='center' class='main'><tr align='left' class='title'><td valign='middle' colspan='2'>用户信息: "& strUserName &"</td></tr><tr align='left' class='sub-title'><td valign='middle' colspan='2'>>> 基本资料</td></tr>")
		response.write("<tr align='left' class='body'><td width='200' valign='top'>用户名:</td><td valign='top'>"& strUserName &"</td></tr><tr align='left' class='body'> <td width='200' valign='top'>入会时间:</td><td valign='top'>"& web_time(strJoined, Site_Time_Format, "Long") &"</td>")
		response.write("</tr><tr align='left' class='body'> <td width='200' valign='top'>生 日:</td><td valign='top'>")
		if strDOB <> "" then response.write(web_date(strDOB, Site_Time_Format))
		response.write("</td></tr><tr align='left' class='body'> <td width='200' valign='top'>地 址:</td><td valign='top'>"& strLocation &"</td></tr><tr align='left' class='body'> <td width='200' valign='top'>个性签名:</td><td valign='top'>"& strBiography &"</td></tr></table>")
		'User statistics
		response.write("<table width='100%' border='0' cellspacing='1' cellpadding='3' align='center' class='main'><tr align='left' class='sub-title'><td valign='middle' colspan='2'>>> 论坛资料</td></tr><tr align='left' class='body'><td width='200' valign='top'>发帖数:</td><td valign='top'>"& strPosts &"</td>")
		response.write("</tr><tr align='left' class='body'><td width='200' valign='top'>Last Post:</td><td valign='top'>")
		if isnull(strLastPost) = false then response.write(web_time(strLastPost, Site_Time_Format, "Long"))
		response.write("</td></tr><tr align='left' valign='top' class='body'><td width='200'>Last On:</td><td >"& web_time(strLastVisit, Site_Time_Format, "Long") &"</td>")
		response.write("</tr><tr align='left' class='body'><td width='200' valign='top'>Last Location:</td><td valign='top'><a href='"& strLastURL &"'>"& strLastURL &"</a></td></tr></table>")
		'联系用户
		response.write("<table width='100%' border='0' cellspacing='1' cellpadding='3' align='center' class='main'><tr align='left' class='sub-title'><td valign='middle' colspan='2'>>> User Contact Details</td></tr><tr align=left valign=top class=body><td width='200'>个人主页:</td><td><a href='"& strWebsite &"' target='_blank'>"& strWebsite &"</a></td></tr><tr align='left' valign='top' class='body'><td width='200'>Email:</td><td><a href='mailto:"& strEmail &"'>"& strEmail &"</a></td></tr>")
		response.write("<tr align='left' valign='top' class='body'><td width='200'>OICQ:</td><td>"& strICQ &"</td></tr><tr align='left' valign='top' class='body'> <td width='200'>MSN:</td><td>"& strMSNl &"</td></tr><tr align='left' valign='top' class='body'> <td width='200'>梦想:</td><td>"& strAIM &"</td></tr></table>")
	end if
	
	if Action = "Profile" then
		'Grab the users current details from the database
		set rsProfile = server.createobject("adodb.recordset")
		sqlProfile = "SELECT User_Password, User_Email, User_DOB, User_Website, User_ICQ, User_MSN, User_AIM, User_Biography, User_Location FROM Forum_Users WHERE User_ID = "& session("UserID") &""
		rsProfile.open sqlProfile, adoConn, CMDText
		if not (rsProfile.eof or rsProfile.bof) then
			strPassword = rsProfile("User_Password")
			strEmail = rsProfile("User_Email")
			strDOB = rsProfile("User_DOB")
			strHomePage = rsProfile("User_Website")
			strICQ = rsProfile("User_ICQ")
			strMSN = rsProfile("User_MSN")
			strAIM = rsProfile("User_AIM")
			strBiography = rsProfile("User_Biography")
			strLocation = rsProfile("User_Location")
		end if
		rsProfile.close
		set rsProfile = nothing
		
		'Calculate specific parts of DOB
		if strDOB <> "" then
			strDay = left(strDOB, 2)
			strMonth = mid(strDOB, 3, 2)
			strYear = right(strDOB, 4)
		end if
		
		'Basic profile options
		response.write("<table width='100%' border='0' cellspacing='1' cellpadding='3' align='center' class='main'><form action='Account.asp?Action=UpdateProfile' method='post'  onSubmit='this.button.disabled = true;'><tr valign='middle' class='title'><td colspan='2'>修改资料</td></tr><tr align='left' valign='middle' class='sub-title'><td colspan='2'>>> 基本信息</td></tr>")
		response.write("<tr valign='top' class='body'><td width='200' align='left'>Username:</td><td align='left'>"& session("UserName") &" </td></tr><tr valign='top' class='body'><td width='200' align='left'>E-Mail Address:</td><td align='left'>"& strEmail &"</td></tr><tr valign='top' class='body'><td width='200' align='left'>Date of Birth:</td>")
		response.write("<td align='left'><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'>")
		'forms are horrible! display the dates in html
		%>
			<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>

⌨️ 快捷键说明

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