📄 class.asp
字号:
<!--#include file="connection.asp"-->
<!--#include file="webconfig.asp"-->
<%dim nclassid,anclassid,zhuantiId
nclassid=replace(request.querystring("nid"),"'","")
anclassid=replace(request.QueryString("aid"),"'","")
zhuantiId=replace(request.QueryString("zid"),"'","")%>
<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/default.css" rel="stylesheet" type="text/css">
</head>
<script language=javascript>
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦!:)';return true">
<!--#include file="webtop.asp"-->
<%dim gg1,gg2,gg3,gg4,gg1url,gg2url,gg3url,gg4url
set rs=conn.execute("select * from shop_gg")
gg1=trim(rs("1601"))
gg1url=trim(rs("1601url"))
gg2=trim(rs("1602"))
gg2url=trim(rs("1602url"))
gg3=trim(rs("1603"))
gg3url=trim(rs("1603url"))
gg4=trim(rs("1604"))
gg4url=trim(rs("1604url"))
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="160" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF"><div align="center"><a href="ClassTT.asp" target="_top"><img src="images/qhpl.gif" alt="点击切换到批量购书" width="167" height="19" vspace="5" border="0"></a></div></td>
</tr>
<tr>
<td height="6" ></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF"><a href=<%=gg1url%> target="_blank"><img src=<%=gg1%> border="0"></a></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" height="6"></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF"><a href=<%=gg2url%> target="_blank"><img src=<%=gg2%> border="0"></a></td>
</tr>
<tr>
<td height="6" bgcolor="#FFFFFF"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/tsfl.gif" width="170" height="30"></td>
</tr>
<tr>
<td height="72" valign="top" background="images/cyclassbg.gif"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CA6802">
<tr>
<td bgcolor="#FDFADD">
<!--#include file="CyClass.asp"--></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="22"><div align="center"><img src="images/tszt.gif" width="170" height="30"></div></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor=#969F05>
<tr>
<td height="48" bgcolor="#FDFADD">
<!--#include file="ZhuanTi.asp"--></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="16"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href=<%=gg3url%> target=_blank><img src=<%=gg3%> border="0"></a></td>
</tr>
<tr>
<td height="6"></td>
</tr>
<tr>
<td><a href=<%=gg4url%> target=_blank><img src=<%=gg4%> border="0"></a></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
<td width="7" valign="top"> </td>
<td width="440" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<tr>
<td width="100%" colspan="2"> <%
if nclassid<>"" then
set rs=conn.execute("SELECT shop_nclass.nclass,shop_nclass.nclassid,shop_anclass.anclass,shop_anclass.anclassid FROM shop_nclass INNER JOIN shop_anclass ON shop_nclass.anclassid=shop_anclass.anclassid WHERE shop_nclass.nclassid="&nclassid)
response.Write "<font color=red>所在分类:</font>"
response.write "<font color=red>"&trim(rs("anclass"))&"</font>"
response.Write "<font color=red> --> "&trim(rs("nclass"))&"</font><hr width=100% size=1 color=#CA6802>"
rs.close
set rs=nothing
end if
if zhuantiId<>"" then
response.write "<font color=red>所属专题:"
set rs=conn.execute("select zhuantiname from shop_zhuanti where zhuantiId="&zhuantiId)
response.write trim(rs("zhuantiName"))&"</font><hr width=100% size=1 color=#CA6802>"
rs.close
set rs=nothing
end if
%> </td>
</tr>
</table>
<%'开始分页
Const MaxPerPage=20
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="" and zhuantiId="" then
sql="select top 50 bookid,bookname,shichangjia,huiyuanjia,tuantijia,queshu,dazhe,bookpic from shop_books order by bookdateorder desc , bookId desc"
else
if nclassid<>"" then
sql="select bookid,bookname,shichangjia,huiyuanjia,dazhe,tuantijia,queshu,bookpic from shop_books where nclassid="&nclassid&" order by bookdateorder desc , bookId desc"
end if
if zhuantiId<>"" then
sql="select bookid,bookname,shichangjia,dazhe,huiyuanjia,tuantijia,queshu,bookpic from shop_books where zhuantiId="&zhuantiId&" order by bookdateorder desc , bookId desc"
end if
end if
conn.CursorLocation = 3
set rs=conn.execute(sql)
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
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"class.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"class.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"class.asp"
end if
end if
end if
sub showContent
dim i
i=0
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><%if nclassid="" and zhuantiId="" then
response.write "<img src=images/newbooks.gif width=440 height=54 alt=新到图书TOP50>"
else
response.write "<img src=images/tushulist.gif width=440 height=54 >"
end if%></td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -