⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 3.asp

📁 一个非常好的旅游网站程序.
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>


<!--#include file="../conn.asp" -->
<%
shop_name=request("shop_name")

'创建分类对象
set FL_rs=server.createobject("adodb.recordset")
sqltext="select * from shop where shop_name1='"&shop_name&"'  "
FL_rs.open sqltext,conn,1,1

'创建商品对象
set rs=server.createobject("adodb.recordset")

'如果分类名为空时则选取全部商品
if request("Classification")="" then
sqltext="select  * from Product  Where p_shop='"& shop_name &"' order by Product_No desc"

'选取分类商品
else
sqltext="select  * from Product  Where p_shop='"& shop_name &"' and Classification='"& request("Classification") &"' order by Product_No desc"
end if
rs.open sqltext,conn,1,1

dim MaxPerPage
MaxPerPage=12

'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage
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

%>
<HTML>
<HEAD>
<TITLE>3</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR>
<NOSCRIPT><IFRAME SRC="*.html"></IFRAME></NOSCRIPT> 

<script language="javascript">
function click() {
if (event.button==2) {
alert('您好!欢迎您光临汕头商城!')
}
}
document.onmousedown=click
</script>
<style>
BODY {
	FONT-SIZE: 9pt
}
TD {
	FONT-SIZE: 9pt
}
.font {width:700;
        filter:blur(add=ture,direction=135,strength=10);font-size:35;
        }

</style>
<SCRIPT language=JavaScript>
<!--
function openbag(url,name){
		window.open(url,name,"height=200,width=600,left=190,top=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no")}
-->
</SCRIPT>
</HEAD>
<BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff 
leftMargin=0 topMargin=0>
<div align="center">
  <TABLE height=84 cellSpacing=0 cellPadding=0 width=770 
background=images/head.jpg border=0>
    <TBODY> 
    <TR> 
      <TD> 
        <TABLE cellSpacing=0 cellPadding=0 width=770 border=0>
          <TBODY> 
          <TR> 
            <TD width=180> 
              <DIV align=right></DIV>
            </TD>
            <TD width=10>&nbsp;</TD>
            <TD class=font ><font color="#0000FF"><b><%=shop_name%></b></font></TD>
          </TR>
          </TBODY>
        </TABLE>
      </TD>
    </TR>
    </TBODY>
  </TABLE>
  <TABLE height=10 cellSpacing=0 cellPadding=0 width=770 border=0>
    <TBODY> 
    <TR> 
      <TD></TD>
    </TR>
    </TBODY>
  </TABLE>
  <TABLE cellSpacing=0 cellPadding=0 width=770 border=0>
    <TBODY> 
    <TR> 
        <TD vAlign=top width=99> <TABLE style="FONT-SIZE: 12px" cellSpacing=0 cellPadding=0 width=85 
      align=center border=0>
            <TBODY>
              <TR> 
                <TD width=15></TD>
                <TD width=70 height=5></TD>
              </TR>
              <TR> 
                <TD width=15><IMG height=15 src="images/dan.gif" width=15></TD>
                <TD width=70 height=25> <DIV align=center><a href="1.asp?shop_name=<%=shop_name%>"><FONT color=#ff0000>公司介绍</FONT></a></DIV></TD>
              </TR>
              <TR> 
                <TD width=15><IMG height=15 src="images/dan.gif" width=15></TD>
                <TD width=70 height=25> <DIV align=center><A 
            href="2.asp?shop_name=<%=shop_name%>">推荐商品 </A></DIV></TD>
              </TR>
              <TR> 
                <TD width=15><IMG height=15 src="images/dan.gif" width=15></TD>
                <TD width=70 height=25> <DIV align=center><A 
            href="3.asp?shop_name=<%=shop_name%>">分类商品 </A></DIV></TD>
              </TR>
              <TR> 
                <TD width=15><IMG height=15 src="images/dan.gif" width=15></TD>
                <TD width=70 height=25> <DIV align=center><A 
            href="4.asp?shop_name=<%=shop_name%>">综合资讯 </A></DIV></TD>
              </TR>
              <TR> 
                <TD width=15><IMG height=15 src="images/dan.gif" width=15></TD>
                <TD width=70 height=25> <DIV align=center><A 
            href="6.asp?shop_name=<%=shop_name%>">旅游线路 </A></DIV></TD>
              </TR>
              <TR> 
                <TD width=15><IMG height=15 src="images/dan.gif" width=15></TD>
                <TD width=70 height=25> <DIV align=center><A 
            href="5.asp?shop_name=<%=shop_name%>">企业动态 </A></DIV></TD>
              </TR>
              <TR> 
                <TD width=15><IMG height=15 src="images/dan.gif" width=15></TD>
                <TD width=70 height=25> <DIV align=center><A 
            href="7.asp?shop_name=<%=shop_name%>">诚聘英才 </A></DIV></TD>
              </TR>
              <TR> 
                <TD width=15><IMG height=15 src="images/dan.gif" width=15></TD>
                <TD width=70 height=25> <DIV align=center><A 
            href="8.asp?shop_name=<%=shop_name%>">客户反馈 </A></DIV></TD>
              </TR>
              <TR> 
                <TD width=15><IMG height=15 src="images/dan.gif" width=15></TD>
                <TD width=70 height=25> <DIV align=center><A 
            href="default.asp?shop_name=<%=shop_name%>">返回首页</A></DIV></TD>
              </TR>
              <TR> 
                <TD width=15>&nbsp;</TD>
                <TD width=70 height=25>&nbsp;</TD>
              </TR>
            </TBODY>
          </TABLE></TD>
      <TD vAlign=top width=1 bgColor=#0066cc></TD>
      <TD vAlign=top width=665> 
        <TABLE style="FONT-SIZE: 12px" height=25 cellSpacing=0 cellPadding=0 
      width="100%" border=0>
          <TBODY> 
          <TR> 
            <TD vAlign=bottom>&nbsp;分类商品: <a href="3.asp?shop_name=<%=shop_name%>&Classification=<%=FL_rs("Classification_1")%>"><%=FL_rs("Classification_1")%></a> 
              丨 <a href="3.asp?shop_name=<%=shop_name%>&Classification=<%=FL_rs("Classification_2")%>"><%=FL_rs("Classification_2")%></a> 
              丨 <a href="3.asp?shop_name=<%=shop_name%>&Classification=<%=FL_rs("Classification_3")%>"><%=FL_rs("Classification_3")%></a> 
              丨 <a href="3.asp?shop_name=<%=shop_name%>&Classification=<%=FL_rs("Classification_4")%>"><%=FL_rs("Classification_4")%></a> 
              <%
FL_rs.close
set FL_rs=nothing
%>
            </TD>
          </TR>
          </TBODY>
        </TABLE>
        <TABLE style="FONT-SIZE: 12px" height=300 cellSpacing=0 cellPadding=5 
      width="100%" border=0>
          <TBODY> 
          <TR> 
            <TD vAlign=top> <br>
              <table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr> 
                  <%                                                      
'/////////////////////////////////////////////////////////假如没有商品时//////////////////                                                      
If rs.eof and rs.bof then                                                       
   response.write "<td><p align='center'><font color='#ff0000'>此类别还没有商品资料</font></p></td>"                                                      
                                                       
End if %>
                  <%row_count=1                                                      
    '/////////////////////////////////////显示帖子的子程序////// ///////////////////////////////////                                                     
Sub list()%>
                  <%i=0                                                      
   Do While Not rs.EOF%>
                  <td height="56" align="center"  valign="top"><a href="../../ProductDetail.asp?Product_id=<%=rs("Product_id")%>"><img name="small" border="0" src="../../manage/pic_play.asp?pic_id=<%=rs("pic_id")%>" width="72" height="82"  ><br>
                    <%=rs("Product_Name")%><br>
                    </a><font color="#cc0000">销售商:</font><%=rs("p_shop")%><font color="#cc0000"><br>
                    会员价:</font><%=rs("P_NewPrice")%>元<br>
                    <a href="javascript:openbag('../../check.asp?cpbm=<%=rs("Product_Id")%>&amp;shopname=<%=rs("p_shop")%>')"><img style="CURSOR: hand" height="22" src="../../images/che1.gif" width="56" align="absMiddle" border="0"></a> 
                  </td>
                  <%if row_count mod 4 =0 then%>
                </tr>
                <tr> 
                  <td height="20"></td>
                </tr>
                <tr> 
                  <%end if%>
                  <%                                                     
                        i=i+1                                                     
  					    if i >= MaxPerpage then exit do                                                     
				    	rs.MoveNext                                                     
					    row_count=row_count+1                                                     
						Loop                                                     
					end Sub                                                     
					  %>
                  <% 
'显示翻页子程序
call list                                                     
   If Rs.recordcount > MaxPerPage then               
    Response.write "<br>"                                                  
   call showpages                                                     
 end if%>
                </tr>
              </table>
            </TD>
          </TR>
          </TBODY>
        </TABLE>
      </TD>
    </TR>
    </TBODY>
  </TABLE>
  <TABLE style="FONT-SIZE: 12px" height=40 cellSpacing=0 cellPadding=0 
width="770" border=0>
    <TBODY> 
    <TR> 
      <TD vAlign=bottom width="795"> 
        <DIV align=center> 
          <HR width="95%">
          <TABLE style="FONT-SIZE: 12px" cellSpacing=0 cellPadding=3 width=500 
      align=center border=0>
            <TBODY> 
            <TR> 
              <TD> 
                <DIV align=center></DIV>
              </TD>
            </TR>
            </TBODY>
          </TABLE>
          <TABLE cellSpacing=0 cellPadding=0 width=220 align=center border=0>
            <TBODY> 
            <TR> 
              <TD style="FONT-SIZE: 12px" vAlign=bottom> 
                <DIV align=center></DIV>
              </TD>
            </TR>
            </TBODY> 
          </TABLE>
        </DIV>
      </TD>
    </TR>
    </TBODY>
  </TABLE>
</div>
<%
'显示翻页的子程序
sub showpages()%>

        <table border="0" cellPadding="0" cellSpacing="3" width="590" align="center">
          <tr> 
            <td class=main1 height="30"> 
              <p align="center"> 
                <%    
   If currentpage > 1 Then
      response.write "<a href='3.asp?&page="+cstr(1)+"&shop_name="+Cstr(shop_name)+"&Classification="+request("Classification")+"'>首页</a><font color='#FF0000'><b>—</b></font>"  
      Response.write "<a href='3.asp?page="+Cstr(currentpage-1)+"&shop_name="+Cstr(shop_name)+"&Classification="+request("Classification")+"'>前页</a><font color='#FF0000'><b>—</b></font>"
   Else
      Response.write "首页<font color='#FF0000'><b>—</b></font>"
      Response.write "前页<font color='#FF0000'><b>—</b></font>"      
   End if
   
   If currentpage < Rs.PageCount Then
      Response.write "<a href='3.asp?page="+Cstr(currentPage+1)+"&shop_name="+Cstr(shop_name)+"&Classification="+request("Classification")+"'>后页</a><font color='#FF0000'><b>—</b></font>"
      Response.write "<a href='3.asp?page="+Cstr(Rs.PageCount)+"&shop_name="+Cstr(shop_name)+"&Classification="+request("Classification")+"'>尾页</a>&nbsp;&nbsp;"
   Else
      Response.write "后页—"
      Response.write "尾页&nbsp;&nbsp;"       
   End if
   Response.write "页次:" & "<font color=#FF0000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font>&nbsp;"
   Response.write "<font color=#FF0000>" & Cstr(MaxPerPage) & "</font>" & "种产品/页&nbsp" & "共" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>种产品</font>&nbsp;&nbsp;"


%>
            </td>
        </tr>
      </table>

<%end sub%>

<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -