<html>
<head>
<STYLE type=text/css>
A:link {COLOR: #000000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:visited {	COLOR: #000000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:active { COLOR: #ff0000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:hover {COLOR: #ff0000; TEXT-DECORATION: none}
BODY {FONT-SIZE: 9pt}
TH {FONT-SIZE: 9pt}
TD {FONT-SIZE: 9pt}
</STYLE>
<title>iChat虚拟超市2.0</title>
<script>
function cart()
{
buywin=window.open("showcart.asp","buy","toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=no,width=1,height=1");
}
function wop(url)
{
buywin=window.open(url,"buy","toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=no,width=650,height=250");
}
function wop1(url)
{
	var x = (screen.width - 274) / 2 ;
	var y = (screen.height - 320) / 2 ;
	buywin=window.open(url,"home","toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=no,width=274,height=260" + ",top="+y+",left="+x);
}
function px(abc)
{
top.location="shop.asp?px="+abc;
}
</script>
</head>         
<!--#include file="conn.asp"-->    
<body bgcolor="#396BA5">

<div align="center">
  <center>    
<table border="0" width="300" height="31" bgcolor="#C0C0C0" style="border-style: ridge; border-width: 1" cellspacing="7">
  <tr>
    <td width="100%" height="14" bgcolor="#BDD6FF" style="border-style: groove; border-width: 1">
      <p align="center"><b><font size="3" color="#FF0000">iChat聊天室虚拟超市</font></b></td>
  </tr>
</table>           
         
  </center> 
</div> 
 <br>        
<%
if request.querystring("move")="NEXT" then               
	session("currentpage")=session("currentpage")+1
end if               
if request.querystring("move")="PREV" then               
	session("currentpage")=session("currentpage")-1               
end if
if request.querystring("move")="" then               
	session("currentpage")=1               
end if
               
if session("currentpage")="" then               
	session("currentpage")=1               
end if          
pxz=request.querystring("px")
if session("pxzd")="" then
	session("pxzd")="CreateDate"
	session("pxm")="供货时间"
end if

if pxz="1" then
	session("pxzd")="CreateDate"
	session("pxm")="供货时间"
end if
if pxz="2" then
	session("pxzd")="Price"
	session("pxm")="商品价格"
end if
if pxz="3" then
	session("pxzd")="ProductLevel"
	session("pxm")="使用级别"
end if
if pxz="4" then
	session("pxzd")="Quantity"
	session("pxm")="存货数量"
end if
if pxz="5" then
	session("pxzd")="Sells"
	session("pxm")="销售数量"
end if

id=request.querystring("id")
if len(id) > 10 then response.end
if id="" and session("idid")="" then 
	id=0 
	session("idid")=id
end if
if id<>"" then
	session("idid")=id
else
	id=session("idid")
end if

if int(id)>zlmmx then
	id=0
end if          



%>   
<div align="center">           
           
           
	<table border="0"  width="520" height="35" cellspacing="1" cellpadding="0"><tr>           
		<td width="100%" height="2" colspan="3" align="right" bgcolor="#BDD6FF" style="border-style: ridge; border-width: 1">           
           <table border="0" width="100%" cellspacing="1" height="1">
            <tr>
              <td width="186" height="1">
                <p align="left">
                
                排序方式：<SELECT name="ppp" size="1" onChange="px(this.value)">
						<OPTION value=-1 selected><%=session("pxm")%></OPTION>
						<OPTION value=0>--------</OPTION>
						<OPTION value=1>供货时间</OPTION>
						<OPTION value=2>商品价格</OPTION>
						<OPTION value=3>使用级别</OPTION>
						<OPTION value=4>存货数量</OPTION>
						<OPTION value=5>销售数量</OPTION>
				</SELECT>

                
                
                
                </td>
              <td width="95" height="1"></td>
              <td width="5" height="1">
                <p align="center"></td>
              <td width="4" height="1">
                <p align="right">

		</td>
              <td width="172" height="1">
                <p align="center">
		<input type="button" value="我的百宝箱" name="B3" onclick="javascript:wop1('home.asp');">
		<input type="button" value="购物车" name="B4" onclick="javascript:wop('showcart.asp');"> 
		</td> 
            </tr> 
           </table> 
			</td>                      
			</tr> 
			 
			 
      <tr>            
		<td width="100%" height="27" bgcolor="#C0C0C0" colspan="3" style="border-style: ridge; border-width: 1">            
           <table border="0" width="100%" cellspacing="0" cellpadding="3"> 
            <tr> 
              <td width="12%">            
        	   商品类别:</td> 
              <td width="62%"> 
              	<%for i=0 to zlmmx  
			if i=cint(id) then%> 
	           [<b><% =zlm(i,0) %></b>]                   
  
			<%else %>  
	           [<a href="shop.asp?id=<%=i%>"><% =zlm(i,0) %></a>]                   
				<%end if  
				next%>                  　</td> 
              <td width="26%"> 
                <p align="right">　当前类别:<b><font color="#FF0000"><%=zlm(id,0)%></font></b></p> 
              </td> 
            </tr> 
           </table> 
			</td>                      
			</tr> 
			 
			 
	<% 
set rs=Server.CreateObject("ADODB.RecordSet")                           
Rs.open "Select * from Products where type="&zlm(id,1)&" ORDER BY "&session("pxzd")&" DESC ",conn,1 
zys=rs.recordcount\15 
if rs.recordcount mod 15<>0 then 
    	zys=zys+1 
end if	 
if Rs.Eof then %>           
<tr><td  height="34" bgcolor="#F6F6F6">  
    <p align="center">此 种 类 现 在 没 有 商 品！</p>            
</td></tr>            
<%else%>            
            
	<tr>                        
	<%         
	rs.PageSize=15                  
	if session("currentpage")>zys then    
	session("currentpage")=zys    
	end if    
	if session("currentpage")<1 then    
	session("currentpage")=1    
	end if    
	    
	rs.AbsolutePage=session("currentpage")         
	js=1         
	js1=0         
	while NOT rs.EOF and js1<rs.pagesize%>                       
		<td width="202" height="1" bgcolor="#F6F6F6" valign="top">                       
                       
		<table border="0" width="202" height="101" cellspacing="0" cellpadding="0" title="<%=Rs("Memo")%>"><tr>  
	    <td width="67" rowspan="5" height="92"><p align="center">&nbsp;<img src="<%=Rs("Facies")%>">  
    	  <p align="center">           
              <%if session("admin")="administrator" then %>         
              	[<a href="edit.asp?id=<%=Rs("id")%>">改</a>] [<a href="#"  onclick="javascript:if (confirm('您确定要删除吗?')) href='dele.asp?id=<%=Rs("id")%>'; else return;">删</a>]            
          		<%else    
          			if Rs("Quantity")>0 then%>    
			    <a href="javascript:wop('buy.asp?id=<%=Rs("id")%>')">[订 购]</a>        
			    	<%else%>    
			    		[无 货]    
               <%	end if    
               end if%>         
		</td>                                  
    	<td width="54" height="20">商品名称:</td>                                  
	    <td width="61" height="20"><%=Rs("ProductName")%></td>                                 
 		</tr><tr><td width="54" height="20">商品价格:</td>                                 
	    <td width="61" height="20"><font color="#FF0000"><%=Rs("Price")%></font></td>                                 
	  </tr><tr><td width="54" height="19">现存数量:</td>                                 
	    <td width="61" height="19"><font color="#FF0000"><%=Rs("Quantity")%></font></td>                                 
	  </tr><tr><td width="54" height="19">使用级别:</td>                                 
	    <td width="61" height="19"><font color="#FF0000"><%=Rs("ProductLevel")%></font></td>                                 
	  </tr><tr><td width="54" height="1">已销数量:</td>                                 
	    <td width="61" height="1"><font color="#FF0000"><%=Rs("Sells")%></font></td>                                 
	  </tr></table>                                       
</td>                                       
	    <%rs.movenext         
	    js1=js1+1                                        
		js=js+1                                       
		if js>3 then%>                                        
			</tr><tr>                                        
			<%js=1                                       
		                                       
		end if                                       
	wend    
	if js>1 then    
	for i=js to 3 %>    
	<td width="260" height="5" bgcolor="#F6F6F6" valign="top">    
	</td>    
	    
	<%js=js+1    
	next    
	    
	end if    
	%>     
	                                      
                                       
</tr>                                        
<%end if                                       
%>                                       
     <tr>                      
		<td width="100%" height="27" bgcolor="#C0C0C0" colspan="3" style="border-style: ridge; border-width: 1">                      
           <table border="0" width="100%" cellspacing="0" cellpadding="3">           
            <tr>           
              <td width="34%">         
              <%if session("admin")="administrator" then %>         
              	[<a href="logut.asp">退出管理</a>]&nbsp;&nbsp;&nbsp;&nbsp; [<a href="addnew.asp">增加商品</a>]            
          		<%else%>        
          		[<a href="adminlogin.asp">管理入口</a>]         
              <%end if%>         
        	  </td>           
              <td width="31%">           
                <p align="center">第<%=session("currentpage")%>页/共<%=zys%>页          
				</td>          
              <td width="35%">          
              <p align="right">         
                       
			<%if session("currentpage")>1 then %>         
				<A href="shop.asp?move=PREV">[上页]</A>         
			<%else%>         
				 [上页]         
			 <%end if%>         
			 &nbsp;&nbsp;&nbsp;&nbsp;         
			<%if session("currentpage")<rs.pagecount then %>         
				<A href="shop.asp?move=NEXT">[下页]</A>         
			<%else%>         
				[下页]         
			<%end if%>         
         
         
              </td>          
            </tr>          
           </table>          
			</td>                               
			</tr>          
                                  
                                     
	</table>	                                      
</div>
<script>window.focus();</script>   
<p align=center>系统设计由 iChat <a href="http://www.ichat.net.cn" target=_blank style="font-size: 9pt;">深圳博雅信息技术有限责任公司</a>提供</p>
<p align=center>
<script>var tc_user="szptt2";var tc_class="1";</script><script src="http://stat.t2t2.com/stat.js"></script>
</p>
                           
</body>
</html>
