<!--#include file="setup.asp" -->
<%
top
if Request.Cookies("username")=empty then error("<li>您还未<a href=login.asp>登录</a>社区")
if Request.Cookies("sex")<>"female" and  Request.Cookies("sex")<>"male" then Response.Cookies("sex")="male"


name=Trim(Request("name"))
If Not IsEmpty(Request("showsex")) Then 
showsex=Cint(Request("showsex"))
Else 
showsex=3
End If

If Not IsEmpty(Request("type")) Then 
showtype=Cint(Request("type"))
Else 
showtype=0
End If

If Not IsEmpty(Request("subtype")) Then 
subtype=Cint(Request("subtype"))+1
Else 
subtype=0
End If

If Not IsEmpty(Request("Price1")) Then 
Price1=Cint(Request("Price1"))
Else 
Price1=0
End If

	sql="select * from [myshow]"

	if name<>"" or showsex<>3 or showtype<>0 or Price1<>0 then myshowsql=sql&" where "

	if name<>"" then myshowsql=myshowsql&"name like '%"&name&"%'"

	if showsex<>3 then
		if name<>"" then 
			myshowsql=myshowsql&" and sex="&showsex&""
		else
			myshowsql=myshowsql&" sex="&showsex&""
		end if
	end if

	if showtype<>0  then
		if name<>"" or showsex<>3 then
			myshowsql=myshowsql&" and type="&showtype+subtype*100&""
		else
			myshowsql=myshowsql&" type="&showtype+subtype*100&""
		end if
	end if

	if Price1<>0 then
		if name<>"" or  showsex<>3  or showtype<>0 then
			if Price1 <=2 then 
			myshowsql=myshowsql&" and Price1<="&Price1*100&""
			else 
			myshowsql=myshowsql&" and Price1>="&Price1*100&""
			end if
		else
			if Price1 <=2 then 
			myshowsql=myshowsql&" Price1<="&Price1*100&""
			else
			myshowsql=myshowsql&" Price1>="&Price1*100&""
			end if
		end if
	end if
%>
<SCRIPT language="JavaScript">
function changetype(oneform)
{
	if (oneform.type.value=="0") 
	{	oneform.subtype.length = 1;
		oneform.subtype.options[0].value="0";
		oneform.subtype.options[0].text="小类不限";
	}
	if (oneform.type.value=="1") 
	{	oneform.subtype.length = 7;
		oneform.subtype.options[0].value="0";
		oneform.subtype.options[0].text="时尚套装";
		oneform.subtype.options[1].value="1";
		oneform.subtype.options[1].text="造型套装";
		oneform.subtype.options[2].value="2";
		oneform.subtype.options[2].text="复古套装";
		oneform.subtype.options[3].value="3";
		oneform.subtype.options[3].text="神奇套装";
		oneform.subtype.options[4].value="4";
		oneform.subtype.options[4].text="上衣";
		oneform.subtype.options[5].value="5";
		oneform.subtype.options[5].text="裤裙";
		oneform.subtype.options[6].value="6";
		oneform.subtype.options[6].text="帽子";
	}
	if (oneform.type.value=="2") 
	{	oneform.subtype.length = 6;
		oneform.subtype.options[0].value="0";
		oneform.subtype.options[0].text="头部造型";
		oneform.subtype.options[1].value="1";
		oneform.subtype.options[1].text="脸形";
		oneform.subtype.options[2].value="2";
		oneform.subtype.options[2].text="眼眉";
		oneform.subtype.options[3].value="3";
		oneform.subtype.options[3].text="发型";
		oneform.subtype.options[4].value="4";
		oneform.subtype.options[4].text="口鼻";
		oneform.subtype.options[5].value="5";
		oneform.subtype.options[5].text="表情";
	}
	if (oneform.type.value=="3") 
	{	oneform.subtype.length = 5;
		oneform.subtype.options[0].value="0";
		oneform.subtype.options[0].text="项饰品";
		oneform.subtype.options[1].value="1";
		oneform.subtype.options[1].text="头饰品";
		oneform.subtype.options[2].value="2";
		oneform.subtype.options[2].text="礼品";
		oneform.subtype.options[3].value="3";
		oneform.subtype.options[3].text="眼镜";
		oneform.subtype.options[4].value="4";
		oneform.subtype.options[4].text="包袋";
	}
	if (oneform.type.value=="4") 
	{	oneform.subtype.length = 4;
		oneform.subtype.options[0].value="0";
		oneform.subtype.options[0].text="超眩背景";
		oneform.subtype.options[1].value="1";
		oneform.subtype.options[1].text="相框效果";
		oneform.subtype.options[2].value="2";
		oneform.subtype.options[2].text="动感效果";
		oneform.subtype.options[3].value="3";
		oneform.subtype.options[3].text="其它物品";
	}
	if (oneform.type.value=="5") 
	{	oneform.subtype.length = 3;
		oneform.subtype.options[0].value="0";
		oneform.subtype.options[0].text="Q哥Q妹";
		oneform.subtype.options[1].value="1";
		oneform.subtype.options[1].text="其他动物";
		oneform.subtype.options[2].value="2";
		oneform.subtype.options[2].text="宠物";
	}
}
</SCRIPT>

<title>虚拟形象</title>

<% if xlogo=1 then %>
<table width=<%=dkuan %> align=center border=0>
</table><br><% end if %>
<table border=0 width=<%=dkuan%> align=center cellspacing=1 cellpadding=4 class=a2>
<tr class=a3>
<td height=25>&nbsp;<img src=images/Forum_nav.gif>&nbsp; <a href=main.asp><%ClubTree%></a> → 虚拟形象</td>
</tr>
</table><br>

<table cellspacing="1" cellpadding="1" width=<%=dkuan%> align="center" border="0" class="a2">
<TR id=TableTitleLink class=a1 height="25">
		<TD align=center height=25 class=a1><b><a href="myshow.asp">推荐商品</a></b></TH>
		<TD align=center height=25 class=a1><b><a href="myshow.asp?type=1&subtype=0">潮流服装</a></b></TD>
		<TD align=center height=25 class=a1><b><a href="myshow.asp?type=2&subtype=0">化妆整形</a></b></TD>
		<TD align=center height=25 class=a1><b><a href="myshow.asp?type=3&subtype=0">珠宝首饰</a></b></TD>
		<TD align=center height=25 class=a1><b><a href="myshow.asp?type=4&subtype=0">精品场景</a></b></TD>
		<TD align=center height=25 class=a1><b><a href="myshow.asp?type=5&subtype=0">异形天地</a></b></TD>
		<TD align=center height=25 class=a1><b><a href="myshow_myroom.asp">我的衣柜</a></b></TD>
		<TD align=center height=25 class=a1><b><a href="myshow_myphoto.asp">我的相册</a></b></TD>
		<TD align=center height=25 class=a1><b><a href="myshow_photoshow.asp">形象展示</a></b></TD>
</TR>
<% if showtype<6 and showtype>0 then%>
<TR height="25">
		<TD align=center height=20 colspan="9" class=a3>
		<div id="menushow" style="border:0px solid #000000;padding:0;POSITION: relative; Left: 20; TOP: 0; HEIGHT: 10px;  WIDTH: 100%;"> 
        <% 
		sql2 = "select * from [myshow_subtype] where TypeSeq="&showtype&""
		rs.open sql2,conn
		do while not rs.eof
		response.Write("&nbsp;｜&nbsp;<a href=?type="&rs("TypeSeq")&"&subtype="&rs("SeqNo")-1&">"&rs("SubTypeName")&"</a>")
		rs.movenext
		loop
		response.Write("&nbsp;｜&nbsp;")
		rs.close		
		%>
      </div>
		</TD>
