<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<!--#include file=inc/userfun.asp-->
<!--#include file=inc/template.asp-->
<%
 '=========================================================
' File: dispuser.asp
' Version:3.0
' Date: 2005-11-5
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 Xmrxw.Com All rights reserved.
' Web: http://www.xmrxw.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ：10689579　Msn：zdlmicr@hotmail.com
'=========================================================
dim username
dim userclass
username=trim(checkStr(request("Username")))
if username="" or strLength(request("Username"))>20 then
errmsg=errmsg+"<br>"+"<li>用户名不能为空。"
		founderr=true
end if
stats="查询"&username&"个人资料"
founderr=false
if founderr then
	call head_var("","")
	call Mslove_error()
else
	if username="" then
   		ErrMsg=Errmsg+"<br>"+"<li>错误的参数。"
		founderr=true
	end if
	dim Stockmoney,bankmoney,userinfo
	dim realname,character,personal,country,province,city,shengxiao,Userstars
	dim UserIM
	dim homepage,Oicq,Icq,Msn,Aim,Yahoo,Uc
	dim Userfriendinfo,Pheight,Pweight,figure,TemplateId
	dim Ublood,UFolk,Ubelief,Uoccupation,Udutytype,Umarital,Ueducation,Ucollege
	dim Uuserphone,Uaddress
	dim Uhealth,Uweight,Ufigure,Umylook,Ufug,Uincome,Ualcohol,Uhouses,Ulanguage
	dim Uphototitle,Uimages,UWealth,Uvip,Uep,Ucp,Upower,Udiarynum
	dim Upics,Uhits,ULastlogin,Uclass,Usex,Ubirth,Umail,Ulock,Loginnum
	dim Sqlt,rst,Show_Template,OnlineTime,Ostat,Userwife
	set rs=server.createobject("adodb.recordset")
	sql="select userclass,UserIM,Userheight,TemplateId,UserInfo,Userfriends,Visual,UserFace,userWealth,Uservip,userEP,userCP,userPower,UserPics,Userdiary,UserViews,lastlogin,userclass,Usersex,Userbirthday,UserEmail,LockUser,UserLogins,Userwife from [Ms_User] where username='"&UserName&"'"
	rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			ErrMsg=Errmsg+"<br>"+"<li>您查询的名字不存在"
			founderr=true
			call Mslove_error()
			response.end
		end if
		userclass=rs("userclass")
		UserIM=rs("UserIM")
		Pheight=rs("Userheight")
		TemplateId=rs("TemplateId")
		UserIM=split(UserIM,"|||")
		homepage=UserIM(0)
		Oicq=UserIM(1)
		Icq=UserIM(2)
		Msn=UserIM(3)
		Aim=UserIM(4)
		Yahoo=UserIM(5)
		Uc=UserIM(6)
		userinfo=rs("UserInfo")
		userinfo=split(userinfo,"|||")
		realname=userinfo(0)
		character=userinfo(1)
		personal=userinfo(2)
		country=userinfo(3)
		province=userinfo(4)
		city=userinfo(5)
		shengxiao=userinfo(6)
		Userstars=userinfo(7)
		Ublood=userinfo(8)
		UFolk=userinfo(9)
		Ubelief=userinfo(10)
		Uoccupation=userinfo(11)
		Udutytype=userinfo(12)
		Umarital=userinfo(13)
		Ueducation=userinfo(14)
		Ucollege=userinfo(15)
		Uuserphone=userinfo(16)
		Uaddress=userinfo(17)
		Userfriendinfo=split(rs("Userfriends"),"|||")
		Uhealth=Userfriendinfo(0)
		Uweight=Userfriendinfo(1)
		Ufigure=Userfriendinfo(2)
		Umylook=Userfriendinfo(3)
		Ufug=Userfriendinfo(4)
		Uincome=Userfriendinfo(5)
		Ualcohol=Userfriendinfo(6)
		Uhouses=Userfriendinfo(7)
		Ulanguage=Userfriendinfo(8)
		Stockmoney=0
		bankmoney=0
	if TemplateId="" then
		TemplateId=1
	end if
		Uphototitle=rs("Visual")
		Uimages=rs("UserFace")
		Uwealth=rs("userWealth")
		Uvip=rs("Uservip")
		Uep=rs("userEP")
		Ucp=rs("userCP")
		Upower=rs("userPower")
		Upics=rs("UserPics")
		Udiarynum=rs("Userdiary")
		Uhits=rs("UserViews")
		Ulastlogin=rs("lastlogin")
		Uclass=rs("userclass")
		Usex=rs("Usersex")
		Ubirth=rs("Userbirthday")
		Umail=rs("UserEmail")
		Ulock=rs("LockUser")
		Loginnum=rs("UserLogins")
		Userwife=rs("Userwife")
		Sqlt="select Template from [Ms_Template] where id="&TemplateId
		set rst=conn.execute(Sqlt)
		if not (rst.eof and rst.bof) then
			Show_Template=rst("Template")
		End If
		rs.close
		set rs=nothing
	set rs=conn.execute("select stats,startime from Ms_online where username='"&UserName&"'")
	if rs.eof and rs.bof then
		Ostat=""
		OnlineTime="状态：[离线]"
	else
		Ostat="当前位置：["&rs(0)&"]"
		OnlineTime="状态：[在线：" & datediff("n",rs(1),Now()) & "Mins]"
	end if
	rs.close
	set rs=nothing
	Call Replace_PublicTag(Show_Template)
	conn.execute("update Ms_user set UserViews=UserViews+1 where Username='"&UserName&"'")
	if founderr then call Mslove_error()
	call activeonline()
end if
%>