📄 speciallist.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
Classid=trim(request.QueryString("Classid"))
%>
<!--#include file="top.asp"-->
<table width="773" height="176" border="0" cellpadding="0" cellspacing="0" bgcolor="#30393D" style="border-collapse: collapse" align="center" >
<tr>
<td width="729" valign="top" align="center" height="156">
<table width="98%" class="right" align="center">
<tr>
<td align="center">
<%
if Classid<>"" then
set rs=conn.execute("SELECT Class FROM Class where Classid="&Classid)
if not rs.eof then
ThisTitle=rs(0)
end if
rs.close
set rs=nothing
sql="SELECT * FROM Special where Classid="+cstr(Classid)+" order by Specialid desc"
else
sql="SELECT * FROM Special order by Specialid desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>暂时没有收集</p>"
else
totalPut=rs.recordcount
PageUrl="SpecialList.asp"
if currentpage<1 then currentpage=1
if (currentpage-1)*MaxSpecialList>totalput then
if (totalPut mod MaxSpecialList)=0 then
currentpage= totalPut \ MaxSpecialList
else
currentpage= totalPut \ MaxSpecialList + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxSpecialList,PageUrl
showContent
showpage totalput,MaxSpecialList,PageUrl
else
if (currentPage-1)*MaxSpecialList<totalPut then
rs.move (currentPage-1)*MaxSpecialList
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxSpecialList,PageUrl
showContent
showpage totalput,MaxSpecialList,PageUrl
else
currentPage=1
showpage totalput,MaxSpecialList,PageUrl
showContent
showpage totalput,MaxSpecialList,PageUrl
end if
end if
end if
rs.close
set rs=nothing
sub showContent
i=0
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="TableLine" style="border-collapse: collapse">
<tr>
<%
do while not rs.eof
i=i+1
%>
<td align=center valign="top"><a href="showspecial.asp?Specialid=<%=rs("Specialid")%>"><%if rs("pic")="" then%><img border="0" src="<%=NoPic%>" width="90" height="90"><%else%><img src="<%=rs("pic")%>" width=90 border=0 height="90"><%end if%><br>
<font color="#FFFFFF"><%=i%>.<%=rs("name")%></font></a></td>
<%
if (i mod (MaxSpecialList/2)=0) and i>=(MaxSpecialList/2) then
%></tr><tr><%
end if
if i>=MaxSpecialList then exit do
rs.movenext
loop
%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table><%
end sub
function showpage(totalnumber,MaxSpecialList,filename)
if totalnumber mod MaxSpecialList=0 then
n= totalnumber \ MaxSpecialList
else
n= totalnumber \ MaxSpecialList+1
end if
if Classid<>"" then
linkto="classid="&Classid
else
linkto=""
end if
%>
<form method=Post action="<%=filename%>?<%=linkto%>">
<font color="#FFFFFF">共</font><font color="<%=AlertFColor%>"><b><%=totalnumber%></b></font>个专辑
<%if CurrentPage<2 then%>
<font color="#FFFFFF">首页 上一页</font>
<%else%>
<a href="<%=filename%>?page=1&<%=linkto%>"><font color="#FFFFFF">首页</font></a>
<a href="<%=filename%>?page=<%=CurrentPage-1%>&<%=linkto%>"><font color="#FFFFFF">上一页</font></a>
<%
end if
if n-currentpage<1 then
%>
下一页 末页
<%else%>
<a href="<%=filename%>?page=<%=CurrentPage+1%>&<%=linkto%>"><font color="#FFFFFF">下一页</font></a>
<a href="<%=filename%>?page=<%=n%>&<%=linkto%>"><font color="#FFFFFF">末页</font></a>
<%end if%>
页次:<strong><font color="<%=AlertFColor%>"><%=CurrentPage%>/<%=n%></font></strong>页
转到:
<select name="page" size="1" onchange="javascript:submit()">
<%for i = 1 to n%>
<option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>
第<%=i%>页</option>
<%next%>
</select>
</form>
<%
end function
function AllList
%>
<script language="JavaScript1.2">
scores = new Array(20);
var numTotal=0;
NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;
if (ver4){
with (document){
write("<STYLE TYPE='text/css'>");
if (NS4){
write(".parent {position:absolute; visibility:visible}");
write(".child {position:absolute; visibility:visible}");
write(".regular {position:absolute; visibility:visible}")
}
else{
write(".child {display:none}")
}
write("</STYLE>");
}
}
function getIndex(el){
ind = null;
for (i=0; i<document.layers.length; i++){
whichEl = document.layers[i];
if (whichEl.id == el){
ind = i;
break;
}
}
return ind;
}
function arrange(){
nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height;
for (i=firstInd+1; i<document.layers.length; i++){
whichEl = document.layers[i];
if (whichEl.visibility != "hide"){
whichEl.pageY = nextY;
nextY += whichEl.document.height;
}
}
}
function initIt(){
if (!ver4) return;
if (NS4){
for (i=0; i<document.layers.length; i++){
whichEl = document.layers[i];
if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
}
arrange();
}
else{
divColl = document.all.tags("DIV");
for (i=0; i<divColl.length; i++){
whichEl = divColl(i);
if (whichEl.className == "child") whichEl.style.display = "none";
}
}
}
function expandIt(el){
if (!ver4) return;
if (IE4){
whichEl1 = eval(el + "Child");
for(i=1;i<=numTotal;i++){
whichEl = eval(scores[i] + "Child");
if(whichEl!=whichEl1){
whichEl.style.display = "none";
}
}
whichEl1 = eval(el + "Child");
if (whichEl1.style.display == "none"){
whichEl1.style.display = "block";
}
else{
whichEl1.style.display = "none";
}
}
else{
whichEl = eval("document." + el + "Child");
for(i=1;i<=numTotal;i++){
whichEl = eval("document." + scores[i] + "Child");
if(whichEl!=whichEl1){
whichEl.visibility = "hide";
}
}
if (whichEl.visibility == "hide"){
whichEl.visibility = "show";
}
else{
whichEl.visibility = "hide";
}
arrange();
}
}
onload = initIt;
</script>
<%
set rs=server.createobject("adodb.recordset")
sql="SELECT classid,class FROM class"
rs.open sql,conn,1,1
if not rs.eof then
arrRow=rs.GetRows
arrCon=rs.RecordCount
rs.close
for i=0 to arrCon-1
ThisClassid=arrRow(0,i)
ClassName=arrRow(1,i)
%>
<%
next
arrRow=null
arrCon=null
else
rs.close
end if
set rs=nothing
%>
<SCRIPT>numTotal=<%=i%>;<%
for k=1 to i
response.write "scores["&k&"]='KB"&k&"';"
next
%></SCRIPT>
<%end function%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="750" valign="top" align="center" height="9" colspan="3"> </td>
</tr>
</table>
<!--#include file="friendsite.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -