<!--#include file="connection.asp"-->
<!-- #include file="inc/const.asp" -->
<%
Dvbbs.LoadTemplates("dispuser")
Dim ErrCodes,UserName,ShowUserid
UserName=Dvbbs.CheckStr(Request("name"))
If IsNumeric(Request("id")) and Request("id")<>"" Then
	ShowUserid=Clng(Request("id"))
Else
	If UserName="" Then
		Dvbbs.AddErrCode(35)
	End If
End If
'If Cint(Dvbbs.GroupSetting(1))=0 Then
'	ErrCodes=ErrCodes+"<li>"+template.Strings(1)
'End If

Dvbbs.Stats=Replace(template.Strings(0),"{$MemberName}",UserName)
Dvbbs.Nav()
Dvbbs.Head_var 2,0,Dvbbs.Stats,"dispuser.asp"
Dvbbs.Showerr()
If ErrCodes="" Then Main()

Showerr()
Dvbbs.Showerr()
Dvbbs.ActiveOnline
Dvbbs.NewPassword()
Dvbbs.Footer()

'0=UserID,1=UserName,2=UserPassword,3=UserEmail,4=UserPost,5=UserTopic,6=UserSign,7=UserSex,8=UserFace,9=UserWidth,10=UserHeight,11=UserIM,12=JoinDate,13=LastLogin,14=UserLogins,15=UserViews,16=Lockuser,17=Userclass,18=UserGroup,19=userWealth,20=userEP,21=userCP,22=UserTitle,23=UserBirthday,24=UserQuesion,25=UserAnswer,26=UserLastIP,27=UserPhoto,28=UserFav,29=UserPower,30=UserDel,31=UserIsBest,32=UserInfo,33=UserSetting,34=UserGroupID,35=TitlePic,36=UserHidden,37=UserMsg,38=IsChallenge,39=UserMobile
 
Sub Main()
Dim RS,SQL,UserInfo,i,UPSQL,userface,userxin,userborn,usersex
Dim TempPart0,TempPart1,TempPart2,TempPart3,TempPart4,TempPart5
		i	= 0
TempPart0	= template.html(0)
TempPart1	= template.html(1)
TempPart2	= template.html(2)
TempPart3	= template.html(3)
TempPart4	= template.html(4)
TempPart5	= template.html(5)

'UPSQL="update [Dv_user] set UserViews=UserViews+1 "
SQL=" select Jauname,Jaface,Jaxin,Jaborn,Jasex,visual From Jauser "
	If ShowUserid="" Then
		'UPSQL=UPSQL + " Where Username='"&UserName&"'"
		SQL=SQL + " Where Jauname='"&UserName&"'"
	Else
		'UPSQL=UPSQL + " Where Userid="&ShowUserid
		SQL=SQL + " Where Jauid="&ShowUserid
	End If
	Set Rs=Dvbbs.Execute(Sql)
	If Rs.Eof And Rs.Bof Then
		Dvbbs.AddErrCode(32)
		Exit Sub
'	Else
		'Dvbbs.Execute(UPSQL)
		'UserInfo=Rs.GetRows(1)
		'SQL=Rs.GetString(,1, "@@@", "", "")
'		Rs.Close:Set Rs=Nothing
	End if
	'UserInfo=Split(Sql,"@@@")
	'ShowUserid=Clng(UserInfo(0))
	UserName=rs("Jauname")
'	UserFace=rs("Jaface")
	usersex=rs("Jasex")
	if not isnull(rs("Jaborn")) then
	userborn=rs("Jaborn")
	else
	userborn=""
	end if
'	Dim UserStats,UserOnTime
'	If Dvbbs.Boardmaster or Dvbbs.Superboardmaster or Dvbbs.Master Then
'		Set Rs=Dvbbs.Execute("Select Stats,Startime From Dv_Online Where Userid="&ShowUserid)
'	Else
'		Set Rs=Dvbbs.Execute("Select Stats,Startime From Dv_Online Where Userid="&ShowUserid&" And Userhidden=2")
'	End If
'	If Rs.eof and Rs.bof Then
'		UserStats=template.Strings(4)
'		UserOnTime=template.Strings(4)
'	Else
'		UserStats=Rs(0)
'		UserOnTime=DateDiff("n",Rs(1),Now())
'		UserOnTime=Replace(template.Strings(3),"{$UserOnTime}",UserOnTime)
'	End If
'	Rs.close:Set Rs=Nothing
'	Dim UserSetting,SetUserInfo,SetUserTrue
'	UserSetting=split(UserInfo(33),"|||")
'	If Ubound(UserSetting)>1 Then
'		If not isnumeric(UserSetting(0)) Then SetUserInfo=1 Else SetUserInfo=cint(UserSetting(0))
'		If not isnumeric(UserSetting(1)) Then SetUserTrue=0 Else SetUserTrue=cint(UserSetting(1))
'	Else
'		SetUserInfo=1
'		SetUserTrue=0
'	End If

	TempPart4=Replace(TempPart4,"{$UserName}",UserName)
	TempPart0=Replace(TempPart0,"{$TableWidth}","")
	TempPart0=Replace(TempPart0,"{$UserFace}",userface)
	TempPart0=Replace(TempPart0,"{$UserName}",UserName)
	TempPart0=Replace(TempPart0,"{$WhereUser}","")
	TempPart0=Replace(TempPart0,"{$Pic_Stats}","")
	TempPart0=Replace(TempPart0,"{$UserStats}","")
	TempPart0=Replace(TempPart0,"{$UserOnTime}","")
'	Response.Write TempPart4
	Response.Write TempPart0
'const dbStock="plus/gupiao/stock.mdb"     '改为你的股票数据库地址
'dim connmoney,Stock_money
'dim rsmoney
'Set connmoney = Server.CreateObject("ADODB.Connection")
'connmoney.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&dbStock&"")
'set rsmoney=connmoney.execute("select 总资金 from 客户 where 帐号='"&username&"'")
'if rsmoney.bof and rsmoney.eof then
'Stock_money=0
'else
'Stock_money=clng(rsmoney("总资金"))
'end if
'rsmoney.close  
'connmoney.close
'set rsmoney=nothing
'Set connmoney = Nothing


'基本资料部分
'If SetUserInfo=1 or ShowUserid=Dvbbs.userid Then
'	Dim UserIM,Sex,UserPhoto	'UserIM=========HomePage,UserOicq,UserIcq,UserMsn,UserAim,UserYahoo,UserUC
'	UserIM=DVbbs.htmlencode(UserInfo(11))
'	UserIM=split(UserIM,"|||")
'	If not IsArray(UserIM) Then ReDim UserIM(6)
'	If UserInfo(7)=1 Then
'		Sex=split(template.Strings(5),",")(1)
'	Else
'		Sex=split(template.Strings(5),",")(0)
'	End If
'	If UserInfo(27)<>"" Then UserPhoto="<img src="""&Dv_FilterJS(UserInfo(27)) &""" >"
	TempPart1=Replace(TempPart1,"{$UserBirthday}",userborn)
	TempPart1=Replace(TempPart1,"{$UserName}",UserName)
	TempPart1=Replace(TempPart1,"{$UserPhoto}","")
	TempPart1=Replace(TempPart1,"{$UserSex}",usersex)
	TempPart1=Replace(TempPart1,"{$Pic_Star}",astro(userborn))
	TempPart1=Replace(TempPart1,"{$UserEmail}","")
	TempPart1=Replace(TempPart1,"{$UserHomePage}","")
	TempPart1=Replace(TempPart1,"{$UserOicq}","")
	TempPart1=Replace(TempPart1,"{$UserIcq}","")
	TempPart1=Replace(TempPart1,"{$UserMsn}","")
	TempPart1=Replace(TempPart1,"{$UserAIM}","")
	TempPart1=Replace(TempPart1,"{$UserYahoo}","")
	TempPart1=Replace(TempPart1,"{$UserUC}","")
	TempPart1=Replace(TempPart1,"{$UserMobile}","")
	Response.Write TempPart1
'End If

'详细资料部分
'If SetUserTrue=1 or ShowUserid=Dvbbs.userid Then
'	Dim UserTrueInFo
'	UserTrueInFo=DVbbs.htmlencode(UserInfo(32))
'	UserTrueInFo=Split(UserTrueInFo,"|||")
'	If Not IsArray(UserTrueInFo) Or Ubound(UserTrueInFo)<>14 Then ReDim UserTrueInFo(14)
	TempPart2=Replace(TempPart2,"{$UserRealName}","")
	TempPart2=Replace(TempPart2,"{$UserCharacter}","")
	TempPart2=Replace(TempPart2,"{$User_Personal}","")
	TempPart2=Replace(TempPart2,"{$UserCountry}","")
	TempPart2=Replace(TempPart2,"{$UserProvince}","")
	TempPart2=Replace(TempPart2,"{$UserCity}","")
	TempPart2=Replace(TempPart2,"{$UserShengXiao}","")
	TempPart2=Replace(TempPart2,"{$UserBlood}","")
	TempPart2=Replace(TempPart2,"{$UserBelief}","")
	TempPart2=Replace(TempPart2,"{$UserOccupation}","")
	TempPart2=Replace(TempPart2,"{$UserMarital}","")
	TempPart2=Replace(TempPart2,"{$UserEducation}","")
	TempPart2=Replace(TempPart2,"{$UserCollege}","")
	TempPart2=Replace(TempPart2,"{$UserPhone}","")
	TempPart2=Replace(TempPart2,"{$UserAddress}","")
	Response.Write TempPart2
'End If

'论坛属性部分

'用户状态验证
'数据帖子列表
end sub

'显示错误信息
Sub Showerr()
Dim Show_Errmsg
	If ErrCodes<>"" Then 
		Show_Errmsg=Dvbbs.mainhtml(14)
		ErrCodes=Replace(ErrCodes,"{$color}",Dvbbs.mainSetting(1))
		Show_Errmsg=Replace(Show_Errmsg,"{$color}",Dvbbs.mainSetting(1))
		Show_Errmsg=Replace(Show_Errmsg,"{$errtitle}",Dvbbs.Forum_Info(0)&"-"&Dvbbs.Stats)
		Show_Errmsg=Replace(Show_Errmsg,"{$action}",Dvbbs.Stats)
		Show_Errmsg=Replace(Show_Errmsg,"{$ErrString}",ErrCodes)
	End If
	Response.write Show_Errmsg
End Sub

Function Dv_FilterJS(v)
	If  Not Isnull(V) Then
		Dim t
		Dim re
		Dim reContent
		Set re=new RegExp
		re.IgnoreCase =True
		re.Global=True
		re.Pattern="(&#)"
		t=re.Replace(v,"<I>&#</I>")
		re.Pattern="(script)"
		t=re.Replace(t,"<I>script</I>")
		re.Pattern="(js:)"
		t=re.Replace(t,"<I>js:</I>")
		re.Pattern="(value)"
		t=re.Replace(t,"<I>value</I>")
		re.Pattern="(about:)"
		t=re.Replace(t,"<I>about:</I>")
		re.Pattern="(file:)"
		t=re.Replace(t,"<I>file:</I>")
		re.Pattern="(Document.cookie)"
		t=re.Replace(t,"<I>Documents.cookie</I>")
		re.Pattern="(vbs:)"
		t=re.Replace(t,"<I>vbs:</I>")
		re.Pattern="(on(mouse|Exit|error|click|key))"
		t=re.Replace(t,"<I>on$2</I>")
		Dv_FilterJS=t
		Set Re=Nothing
	End If 
End Function



'日期转换星座函数
'白羊座,金牛座,双子座,巨蟹座,狮子座,处女座,天秤座,天蝎座,射手座,魔羯座,水瓶座,双鱼座
function astro(birth)
if birth="" or not isdate(birth) Then birth=now()
Dim birthday,birthmonth
Dim Star_name,Star_src
Star_name=Split(template.Strings(6),",")
IF not IsArray(Star_name) Then ReDim Star_name(12)
	birthday=day(birth)
	birthmonth=month(birth)
	select case birthmonth
	case 1
		if birthday>=21 then
			astro="<img src="""&template.pic(11)&""" alt="&Star_name(10)&birth&">"
		else
			astro="<img src="""&template.pic(10)&""" alt="&Star_name(9)&birth&">"
		end if
	case 2
		if birthday>=20 then
			astro="<img src="""&template.pic(11)&""" alt="&Star_name(11)&birth&">"
		else
			astro="<img src="""&template.pic(10)&""" alt="&Star_name(10)&birth&">"
		end if
	case 3
		if birthday>=21 then
			astro="<img src="""&template.pic(1)&""" alt="&Star_name(0)&birth&">"
		else
			astro="<img src="""&template.pic(12)&""" alt="&Star_name(11)&birth&">"
		end if
	case 4
		if birthday>=21 then
			astro="<img src="""&template.pic(2)&""" alt="&Star_name(1)&birth&">"
		else
			astro="<img src="""&template.pic(1)&""" alt="&Star_name(0)&birth&">"
		end if
	case 5
		if birthday>=22 then
			astro="<img src="""&template.pic(3)&""" alt="&Star_name(2)&birth&">"
		else
			astro="<img src="""&template.pic(2)&""" alt="&Star_name(1)&birth&">"
		end if
	case 6
		if birthday>=22 then
			astro="<img src="""&template.pic(4)&""" alt="&Star_name(3)&birth&">"
		else
			astro="<img src="""&template.pic(3)&""" alt="&Star_name(2)&birth&">"
		end if
	case 7
		if birthday>=23 then
			astro="<img src="""&template.pic(5)&""" alt="&Star_name(4)&birth&">"
		else
			astro="<img src="""&template.pic(4)&""" alt="&Star_name(3)&birth&">"
		end if
	case 8
		if birthday>=24 then
			astro="<img src="""&template.pic(6)&""" alt="&Star_name(5)&birth&">"
		else
			astro="<img src="""&template.pic(5)&""" alt="&Star_name(4)&birth&">"
		end if
	case 9
		if birthday>=24 then
			astro="<img src="""&template.pic(7)&""" alt="&Star_name(6)&birth&">"
		else
			astro="<img src="""&template.pic(6)&""" alt="&Star_name(5)&birth&">"
		end if
	case 10
		if birthday>=24 then
			astro="<img src="""&template.pic(8)&""" alt="&Star_name(7)&birth&">"
		else
			astro="<img src="""&template.pic(7)&""" alt="&Star_name(6)&birth&">"
		end if
	case 11
		if birthday>=23 then
			astro="<img src="""&template.pic(9)&""" alt="&Star_name(8)&birth&">"
		else
			astro="<img src="""&template.pic(8)&""" alt="&Star_name(7)&birth&">"
		end if
	case 12
		if birthday>=22 then
			astro="<img src="""&template.pic(10)&""" alt="&Star_name(9)&birth&">"
		else
			astro="<img src="""&template.pic(9)&""" alt="&Star_name(8)&birth&">"
		end if
	case else
		astro=""
	end select
end function



%>