<%Session.CodePage=936%>
<!--#include file="inc/function.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/Conn_User.asp"-->
<%
const ChannelID=1
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  xml:lang="zh-CN" lang="zh-CN">
<script type=text/javascript>var xijuan={channel:"spacee"}</script>
<script type=text/javascript src="Inc/main4.js"></script>
<title><%=SiteName%> >>> 商城</title>
<!--#include file="top5.asp"-->

<script language="JavaScript" type="text/javascript">
	function chkfrm(){
		
		if (document.Myform.Keywords.value==""){
			alert('请输入要检索的关键字！');
			document.Myform.Keywords.focus();
			return false;
		}
		
		
			var Obj = document.getElementsByName("mysort");
			for(i=0;i<Obj.length;i++){
				if(Obj[i].selected){
					if (Obj[i].value=="flv"){
						document.Myform.action="flv_search.asp";
					}else if (Obj[i].value=="zone"){
						document.Myform.action="user_search.asp";
					}else if (Obj[i].value=="blog"){
						document.Myform.action="blog_search.asp";
					}else if (Obj[i].value=="photo"){
						document.Myform.action="photo_search.asp";
					}else{
						document.Myform.action="user_search.asp";
					}
				}
			}

		
		return true;
	}
</script>
<form id="Myform" name="Myform" onSubmit="return chkfrm();" action="" method=post>
    <div id=SearchBlock>
      <div id=search>
<input name="Keywords" type="text" id="Keywords" class="input2"size="45" value="请输入关键字" onMouseOver="this.focus()" onFocus="this.select()" onClick="if (this.value=='请输入关键字') this.value=''"  />


             <select name="mysort" id="mysort" size="1" class="input2"> 
             <option selected value="zone" name="mysort" id="mysort">用户家园</option>
             <option value="photo" name="mysort" id="mysort">用户相册</option>
             <option value="flv" name="mysort" id="mysort">用户视屏</option>
             <option value="blog" name="mysort" id="mysort">用户日志</option>
             </select> &nbsp;
      </div>
     <input class=input_btn value="" type=submit src=Inc/global/images/btn_search.gif name=submit style="cursor:hand;" />
    </div>
    <div class=keywords>
      <ul>
        <li class=key1>消息:
<%
set rs=server.createobject("adodb.recordset")
rs.open "select top 1 * from [516show] where hotType=1 order by ID desc",conn,1,1 
%>
<%
do while not rs.eof
%>
<B><a href="<%=rs("url")%>" target="_blank"><font color="<%=rs("titlecolor")%>"><%=left(rs("title"),24)%><%if len(rs("title"))>24 then response.write ""%></font></B></a>
 <%rs.movenext
loop%>
<%rs.close
set rs=nothing%>
        </li>
      </ul>
    </div>
  </form>
</div><div id="mainbody">
<!-- Main start -->
<div class="main">
	<div class="main_l">
		<!--Start myshow -->

<SCRIPT language=javascript>
function shoping()
{
   if(confirm("您确定要购买此模版吗？"))
     return true;
   else
     return false;
	 
}
function shoping2()
{
   if(confirm("您确定要购买此挂饰吗？"))
     return true;
   else
     return false;
	 
}
function shoping3()
{
   if(confirm("您确定要购买此小窝吗？"))
     return true;
   else
     return false;
	 
}
</SCRIPT>



		<!--Start stars -->
		<div class="leftcolumn1">
			<div class="b1tl"></div>
			<div class="b1tr"></div>
			<div class="b1tbg">
				<div class="b1tm"></div>
			</div>
			<div class="b3c">
				<div class="b3cnb">
					<div class="user_tabsnav">
						<h2 class="title1">
						<div class="more"></div><span><div class="name">推荐模版</div></span>
					    	<ul class="tabsmenu">
	
							</ul>
						</h2>
					</div>
             	</div>
			<!-- Start user_content -->
			<div class="user_content">				
                             <div id="tab_cnt">
                             	</div>		

<%
myPagesize=24
set rs=server.createobject("adodb.recordset")
sql="select * from [wos] order by id desc"
rs.open sql,Conn_User,1,3
call myPages(rs,myPagesize)
%>

			<div class="cont4" id="tab_cnt_1">
                  <%if rs.eof then%>
                  <br/>
                  暂时没有模版 <br/> <br/>
                  <%else%>
                      <%i=0%>
                      <%line=myPagesize
do while not rs.eof and line>0
%>
			<div class="pic">


<iframe id="frameLeft" name="frameLeft" src="bg/wo/<%=rs("bgid")%>.asp"  width="100" height="72" border="0"  frameborder="0" scrolling="no" marginwidth="0" marginheight="0"></iframe>

				<dl>
					<dt><img src="user/gold.gif" width="12" height="13"><%=rs("point")%>V币&nbsp;&nbsp;</font> </B></dt>
						<dd><span> <a href="shopingwo.asp?action=t&bgid=<%=rs("bgid")%>&point=<%=rs("point")%>" target="_blank" onClick="return shoping3();"><font class=no>购买</font></a>/<a href="woview.asp?bgid=<%=rs("bgid")%>" target="_blank"><font class=no>查看</font></a> </span></dd>
 </dl>			   </div>                     
                      <%i=i+1%>
                      <%if i mod 6=0 then%>
                    <%else%>
                    <%end if%>
                    <%rs.movenext
					line=line-1
		loop
		rs.close
		set rs=nothing%>
                  </table>
                  <%end if%>
		   </div>
		   <div class="cont4" id="tab_cnt_3" style="display:none;">
				<div class="pic">
				</dl>
			   </div>
		   </div>
		   		   		   
			</div><!-- End user_content -->
			<div >
				<div >
				</div>

			<div >
					<div>
											</div>				</div>
						
			<div>
					<div >

            <table width="100%" border="0" cellspacing="0" cellpadding="0">
            
              <tr>
                <td width="1" bgcolor="#ffffff"><img src="img0415/space.gif" width="1" height="1"></td>
                <td height="25" align="center" bgcolor="#FFFFF"><%call listpages(mycondition)%> </td>
                <td width="1" bgcolor="#ffffff"><img src="img0415/space.gif" width="1" height="1"></td>
              </tr>
                <tr>
                <td width="1" height="1"><img src="img0415/space.gif" width="1" height="1"></td>
                <td bgcolor="#ffffff"></td>
                <td width="1"></td>
              </tr>
            </table>


<%sub listpages(mycondition)
	response.write "<table height=22  border=0 cellpadding=0 cellspacing=0><Tr><td><table width='100%' border=0 cellspacing=0 cellpadding=0><tr><td height=3></td></tr></table>"
	if pages<1 then
		exit sub
	end if
	
	
	if p>0 then
		response.write	"<a href="&request.ServerVariables("script_name")&"?currentpage=10&p="&p-1&mycondition&"><img src=user/prepre.gif alt=前十页 border=0></a>&nbsp;&nbsp;&nbsp;"
    else
	response.write	"<img src=user/prepre.gif alt=前十页 border=0>&nbsp;&nbsp;&nbsp;"
    end if
	'-------------------下面写出当前十个页码
	response.write "</td><td><img src=user/lined.gif border=0><img src=user/k.gif border=0 width=5>"
	for i=1 to 10
		if (p*10+i)>pages then exit for
		if currentpage=i then
		
			response.write "<b><a style='color:ff6600'"
		else
			response.write "<a"
		end if 
		response.write " href="&request.ServerVariables("script_name")&"?currentpage="&i&"&p="&p&mycondition&"><font class=no >"&(p*10+i)&"</font></a></b>&nbsp;&nbsp;<img src=user/lined.gif border=0><img src=user/k.gif width=5 border=0>"	
     next
	 response.write "</td><td><table width='100%' border=0 cellspacing=0 cellpadding=0><tr><td height=3></td></tr></table>"
	 '--------------------察看下十页的连接
    if (p*10+10)<pages then
		response.write "<img src=user/k.gif border=0><a href="&request.ServerVariables("script_name")&"?currentpage=1&p="&p+1&mycondition&"><img src=user/nextnext.gif alt=后十页 border=0></a>&nbsp;&nbsp;" 
		else
		response.write "<img src=user/k.gif border=0><img src=user/nextnext.gif alt=后十页 border=0>&nbsp;&nbsp;"
	end if
	'-----------------------------------------------上下页导航
	response.write "&nbsp;</td>"
	

	  response.write "</tr></table>"
end sub

sub myPages(myRS,mysize)  '------mysize为内部变量（主页面没有定义），myRS为主页面传递过来的RS对象（地址传递）
	if myRS.eof and myRS.bof then str="没有纪录"
	if str="" then
		if mysize="" or NOT IsNumeric(mysize) then
			mysize=15
		end if
		myRS.PageSize=mysize
		pages=myRS.pagecount
		records=myRS.recordcount
		On Error Resume Next '取得数字
		currentPage=request("currentPage")
		if currentPage="" then
			currentPage=1
		end if
		currentPage=CInt(currentPage)
		if Err.Number <> 0 Then
			currentPage=1
			Err.Clear
		end if
		if currentPage<1 then
			currentPage=1
		elseIf currentPage>10 then
			currentPage=10
		end if
		'----------------处理p
		p=request("p")
		if p="" then
			p=0
		end if
		p=CLng(p)
		if Err.Number <> 0 Then
			p=0
			Err.Clear
		end if
		if p<0 then
			p=0
		end if
		'--判断是否出了页数范围
		nowPage=p*10+currentPage
		if nowPage>pages then
			p=(pages-1)\10
			currentPage=((pages-1) mod 10)+1
		end if
		myRS.absolutepage=p*10+currentPage
	else
	   currentPage=1
	   records=0
	   pages=1
	end if
end sub

dim pages,records,currentPage,p '--------定义变量，这些变量在主页面中，进行地址传递%>
					</div>
			</div>
		   </div>
		  </div>
		</div>

		<div  >
			<div ></div>
			<div ></div>
			<div >
				<div  ></div>
			</div>
		<div >
		<div >

				<div ></div>
				<div ></div>

		</div>
		<div  >

				<div  >					

				</div>
		</div>        
		</div>
		</div>
	</div><!-- End main_l -->
	
	<div id="main_r">
		<!--Start bulletin -->
		<div class="rightcolumn">
			<div class="bulletin" >
				<div class="b1tl"></div>
				<div class="b1tr"></div>
				<div class="b1tbg">
					<div class="b1tm"></div>
				</div>
				<div class="b1c">
					<div class="b1cnb">
						<h2 class="title">
							<div class="name">家园公告</div>
						</h2>
					</div>
					<div style="height:5px;font-size:1px"></div>
					<div id="showmessage"> 	</div>





<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <%
set rs=server.createobject("adodb.recordset")
rs.open "select top 6 * from Announce order by ID desc",conn,1,1 
%>
                        <Tr >
                          <td height="9" colspan="3"></td>
                        </tr>
                        <%if rs.recordcount=0 then %>
                        <Tr align="center" >
                          <td height="25" colspan="3">暂时没有公告!!!</td>
                        </tr>
                        <%else%>
                        <%
do while not rs.eof
%>
                        <tr>
                          <td height="24">&nbsp;<img src="img0415/yuan.gif"><a href="announce.asp?id=<%=rs("id")%>" target="_blank"><font color="<%=rs("titlecolor")%>"><%=gotTopic(rs("title"),30)%></font></a>
                              
                          </td>
                          <td width="0" align="right"></td>
                        </tr>
                        <%rs.movenext
loop
%>
                        <%end if%>
                        <%rs.close
set rs=nothing%>
                      </table></td>
                    </tr>
                  </table>










					<div style="height:6px;font-size:1px"></div>
		  		</div>
			</div>
		</div>
		<!--Eng bulletin -->		
		
		<!--Start top5 -->
		<div class="rightcolumn1">
			<div class="b1tl"></div>
			<div class="b1tr"></div>
			<div class="b1tbg">
				<div class="b1tm"></div>
			</div>
			<div class="b3c">
				<div class="b3cnb">
					<h2 class="title1">
						<div >
							<li  ><span>相册排行</span></li>

						</div>
					</h2>
				</div>




				<div class="top5">
<%
set rs=server.createobject("adodb.recordset")
rs.open "select top 5 * from [photo]  order by hits desc",conn,1,1 
%>



<ul id="MyfileList_1">									<div class="king">		 

 <%

						i=1
do while not rs.eof
%>

                                              <div class="userInfo">




								<div class="Name">




								<p>名称：<a href=photo_photo.asp?photoid=<%=rs("photoID")%> target="_blank"><%=left(rs("photoname"),5)%></a></p>
								<p>作者：<%
set rsf=server.createobject("adodb.recordset")
rsf.open "select * from [user] where username='"&rs("editor")&"' order by userid desc",conn_user,1,1 
%><a href=user.asp?userid=<%=rsf("userid")%> target="_blank"><%=rs("editor")%></a> </p>
								<p>人气：<span class="fpoint"><%=rs("hits")%></span></p>
								</div>
								<div class="Photo">
									<a href=photo_photo.asp?photoid=<%=rs("photoID")%> target="_blank">  <img src="<%=rs("PhotoUrl_Thumb")%>" border="0" width="50" height="50" /></a>
								</div>
											</div>
	<%
						i=i+1
						if i>5 then exit do
						rs.movenext
						loop
						rs.close
						set rs=nothing%>				
</div>
</ul>

					<ul id="MyfileList_2" style="display:none;">
					<div class="king">
						<div class="userInfo">
							<div class="Name">
								












							</div>
						</div>
					</div>
					</ul>
				</div>
			</div>
		</div>
		<!-- End TOP5 -->

		<!--Start newuser-->
		<div class="rightcolumn1">
			<div ></div>
			
			<div >
		    	<div ></div>
			</div>
			
		    				        		<div >
		            				         		</div>
		         		<div ></div>
		     		
		 		</div>
		 	    <div >
		 	        <div >
					<div >
	
					</div>
					</div>
		 	    </div>
		 	    <div></div>
		    </div>
		</div>
	</div><!--Eng main_r -->
</div>
<script>
function click(i)
{
  ShowTag(i,2);
}
</script>
<!-- End main -->
</div>
<div ></div>
<div >
</div>


<div >


</div>
	</div>
<!-- sidebar end --><br>
<!--#include file="end.asp"-->
</div></div><!-- End footerCopyright -->
