<!--#include file="connection.asp"-->

<!--#include file="inc/const.asp" -->
<!--#include file="z_Visual_const.asp"-->
<!--#include file="inc/chkinput.asp"-->
<!--#include file="inc/md5.asp"-->
<%
dim pid,curpage,act,app,uid,pas,pmyname,lst,content
dim prs,PageCount,curcount
dim getmoney


if dvbbs.userid=0  then
	errmsg=errmsg+"<br>"+"<li>您还没有<a href=login.asp>登录社区</a>，不能使用个人形象合影功能。如果您还没有<a href=reg.asp>注册</a>，请先<a href=reg.asp>注册</a>！"
	founderr=true
end if
getmoney=dvbbs.GroupSetting(47)
dim rsm,sqlm
set rsm=server.createobject("adodb.recordset")
 set rsm=conn.execute("select Jamonery from [Jauser] where Jauid="&trim(dvbbs.userid))
        if rsm.eof or rsm.bof then
  mymoney=0
 else
 mymoney=trim(rsm("Jamonery"))
end if
rsm.close
set rsm=nothing 
	dvbbs.nav()
        dvbbs.head_var 2,0,"个人形象大赛",""
act=checkstr(request("act")) '提交的类型0为申请合影1为同意合影2观看照片
app=checkstr(request("app")) '提交的类型0为申请合影1为同意合影
lst=checkstr(request("lst")) '影集的类别
pas=checkstr(request("pas")) '密码
pid=checkstr(request("pid")) '合影的id
uid=checkstr(request("uid")) '用户id
curPage=request("page") '页数

if not isInteger(pid) then pid=""
if not isInteger(lst) then lst=""
if not isInteger(uid) then uid=""
if act="" or not isInteger(act) then act=3
if not isInteger(app) then app=""

if uid<>"" then uid=clng(uid)
if act<>"" then act=clng(act)
if app<>"" then app=clng(app)
if pid<>"" then pid=clng(pid)
if lst<>"" then lst=clng(lst)

if curpage="" or not isInteger(curpage) then
	curpage=1
else
	curpage=clng(curpage)
end if
if uid="" then
	uid=dvbbs.userid
	pmyname=dvbbs.membername
	else
	pmyname=getmyname(uid)
end if
dvbbs.stats="个人形象"
if founderr=true then
	dvbbs.nav()
        dvbbs.head_var 2,0,"",""
	call dvbbs_error()
else
call phototop()
end if

Dvbbs.ActiveOnline()
Dvbbs.Footer()


sub phototop()'top20虚拟形象大赛
dim totalrec,mypid,srs
%>
<a name=visualtop>

 <div align="center">
<table border=0 cellspacing=1 cellpadding=0 bgcolor=blue width=96%>
<tr height=25 valign=middle>
<th valign=middle >
[论坛个人形象秀<font color=red>TOP　2 </font>]</th></tr>



<%
set srs=server.createobject("ADODB.Recordset")
                        select case lst
                        case "3" 'top20虚拟形象大赛
                      
                        sql="select top 20 id,book,date,cou from [Visual_photo3] where pok=1 and vopen=0 and lb=3 order by cou desc"			        
			case "2" 'top20虚拟形象大赛
			
                        sql="select top 20 id,book,date,cou from [Visual_photo3] where pok=1 and vopen=0 and lb=2 order by cou desc"			        
			case "1" 'top20虚拟形象大赛
			
			           sql="select id,book,date,cou from [Visual_photo3] where pok=1 and vopen=0 order by id desc"
                        'sql="select top 20 id,book,date,cou from [Visual_photo3] where pok=1 and vopen=0 and lb=1 order by cou desc"				
			case "0" 'top20虚拟形象大赛
			             

                        sql="select top 20 id,book,date,cou from [Visual_photo3] where pok=1 and vopen=0 and lb=0 order by cou desc"			        
			case else '全部照片列表
			%><tr><td>
                       
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr valign=middle>
			<% 
                        sql="select top 2 id,book,date,cou from [Visual_photo3] where pok=1 and vopen=0 and lb=1 order by cou desc"
                        'sql="select id,book,date,cou from [Visual_photo3] where pok=1 and vopen=0 order by id desc"
			end select
                        srs.open sql,conn,1,1
                        if srs.eof and srs.bof then
		               response.write "<br>暂时还没有任何用户数据</td>"
                        else
                        
			                totalrec=srs.recordcount
                                        if totalrec mod 2=0 then
						pagecount=totalrec \ 2
					else
						pagecount=totalrec \ 2+1
					end if
					curcount=0
					dim iic
					iic=0
					if curpage > pagecount then curpage = pagecount
						if curpage < 1 then curpage=1
						srs.PageSize=2
						srs.AbsolutePage=CurPage
					do while not srs.eof and curcount<2
					mypid=srs("id")
					%>
					
					<td class=tablebody1 width=50%>
					
					
					<table width=100% border=0 cellspacing=1 cellpadding=0 ><tr><td align=center>
					<%
					
					call photosee(mypid,"")%>					
                                        </td>
                                        
                                        </tr>
                                        <tr><td class=tablebody2 align="center">
                                        <%
                                        response.write "(得票：<font color=blue>"&srs("cou")&"</font>)"
                                        if dvbbs.master then
                                        response.write "&nbsp;&nbsp;<a href=""z_top_photo.asp?act=5&lst=0&pid="&mypid&"&uid=""&dvbbs.userid&"" title=""删除这副合影"">删除</a>"
                                        end if
                                        %>
                                        </td></tr>
                                        
                                        
                                        </table></td>
                                        <%
                                        curcount=curcount+1
                                        iic=iic+1
                                        if iic mod 2=0 then
                                        iic=0%>
                                        <tr valign=middle>
                                        <%end if
					srs.movenext
					loop
					
			%>
			</tr></table></td>
			<%		
			end if
			%>
			</tr><tr><td width=100%>
			
		
			<table width=100% border=0 cellspacing=0 cellpadding=0>
					<tr height=25 valign=middle>
						<td valign=middle class=tablebody1>&nbsp;&nbsp;页次：<b><%=curPage%></b> / <b><%=pagecount%></b> 页 每页：<b>2</b> 共计：<b><%=totalrec%></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=z_top_photo.asp?act=0&app=3&lst=2><b></font color=red>我要参赛</font></b></a></td>
						<td valign=middle class=tablebody1><div align=right>分页：<%
							call DispPageNum(curpage,pagecount,"?act=3&lst="&lst&"&page=","#VisualTop")
						%>&nbsp;&nbsp;</td>
					</tr>
			</table>
			</td></tr></table></td></div>
		
			<%
srs.close
set srs=nothing
end sub

sub photosee(pid,pas) '观看，需要调用合影id，密码
dim myid,myv,myc,mybake,myopen,mypass,mylb,mybook,mydate
dim myid_n,myv_n,myc_n,pwidth,myname1,myname2,myname3,mysex1,mysex2,mysex3
dim trs
set trs=server.createobject("ADODB.Recordset")
sql="select * from [Visual_photo3] where pok=1 and id="&pid
set trs=conn.execute(sql)
if trs.eof or trs.bof then
	response.write"<br>"+"<li>暂时没有您想看的照片，或者合影尚未完成。"
	trs.close
        set trs=nothing
	exit sub
else
        myid=trs("myid")
        myv=trs("myv")
        myc=trs("myc")
        mybake=trs("bake")
        myopen=trs("vopen")
        mypass=trs("pass")
        mylb=trs("lb")
        mybook=trs("book")
        mydate=trs("date")
        if mybake="" or isnull(mybake) then
	pwidth=140
	mybake=""
	else
	pwidth=280
        end if
end if
trs.close        
set trs=nothing 
        myid_n=split(myid,"|")
        myv_n=split(myv,"§")
        myc_n=split(myc,"|")
        dim passok
        
        if myopen=0 then '相片需要密码
        if myid_n(0)=cstr(dvbbs.userid) or myid_n(1)=cstr(dvbbs.userid) or myid_n(1)=cstr(dvbbs.userid) or dvbbs.master then '照片的主人可以不需要密码
	passok=true
	else
	if pas<>mypass then
		passok=false
		else
		passok=true
	end if
        end if
        end if
        
        if passok=false then '相册保密需要正确的密码
	response.write"<br>"+"<li>照片保密</a>，暂时不能观看。"
        exit sub
        end if

        myname1=getmyname(myid_n(0))
	myname2=getmyname(myid_n(1))
	myname3=getmyname(myid_n(2))
	mysex1=getmysex(myid_n(0))
	mysex2=getmysex(myid_n(1))
	mysex3=getmysex(myid_n(2))
	call photolook(mylb,pwidth,mybake,myname1,myname2,myname3,mysex1,mysex2,mysex3,myv_n(0),myv_n(1),myv_n(2),myc_n(0),myc_n(1),myc_n(2),mydate)		

end sub










sub photolist(lst)'我的相册列表
dim myname,myid,myid1,mylb
dim totalrec,mypid,mypas
if lst="" then lst="0"
if uid="" then 
	uid=dvbbs.userid
        myname="我"
        else
myname=getmyname(uid)
end if

%>
<a name=visualtop>
<table border=0 cellspacing=1 cellpadding=0 bgcolor=blue width=98%>
<tr height=25 valign=middle>
<th valign=middle>
 
</th></tr>
<tr height=25 valign=middle>
<td valign=middle width=100%> 
</td></tr><tr><td width="100%">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr valign=middle>
			
<%
                        set prs=server.createobject("ADODB.Recordset")
                        select case lst
                        case "0" 
			%><%=myname%>的家庭秀<%
			sql="select id,myid,book,date,pass,cou,lb from [Visual_photo3] where lb=0 and pok=1  order by cou desc"			        
			case "1" 
			%><%=myname%>的写真秀<%
			sql="select id,myid,book,date,pass,cou,lb from [Visual_photo3] where lb=1 and pok=1  order by cou desc"
			case else '
			%><%=myname%>的合影秀<%
			sql="select id,myid,book,date,pass,cou,lb from [Visual_photo3] where (lb=2 or lb=3) and pok=1  order by cou desc"
			end select
                        prs.open sql,conn,1,1
                        if prs.eof and prs.bof then
		               response.write "<br>暂时还没有任何用户数据</td>"
                        else
                        
			                totalrec=prs.recordcount
                                        
					curcount=0
					dim iic
					iic=0
					if curpage > pagecount then curpage = pagecount
						if curpage < 1 then curpage=1
						prs.PageSize=10
						prs.AbsolutePage=CurPage
					do while not prs.eof and curcount<10
				        mylb=prs("lb")
					myid=prs("myid")
					myid1=split(myid,"|")
					mypas=prs("pass")
					dim showok
					
					if myid1(0)=cstr(uid) or myid1(1)=cstr(uid) or myid1(2)=cstr(uid) then
                                        	showok=true
                                        	else
                                        	showok=false
                                        end if
                                        if showok=true then
			                %>
					<td class=tablebody1 width=45%>
					<table width=100% border=0 cellspacing=1 cellpadding=0><tr><td align=center>
					<%
					
			                mypid=prs("id")
					call photosee(mypid,"")
					%>					
                                        </td></tr>
                                        <tr><td class=tablebody2>
                                        <%
                                        response.write "&nbsp;&nbsp;<a href=""z_top_photo.asp?act=4&lst=1&pid="&mypid&"&uid=""&dvbbs.userid&"" title=""欣赏这个形象，给他一朵鲜花，将消耗您"&dvbbs.GroupSetting(47)&"点金钱""><img src=skins/default/xianhua.gif border=0>鲜花</a>&nbsp;&nbsp;(共：<font color=blue>"&prs("cou")&"</font>)"
                                        response.write "&nbsp;&nbsp;<a href=""z_top_photo.asp?act=5&lst=0&pid="&mypid&"&uid=""&dvbbs.userid&"" title=""删除这副合影"">删除</a>"
                                        %>
                                        </td></tr>
                                        
                                        <tr><td class=tablebody2>
                                        <form action="z_top_photo.asp?act=5&pid=<%=mypid%>&lst=1&uid=<%=dvbbs.userid%>&pas=<%=mypas%>" name="subsee" method=post>
                                        <INPUT name=phtname type=text size="20"> &nbsp;<input type=submit name=submit value="推荐给朋友">
                                        </form>
                                        </td></tr>
                                        </table></td>
                                   
                                        <%
                                        curcount=curcount+1
                                        iic=iic+1
                                        else
					totalrec=totalrec-1
				        end if
					
					
                                        
                                        if iic mod 2=0 then
                                        iic=0%>
                                        <tr valign=middle>
                                        <%end if
					prs.movenext
					loop
					if totalrec mod 10=0 then
						pagecount=totalrec \ 10
					else
						pagecount=totalrec \ 10+1
					end if
			%>
			</tr></table></td>
			
			<%		
			end if
			%>
			</tr><tr><td width=100%>
			<table width=100% border=0 cellspacing=0 cellpadding=0>
					<tr height=25 valign=middle>
						<td valign=middle class=tablebody1>&nbsp;&nbsp;页次：<b><%=curPage%></b> / <b><%=pagecount%></b> 页 每页：<b>10</b> 共计：<b><%=totalrec%></b></td>
						<td valign=middle class=tablebody1><div align=right>分页：<%
							call DispPageNum(curpage,pagecount,"?act=3&lst="&lst&"&page=","#VisualTop")
						%>&nbsp;&nbsp;</td>
					</tr>
			</table>
			</td></tr></table></td>
			
			
			<%
prs.close
set prs=nothing
end sub


sub photolook(lb,pwidth,mybake,myname1,myname2,myname3,mysex1,mysex2,mysex3,myv1,myv2,myv3,myc1,myc2,myc3,mydate)'显示照片
dim myfqsex1,myfqsex2,mycolor1,mycolor2,mycolor3
dim amyname,amydate
if lb<>0 then
myfqsex1=""
myfqsex2=""
else '夫妻
if mysex1<>0 then
myfqsex1="[夫]"
myfqsex2="[妻]"
else
myfqsex2="[夫]"
myfqsex1="[妻]"
end if	
END IF	



amyname="<table align=left valign=top></tr><td>"
if myname1<>"" then
	if mysex1=1 then
	mycolor1="ffff00" 
	else
	mycolor1="00ff00"
end if
myname1="<table style='filter:glow(color=#05050A,strength=2)'><tr><td align=left><FONT color=#"&mycolor1&">"&myname1&""&myfqsex1&"</font><br></td></tr>"
amyname=amyname&myname1&"</table>"
end if

if myname2<>"" then
	if mysex2=1 then
	mycolor2="ffff00" 
	else
	mycolor2="00ff00"
end if
myname2="<table style='filter:glow(color=#01010c,strength=2)'><tr><td align=left><FONT color=#"&mycolor2&">[R]"&myname2&""&myfqsex2&"</font><br></td></tr>"
amyname=amyname&myname2&"</table>"
else
myname2=""
end if

if myname3<>"" then
	if mysex3=1 then
	mycolor3="ffff00" 
	else
	mycolor3="00ff00"
end if
myname3="<table style='filter:glow(color=#01010c,strength=2)'><tr><td align=left><FONT color=#"&mycolor3&">[L]"&myname3&"</font><br></td></tr>"
amyname=amyname&myname3&"</table>"
else
myname3=""
end if
amyname=amyname&"</td></tr></table>"

mydate="<table style='filter:glow(color=#000000,strength=2)' align=center><tr><td align=left><FONT color=#66FF33>"&mydate&"</font></td></tr></table>"
amydate="<table align=left valign=top></tr><td>"&mydate&"</td></tr></table>"
select case lb
case 3 '三人合影
%>
<DIV style='padding:0;position:relative;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/280)%>'> 
  <img src=<%=mybake%> border=0 style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/280)%>;z-index:-5;'> 
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-1;'> 
    <%response.write amyname%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:<%=int(pwidth*200/280)%>;right:-5;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-1;'> 
    <%response.write amydate%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:<%=int(pwidth*(1-70/140)/2)%>;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-4;'> 
    <%
call showphoto(myv3,int(pwidth*140/280),mysex3,-int(pwidth*(1-208/280)/2),"",0)
%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:<%=int(pwidth*(1-70/140)/2)%>;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-2;'> 
    <%
call showphoto(myv1,int(pwidth*140/280),mysex1,0,"",0)
%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:<%=int(pwidth*(1-70/140)/2)%>;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-3;'> 
    <%
call showphoto(myv2,int(pwidth*140/280),mysex2,int(pwidth*(1-208/280)/2),"",0)
%>
  </DIV>
</DIV>
<%



case 2 '朋友
if mybake="" then
pwidth=140     '没有选择背景
%>
<DIV style='padding:0;position:relative;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>'> 
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-1;'> 
    <%response.write amyname%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:<%=int(pwidth*200/140)%>;left:10;width:<%=int(pwidth*226/140)%>;height:<%=int(pwidth*226/280)%>;z-index:-1;'> 
    <%response.write amydate%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:-40;left:-25;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-3;'> 
    <%
call showphoto(myv2,pwidth,mysex2,int(pwidth*(90/280)/2),"",5)
%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-4;'> 
    <%
call showphoto(myv1,pwidth,mysex1,-int(pwidth*(70/280)/2),"",1)
%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:-40;left:-25;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-2;'> 
    <%
call showphoto(myv1,pwidth,mysex1,-int(pwidth*(70/280)/2),"",5)
%>
  </DIV>
</DIV>
<%         


                     
else
%>
<DIV style='padding:0;position:relative;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/280)%>'> 
  <img src=<%=mybake%> border=0 style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/280)%>;z-index:-4;'> 
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-1;'> 
    <%response.write amyname%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:<%=int(pwidth*200/280)%>;right:-10;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-1;'> 
    <%response.write amydate%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:<%=int(pwidth*(1-70/140)/2)%>;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-3;'> 
    <%
call showphoto(myv1,int(pwidth*140/280),mysex1,-int(pwidth*(1-220/280)/2),"",0)
%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:<%=int(pwidth*(1-70/140)/2)%>;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-2;'> 
    <%


call showphoto(myv2,int(pwidth*140/280),mysex2,int(pwidth*(1-220/280)/2),"",0)
%>
  </DIV>
</DIV>
<%                                	
end if
case 1 '单人
pwidth=140
%>
<DIV style='padding:0;position:relative;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>'> 
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-1;'> 
    <%response.write amyname%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:<%=int(pwidth*200/140)%>;left:10;width:<%=int(pwidth*226/140)%>;height:<%=int(pwidth*226/280)%>;z-index:-1;'> 
    <%response.write amydate%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-3;'> 
    <%
call showphoto(myv1,pwidth,mysex1,-int(pwidth*(50/280)/2),"",1)
%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-2;'> 
    <%
call showphoto(myv1,pwidth,mysex1,-int(pwidth*(50/280)/2),"",0)
%>
  </DIV>
</DIV>
<%
case 0 '夫妻
if mybake="" then
pwidth=140     '没有选择背景
%>
<DIV style='padding:0;position:relative;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>'>
<DIV style='padding:0;position:relative;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>'> 
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-1;'> 
    <%response.write amyname%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:<%=int(pwidth*200/140)%>;left:10;width:<%=int(pwidth*226/140)%>;height:<%=int(pwidth*226/280)%>;z-index:-1;'> 
    <%response.write amydate%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-3;'> 
    <%
call showphoto(myv2,int(pwidth*230/280),mysex2,int(pwidth*(10/280)/2),"",5)
%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-4;'> 
    <%
call showphoto(myv1,pwidth,mysex1,-int(pwidth*(70/280)/2),"",1)
%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/140)%>;z-index:-2;'> 
    <%
call showphoto(myv1,int(pwidth*230/280),mysex1,-int(pwidth*(150/280)/2),"",5)
%>
  </DIV>
</DIV>
<%                              
else
%>
<DIV style='padding:0;position:relative;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/280)%>'> 
  <img src=<%=mybake%> border=0 style='padding:0;position:absolute;top:0;left:0;width:<%=pwidth%>;height:<%=int(pwidth*226/280)%>;z-index:-4;'> 
  <DIV style='padding:0;position:absolute;top:0;left:0;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-1;'> 
    <%response.write amyname%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:<%=int(pwidth*200/280)%>;right:-10;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-1;'> 
    <%response.write amydate%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:<%=int(pwidth*(1-70/140)/2)%>;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-2;'> 
    <%
call showphoto(myv1,int(pwidth*140/280),mysex1,-int(pwidth*(1-240/280)/2),"",0)
%>
  </DIV>
  <DIV style='padding:0;position:absolute;top:0;left:<%=int(pwidth*(1-70/140)/2)%>;width:<%=int(pwidth*120/280)%>;height:<%=int(pwidth*226/280)%>;z-index:-3;'> 
    <%
call showphoto(myv2,int(pwidth*140/280),mysex2,int(pwidth*(1-240/280)/2),"",0)
%>
  </DIV>
</DIV>
</a>
<%
end if
end select
end sub

sub showphoto(uservisual,visualwidth,userstex,visualtop,username,inchtc)
 response.write "<table border=0 cellspacing=0 cellpadding=0 width="&visualwidth&">"
 response.write "<tr>"
 response.write "<td align=center visualwidth="&visualwidth&"  visualheight="&(visualwidth*226/140)&" ImagePath="""&PicPath&""" username="""&username&""" visualtop="&visualtop&" usergender="&userstex&" baseName=""images/img_visual/blank.gif"" visual="""&uservisual&"""  style=behavior:url(inc/z_show"&inchtc&".htc) localpic="""&LocalPic&""" ></td>"
 response.write "</tr>"
 response.write "</table>"
end sub


sub messto(towho,sender,title,content)
    conn.execute("insert into dv_message(incept,sender,title,content,sendtime,flag,issend) values('"&towho&"','"&sender&"','"&title&"','"&content&"',Now(),0,1)")
end sub

'获得用户名字
function getmyname(ismyid)
dim mynametmp
dim mrs
mynametmp=""
if ismyid="" then
 mynametmp=""
 'getmyname=""
 'Exit Function
 else
 sql="select Jauname from [Jauser] where Jauid="&ismyid
 set mrs=conn.execute(sql)
        if mrs.eof or mrs.bof then
  mynametmp=""         
  'getmyname=""
  'Exit Function
 else
 mynametmp=mrs("Jauname")
end if
mrs.close
set mrs=nothing 
end if
getmyname=mynametmp
end function

'获得用户性别
function getmysex(ismyid)
dim mysextmp
dim mrs
mysextmp=""
if ismyid="" then
 mysextmp="" 
 'getmysex=""
 'Exit Function
 else
 sql="select Jasex from [Jauser] where Jauid="&ismyid
 set mrs=conn.execute(sql)
        if mrs.eof or mrs.bof then
  mysextmp=""       
  'getmysex=""
  'Exit Function
 else
 mysextmp=mrs("usersex")
end if
mrs.close
set mrs=nothing 
end if
getmysex=mysextmp
end function

'获得用户ID
function getmyid(ismyname)
dim myidtmp
dim mrs
myidtmp=""
if ismyname="" then
 'getmyid=""
 'Exit Function
 myidtmp=""
else
 sql="select Jauid from [Jauser] where Jauname='"&ismyname&"'"
 set mrs=conn.execute(sql)
        if mrs.eof or mrs.bof then
         'getmyid=""
  'Exit Function
  myidtmp=""
 else
 myidtmp=mrs("Jauid")
end if
mrs.close
set mrs=nothing 
end if
getmyid=myidtmp
end function

'通过ID获得用户虚拟数据
function getmyv(ismyid)
dim myvtmp
dim mrs
myvtmp=""
        if ismyid="" then
  myvtmp=""
  'getmyv=""
  'Exit Function
 else
  sql="select visual from [Jauser] where Jauid="&ismyid
  set mrs=conn.execute(sql)
         if mrs.eof or mrs.bof then
   myvtmp=""
          'getmyv=""
   'Exit Function
  else
   myvtmp=mrs("visual")
   if myvtmp="" or isnull(myvtmp) then
   myvtmp=""
   'getmyv=""
   end if
  end if
  mrs.close
  set mrs=nothing 
 end if
getmyv=myvtmp
end function

'通过ID获得用户等级
'function getmyc(ismyid)
'dim myctmp
'dim mrs
'myctmp=""
'        if ismyid="" then
  'getmyc=""
'  myctmp=""
  'Exit Function
' else
'  sql="select userclass from [dv_user] where UserID="&ismyid
'  set mrs=conn.execute(sql)
'         if mrs.eof or mrs.bof then
          'getmyc=""
   'Exit Function
'   myctmp=""
'  else
'   myctmp=mrs("userclass")
'  end if
'  mrs.close
'  set mrs=nothing 
' end if
'getmyc=myctmp
'end function

function getmyw(vismywife,vismyid)
dim mrs,ismywife
        if vismywife="" or vismyid="" then
  getmyw=false
 else
  sql="select Jauid from [Jauser] where Jauid="&vismyid&" and wife='"&vismywife&"'"
  set mrs=conn.execute(sql)
         if mrs.eof or mrs.bof then
          getmyw=false
  else
   getmyw=true
  end if
        end if
mrs.close
set mrs=nothing 
end function   
  
%>