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

📄 pop_profile.asp

📁 一个不错的ASP论坛源码
💻 ASP
📖 第 1 页 / 共 5 页
字号:
						if DoesUserFieldExist(memID,rsIDs("USR_FIELD_ID")) then
							UpdSQL = "UPDATE " & strMemberTablePrefix & "MEMBERFIELDS "
							UpdSQL = UpdSQL & "SET " & strMemberTablePrefix & "MEMBERFIELDS.USR_VALUE ='" & Request.Form(sInputName) & "'"
							UpdSQL = UpdSQL & "WHERE " & strMemberTablePrefix & "MEMBERFIELDS.USR_FIELD_ID =" & rsIDs("USR_FIELD_ID") & " AND "
							UpdSQL = UpdSQL &  strMemberTablePrefix & "MEMBERFIELDS.MEMBER_ID =" & memID
							Conn.Execute(UpdSQL)
							UpdSQL = ""
						else
							UpdSql = "INSERT INTO " & strMemberTablePrefix & "MEMBERFIELDS "
							UpdSql = UpdSql & "VALUES ( " & memID & "," & rsIDs("USR_FIELD_ID") & ",'"
							UpdSql = UpdSql & Request.Form(sInputName) & "')"
							Conn.Execute(UpdSQL)
							UpdSQL = ""
						end if
						rsIDs.MoveNext
					loop
					rsIDs.Close
					Err_Msg = "OK"
				end if
			end if
'Rem User Field Code #######################################
			regHomepage = ""
			
%>
	<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">你的注册资料已经修改完毕!</font></p>
<%
					if (strUseExtendedProfile) then
%>					
					<meta http-equiv="Refresh" content="0; URL=<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("default.asp") else Response.Write(Request.Form("refer")) end if %>">
					<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("default.asp") else Response.Write(Request.Form("refer")) end if %>">返回论坛</a></font></p>
<%
					end if
			else

%>
	<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">你输入的资料有问题或没有填写完整</font></p>

	<table align=center>
	  <tr>
	    <td align=center><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><center>
		<ul>
		<% =Err_Msg %>
		</ul></center></font>
	    </td>
	  </tr>
	</table>

	<p align=center><font size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">请返回重新输入</a></font></p>
<%			if strUseExtendedProfile then %>
	<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("default.asp") else Response.Write(Request.Form("refer")) end if %>">返回论坛</a></font></p>

<%			end if 
		end if

	case "ModifyIt"

		mLev = cint(ChkUser2(STRdbntUserName, Request.Form("Pass"))) 
						
		if mLev > 0 then  '## is Member
			if mLev = 4 then '## is Admin

				Err_Msg = ""
			
				if Request.Form("Name") = "" then 
					Err_Msg = Err_Msg & "<li>You must set a UserName</li>"
				end if
				if (Instr(Request.Form("Name"), ">") > 0 ) or (Instr(Request.Form("Name"), "<") > 0) then
					Err_Msg = Err_Msg & "<li> &gt; 和 &lt; 不能出现在用户名里,请重新输入</li>"
				end if
				'## Forum_SQL
				strSql = "SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS "
				strSql = strSql & " WHERE M_NAME = '" & Trim(Request.Form("Name")) &"' "
				strSql = strSql & " AND MEMBER_ID <> " & Trim(Request.Form("Member_ID")) &" "
		
				set rs = my_Conn.Execute (strSql)	

				if rs.BOF and rs.EOF then 
					'## Do Nothing - proceed
				else 
					Err_Msg = Err_Msg & "<li>用户名重复<br>请重新输入</li>"
				end if
						
				rs.close
				set rs = nothing
				if strAuthType = "db" then
					if Request.Form("Password") = "" then 
						Err_Msg = Err_Msg &  "<li>你必须设定密码</li>"
					end if
					if Len(Request.Form("Password")) > 25 then 
						Err_Msg = Err_Msg & "<li>密码不能超过25个字符</li>" 
					end if
					'if Request.Form("Password") <>  Request.Form("Password2") then 
					'	Err_Msg = Err_Msg & "<li>两次输入密码不一致</li>"
					'end if
				end if
				if Request.Form("Email") = "" then 
					Err_Msg = Err_Msg & "<li>你必须填写电子邮件</li>"
				end if
				if EmailField(Request.Form("Email")) = 0 then 
					Err_Msg = Err_Msg & "<li>必须填写正确的电子邮件地址</li>"
				end if
				if (lcase(left(Request.Form("Homepage"), 7)) <> "http://") and (lcase(left(Request.Form("Homepage"), 8)) <> "https://") and (Request.Form("Homepage") <> "") then
					Err_Msg = Err_Msg & "<li>你必须在连接前加上 <b>http://</b> or <b>https://</b></li>"
				end if
				if Len(Request.Form("Sig")) > 255 then
					Err_Msg = Err_Msg & "<li>个人签名不能超过255个字符 "
					Err_Msg = Err_Msg & "现在共有 <b>" & Len(Request.Form("Sig")) & "</b> 个字符</li>"
				end if
				if Err_Msg = "" then '## it is ok to update the profile
		
					if Trim(Request.Form("Homepage")) <> "" and lcase(trim(Request.Form("Homepage"))) <> "http://" and Trim(lcase(Request.Form("Homepage"))) <> "https://" then
						regHomepage = ChkString(Request.Form("Homepage"),"url")
					else
						regHomepage = " "
					end if
					if Trim(Request.Form("LINK1")) <> "" and lcase(trim(Request.Form("LINK1"))) <> "http://" and Trim(lcase(Request.Form("LINK1"))) <> "https://" then
						regLink1 = ChkString(Request.Form("LINK1"),"url")
					else
						regLink1 = " "
					end if
					if Trim(Request.Form("LINK2")) <> "" and lcase(trim(Request.Form("LINK2"))) <> "http://" and Trim(lcase(Request.Form("LINK2"))) <> "https://" then
						regLink2 = ChkString(Request.Form("LINK2"),"url")
					else
						regLink2 = " "
					end if
					if Trim(Request.Form("PHOTO_URL")) <> "" and lcase(trim(Request.Form("PHOTO_URL"))) <> "http://" and Trim(lcase(Request.Form("PHOTO_URL"))) <> "https://" then
						regPhoto_URL = ChkString(Request.Form("Photo_URL"),"url")
					else
						regPhoto_URL = " "
					end if
			
					'## Forum_SQL
					strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
					strSql = strSql & " SET M_NAME = '" & ChkString(Request.Form("Name"),"name") & "'"
					if strAuthType = "nt" then
						strSql = strSql & ",    M_USERNAME = '" & ChkString(Request.Form("Account"),"") & "'"
					else
						if strAuthType = "db" then
							strSql = strSql & ",    M_PASSWORD = '" & ChkString(Request.Form("Password"),"") & "'"
						end if
					end if
					strSql = strSql & ",    M_EMAIL = '" & ChkString(Request.Form("Email"),"") & "'"
'#########################kerrycode for Email List # UPDATE in Modify
			
			strSql = strSql & ",     M_RECMAIL  = '" & ChkString(Request.Form("RECMAIL"),"")  & "'"
			
'----------------------/kerrycode					
					strSql = strSql & ",    M_TITLE = '" & ChkString(Request.Form("Title"),"") & "'"
					strSql = strSql & ",    M_POSTS = " & ChkString(Request.Form("Posts"),"") & " "
					strSql = strSql & ",    M_COUNTRY = '" & ChkString(Request.Form("Country"),"") & "'"
					if strICQ = "1" then
						strSql = strSql & ",    M_ICQ = '" & ChkString(Request.Form("ICQ"),"") & "'"
					end if
					if strYAHOO = "1" then
						strSql = strSql & ",    M_YAHOO = '" & ChkString(Request.Form("YAHOO"),"") & "'"
					end if
					if strAIM = "1" then
						strSql = strSql & ",    M_AIM = '" & ChkString(Request.Form("AIM"),"name") & "'"
					end if
					if strHOMEPAGE = "1" then
						strSql = strSql & ",    M_HOMEPAGE = '" & ChkString(Request.Form("Homepage"),"" ) & "'"
					end if
					strSql = strSql & ",    M_SIG = '" & ChkString(Request.Form("Sig"),"message") & "'"
					strSql = strSql & ",    M_LEVEL = " & ChkString(Request.Form("Level"),"")
					if strfullName = "1" then
						strSql = strSql & ",	M_FIRSTNAME = '" & ChkString(Request.Form("FirstName"),"") & "'" 
						strSql = strSql & ",	M_LASTNAME  = '" & ChkString(Request.Form("LastName"),"") & "'"  
					end if
					if strCity = "1" then
						strsql = strsql & ",	M_CITY = '" & ChkString(Request.Form("City"),"") & "'"  
					end if
					if strState = "1" then
						strsql = strsql & ",	M_STATE = '" & ChkString(Request.Form("State"),"") & "'" 
					end if
					strsql = strsql & ",	M_HIDE_EMAIL = '" & ChkString(Request.Form("HideMail"),"") & "'"  
					if strPicture = "1" then
						strsql = strsql & ",	M_PHOTO_URL = '" & ChkString(Request.Form("Photo_URL"),"") & "'"  
					end if
					if strFavLinks = "1" then
						strsql = strsql & ",	M_LINK1 = '" & ChkString(Request.Form("LINK1"),"") & "'" 
						strSql = strSql & ",	M_LINK2 = '" & ChkString(Request.Form("LINK2"),"") & "'" 
					end if
					if strAge = "1" then
						strSql = strsql & ",	M_AGE = '" & ChkString(Request.Form("Age"),"") & "'" 
					end if
					if strMarStauts = "1" then
						strSql = strSql & ",	M_MARSTATUS = '" & ChkString(Request.Form("MarStatus"),"") & "'" 
					end if
					if strSex = "1" then
						strSql = strsql & ",	M_SEX = '" & ChkString(Request.Form("Sex"),"") & "'" 
					end if
					if strOccupation = "1" then
						strSql = strSql & ",	M_OCCUPATION = '" & ChkString(Request.Form("Occupation"),"") & "'" 
					end if
					if strBio = "1" then
						strSql = strSql & ",	M_BIO = '" & ChkString(Request.Form("Bio"),"message") & "'" 
					end if
					if strHobbies = "1" then
						strSql = strSql & ",	M_HOBBIES = '" & ChkString(Request.Form("Hobbies"),"message") & "'" 
					end if
					if strLNews = "1" then
						strsql = strsql & ",	M_LNEWS = '" & ChkString(Request.Form("LNews"),"message") & "'" 
					end if
					if strQuote = "1" then
						strSql = strSql & ",	M_QUOTE = '" & ChkString(Request.Form("Quote"),"message") & "'" 
					end if
'File Attachment ################################################
					if Request.Form("allowDownloads") = 1 then
						strSql = strSql & ",	M_ALLOWDOWNLOADS = 1"
					else 					
						strSql = strSql & ",	M_ALLOWDOWNLOADS = 0"
					end if
					if Request.Form("allowUploads") = 1 then
						strSql = strSql & ",	M_ALLOWUPLOADS = 1"
					else 					
						strSql = strSql & ",	M_ALLOWUPLOADS = 0"
					end if
'File Attachment ##################################################					
					strSql = strSql & " WHERE MEMBER_ID = " & Request.Form("MEMBER_ID")	

					my_Conn.Execute(strSql)
					
					if ChkString(Request.Form("Level"),"") = "1" then 
						'## Forum_SQL - Remove the member from the moderator table
						strSql = "DELETE FROM " & strTablePrefix & "MODERATOR "
						strSql = strSql & " WHERE " & strTablePrefix & "MODERATOR.MEMBER_ID = " & Request.Form("MEMBER_ID")

						my_Conn.Execute (strSql)
					end if

					
%>
					<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">你的注册资料已经修改完毕!</font></p>
<%
					if (strUseExtendedProfile) then
%>					
					<meta http-equiv="Refresh" content="0; URL=<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("default.asp") else Response.Write(Request.Form("refer")) end if %>">
					<p 

⌨️ 快捷键说明

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