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

📄 index.asp

📁 网上书店是指在网上建立一个在线销售的图书平台,购书者可以实现在线定单提交,达到买书的目的.
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%dim nclassid
nclassid=request.querystring("nid")%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><%=webname%>--图书分类</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>
.pad {
	PADDING-LEFT: 2px
}
</style>
<link href="images/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {
	color: #990000;
	font-weight: bold;
	font-size: 14px;
}
.style3 {
	color: #000099;
	font-weight: bold;
}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="webtop.asp"-->
<%dim dada,dadaurl,xiao1,xiao2,xiao3,xiao1url,xiao2url,xiao3url
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_gg",conn,1,1
dada=trim(rs("458"))
dadaurl=trim(rs("458url"))
xiao1=trim(rs("2541"))
xiao1url=trim(rs("2541url"))
xiao2=trim(rs("2542"))
xiao2url=trim(rs("2542url"))
xiao3=trim(rs("2543"))
xiao3url=trim(rs("2543url"))
rs.close
set rs=nothing
%>
<table width="10" height="7" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height=7></td>
  </tr>
</table>
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="162" valign="top" bgcolor="#bed3f4"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td bgcolor="#9C65FF"><div align="center">系统新闻</div></td>
        </tr>
        
        <tr> 
          <td height="67" valign="top" bgcolor="#99CCFF"><div align="center"><%dim m
		  m=0
		  set rs=server.CreateObject("adodb.recordset")
		  rs.open "select top 4 newsname,adddate,newsid from shop_news order by adddate desc",conn,1,1
		  do while not rs.eof
		  m=m+1
		  response.write "·<a href=# onClick=""javascript:window.open('news.asp?id="&rs("newsid")&"','','width=432,height=288,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"" title="&year(rs("adddate"))&"年"&month(rs("adddate"))&"月"&day(rs("adddate"))&"日发布>"&trim(rs("newsname"))&"</a><br>"
		  if m>=4 then exit do
		  rs.movenext
		  loop%> </div></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td bgcolor="#FFCCFF"><div align="center" class="style2">图书分类</div></td>
        </tr>
        <tr> 
          <td height="180" valign="top" bgcolor="#FFCCFF">
		  <%set rs=server.CreateObject("adodb.recordset")
				rs.open "select anclassid,anclass,changyong from shop_anclass where changyong=1 order by anclassidorder",conn,1,1
				do while not rs.eof
				response.write "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td colspan=3><div align=center>"
				response.write "【"&trim(rs("anclass"))&"】"
				response.write "</div></td></tr>"
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select nclassid,nclass,changyong,anclassid from shop_nclass where changyong=1 and anclassid="&rs("anclassid")&" order by nclassidorder",conn,1,1
do while not rs2.eof
Dim num1 '//判断数字奇偶
num1 = Num1+1
If num1 Mod 2 = 0 Then
response.write "<td width=80><div align=left><a href=class.asp?aid="&rs2("anclassid")&"&nid="&rs2("nclassid")&">"&trim(rs2("nclass"))&"</a></div></td></tr>"
else
response.write "<tr><td width=70><div align=right><a href=index.asp?aid="&rs2("anclassid")&"&nid="&rs2("nclassid")&">"&trim(rs2("nclass"))&"</a></div></td>"
response.write "<td width=12><div align=center><FONT color=#ff6600>|</FONT></div></td>"
end if
rs2.movenext
loop
rs2.close
set rs2=nothing
response.write "</table>"
rs.movenext
loop
rs.close
set rs=nothing%>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td colspan="3"><div align="center">【其它】</div></td>
              <%set rs=server.CreateObject("adodb.recordset")
			  rs.open "select shop_nclass.anclassid,shop_nclass.nclassid,shop_nclass.nclass from shop_nclass inner join shop_anclass on shop_anclass.anclassid=shop_nclass.anclassid where shop_anclass.changyong=0 and shop_nclass.changyong=1 order by shop_nclass.nclassid",conn,1,1 
			  do while not rs.eof
			  dim num2
			  num2 = Num2+1
If num2 Mod 2 = 0 Then
response.write "<td width=80><div align=left><a href=class.asp?aid="&rs("anclassid")&"&nid="&rs("nclassid")&">"&trim(rs("nclass"))&"</a></div></td></tr>"
else
response.write "<tr><td width=70><div align=right><a href=indexs.asp?aid="&rs("anclassid")&"&nid="&rs("nclassid")&">"&trim(rs("nclass"))&"</a></div></td>"
response.write "<td width=12><div align=center><FONT color=#ff6600>|</FONT></div></td>"
end if
rs.movenext
loop
rs.close
set rs=nothing
%>
          </table>
            <table width="155" border="0" align="center">
              <tr>
                <td><a href=<%=xiao1url%> target="_blank"><img src=<%=xiao1%> width="145" height="36" border="0"></a></td>
              </tr>
              <tr>
                <td height="32"><a href=<%=xiao2url%> target="_blank"><img src=<%=xiao2%> width="145" height="36"  border="0"></a></td>
              </tr>
              <tr>
                <td width="141" height="32"><div align="center"></div></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="6"></td>
        </tr>
        <tr>
          <td valign="top"><div align="center">
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td height="6"></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td height="6">&nbsp;</td>
                </tr>
              </table>
            </div></td>
        </tr>
      </table></td>
    <td width="7" valign="top">&nbsp;</td>
    <td width="440" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          
          <td width="100%" valign="middle" bgcolor="#BDD3F7"><span class="style2">图书分类</span></td>
        </tr>
        <TR> 
          <TD colspan="2"><%'
		  dim ii,jj
		  ii=1
		  set rs=server.CreateObject("adodb.recordset")
		  rs.open "select anclass,anclassid from shop_anclass",conn,1,1
		  jj=rs.recordcount
		  do while not rs.eof
		  response.write "<A href=javascript:turnX('r"&rs("anclassid")&"')>"&trim(rs("anclass"))&"</A> | "
		  if ii=jj then
			response.Write "<br>"
			end if
		  rs.movenext
		  loop
		  rs.close
		  set rs=nothing
		  response.write "<BR>"
		  '二次查询大类
		  set rs=server.CreateObject("adodb.recordset")
		  rs.open "select anclass,anclassid from shop_anclass",conn,1,1
		  do while not rs.eof
		   response.write "<DIV id=r"&rs("anclassid")&" style='DISPLAY: none'><font color=red>"&trim(rs("anclass"))&"--&gt;</font>"
			'//查询小类
			dim rs2
			set rs2=server.CreateObject("adodb.recordset")
			rs2.open"select nclass,nclassid from shop_nclass where anclassid="&rs("anclassid")&" order by nclassidorder",conn,1,1
			do while not rs2.eof
			response.write "<A href=class.asp?aid="&rs("anclassid")&"&nid="&rs2("nclassid")&">"&trim(rs2("nclass"))&"</A> | " 
             rs2.movenext
			 loop
			 rs2.close
			 set rs2=nothing
			 response.write "</DIV><DIV id=r0101 style='DISPLAY: none'></DIV>"
			rs.movenext
			ii=ii+1
			loop
				rs.close
				set rs=nothing%>
                
            <DIV id=currentLocation></DIV></TD>
        </TR>
        <tr> 
          <td colspan="2"><hr width="100%" size="1" color=#6B8FC8></td>
        </tr>
      </table><%'开始分页
				Const MaxPerPage=8 
   				dim totalPut   
   				dim CurrentPage
   				dim TotalPages
   				dim j
   				dim sql
    				if Not isempty(request("page")) then
      				currentPage=Cint(request("page"))
   				else
      				currentPage=1
   				end if 
		  if nclassid="" then
		  set rs=server.CreateObject("adodb.recordset")
		  rs.open "select top 20 bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,dazhe,bookdate,bookpic from shop_books order by adddate desc",conn,1,1
		  else
		  set rs=server.CreateObject("adodb.recordset")
		   rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,dazhe,bookdate,bookpic from shop_books where nclassid="&nclassid&" order by adddate desc",conn,1,1 
		  end if
		  
				if err.number<>0 then
				response.write "数据库中无数据"
				end if
				
  				if rs.eof And rs.bof then
       				Response.Write "<p align='center' class='contents'> 对不起,此分类暂时还没有图书!</p>"
   				else
	  				totalPut=rs.recordcount

      				if currentpage<1 then
          				currentpage=1
      				end if

⌨️ 快捷键说明

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