<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<%
titlename="店铺搜索"
If shopnet("lbid")<>"" And Not isnumeric(shopnet("lbid"))  Then
	 response.redirect"/note.asp?errid=0"
End If
%>
<!--#include file="FFunction.asp"-->
<!--#include file="FHeadTitle.asp"-->
<style type="text/css" media="screen">
@import url("css/v1.2.php@t=2006512.css");
@import url("css/component.php@t=2006512.css");

</style>
</head>
<body class="<%= PageStyle %>">
<%IsShowHotKey=false%>
<!--#include file="FHeadAll.asp"-->
<div class="HackBox"></div>
<div id="Content" class="L180">
<div id="LinkPath">
<!--导航栏 -->
		<ul class="PathLinksLevel1">
			<li><a href="index.asp">首页</a></li>
			<li><a href="shopindex.asp">店铺首页</a></li>
            <li><a href="shoplist.asp?PageType=A" class="f2">所有店铺</a></li>

			<%   if shopnet("s")="yes" and (shopnet("lx")="0" or shopnet("lx")="1" or shopnet("lx")="2" or shopnet("lx")="3" or shopnet("lx")="5") then
			      response.write " <li>店铺搜索结果</li>"
				 end if
				 if shopnet("s")="yes" and shopnet("lx")="4" and shopnet("lbid")<>"" then 
				 response.write "<li>"
				 set rs= conn.execute("select * from lb where lbid="&shopnet("lbid"))
				 if not rs.eof then
				 response.write rs("lbname")
				 end if
				 response.write "<span>("
				  set rs2= conn.execute("select count(*) as totalnum from lb where lbid="&shopnet("lbid"))
				  response.write rs2("totalnum")-1
				 response.write ")</span></li>"
				 rs.close
				 set rs=nothing
				 rs2.close
				set rs2=nothing 
				end if
				if shopnet("lx")="" and shopnet("lbid")="" and shopnet("key")="" and shopnet("xlbid")="" and shopnet("s")="" and shopnet("key")="" then
				response.write("<li><span>所有商铺</span></li>")
				end if
			
			'商易仿淘宝4.0.1演示地址
'http://www.ftaobao.com
%>
		</ul>
		<div class="HackBox"></div>
</div>
<!--内容栏 -->
  <div id="Main"></div>
 <%

 %>
    <table width="98%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="20%" valign="top">

		  <div id="SideBar">
 <div id="SideSearchShop" class="StandardSidePanel">
            <form action="shoplist.asp" name="search_s" method="get">
              <input name="s" type="hidden" id="s" value="yes">
              <input name="PageType" type="hidden" id="PageType" value="A">
              <div class="Title"><b>搜索店铺</b></div>
              <ul class="FormLite">
                <li>
                  <input type="text" name="key" id="SearchShopKeyword" size="16" value="<%=shopnet("key")%>" />
                  <input name="submit" type="submit" id="SideSearchShopSubmit" value="搜 索" />
                </li>
                <li>
                  <input name="lx" type="radio" id="lx"  onclick="changeType(this)" value="1" <%if shopnet("lx")="1" then%>checked<%end if%> checked/>
                  <label for="SideSearchShopName">店铺名</label>
                </li>
                <li>
                  <input type="radio" name="lx" id="lx" VALUE="2"   onclick="changeType(this)" <%if shopnet("lx")="2" then%>checked<%end if%>/>
                  <label for="SideSearchSellerName">掌柜会员名</label>
                </li>
                <li>
                  <input type="radio" name="lx" id="lx"  VALUE="3"  onclick="changeType(this)" <%if shopnet("lx")="3" then%>checked<%end if%>/>
                  <label for="SideSearchShopMajor">主营</label>
                </li>
                <li>
                  <input type="radio" name="lx" id="lx"  VALUE="5"  onclick="changeType(this)" <%if shopnet("lx")="5" then%>checked<%end if%>/>
                  <label for="SideSearchShopMajor">地址</label>
                </li>
              </ul>
            </form>
            <div class="HackBox"></div>
            <div class="Bottom"></div></div>
          <%ShowLeftTopic() %>
        <td width="80%" valign="top"><div id="div">
          <div id="TopPageChanger" class="PageChanger" style="display:none"> <img src="images/pre_page_simple.gif" alt="上一页" /> <strong>1</strong> <a href="">2</a> <a href="">3</a> ... <a href="">923</a> <a href="">924</a> <a href="" class="EventCode34"><img src="images/next_page_act.gif" alt="下一页" title="翻到下一页" /></a>到第
            <input type="text" name="jumpto" id="jumpto" size="3" value="1" onKeyPress="return gotoPageDelegate()" />
            页 <img src="images/btn_ok.gif" alt="翻指定的页码" title="翻指定的页码" onClick="gotoPage()" class="HandCursor" /> </div>
          <!--列表内容 -->
          <!--#include file="include/page.asp" -->
         <h2> <table width="98%" align="center" cellpadding="2" cellspacing="0">
            <tr valign="middle">
              <td width="140" height="25" align="center">店铺LOGO</td>
              <td width="56" align="center">商品数</td>
              <td width="256" height="25" align="center">店铺名称</td>
              <td width="50" height="25" align="center" nowrap>人气</td>
              <td width="50" height="25" align="center" nowrap>实名认证</td>
              <td width="60" height="25" align="center" nowrap>星级信用</td>
              <td width="100" height="25" align="center" nowrap>创建时间</td>
            </tr>
            <%Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from shop where id is not null"
if shopnet("lbid")<>"" then
sql=sql&" and lbid="&shopnet("lbid")&""
end if
if shopnet("key")<>"" then
select case ""&shopnet("lx")&""
case "1"
sql=sql&" and name like '%"&shopnet("key")&"%'"
case "2"
sql=sql&" and name2 like '%"&shopnet("key")&"%'"
case "3"
sql=sql&" and js like '%"&shopnet("key")&"%'"
case "5"
sql=sql&" and dz like '%"&shopnet("key")&"%'"
end select 
end if
sql=sql&" order by sj2 desc,id desc"

if shopnet("key")="" then
tishinr="没有找相关的店铺信息！"
else
tishinr="没有找到关于<font color=red>"&shopnet("key")&"</font>的店铺信息！"
end if
rs.open sql,conn,3,1 
if rs.eof then

response.write("<tr><td colspan=7 height=70 align=center>"&tishinr&"</td></tr>")
else
rs.PageSize =12 '每页记录条数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.PageCount 
    		page=request("page")
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
        if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
        rs.AbsolutePage=Page
	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
		For y=1 To x%>
            <tr>
              <td width="140" height="70" align="center"><%if rs("logo")<>"" then
Response.Write("<a href=shop/1/myshop.asp?shopid="&rs("id")&" target=_blank onFocus=this.blur()><img border=0 src=user/images/logo/"&rs("logo")&" width=120 height=50></a>")
else
Response.Write("<table width=80 border=0 cellpadding=0 cellspacing=1 bgcolor=#f1f1f1><tr><td height=40 align=center valign=middle bgcolor=#FFFFFF><font color=#cccccc>店标</font></td></tr></table>")
end if%>
              </td>
              <td align="center" style="word-break:break-all;"><div align="center">
                  <%rz = conn.execute("select count(id) from chanpin where userid="&rs("id")&"")(0)
		  Response.Write rz%>
              </div></td>
              <td align="center" style="word-break:break-all;"><%Response.Write("<a href=shop/1/myshop.asp?shopid="&rs("id")&" target=_blank><b>"&rs("name")&"</b></a>")


'Response.Write("<br><a href=shop/1/myshop.asp?shopid="&rs("id")&" target=_blank>http://"&my_url&"/shop/1/myshop.asp?shopid="&rs("id")&"</a>")
%>
              </td>
              <td width="50" align="center" nowrap><%=rs("jishu")%></td>
              <td width="50" align="center" nowrap><%rz = conn.execute("select rzjb from rz where username='"&rs("huiyuan")&"'")(0)
		  renzheng()%>
              </td>
              <td width="60" align="center" nowrap><%xinyong = conn.execute("select xinyong from huiyuan where huiyuan='"&rs("huiyuan")&"'")(0)
		  If xinyong<cint(xing1) Then
		xing="noxing.gif"
		End If     
		If xinyong>cint(xing1) Then
		xing="xing1.gif"
		alt=""&cint(xing1)&"-"&cint(xing11)&"为一星级"
		End if
		If xinyong>cint(xing2) Then
		xing="xing2.gif"
		alt=""&cint(xing2)&"-"&cint(xing21)&"为二星级"
		End If
		If xinyong>cint(xing3) Then
		xing="xing3.gif"
		alt=""&cint(xing3)&"-"&cint(xing31)&"为三星级"
		End if
		If xinyong>cint(xing4) Then
		xing="xing4.gif"
		alt=""&cint(xing4)&"-"&cint(xing41)&"为四星级"
		End If
		
		If xinyong>cint(xing5) Then
		xing="xing5.gif"
		alt=""&cint(xing5)&"-"&cint(xing51)&"为五星级"
		End If
		
		If xinyong>cint(xing6) Then
		xing="xing6.gif"
		alt=""&cint(xing6)&"-"&cint(xing61)&"为六星级"
		End If
		
		If xinyong>cint(xing7) Then
		xing="xing7.gif"
		alt=""&cint(xing7)&"-"&cint(xing71)&"为七星级"
		End If
        If  xinyong>cint(xing8) Then
		xing="xing8.gif"
		alt=""&cint(xing8)&"以上为八星级"
		End If
		  %>
                  <img src=image/<%=xing%> alt="<%=alt%>"></td>
              <td width="100" align="center" nowrap><%=formatdatetime(rs("sj"),1)%></td>
            </tr>
            <tr>
              <td height=1 colspan=7 bgcolor=#f1f1f1></td>
            </tr>
<%x=y+1
rs.MoveNext                                              
next

%>
          </table>
          <table width="98%" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="30" align="center" valign="middle"><%call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
%>
              </td>
            </tr><%end if%>
          </table>
          <div class="HackBox"></div>
        </div>        
      <tr></td>
        <td>        
        <tr><td><div id="Container"><div class="HackBox"></div>
        </div></td>
          <td>&nbsp;</td>
      </tr>
    </table>
</div>
<div class="HackBox"></div>
<!--#include file="Bottom.asp"-->
</body>
</html>