</TR>
<% end if %>
</TABLE>
<BR>
<TABLE cellSpacing=0 cellPadding=0 width=<%=dkuan%> align=center>
<form name="showform" method="post" action="">
<input name="usershow" type="hidden" value=""> 
<TR>
<TD vAlign=top width="180">
	<TABLE style="WIDTH: 95%" height="100%" cellSpacing=1 cellPadding=3 border=0 class=a2>
	<TBODY>
	<TR>
	<TD height=25 class=a1 align="center" colspan="2"><b>用户形象</b></TH>
	</TR>
	<TR align=middle>
	<TD colspan="2" class=a3 height="230"><div id="bodyshow" style="border:0px solid #000000;padding:0;POSITION: relative; Left: 0; TOP: 0; HEIGHT: 226px;  WIDTH: 140px;"></div></TD>
	</TR>
	<TR align=middle>
	<TD colspan="2" class=a3 height="20">
	<table width="80%" border="0" cellspacing="0" cellpadding="0">
	  <tr align="center"> 
		<td height="20"><a href="javascript:openScript('myshow_menu.asp?menu=save&myshow='+showform.usershow.value,515,330)">保存</a></td>
		<td><a href="javascript:init()">原始</a></td>
		<td><a href="javascript:cameraprompt('myshow_menu.asp?menu=camera&myshow='+showform.usershow.value,515,330)">快照</a></td>
		<td>合影</td>
	  </tr>
	</table>
	</TD>
	</TR>
	<TR>
	<TD height=25 class=a1 align="center" colspan="2"><b>用户状态</b></TH>
	</TR>
	<TR>
	<TD class=a3 align="center" valign="top">
		<TABLE>	
		<%
		sql2="select * from [user] where username='"&Request.Cookies("username")&"'"
		rs.Open sql2,Conn
		response.write "<TR><TD class=a3>用户等级： <Script>document.write(level("&rs("experience")&","&rs("membercode")&",'','')+levelname)</Script><br>用户门派： "&rs("faction")&"<br>用户配偶： "&rs("consort")&"<br>用户体力： "&rs("userlife")&"<br>发表原贴： "&rs("posttopic")&"<br>发表回贴： "&rs("postrevert")&"<br>精华帖数： "&rs("goodtopic")&"<br>被删原贴： "&rs("deltopic")&"<br>社区金币： "&rs("money")&"<br>用户经验： "&rs("experience")&"<br>登录次数： "&rs("degree")&"<br>注册时间： "&rs("regtime")&"</TD></TR>"
		rs.close
		%>   
		</TABLE>
	</TD>
	</TR> 
	</TABLE>
