<!--#Include File="Connection.Asp"-->
 
<%
response.expires = 0
response.expiresabsolute = Now() - 1
response.addHeader "pragma","no-cache"
response.addHeader "cache-control","private"
Response.CacheControl = "no-cache"

Dim JaZ,C,flyN,B,cur,D,AType
Set JaZ = new q_zone
B = JaZ.JaKillStr(Request.QueryString("JaUid"))
If B="" Then
B= "2"
End If
AType=Request.QueryString("Type")
If SESSION("VicNum")<>B Then
Response.Write "<script language=""javascript"">alert('请先登陆,登陆后才可以装扮自己的空间!');history.go(-1);</script>"
Response.End()
End If
C=Split(JaZ.GetHeadElement("*",B,"JaFaceSet",""),"<><><>")
flyN = split(Trim(C(2)),"|")
If Cint(Trim(C(1)))<>0 Then
cur = "CURSOR:url('cur/"&C(1)&".ani');"
Else
cur = ""
End If 
Dim Rs,sqlstr,Img,MaxPerPage,text,checkpage,CurrentPage,i,k,T,ft,fy,G
k=1
If AType<>"" then
sqlstr = "SELECT * FROM [JaSel] where JaType="&AType&" Order By ID DESC"
else
sqlstr = "SELECT * FROM [JaSel] Order By ID DESC"
end if
Set Rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sqlstr,conn,1,1
MaxPerPage=15
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next

If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
i=0
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JaZone</title>
<link href="Qz/css.css" rel="stylesheet" type="text/css">
</head>
<script src="JsInc/Jafloat.js"></script>
<script src="JsInc/Pages.js"></script>
<script>
document.cookie ="buy=<%=Trim(C(6))%>;";
function setCookie(name,value)
{
	document.cookie = name + "=" + value + "; path=/; domain=lancent.com.cn";
}
function getCookie(name)
{
	var search;
	search = name + "=";
	var offset = document.cookie.indexOf(search);
	if (offset != -1) {
		offset += search.length;
		var end = document.cookie.indexOf(";", offset);
		if (end == -1)
			end = document.cookie.length;
		return unescape(document.cookie.substring(offset, end));
	}
	else
		return "";
}

if(getCookie("divc") == "")
{
var divc = <%=Trim(C(7))%>;

}
else
{
var divc = parseInt(getCookie("divc"));
}

function addfly(numb,cc)
{
var l=Math.random()*800
var t=Math.random()*500
var newDiva=top.document.createElement("<div id='flytop' style='position:absolute; width:36px; height:183px; z-index:150; left: "+l+"px;top: "+t+"px;' onmousedown='kk(this);getFocus(this);' onmouseup='stopDrag(this);' onmousemove='drag(this);'></div>");
	//漂浮物的层
	var str="<div style='position:relative'>";
        str+='<img id="s" src="flytop/'+numb+'.gif" oncontextmenu="showmenuie5('+numb+','+cc+',1);" onclick="hidemenuie5();" style="position:absolute;top:0px;left:0px;" UNSELECTABLE=on >';
	str+='</div>';
newDiva.innerHTML=str;
top.document.body.appendChild(newDiva);
}



function changeElenment(numa,type,ft,fy)
{
if(type==1)
{
    if(top.all.style.background=='url(Bg/'+numa+'.gif)') 
         {
		top.all.style.background= 'url(Bg/0.gif)';
                
	}
	else {
  
		top.all.style.background= 'url(Bg/'+numa+'.gif)';
               
	}
}
if(type==2)
{
var ss = top.body.style.cursor.indexOf(numa);
     if(ss>0) 
    {
                top.body.style.cursor='default';
                document.body.style.cursor='default';
                
	}
	else {
                top.body.style.cursor='url(cur/'+numa+'.ani)';
                document.body.style.cursor='url(cur/'+numa+'.ani)';
	}
}

if(type==3)
{
var ss = top.Fgif.src.indexOf('banner/'+numa+'.gif');
     if(ss>0) 
    {
                top.Fgif.style.visibility="hidden";
                //top.Fgif.src='banner/<%=Trim(C(9))%>.gif';
                top.Fgif.src='';
                
	}
	else {
                top.Fgif.style.visibility="visible";
                top.Fgif.src='banner/'+numa+'.gif';
             
	}
}

if(type==4)
{
divc = parseInt(divc) + 1;
 
document.cookie = "divc="+parseInt(divc)+";";

if(getCookie("buy").indexOf(numa)<0)
{
addfly(numa,divc);
var newa = getCookie("buy") + "|" + numa;
document.cookie = "buy="+newa+";";
}
else
{
alert("此物品已经在使用中,右键可以移除该物品!")
}
}

if(type==5)
{
for(i=0; i<8;i++)
	{
          if(si[i]) {
               if(si[i].src.indexOf(numa)>0)
                  {
                 
                 Jahid(ft);
                    }
          }
    }
Jafloat(numa,ft,fy);
}

if(type==6)
{
var ss = top.Fg.src.indexOf('class/'+numa+'_r2.gif');

if(ss>0)
  {
   top.Fg.style.visibility="hidden";
   top.Fg.src='';
   top.Fbb.style.visibility="hidden";
   top.Fbb.src='';
   top.Fll.style.visibility="hidden";
   top.Fll.src='';
   top.Sun.style.visibility="hidden";
   }
   else
    {
    top.Fg.style.visibility="visible";
                top.Fg.src='class/'+numa+'_r2.gif';
    top.Fbb.style.visibility="visible";
                top.Fbb.src='class/'+numa+'_bg.gif';
    top.Fll.style.visibility="visible";
               top.Fll.src='class/'+numa+'_f2.gif';
   top.Sun.style.visibility="visible";
  }
}


if(type==7)
{

var ss = top.Say.style.background.indexOf('Say/'+numa+'.gif');
     if(ss>0) 
    {           
                top.Say.style.visibility="hidden";
                top.Say.style.background='';
	}
	else {
                top.Say.style.visibility="visible";
                top.Say.style.background='url(Say/'+numa+'.gif)';
	}
}


if(type==8)
{

    if(top.musicSwf.movie=='Music/'+numa+'.swf') 
         {
		top.musicSwf.movie='.swf';
		top.musicPlayer.style.visibility="hidden";
		top.stop();
                
	}
	else {
        top.musicPlayer.style.visibility="visible";
		top.musicSwf.movie='Music/'+numa+'.swf';
		top.play();
		
               
	}
}

}
Jafloat('<%=FlyN(0)%>','2','<%=FlyN(1)%>');



function Japay()
{
var jxy = "";
var bxy ="";
//挂件可移动组装数组
try
{
 for(var i=0;i<divc+1;i++)
  {
   if(top.s[i].src.indexOf("b.gif")<0)
    {
     var sp = "none";
     sp = top.s[i].src.replace("<%=SESSION("ServerUrl")%>/","");
     sp = sp.replace("flytop/","");
     sp = sp.replace(".gif","");
     var flyt=flyt+sp+"|";
     jxy = jxy + top.flytop[i].style.left.replace("px","")+","+top.flytop[i].style.top.replace("px","")+"|";
    }
}
}
catch(e)
{
 //flyt=getCookie("buy");
 //alert(flyt);
}


//banner组装
if(top.Fgif.src.indexOf("b.gif")<0)
{        
    var kp = "none";
    kp = top.Fgif.src.replace("<%=SESSION("ServerUrl")%>/",""); 
    kp = kp.replace("banner/","");
    kp = kp.replace(".gif","");
    bxy = top.FBanner.style.left.replace("px","") + "," + top.FBanner.style.top.replace("px","");
}
    
// 公告栏组装

   var cxy = top.Say.style.left.replace("px","") + "," + top.Say.style.top.replace("px","");
   if(top.Say.style.visibility!="hidden")
   {
   var uu = top.Say.style.background.indexOf('.gif');
   if(uu>0)
   {
   var cp = "none";
   cp = top.Say.style.background.replace("url(Say/","");
   cp = cp.replace(".gif)","");
   
   
   }
   }
   else
   {
   cp = "0";
   }
    
// 植物组装
  var xp = "none"; 
  xp = top.Fll.src.replace("<%=SESSION("ServerUrl")%>/","");
  xp = xp.replace("class/","");
  xp = xp.replace("_f2.gif","");

// 漂浮层组装
 
  if(si[1].src!="about:blank") 
   {
   var op = "none";
   op = si[1].src.replace("<%=SESSION("ServerUrl")%>/",""); 
   op = op.replace("Fly/","");
   op = op.replace(".gif","");
   op = op.split("_")[0];

   }
// 鼠标层组装
  var lp = "none";
  lp = top.body.style.cursor.replace("url('cur/","");
  lp = lp.replace(".ani')","");

//背景层组装
  var hp = "none";
  hp = top.all.style.background.replace("url(Bg/","");
  hp = hp.replace(".gif)","");

//音乐层组装
  var mp = "none";
  mp = top.musicSwf.movie.replace("Music/","");
  mp = mp.replace(".swf","");
  mxy = top.musicPlayer.style.left.replace("px","") + "," + top.musicPlayer.style.top.replace("px","");

var allbuy = flyt + "$" + kp + "$" + cp + "$" + xp + "$" + op + "$" + lp + "$" + hp + "$" + mp; 
var allxy  = jxy + "$" + bxy + "$" + cxy + "$" + mxy;
var urls = "BuySave.Asp?buy="+allbuy+"&xy=" +allxy;
window.location.href=urls;
//alert(allxy);
//alert(urls);
//alert("挂件层："+flyt);
//alert("挂件层xy:"+jxy);
//alert("banner层:"+kp);
//alert("banner层xy:"+bxy);
//alert("公告栏:"+cp);
//alert("公告xy:"+cxy);
//alert("植物层:"+xp);
//alert("漂浮层:"+op);

}

function runok()
{
if(confirm('你还没完成装扮,是否退出装扮?'))
{
top.window.location.href="Index.Asp?JaUid=<%=SESSION("VicNum")%>";
return true;
}
else
{
return false;
}
}

window.onerror = function()
{
return true;
} 
</script>
<body leftmargin="0" topmargin="0" style="background-color:transparent;" text="#cccccc" link="#cccccc" vlink="#cccccc" alink="#cccccc" id="body" style="<%=cur%>" onclick="DocumentOnKeyUp();" >
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="60%" valign="middle"> <div align="center"><a href="Buy.Asp?JaUid=<%=B%>">全部</a> |<a href="?type=1&JaUid=<%=B%>">皮肤</a> |<a href="?type=2&JaUid=<%=B%>">鼠标</a> |<a href="?type=3&JaUid=<%=B%>">Banner</a> |<a href="?type=4&JaUid=<%=B%>">挂件</a> |<a href="?type=5&JaUid=<%=B%>">漂浮</a> |<a href="?type=6&JaUid=<%=B%>">植物</a> |<a href="?type=7&JaUid=<%=B%>">公告栏</a> |<a href="?type=8&JaUid=<%=B%>">播放器</a>  
    </div></td>

    <td width="16%" valign="middle"><a href="MyBank.Asp">[查询我的余额]</a></td>
    <td width="10%" valign="middle"><div align="center"><img src="Qz/gwc.gif" width="55" height="17" onClick="Japay();" style="CURSOR:hand;"></div></td>
    <td width="14%" valign="middle"><div align="center"><img src="Qz/save_bt.gif" width="76" height="19" onClick="Japay();" style="CURSOR:hand;"></div></td>
  </tr>
</table>
<div align="center">
  <Script Language="JavaScript">Pages(<%=CurrentPage%>,<%=Rs.PageCount%>,<%=Rs.RecordCount%>,'JaUid=<%=B%>&Type=<%=AType%>&page');</Script>

<br>
<table width="100%" height="90%"  border="0" cellpadding="1" cellspacing="0">
  <tr align="center">
  <%
ft=0
fy=0

Do While Not Rs.Eof
if Rs("JaType")=1 Then
 T="BgSel"
 G = Rs("JaSale")
else
if Rs("JaType")=2 Then
 T="cursel"
 G = Rs("JaSale")
 else
if Rs("JaType")=3 Then
 T="bannersel"
 G = Rs("JaSale")
  else
if Rs("JaType")=4 Then
 T="flytopsel"
 G = Rs("JaSale")
else
if Rs("JaType")=5 Then
 T="Flysel"
 G=Split(Rs("JaSale"),"|")(0)
 fy=Split(Rs("JaSale"),"|")(1)
 ft=Split(Rs("JaSale"),"|")(2)
else
if Rs("JaType")=6 Then
 T="classsel"
 G = Rs("JaSale")
else
if Rs("JaType")=7 Then
 T="Saysel"
 G = Rs("JaSale")
else
if Rs("JaType")=8 Then
 T="Musicsel"
 G = Rs("JaSale")
end if
end if
end if
end if
end if
end if
end if
end if
%> 
    <td><img src="<%=T%>/<%=G%>.gif"  alt = "点击试用" width="85" height="85" border="0" onClick="changeElenment(<%=G%>,<%=Rs("JaType")%>,<%=ft%>,<%=fy%>);" style="cursor: hand;" UNSELECTABLE=on><br>
       <%=Rs("JaSname")%>
        <br>
        <img src="Qz/money.gif" width="12" height="9" hspace="1" vspace="4" align="absmiddle">
        <s><%=Rs("JaBuy")%></s>/<font color=ff0000><%=Rs("JaSbuy")%></font>
        H币 <br>
        <img src="Qz/<%if Rs("JaType")=6 then Response.Write "lingyang.gif" else Response.Write "buy.gif" end if%>" width="33" height="18" hspace="3" border="0"  style="cursor:hand;" onClick="changeElenment(<%=G%>,<%=Rs("JaType")%>,<%=ft%>,<%=fy%>);" UNSELECTABLE=on>        <br>
    </td>
    
<%
if k mod 5=0 then
Response.Write " </tr><tr align=""center"">"
end if
k =k+1
i=i+1 
If i >= MaxPerpage Then Exit do 
rs.MoveNext
Loop
%>   
 
  </tr>
</table>

  
<div align="center">
  <Script Language="JavaScript">Pages(<%=CurrentPage%>,<%=Rs.PageCount%>,<%=Rs.RecordCount%>,'JaUid=<%=B%>&Type=<%=AType%>&page');</Script>
</div>
</body>
</html>
