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

📄 7.asp

📁 一个非常好的旅游网站程序.
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="../conn.asp" -->
<%
shop_name=request("shop_name")

'  创建合作代理对象
set rs=server.createobject("adodb.recordset")
sqltext="select  * from travelline   where p_shop='"&shop_name&"'"
rs.open sqltext,conn,1,1


dim MaxPerPage
MaxPerPage=6

'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
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>7</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<style>
a            { text-decoration: none; color: #E7DCBA }
a:hover      { text-decoration: underline; color: #FFFFFF }
.font1 {font-size: 25pt; filter: dropshadow(color=#7E6A2C,offx=3,offy=3, positive=80); color: #E7DCBA; font-family: "宋体"}
TD {font-size: 12pt; filter: dropshadow(color=#7E6A2C,offx=1,offy=1, positive=80); color: #E7DCBA; font-family: "宋体"}

</style>
<NOSCRIPT><IFRAME SRC="*.html"></IFRAME></NOSCRIPT> 

<script language="javascript">
function click() {
if (event.button==2) {
alert('您好!欢迎您光临鹰潭休闲旅游!')
}
}
document.onmousedown=click
</script>
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF leftmargin="0" topmargin="0" background="images/bg.gif" onLoad="MM_preloadImages('images/default_down_08.gif','images/default_down_09.gif','images/default_down_10.gif','images/default_down_11.gif','images/default_down_12.gif','images/default_down_13.gif','images/default_down_15.gif')">
<TABLE WIDTH=777 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center" bgcolor="#a58639">
  <TR> 
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=144 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=52 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=20 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=72 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=72 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=72 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=72 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=72 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=72 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=61 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=12 HEIGHT=1></TD>
    <TD> <IMG SRC="images/Spacer.gif" WIDTH=56 HEIGHT=1></TD>
  </TR>
  <TR> 
    <TD COLSPAN=12> <IMG SRC="images/default_01.gif" WIDTH=777 HEIGHT=3></TD>
  </TR>
  <TR> 
    <TD COLSPAN=2 ROWSPAN=2> <IMG SRC="images/default_02.gif" WIDTH=196 HEIGHT=63></TD>
    <TD  class="font1" COLSPAN=7 height="43"> 
      <div align="center"><b><%=shop_name%></b></div>
    </TD>
    <TD  class="font1" height="43">&nbsp;</TD>
    <TD COLSPAN=2 ROWSPAN=2> <IMG SRC="images/default_04.gif" WIDTH=68 HEIGHT=63></TD>
  </TR>
  <TR> 
    <TD COLSPAN=8> <IMG SRC="images/default_05.gif" WIDTH=513 HEIGHT=20></TD>
  </TR>
  <TR> 
    <TD COLSPAN=12> <IMG SRC="images/default_06.gif" WIDTH=777 HEIGHT=23></TD>
  </TR>
  <TR> 
    <TD ROWSPAN=2> <IMG SRC="images/default_07.gif" WIDTH=144 HEIGHT=49></TD>
    <TD COLSPAN=2> <a href="default.asp?shop_name=<%=shop_name%>" onMouseOver="MM_swapImage('d08','','images/default_down_08.gif',1)" onMouseOut="MM_swapImgRestore()"><IMG SRC="images/default_08.gif" WIDTH=72 HEIGHT=23 border="0" name="d08"></a></TD>
    <TD> <a href="2.asp?shop_name=<%=shop_name%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('d09','','images/default_down_09.gif',1)"><IMG SRC="images/default_09.gif" WIDTH=72 HEIGHT=23 name="d09" border="0"></a></TD>
    <TD> <a href="3.asp?shop_name=<%=shop_name%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('d10','','images/default_down_10.gif',1)"><IMG SRC="images/default_10.gif" WIDTH=72 HEIGHT=23 name="d10" border="0"></a></TD>
    <TD> <a href="4.asp?shop_name=<%=shop_name%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('d11','','images/default_down_11.gif',1)"><IMG SRC="images/default_11.gif" WIDTH=72 HEIGHT=23 name="d11" border="0"></a></TD>
    <TD> <IMG SRC="images/default_down_14.gif" WIDTH=72 HEIGHT=23 name="d14" border="0"></TD>    <TD> <a href="5.asp?shop_name=<%=shop_name%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('d12','','images/default_down_12.gif',1)"><IMG SRC="images/default_12.gif" WIDTH=72 HEIGHT=23 name="d12" border="0"></a></TD>
    <TD> <a href="6.asp?shop_name=<%=shop_name%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('d13','','images/default_down_13.gif',1)"><IMG SRC="images/default_13.gif" WIDTH=72 HEIGHT=23 name="d13" border="0"></a></TD>

    <TD COLSPAN=2> <a href="8.asp?shop_name=<%=shop_name%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('d15','','images/default_down_15.gif',1)"><IMG SRC="images/default_15.gif" WIDTH=73 HEIGHT=23 name="d15" border="0"></a></TD>
    <TD ROWSPAN=2> <IMG SRC="images/default_16.gif" WIDTH=56 HEIGHT=49></TD>
  </TR>
  <TR> 
    <TD COLSPAN=10> <IMG SRC="images/default_17.gif" WIDTH=577 HEIGHT=26></TD>
  </TR>
</TABLE>

<table width="777" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>
      <table width="500" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="35">&nbsp;</td>
          <td width="465">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td valign="top"> 
       
      <table width="680" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#7E6A2C" bordercolordark="#E7DCBA">
        <tr>
          <td height="307" valign="top">
            <table border="0" cellpadding="0" cellspacing="0" width="100%" height="148" class=main1>
        <tr> 
          <%                                                      
'/////////////////////////////////////////////////////////假如没有商品时//////////////////                                                      
If rs.eof and rs.bof then                                                       
   response.write "<td><p align='center'><font color='#ff0000'>还没任何旅游线路</font></p></td>"                                                      
   response.end                                                      
End if %>
          <%row_count=1                                                      
                    '/////////////////////////////////////显示帖子的子程序////// ///////////////////////////////////                                                     
					Sub list()%>
          <%i=0                                                      
                     Do While Not rs.EOF%>
          <td align="center"  valign="top"><TABLE width="130" border=0 cellPadding=0 cellSpacing=0>
              <TBODY>
                <TR> 
                  <TD> <TABLE border=0 cellPadding=0 cellSpacing=0 width=100>
                      <TBODY>
                        <TR> 
                          <TD bgColor=#319a9c> <TABLE border=0 cellPadding=0 cellSpacing=1 
width="100%">
                              <TBODY>
                                <TR> 
                                  <TD bgColor=#ffffff><img name="small" border="0" src="../../manage/pic_play.asp?pic_id=<%=rs("pic_id")%>" width="128" height="100"></TD>
                                </TR>
                              </TBODY>
                            </TABLE></TD>
                        </TR>
                        <TR> 
                          <TD align=right vAlign=top><a href="travellineshow.asp?Product_id=<%=rs("Product_id")%>"><IMG 
                        src="../../images/view.gif" 
                width=128 height=11 border="0"></a></TD>
                        </TR>
                      </TBODY>
                    </TABLE></TD>
                </TR>
                <TR height=20> 
                  <TD height="30" align=middle><div align="center"><a href="../../travellineshow.asp?Product_id=<%=rs("Product_id")%>">
                      <% if len(rs("X_Name"))>20 then%>
                      <%=Left(rs("X_Name"),20)%> 
                      <% else%>
                      <%=rs("X_Name")%> 
                      <%end if%>
                      </a></div></TD>
                </TR>
              </TBODY>
            </TABLE>
            <br> <br> <br> <br> </td>
          <%if row_count mod 3 =0 then%>
        </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               
                                                      
   call showpages                                                     
 end if%>
        </tr>
      </table>
      <%                                                     
'显示翻页的子程序                                                     
sub showpages()%>
      <table width="530"  border="0" align="center" cellPadding="0" cellSpacing="0" >
        <td> <INPUT  type=hidden value=<%=ProductClass_1%> name=ProductClass_1> 
          <table border="0" cellPadding="0" cellSpacing="0" width="100%" height="30" class="box2">
            <tr> 
              <td> <font color="#000000"> 
                <p align="center"> 
                  <%                                                     
   Response.write "<font color='#000000'>页面-> </font>"                                                        
   If currentpage > 1 Then                                                     
      response.write "<a href='7.asp?&page="+cstr(1)+"&travelline_1="+Cstr(ProductClass_1)+"'><font color='#000000'>首页</font></a><font color='#000000'><b>-</b></font>"                                                       
      Response.write "<a href='7.asp?page="+Cstr(currentpage-1)+"&travelline_1="+Cstr(ProductClass_1)+"'><font color='#000000'>前页</font></a><font color='#000000'><b>-</b></font>"                                                     
   Else                                                     
      Response.write "<font color='#000000'>首页-</font>"                                                     
      Response.write "<font color='#000000'>前页-</font>"                                                      
   End if                                                     
                                                        
   If currentpage < Rs.PageCount Then                                                     
      Response.write "<a href='7.asp?page="+Cstr(currentPage+1)+"&travelline_1="+Cstr(ProductClass_1)+"'><font color='#000000'>后页</font></a><font color='#000000'><b>-</b></font>"                                                     
      Response.write "<a href='7.asp?page="+Cstr(Rs.PageCount)+"&travelline_1="+Cstr(ProductClass_1)+"'><font color='#000000'>尾页</font></a>&nbsp;&nbsp;"                                                     
   Else                                                     
      Response.write "<font color='#000000'>后页-</font>"                                                     
      Response.write "<font color='#000000'>尾页</font>&nbsp;&nbsp;"                                                            
   End if                                                     
   Response.write "<font color='#000000'>页次:</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font>&nbsp;"                                                     
   Response.write "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>条线路</font>&nbsp;&nbsp;"                                                     
                                                     
response.write "</td><td align='center'>"                                                     
response.write "<font color='#000000' class=main1> 转到第 </font><input type='text' name='page' size=2 maxlength=3 class=smallInput value="&Currentpage&"> 页&nbsp;"                                                     
   response.write "<input class=buttonface type='submit'  value='Go'  name='cndok' style='background-color: #Eaeaea'></span>&nbsp;&nbsp;"                                                        
%>
                </font> </td>
            </tr>
          </table></td>
      </table>
      <%end sub%>

          </td>
        </tr>
      </table>
      <br>
    </td>
  </tr>
</table>
<table width="777" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td bgcolor="#FF6600" height="3"></td>
  </tr>
  <tr>
    <td>
      <div align="center"><br>
      </div>
    </td>
  </tr>
</table>
<br>

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

⌨️ 快捷键说明

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