</TD>
<TD vAlign=top>
	<TABLE style="WIDTH: 100%" cellSpacing=1 cellPadding=0 align=center border=0 class=a2>
    <TR>
		<TD height=25 class=a3 align="left" class=a1> 
			<table cellspacing="1" cellpadding="1" width="99%" align="center" border="0">
			<TR height="20">
					<TD height=20 align="left"><span class=a1><b>-=> 购买商品</b></span></TD>
					<TD height=20 align="right"><b><a href=?name=<%=name%>&type=<%=showtype%>&subtype=<%=subtype-1%>&showsex=1&Price1=<%=Price1%>&topage=<%= cint(Request.QueryString("ToPage")) %>><span class=a1>男</span></a>　<a href=?name=<%=name%>&type=<%=showtype%>&subtype=<%=subtype-1%>&showsex=0&Price1=<%=Price1%>&topage=<%= cint(Request.QueryString("ToPage")) %>><span class=a1>女</span></a>　<a href=?name=<%=name%>&type=<%=showtype%>&subtype=<%=subtype-1%>&showsex=3&Price1=<%=Price1%>&topage=<%= cint(Request.QueryString("ToPage")) %>><span class=a1>全部</span></a></TD>
			</TR>
			</TABLE>
		</TD>
	</TR>
	<TR>
		<!--form name="myshowsearch" method="post" action=""-->
		<TD align="center" class=a3 height=25>
		<input name="name" type="text" id="name" size="15">
		<select name="showsex" id="showsex">
			<option value=3 selected>性别不限</option>
			<option value=1>男</option>
			<option value=0>女</option> 
			<option value=2>男女适宜</option>
		</select>
		<select name="type" id="type" onChange="changetype(document.showform)">
			<option value=0 selected>类型不限</option> 
			<option value=1>服装类</option>
			<option value=2>首饰类</option>
			<option value=3>化妆类</option> 
			<option value=4>场景类</option>
			<option value=5>异型类</option>
		</select>
		<select name="subtype" id="subtype">
			<option value=0 selected>小类不限</option> 
		</select>
		<select name="Price1" id="Price1">
			<option value=0 selected>价格不限</option> 
			<option value=1>100金币以下</option>
			<option value=2>200金币以下</option>
			<option value=3>300金币以上</option>
			<option value=4>400金币以上</option>
		</select>
		<input type="submit" name="Submit" value="查找商品" style="height:21px">
		</TD>
		<!--/form-->
	</TR>
	<TR>
		    <TD align="center" class=a3>
			<%
			if name<>"" or showsex<>3 or showtype<>0 or Price1<>0 then
			else
			myshowsql="select * from [myshow] where Type>1200 order by id asc"
			end if

			rs.open myshowsql,conn,1
			
			pagesetup=12
			
			count=rs.recordcount    '数据总条数
			rs.pagesize=pagesetup   '每页显示条数
			TotalPage=rs.pagecount  '总页数
			PageCount = cint(Request.QueryString("ToPage"))
			if PageCount <1 then PageCount = 1
			if PageCount > TotalPage then PageCount = TotalPage
			if TotalPage>0 then rs.absolutepage=PageCount '跳转到指定页数
			
			i=0
			Do While Not RS.EOF and i<pagesetup
			i=i+1
			if Not Response.IsClientConnected then responseend
			if i mod 2 = 1 then response.Write("<table width='99%' border='0' cellspacing='0' cellpadding='0'><tr><td colspan=2 height=10></td></tr><tr><td align='center' width='50%'>")
			if rs("sex")=1 then sex1="(男)"
			if rs("sex")=0 then sex1="(女)"
			if rs("sex")=2 then sex1=""
			%>
			<table width="95%" border="0" cellspacing="0" cellpadding="0">
			  <tr> 
				<td width="84" height="84" rowspan="5" align="center" valign="middle" bgcolor="F8F8F8"><img src="http://qqshow-item.tencent.com/<%=rs("ID")%>/00/00/" width="84" height="84" border="1"  style="border-color:EBEBEB" onclick="testdress('<%=rs("Content")%>',<%=rs("ID")%>,<%=rs("sex")%>);return false;"></td>
				<td>　<b><%=rs("Name")%><%=sex1%></td>
			  </tr>
			  <tr> 
				<td>　会员价：<%=rs("Price1")%> 金币</td>
			  </tr>
			  <tr> 
				<td>　嘉宾价：<%=rs("Price2")%> 金币</td>
			  </tr>
			  <tr> 
				<td>　说　明：普通</td>
			  </tr>
			  <tr> 
				<td>　<img src="images/show/show_test.gif" width="36" height="17" onclick="testdress('<%=rs("Content")%>',<%=rs("ID")%>,<%=rs("sex")%>);return false;">
				<img src="images/show/show_buy.gif" width="36" height="17" onclick="openScript('myshow_buy.asp?id=<%=rs("ID")%>',515,330);return false;">
				<img src="images/show/show_give.gif" width="36" height="17" onclick="presentprompt('myshow_menu.asp?menu=present&id=<%=rs("ID")%>',515,330);return false;">
				<img src="images/show/show_collect.gif" width="36" height="17"></td>
			  </tr>
			</table>
			<%
			if i mod 2 = 1 then 
			response.Write("</td><td align='center' width='50%'>")
			else
			response.Write("</td></tr></table><hr width='97%' size='1' color='CCCCCC'>")
			end if
			
			rs.movenext
			loop
			rs.close
			
			if i mod 2 = 1 then response.Write("</td></tr></table><hr width='97%' size='1' color='CCCCCC'>")
			%>
			<table width="95%" border="0" cellspacing="0" cellpadding="0">
			<tr>
			<td height="20">
			<b>共有 <font color=990000><%=TotalPage%></font> 页 </b>
			</td>
			<td align="right"><b>页 [ 
			<script>
			PageCount=<%=TotalPage%>
			topage=<%=PageCount%>
			for (var i=1; i <= PageCount; i++) {
			if (i <= topage+3 && i >= topage-3 || i==1 || i==PageCount){
			if (i > topage+4 || i < topage-2 && i!=1 && i!=2 ){document.write(" ... ");}
			if (topage==i){document.write(" "+ i +" ");}
			else{
			document.write("<a href=?name=<%=name%>&type=<%=showtype%>&subtype=<%=subtype-1%>&showsex=<%=showsex%>&Price1=<%=Price1%>"+"&topage="+i+">"+ i +"</a> ");
			}
			}
			}
			</script>
			] </b>
			</td>
			</tr>
			</table>
            </TD>
	</TR>
	</TABLE>
</TD>
</TR>
</TBODY>
</form>
</TABLE>
		
<script src="inc/myshow.js"></script>
<%
htmlend
%>