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

📄 2.asp

📁 一个非常好的旅游网站程序.
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="../conn.asp" -->
<%
shop_name=request("shop_name")
Classification_0="推荐商品"
set rs=server.createobject("adodb.recordset")
sqltext="select  * from Product  Where p_shop='"& shop_name &"' and Classification='"& Classification_0 &"' order by Product_No desc"
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>2</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<STYLE>BODY {
	FONT-SIZE: 9pt
}
TD {
	FONT-SIZE: 9pt
}
a            { text-decoration: none; color: #000000 }
a:hover      { text-decoration: underline; color: #0000FF }

.3dfont {font-size: 25pt; letter-spacing: 5;
COLOR: #0000ff; FILTER: glow(color=ffffff,strength=1) shadow(color= #66ccFF,di 
rection:100); POSITION: relative; WIDTH: 100% 
} 
</STYLE>
<NOSCRIPT><IFRAME SRC="*.html"></IFRAME></NOSCRIPT> 
<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>

<script language="javascript">
function click() {
if (event.button==2) {
alert('您好!欢迎您光临汕头商城!')
}
}
document.onmousedown=click
</script>
</HEAD>
<BODY BGCOLOR=#0000FF leftmargin="0" topmargin="0">
<TABLE WIDTH=778 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
  <TR bgcolor="#9999CC"> 
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=102 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=46 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=12 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=18 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=57 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=18 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=57 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=17 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=53 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=21 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=54 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=14 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=61 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=17 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=53 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=17 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=59 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=16 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=56 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=14 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=16 HEIGHT=1></TD>
  </TR>
  <TR> 
    <TD COLSPAN=21> <IMG SRC="images/1_01.gif" WIDTH=778 HEIGHT=17></TD>
  </TR>
  <TR> 
    <TD COLSPAN=21> <IMG SRC="images/1_02.gif" WIDTH=778 HEIGHT=8></TD>
  </TR>
  <TR> 
    <TD COLSPAN=21> <IMG SRC="images/1_03.gif" WIDTH=778 HEIGHT=25></TD>
  </TR>
  <TR> 
    <TD COLSPAN=2 ROWSPAN=2> <IMG SRC="images/1_04.gif" WIDTH=148 HEIGHT=50></TD>
    <TD COLSPAN=18 height="44" bgcolor="#D6E7EF" > <div class="3dfont"><b><%=shop_name%></b></div></TD>
    <TD ROWSPAN=3> <IMG SRC="images/1_06.gif" WIDTH=16 HEIGHT=69></TD>
  </TR>
  <TR> 
    <TD COLSPAN=18> <IMG SRC="images/1_07.gif" WIDTH=614 HEIGHT=6></TD>
  </TR>
  <TR> 
    <TD> <IMG SRC="images/1_08.gif" WIDTH=102 HEIGHT=19></TD>
    <TD COLSPAN=2> <a href="1.asp?shop_name=<%=shop_name%>"><IMG SRC="images/1_09.gif" WIDTH=58 HEIGHT=19 border="0"></a></TD>
    <TD> <IMG SRC="images/1_10.gif" WIDTH=18 HEIGHT=19></TD>
    <TD> <a href="2.asp?shop_name=<%=shop_name%>"><IMG SRC="images/1_11.gif" WIDTH=57 HEIGHT=19 border="0"></a></TD>
    <TD> <IMG SRC="images/1_12.gif" WIDTH=18 HEIGHT=19></TD>
    <TD> <a href="3.asp?shop_name=<%=shop_name%>"><IMG SRC="images/1_13.gif" WIDTH=57 HEIGHT=19 border="0"></a></TD>
    <TD> <IMG SRC="images/1_14.gif" WIDTH=17 HEIGHT=19></TD>
    <TD> <a href="4.asp?shop_name=<%=shop_name%>"><IMG SRC="images/1_15.gif" WIDTH=53 HEIGHT=19 border="0"></a></TD>
    <TD> <IMG SRC="images/1_16.gif" WIDTH=21 HEIGHT=19></TD>
    <TD> <a href="7.asp?shop_name=<%=shop_name%>"><IMG SRC="images/1_21.gif" border="0"></a></TD>
    <TD> <IMG SRC="images/1_18.gif" WIDTH=14 HEIGHT=19></TD>
    <TD> <a href="6.asp?shop_name=<%=shop_name%>"><IMG SRC="images/1_19.gif" WIDTH=61 HEIGHT=19 border="0"></a></TD>
    <TD> <IMG SRC="images/1_20.gif" WIDTH=17 HEIGHT=19></TD>
    <TD> <a href="5.asp?shop_name=<%=shop_name%>"><IMG SRC="images/1_17.gif" WIDTH=53 HEIGHT=19 border="0"></a></TD>
    <TD> <IMG SRC="images/1_22.gif" WIDTH=17 HEIGHT=19></TD>
    <TD> <a href="8.asp?shop_name=<%=shop_name%>"><IMG SRC="images/1_23.gif" WIDTH=59 HEIGHT=19 border="0"></a></TD>
    <TD> <IMG SRC="images/1_24.gif" WIDTH=16 HEIGHT=19></TD>
    <TD> <a href="default.asp?shop_name=<%=shop_name%>"><IMG SRC="images/1_25.gif" WIDTH=56 HEIGHT=19 border="0"></a></TD>
    <TD> <IMG SRC="images/1_26.gif" WIDTH=14 HEIGHT=19></TD>
  </TR>
</TABLE>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td width="14" background="images/bg_left.gif" height="224">&nbsp;</td>
    <td width="119" height="224" valign="top" bgcolor="#FFFFFF"> 
      <div align="center"> 
        <p>&nbsp;</p>
        <p><img src="images/left_1.gif" width="64" height="43"></p>
        <p><img src="images/left_2.gif" width="89" height="271"></p>
      </div>
    </td>
    <td width="1" height="224" background="images/bg_line.jpg"></td>
    <td width="635" height="224" bgcolor="#FFFFFF" valign="top">
      <table width="400" border="0" cellspacing="3" cellpadding="0">
        <tr> 
          <td width="37"><img src="images/box1h.gif" width="16" height="13"></td>
          <td width="221">当前位置:推荐商品</td>
          <td width="130">&nbsp;</td>
        </tr>
      </table>
      <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>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" height="10" bgcolor="#82A4DD">
  <tr>
    <td>
      <div align="center"><a href="http://www.0754b2c.com" target="_blank"></a></div>
    </td>
  </tr>
</table>

<%
'显示翻页的子程序
sub showpages()%>
<table border="0" cellPadding="0" cellSpacing="0" width="590" align="center" >
  <form method=Post action='2.asp?shop_name=<%=shop_name%>'> 
  <tr>
      <td> 
        <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='2.asp?&page="+cstr(1)+"&shop_name="+Cstr(shop_name)+"'>首页</a><font color='#FF0000'><b> — </b></font>"  
      Response.write "<a href='2.asp?page="+Cstr(currentpage-1)+"&shop_name="+Cstr(shop_name)+"'>前页</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='2.asp?page="+Cstr(currentPage+1)+"&shop_name="+Cstr(shop_name)+"'>后页</a><font color='#FF0000'><b>—</b></font>"
      Response.write "<a href='2.asp?page="+Cstr(Rs.PageCount)+"&shop_name="+Cstr(shop_name)+"'>尾页</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;"

response.write "</td><td align='right' >"
response.write "<font  class=main1>转到:<input type='text' name='page' size=4 maxlength=4 class=smallInput value="&Currentpage&">&nbsp;"
   response.write "<input class=buttonface type='submit'  value='Go'  name='cndok' style='background-color: #E6E4C4'></span>&nbsp;&nbsp;"   
%>
            </td>
        </tr>
      </table>
      </td>
  </tr>
  </form>
</table>
<%end sub%>


</BODY>
</HTML>

⌨️ 快捷键说明

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