addmtvlist.asp
来自「全站生成htm静态页面」· ASP 代码 · 共 197 行
ASP
197 行
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%PageName="list"%>
<!--#include file="function.asp"-->
<%CheckAdmin1%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
if not isempty(request.QueryString("page")) and request.QueryString("page")<>"" then
currentPage=cint(request.QueryString("page"))
else
currentPage=1
end if
if request.QueryString("classid")<>"" then
classid=request.QueryString("classid")
else
classid=""
end if
if request.QueryString("Nclassid")<>"" then
Nclassid=request.QueryString("Nclassid")
else
Nclassid=""
end if
%>
<!--#include file="top.asp"-->
<%
set rs=conn.execute("SELECT * FROM class order by classid")
if not Rs.eof then
if Left(PageName,5)="admin" and PageName<>"index" then
%>
<%
do while not rs.eof
%>
<%
rs.movenext
loop
elseif PageName="AddmtvList" or PageName="AddmtvModify" or PageName="AddmtvList" then
%>
<%
do while not rs.eof
%>
<%
rs.movenext
loop
else
%>
<%
do while not rs.eof
%>
<%
rs.movenext
loop
end if
else
%>
<%
do while not rs.eof
%>
<%
rs.movenext
loop
end if
rs.close
%>
<div align="center">
<center>
<table border="0" width="96%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td align=center width="100%" valign=top>
<%
if request.QueryString("Nclassid")<>"" then
sql="select * from mtvlist where Nclassid="+cstr(Nclassid)+" order by mtvlistid desc"
elseif request.QueryString("classid")<>"" then
sql="select * from mtvlist where classid="+cstr(classid)+" order by mtvlistid desc"
else
sql="select * from mtvlist order by mtvlistid desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'><br><br><br>对不起,暂时没有任何MTV,抱歉!</p>"
else
MaxPerPage=25
PageUrl="AddmtvList.asp"
totalPut=rs.recordcount
if currentpage<1 then currentpage=1
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
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
currentPage=1
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
end if
end if
end if
rs.close
sub showContent
i=0
%>
<!--#include file="style.asp"-->
<table border="1" width="100%" cellspacing="1" class="TableLine" bordercolor="#64CB1F" style="border-collapse: collapse">
<tr>
<td width="29%" height=22 align=center bgcolor="#64CB1F"><font color="#FFFFFF">MTV名称</font></td>
<td width="5%" align=center bgcolor="#64CB1F"><font color="#FFFFFF">人气</font></td>
<td width="22%" height=22 align=center bgcolor="#64CB1F"><font color="#FFFFFF">所属歌手</font></td>
<td width="18%" height=22 align=center bgcolor="#64CB1F"> <font color="#FFFFFF">操作</font></td>
<td width="8%" height=22 align=center bgcolor="#64CB1F"><font color="#FFFFFF">首页推荐</font></td>
<td width="9%" height=22 align=center bgcolor="#64CB1F"><font color="#FFFFFF">修改</font></td>
<td width="9%" height=22 align=center bgcolor="#64CB1F"><font color="#FFFFFF">删除</font></td>
</tr>
<%
do while not rs.eof
i=i+1
%>
<tr>
<td height="22"> <%=(i)%>.<a href="/html/<%=rs("mtvlistid")%>.htm" target=_blank><%=rs("name")%></a></td>
<td width="5%" height="22" align=center><%=rs("hits")%></td>
<td width="22%" align=center height="22"><a href="addmtvlist.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("NClassid")%>"><%=rs("Nclass")%></a><font color="#000000">--</font><a href="/mtv/<%=rs("NClassid")%>_1.htm" target="_blank"><font color="#0000FF">页面</font></a></td>
<td width="13%" align=center height="22"><a href="mtvadd.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("NClassid")%>"><font color="#000000">[添加该歌手MTV]</font></a>
<a href='fso_mtv.asp?all=page&mtvlistid=<%=rs("mtvlistid")%>' target=_blank><b><font color="#0000FF">生成</font></b></a></td>
<td align=center><a href="AddmtvSave.asp?act=SetIsGood&mtvlistid=<%=rs("mtvlistid")%>&Askclassid=<%=classid%>&AskSClassid=<%=SClassid%>&AskNclassid=<%=Nclassid%>&page=<%=CurrentPage%>">
<%if rs("IsGood")=true then%>
</a><a href="AddmtvSave.asp?act=SetIsGood&mtvlistid=<%=rs("mtvlistid")%>&Askclassid=<%=classid%>&AskSClassid=<%=SClassid%>&AskNclassid=<%=Nclassid%>&page=<%=CurrentPage%>">取消
<%else%>
推荐
<%end if%>
</a></td>
<td align=center> <a href="mtvmodify.asp?mtvlistid=<%=rs("mtvlistid")%>&AskClassid=<%=rs("Classid")%>&AskSClassid=<%=rs("SClassid")%>&AskNClassid=<%=rs("NClassid")%>&page=<%=CurrentPage%>">修改</a></td>
<td width="9%" align=center height="22"><a href="mtvdel.asp?mtvlistid=<%=rs("mtvlistid")%>&classid=<%=rs("Classid")%>&AskSClassid=<%=rs("SClassid")%>&Nclassid=<%=rs("NClassid")%>&page=<%=CurrentPage%>">删除</a></td>
</tr>
<%
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
%>
<form method=Post action="AddmtvList.asp?classid=<%=classid%>&Nclassid=<%=Nclassid%>">
<center>共有<b><%=totalnumber%></b>首MTV 每页25首
<%if CurrentPage<2 then%>
首页 上一页
<%else%>
 <a href="AddmtvList.asp?page=1&classid=<%=classid%>&Nclassid=<%=Nclassid%>">首页</a>
<a href="AddmtvList.asp?page=<%=CurrentPage-1%>&classid=<%=classid%>&Nclassid=<%=Nclassid%>">上一页</a>
<%
end if
if n-currentpage<1 then
%>
下一页 末页
<%else%>
<a href="AddmtvList.asp?page=<%=CurrentPage+1%>&classid=<%=classid%>&Nclassid=<%=Nclassid%>">下一页</a>
<a href="AddmtvList.asp?page=<%=n%>&classid=<%=classid%>&Nclassid=<%=Nclassid%>">末页</a>
<%end if%>
页次:<strong><%=CurrentPage%>/<%=n%></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%>
</td>
</tr>
</table>
</center>
</div>
<%
set rs=nothing
conn.close
set conn=nothing%></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?