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

📄 bzmtv-5.asp

📁 一个不错的音乐网站
💻 ASP
字号:
<!--#include file="bzmtvconst.asp"-->
<%CheckAdmin1%>
<%PageName="bzmtv-5"%>
<!--#include file="top.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

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="AddFileList" or PageName="AddFileModify" or PageName="AddFileList" 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="1" cellpadding="1">
  <tr>
    <td align=center width="100%" valign=top>
<%
if request.QueryString("Nclassid")<>"" then
	sql="select * from Special where Nclassid="+cstr(Nclassid)+" order by Specialid desc" 
elseif request.QueryString("classid")<>"" then
	sql="select * from Special where classid="+cstr(classid)+" order by Specialid desc" 
else
	sql="select * from Special order by Specialid desc" 
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then 
	response.write "<p align='center'>暂时没有任何MTV</p>" 
else 
	MaxPerPage=30
	PageUrl="bzmtv-5.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 %>
           <table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolor="GREEN" bordercolordark="#FFFFFF">
            <tr>
                <td width="35%" height=22 align=center background="bzmtv/bgleft.gif"><b>MTV名称</b></td>
                <td width="15%" height=22 align=center background="bzmtv/bgleft.gif"><b>所属歌手</b></td>
                <td width="10%" height=22 align=center background="bzmtv/bgleft.gif"><b>首页推荐</b></td>
                <td width="5%" height=22 align=center background="bzmtv/bgleft.gif"><b>修改</b></td>
                <td width="20%" height=22 align=center background="bzmtv/bgleft.gif"><b>生成HTM</b></td>
                <td width="5%" height=22 align=center background="bzmtv/bgleft.gif"><b>删除</b></td>
              </tr>
<%
do while not rs.eof
	i=i+1
%>
              <tr>
                <td width="35%" height=22 >&nbsp;<%=i%>.<font color=black><%=rs("name")%></font></td>
                <td width="15%" height=22 align=center ><%=rs("Nclass")%></td>
                <td width="10%"  height=22 align=center ><a href="bzmtv-5-3.asp?act=SetIsGood&Specialid=<%=rs("Specialid")%>&Askclassid=<%=classid%>&AskSClassid=<%=SClassid%>&AskNclassid=<%=Nclassid%>&page=<%=CurrentPage%>"><%if rs("IsGood")=true then%><font color=red>撤销</font> <%else%> 推荐 <%end if%></a></td>
                <td width="5%"  height=22 align=center><a href="bzmtv-5-4.asp?Specialid=<%=rs("Specialid")%>&AskClassid=<%=rs("Classid")%>&AskSClassid=<%=rs("SClassid")%>&AskNClassid=<%=rs("NClassid")%>&page=<%=CurrentPage%>">修改</a></td> 
                <td width="20%"  height=22 align=center><a href="make_musiclist.asp?bzmtv=<%=rs("Specialid")%>"><font color=blue>生成HTM</font></a></td>
                <td width="5%"  height=22 align=center><a title="不到万一请不要用此功能" href="bzmtv-5-5.asp?Specialid=<%=rs("Specialid")%>&classid=<%=rs("Classid")%>&AskSClassid=<%=rs("SClassid")%>&Nclassid=<%=rs("NClassid")%>&page=<%=CurrentPage%>"><font color=red>删除</font></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="<%=filename%>?classid=<%=classid%>&Nclassid=<%=Nclassid%>">
  <center>共有<b><%=totalnumber%></b>MTV
<%if CurrentPage<2 then%>
  &nbsp;首页 上一页&nbsp;
<%else%>
  &nbsp<a href="<%=filename%>?page=1&classid=<%=classid%>&Nclassid=<%=Nclassid%>">首页</a>&nbsp;
  <a href="<%=filename%>?page=<%=CurrentPage-1%>&classid=<%=classid%>&Nclassid=<%=Nclassid%>">上一页</a>&nbsp;
<%
end if
if n-currentpage<1 then
%>
  下一页 末页
<%else%>
  <a href="<%=filename%>?page=<%=CurrentPage+1%>&classid=<%=classid%>&Nclassid=<%=Nclassid%>">下一页</a>
  <a href="<%=filename%>?page=<%=n%>&classid=<%=classid%>&Nclassid=<%=Nclassid%>">末页</a>
<%end if%>
  &nbsp;页次:<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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -