📄 account.asp
字号:
<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>
<%
'finish off profile options.
response.write("</td><td width='33%' align='right'><input name='year' type='text' value='"& strYear &"' size='4' maxlength='4'></td></tr></table></td></tr></table>")
response.write("<table width='100%' border='0' cellspacing='1' cellpadding='3' align='center' class='main'><tr align='left' valign='middle' class='sub-title'><td colspan='2'>>> 设置信息</td></tr><tr valign='top' class='body'><td width='200' align='left'>个人主页:</td>")
response.write("<td align='left'><input name='Homepage' type='text'style='width: 300px; border: 1px solid black;' value='"& strHomePage &"' maxlength='200'></td></tr><tr valign='top' class='body'> <td width='200' align='left'>OICQ号码:</td>")
response.write("<td align='left'><input name='ICQ' type='text' style='width: 300px; border: 1px solid black;' value='"& strICQ &"' maxlength='20'></td></tr><tr valign='top' class='body'> <td width='200' align='left'>MSN Handle:</td><td align='left'><input name='MSN' type='text' style='width: 300px; border: 1px solid black;' value='"& strMSN &"' maxlength='200'></td>")
response.write("</tr><tr valign='top' class='body'><td width='200' align='left'>梦想:</td><td align='left'><input name='AIM' type='text' style='width: 300px; border: 1px solid black;' value='"& strAIM &"' maxlength='200'></td></tr><tr valign='top' class='body'>")
response.write("<td width='200' align='left'>个性签名:</td><td align='left'><textarea name='Biography' style='width: 300px; height: 100px; border: 1px solid black;'>"& strBiography &"</textarea></td></tr><tr valign='top' class='body'>")
response.write("<td width='200' align='left'>地 址:</td><td align='left'><input name='Location' type='text' style='width: 300px; border: 1px solid black;' value='"& strLocation &"' maxlength='50'></td></tr><tr valign='top' class='body'><td width='200' align='left'> </td><td align='left'><input name='button' type='submit' value='完成'></td></tr></form></table>")
end if
if Action = "Options" then
'Grab the users current details from the database
set rsOptions = server.createobject("adodb.recordset")
sqlOptions = "SELECT User_Posts, User_Title, User_Avatar, User_Signature, User_Online_View, User_Email_View, User_Admin_Email FROM Forum_Users WHERE User_ID = "& session("UserID") &""
rsOptions.open sqlOptions, adoConn, CMDText
if not (rsOptions.eof or rsOptions.bof) then
strPosts = rsOptions("User_Posts")
strTitle = rsOptions("User_Title")
strAvatar = rsOptions("User_Avatar")
strSignature = htmlcode(rsOptions("User_Signature"))
strInvisible = rsOptions("User_Online_View")
strUserMail = rsOptions("User_Email_View")
strAdmin = rsOptions("User_Admin_Email")
end if
rsOptions.close
set rsOptions = nothing
response.write("<table width='100%' border='0' cellspacing='1' cellpadding='3' align='center' class='main'><tr valign='middle' class='title'><td height='25' colspan='2'>Edit Options</td></tr><form action='Account.asp?Action=UpdateOptions' method='post' onSubmit='this.button.disabled = true;'><tr valign='top' class='body'><td width='200' align='left'>Title:</td><td align='left'>")
if (Site_Allow_Title <> 0 and strPosts >= Site_Allow_Title) or session("admin") = true then
response.write("<input name='Title' type='text' style='width: 200px; border: 1px solid black;' value='"& strTitle &"' maxlength='25'> ")
else
response.write("<i>Disabled</i>")
end if
response.write("</td></tr><tr valign='top' class='body'><td width='200' align='left'> Avatar:</td><td align='left'>")
if Site_Allow_Avatar <> 0 and strPosts >= Site_Allow_Avatar then
response.write("<input name='Avatar' type='text' style='width: 200px; border: 1px solid black;' value='"& strAvatar &"' maxlength='200'>")
else
response.write("<i>Disabled</i>")
end if
response.write("</td></tr><tr valign='top' class='body'> <td width='200' align='left'>Signature:</td><td align='left'>")
if Site_Allow_Signature = 1 then
response.write("<textarea name='Signature' style='width: 200px; height: 100px; border: 1px solid black;'>"& strSignature &"</textarea> ")
else
response.write("<i>Disabled</i> ")
end if
response.write("</td></tr><tr valign='top' class='body'><td width='200' align='left'>Always Include Signature:</td><td align='left'><input type='checkbox' name='IncSignature' value='1'")
if request.cookies(site_name)("Signature") = "1" then response.write("checked")
response.write("></td></tr><tr valign='top' class='body'><td width='200' align='left'>Invisible Mode: </td><td align='left'><input type='checkbox' name='Invisible' value='1'")
if strInvisible = 0 then response.write("checked")
response.write("></td></tr><tr valign='top' class='body'><td width='200' align='left'>Show E-mail Address: </td><td align='left'><input type='checkbox' name='ShowEmail' value='1'")
if strUserMail = 1 then response.write("checked")
response.write("></td></tr><tr valign='top' class='body'><td width='200' align='left'> Allow Administrators To E-Mail You: </td><td align='left'><input type='checkbox' name='AdminEmail' value='1'")
if strAdmin = 1 then response.write("checked")
response.write("></td></tr><tr valign='top' class='body'><td width='200' align='left'> </td><td align='left'><input name='button' type='submit' value='submit'> </td></tr></form></table>")
end if
if Action = "UpdateProfile" then
'Update users details
if request.form("Day") <> "00" and request.form("Month") <> "00" and request.form("Year") <> "" then
strDOB = request.form("Day") & request.form("Month")
if len(request.form("Year")) <= 2 then
if int(request.form("Year")) > 40 then
strDOB = strDOB & "19" & request.form("Year")
else
strDOB = strDOB & "20" & request.form("Year")
end if
else
strDOB = strDOB & request.form("Year")
end if
else
strDOB = ""
end if
set rsProfile = server.createobject("adodb.recordset")
sqlProfile = "SELECT * FROM Forum_Users WHERE User_ID = "& session("userid") &";"
rsProfile.cursortype = 2
rsProfile.locktype = 3
rsProfile.open sqlProfile, adoConn, CMDText
rsProfile("User_location") = sql_encode(request.form("Location"))
rsProfile("User_Website") = sql_encode(request.form("Homepage"))
rsProfile("User_ICQ") = sql_encode(request.form("ICQ"))
rsProfile("User_MSN") = sql_encode(request.form("MSN"))
rsProfile("User_AIM") = sql_encode(request.form("AIM"))
rsProfile("User_Biography") = clean_text(request.form("Biography"), 0)
rsProfile("User_DOB") = strDOB
rsProfile.update
rsProfile.close
set rsProfile = nothing
'Display confirmation message
response.write("<table width='100%' border='0' cellspacing='1' cellpadding='3' align='center' class='main'><tr valign='middle' class='title'><td colspan='1'>Account Profile Updated</td></tr><tr align='left' valign='middle' class='body'>")
response.write("<td colspan='3'>你的资料已经修改成功. Click <a href='account.asp?Action=Home'>here</a> if you are not redirected within 5 seconds.</td></tr></table><META HTTP-EQUIV='Refresh' CONTENT='5; URL=account.asp?Action=Profile'>")
end if
if Action = "UpdateOptions" then
strTitle = clean_text(request.form("Title"), 0)
strAvatar = sql_encode(request.form("Avatar"))
'Remove title if trying to imitate admin or moderator
if (instr(1, strTitle, "administrator", 1) > 0 or instr(1, strTitle, "Administrator", 1) > 0 or instr(1, strTitle, "Admin", 1) > 0 or instr(1, strTitle, "admin", 1) > 0 or instr(1, strTitle, "moderator", 1) > 0 or instr(1, strTitle, "Moderator", 1) > 0) and session("admin") <> true then
strTitle = ""
end if
'Update users details
set rsProfile = server.createobject("adodb.recordset")
sqlProfile = "SELECT * FROM Forum_Users WHERE User_ID = "& session("UserID") &";"
rsProfile.cursortype = 2
rsProfile.locktype = 3
rsProfile.open sqlProfile, adoConn, CMDText
rsProfile("User_Title") = strTitle
rsProfile("User_Avatar") = strAvatar
'To allow images in signatures comment out the next line and uncomment the line following it
rsProfile("User_Signature") = bbcode(request.form("Signature"), 0)
'rsProfile("User_Signature") = bbcode(request.form("Signature"), 1)
if request.form("Invisible") = 1 then
rsProfile("User_Online_View") = 0
else
rsProfile("User_Online_View") = 1
end if
if request.form("ShowEmail") = 1 then
rsProfile("User_Email_View") = 1
else
rsProfile("User_Email_View") = 0
end if
if request.form("AdminEmail") = 1 then
rsProfile("User_Admin_Email") = 1
else
rsProfile("User_Admin_Email") = 0
end if
rsProfile.update
rsProfile.close
set rsProfile = nothing
if request.form("IncSignature") = 1 then
response.cookies(site_name)("Signature") = "1"
response.cookies(Site_Name).expires = DateAdd("yyyy", 1, Now())
else
response.cookies(site_name)("Signature") = ""
if request.cookies(site_name)("code") <> "" then response.cookies(Site_Name).expires = DateAdd("yyyy", 1, Now())
end if
'Display confirmation message
response.write("<table width='100%' border='0' cellspacing='1' cellpadding='3' align='center' class='main'><tr valign='middle' class='title'><td colspan='1'>Account Options Updated</td></tr><tr align='left' valign='middle' class='body'>")
response.write("<td colspan='3'>Your account options have been successfully updated. Click <a href='account.asp?Action=Home'>here</a> if you are not redirected within 5 seconds.</td></tr></table><META HTTP-EQUIV='Refresh' CONTENT='5; URL=account.asp?Action=Profile'>")
end if
end if
%>
<!--#include file="Includes/inc-footer.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -