📄 cylb.asp
字号:
<!--#include file="conn.asp"-->
<%
dim sql
dim rs
dim nrs
dim i
i=1
dim sel '标志着select中的选中项
dim currentpage '当前的页面
dim typeid
dim k
dim curcolor
if request.querystring("page")="" then
currentpage=1 '分页
else
currentpage=request.querystring("page")
end if
if currentpage<1 then
currentpage=1
end if
if request.querystring("type")="" then
typeid=1 '设置类别的默认值
else
typeid=request.querystring("type")
end if
if typeid<1 or typeid>6 then
typeid=1
end if
dim maxpage'分页的总页数
dim maxperpage '最大每页的记录个数
maxperpage=5
dim totalput '总记录
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>::::52CM梦工场::::52CM DREAM Work Place::::网页品点联盟</title>
<style>
a{text-decoration:none}
a{color:#eeeeee}
td{font-size:9pt}
.stedit { background-color:#cccccc;BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 9pt; border-color: #333333;font-color:#ffffff;}
A:hover {
TEXT-DECORATION: underline}
</style>
<script>
function winpop()
{
window.open("aboutme.htm","","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=550,height=370,top=0,left=0")
}
</script>
</head>
<body topmargin=0 leftmargin=0 bgcolor=#999999>
<!--#include file="head.asp"-->
<script>
function jump(value)
{
document.location="cylb.asp?type="+value;
}
</script>
<table width="778" valign=bottom cellspacing=0 cellpadding=0>
<tr><td align="right" width=778>
<table border="0" cellpadding="5" cellspacing="0" width="778" height="337">
<tr>
<td width="44%" height="1" colspan="2" valign=top>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from lm where pass=true and type=" & typeid & " order by jointime desc"
rs.open sql,conn,1,1 '从联盟表里选出来type=typeid的所有记录
if rs.eof and rs.bof then'如果没有记录的话,就提示别人看别的类别。
%>
<font color=#333333>很抱歉,该类别还没有站点加盟,请在右边选择其他的类别</font>
</td>
<td width="49%" height="21" align="right" valign=top>
<select name="typeid" onchange="jump(value)" class="stedit">
<option selected value="" name=type>请选择分类</option>
<%
sql="select * from type"
set nrs=conn.execute(sql) '当这个类别没有内容的时候出现一个跳转栏让别人好跳转到别的类别。
if nrs.eof and nrs.bof then
response.redirect "error.asp?errorid=1"
else
do while not nrs.eof
if cint(nrs("type"))=cint(typeid) then '选中最后选的那个选项
sel="selected"
else
sel=""
end if
response.write "<option " & sel &" value='" & nrs("type") & "' name=type>" & nrs("typename") & "</option>"
nrs.movenext
loop
end if
%>
</select>
</td>
<td width="7%" height="21">
</td>
</tr>
<%
else
totalput=rs.recordcount '求出总的记录数
if totalput mod maxperpage=0 then
maxpage=totalput\maxperpage '求出总页数
else
maxpage=(totalput\maxperpage+1)
end if
if cint(currentpage)>cint(maxpage) then
currentpage=1 '如果传过来的数大于最大页回到第一页
end if
%>
<tr>
<td width="8" height="21" valign="top">
</td>
<td width=75% height="21">
<font color=#333333> 本类共有站点<font color=#ffffff> <%=totalput%> </font>个 跳转到</font>: 第
<%
for k=1 to maxpage
if cint(k)=cint(currentpage) then
curcolor="#ffffff"
else
curcolor="#cccccc"
end if
%>
<a href="cylb.asp?type=<%=typeid%>&page=<%=k%>" style=color:<%=curcolor%>><%=k%></a>
<%next%>页
<a href="cylb.asp?type=<%=typeid%>&page=<%=(currentpage-1)%>" style="color:#333333" title="上一页">Back <<</a>
<a href="cylb.asp?type=<%=typeid%>&page=<%=(currentpage+1)%>" title="下一页" style="color:#333333">>> Next</a>
</td>
<td width="20%" height="21" valign="top" align="right">
<select name="typeid" onchange="jump(value)" class="stedit">
<option selected value="" name=type>请选择分类</option>
<%
sql="select * from type"
set nrs=conn.execute(sql) '跳转select
if nrs.eof and nrs.bof then
response.write "联盟还没有分类"
else
do while not nrs.eof
if cint(nrs("type"))=cint(typeid) then '选中最后选的那个选项
sel="selected"
else
sel=""
end if
response.write "<option " & sel & " value='" & nrs("type") & "' name=type>" & nrs("typename") & "</option>"
nrs.movenext
loop
end if
%>
</select>
</td>
<td width="7%" height="21" valign="top">
</td>
</tr>
<center>
<tr>
<td width="8" height="289" valign="top">
</td>
<td width="768" colspan="3" height="289" valign="top">
<table border="0" cellpadding="0" cellspacing="0" height="245">
<tr><td height=10></td></tr>
<tr>
<%
if cint(currentpage)<=cint(maxpage) then
rs.move (currentpage-1)*maxperpage '分页的运用
showcontent
else
currentpage=1
showcontent
end if
sub showcontent
%>
<%do while not rs.eof%>
<td valign=top width=120 bgcolor="#666666" align=center height=255>
<table width="100%" cellspacing="1" cellpadding="3" height="265" bgcolor="#333333" border="0">
<tr><td valign=top width=120 bgcolor="#666666" height=245>
<a href="cview.asp?url=<%=rs("username")%>" target="_blank"><img border=0 src="<%=rs("pic")%>" width=120 height=90></a><br><br>
<center><a href="cview.asp?url=<%=rs("username")%>" target="_blank"><%=replace(replace(trim(left(rs("pagename"),10)),"<","<"),">",">")%></a></center><br>
<FONT color=#ffffff><%=rs("hits")%></font> <font color=#cccccc>次点击</font><br>
<font color=#cccccc><a href="cview.asp?url=<%=rs("username")%>" title=<%=rs("note")%> target="_blank"><%=replace(replace(left(trim(rs("note")),30),"<","<"),">",">")%>...</font></a>
<p align=right><font color=#cccccc>--<%=rs("username")%></font> </p>
</td></tr>
</table>
</td>
<td width="24" height="245"></td>
<%
i=i+1 '这里控制每页显示的记录数
if i>maxperpage then
exit do
end if
rs.movenext
loop
rs.close
end sub
end if
%>
</tr>
</table>
</td>
</tr>
</table>
</center>
</td></tr>
</table>
<table width="778" bgcolor="#000000" cellspacing=0 cellpadding=0>
<tr><td align="right" bgcolor=#999999><img src="pic/bottom2.gif"></td></tr>
<tr><td align="center" align="center" height=45><font color="#ffffff">Modification And Program By : 52CM工作室</font></td></tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -