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

📄 profile.asp

📁 程序网络论坛HigroupBBS v4.00 默认管理员帐号密码都是Marcos
💻 ASP
字号:
<!--#include file="MarcosCB.asp"-->
<%
	getConn()
	isIn()

	dim i,userId
	dim theAct,strOther
	dim str,pageCode,pageTitle,pageOther
	dim userPic,userName,passWord,conPassWord,userSign,userSex,userBirthday,userGroup

	theAct=getPost("theAct")
	userId=getPost("userId")
	userName=replace(getPost("userName"),"'","''")
	if not isNumeric(userId) then
		userId=getValue("userId")
	end if
	if userId<>getValue("userId") then
		isAdmin()
	end if
	
	nowWhere "修改个人资料","proFile.asp"
	
	if theAct="modify" then
		passWord=getPost("passWord")
		conPassWord=getPost("conPassWord")
		userPic=getPost("userPic")
		userSign=getPost("userSign")
		userSex=getPost("userSex")
		userBirthday=getPost("userBirthday")
		userGroup=getPost("userGroup")
		
		if passWord<>conPassWord then
			echo "<script>alert('密码确认错误!');history.back();</script>"
			closeConn()
			response.end
		end if
		
		if not isDate(userBirthday) then
			echo "<script>alert('对不起,您的生日填写错误!');history.back();</script>"
			closeConn()
			response.end
		end if
		
		sql="select * from Marcos_User where userId="&userId
		rs.open sql,conn,1,3
'			rs("userName")=userName
			rs("userSign")=userSign
			rs("userPic")=userPic
			rs("userSex")=userSex
			rs("userBirthday")=userBirthday
			rs("userGroup")=userGroup
			if passWord<>"" then
				rs("passWord")=md5(passWord)
				if userId=getValue("userId") then
					setValue "passWord",md5(passWord)
				end if
			end if
			for i=1 to request("otherValue").count
				if request("otherName")(i)<>"" and request("otherValue")(i)<>"" then
					strOther=strOther & request("otherName")(i) & "@@" & request("otherValue")(i) & "$$$"
				end if
			next
			rs("userOther")=strOther
		rs.update
		rs.close
		echo "<script>alert('修改成功!');location.href='proFile.asp?userId="&userId&"';</script>"
		closeConn()
		response.end
	end if

	rem =========================== 页面显示代码 ====================================

	str=getMainCode(mySkinId)
	
	pageTitle="<a href=javascript:location.reload();>修改我的资料</a>"
	pageOther="<script>document.title+=' - 修改我的资料';</script>"
	
	showHead str,pageTitle,pageOther
	showBody()
	showFoot(str)
	
	sub showBody()
		pageCode=getPageCode(mySkinId,"PageProFile")
		PageProFile=split(pageCode,"$$$")
		body=PageProFile(0)
		
		sql="select * from Marcos_User where userId="&userId
		rs.open sql,conn,1,1
		body=replace(body,"{$userName}",rs("userName"))
		body=replace(body,"{$userId}",rs("userId"))
		body=replace(body,"{$userSex"&rs("userSex")&"}","checked")
		body=replace(body,"{$userBirthday}",rs("userBirthday"))
		body=replace(body,"{$userGroup}",rs("userGroup"))
		body=replace(body,"{$userPic}",fixNull(rs("userPic")))
		userOther=split(fixNull(rs("userOther")),"$$$")
		for i=0 to uBound(userOther)-1
			body=body&PageProFile(1)
			body=replace(body,"{$otherName}",split(userOther(i),"@@")(0))
			body=replace(body,"{$otherValue}",split(userOther(i),"@@")(1))
		next
		body=body&PageProFile(2)
		body=replace(body,"{$userSign}",fixNull(rs("userSign")))
		
		echo body
		rs.close
		queryTimes=queryTimes+1
	end sub
	
	closeConn()
%>

⌨️ 快捷键说明

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