<%
dim LocalPic,PicPath,CartLength,hasVipPlus,DefaultVisualBoy,DefaultVisualGirl,isAllow,DefaultFont,PhotoPath,PhotoListCount,DefaultStatus
LocalPic=1
isAllow=0
if LocalPic=1 then
	PicPath="/Service/visual/Images/Img_Visual_ET/Show/"
end if

function isCanShowVisual(CurVisualSplit)
	dim TempSplit
	if ubound(CurVisualSplit)<>24 then
		isCanShowVisual=False
		exit function
	end if
	if CurVisualSplit(6)="" or CurVisualSplit(7)="" or CurVisualSplit(8)="" or CurVisualSplit(10)="" or CurVisualSplit(12)="" or CurVisualSplit(13)="" or CurVisualSplit(17)="" then
		isCanShowVisual=False
		exit function
	end if
	if isAllow=0 then
		TempSplit=split(CurVisualSplit(7),".")
		if TempSplit(0)="6" or TempSplit(0)="13" then
			isCanShowVisual=False
			exit function
		end if
		TempSplit=split(CurVisualSplit(8),".")
		if TempSplit(0)="5" or TempSplit(0)="12" then
			isCanShowVisual=False
			exit function
		end if
	end if
	isCanShowVisual=True
end function

sub showvisual(uservisual,visualwidth,isSmall)
	if uservisual<>"" then
		if isCanShowVisual(split(uservisual,"|")) then
			if isSmall or visualwidth<=0 then
				response.write "<CENTER><IFrame src=../Service/visual/z_visual_show.asp?width=0&picpath="&picpath&"&localpic="&localpic&"&visual="&uservisual&" width=80 height=120 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=NO allowtransparency=true></iframe></CENTER>"
			else
				response.write "<CENTER><IFrame src=../Service/visual/z_visual_show.asp?width="&visualwidth&"&picpath="&picpath&"&localpic="&localpic&"&visual="&uservisual&" width="&visualwidth&" height="&(visualwidth*150\120)&" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=NO allowtransparency=true></iframe></CENTER>"
			end if
		else
			response.write ""
		end if
	else
		response.write ""
	end if
end sub

Sub ShowUserVisual(v_UserName,v_VisualWidth,v_BodyClass,v_isSmallVisual)
	Dim ConnStr,CONN,Db,SQL
	Db="../Service/visual/visual_data/dfrbgfhrtrt_visual.mdb"

	ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
	Set conn = Server.CreateObject("ADODB.Connection")
	conn.open ConnStr
	dim v_usersex,v_userface,v_uservisual,v_userwidth,v_userheight,v_rsu
	v_uservisual=""
	set v_rsu=server.createobject("adodb.recordset")
	sql="select visual from [user] where username='"&v_UserName&"'"
	v_rsu.open sql,conn,1,1
	if not (v_rsu.eof or v_rsu.bof) then
		v_uservisual=v_rsu("visual")
	end if
	v_rsu.close
	set v_rsu=nothing
	Conn.Close
	Set Conn = Nothing
	call showvisual(v_UserVisual,v_VisualWidth,v_isSmallVisual)
End Sub
%>