📄 admin_music.asp
字号:
<option<%if classid=cstr(rs("classid")) and classid<>"" then%> selected<%end if%> value="<%=Cstr(rs("classid"))%>"><%=rs("class")%></option>
<%
rs.MoveNext
Loop
rs.close
%> </select>
二级栏目:
<%if classid<>"" then%>
<select class=input name="sclassid" size="1" onchange="window.open('?action=disk_add&classid=<%=request("classid")%>&sclassid='+this.options[this.selectedIndex].value,'_self')">
<option value="" <%if request("sclassid")="" then%> selected<%end if%>>选择栏目</option>
<%
sql="select * from mv_sclass where classid="&classid
rs.open sql,conn_mv,1,1
Do while not rs.eof
%>
<option<%if sclassid=cstr(rs("sclassid")) and sclassid<>"" then%> selected<%end if%> value="<%=CStr(rs("sclassid"))%>" name=sclassid><%=rs("sclass")%></option>
<%
rs.MoveNext
Loop
rs.close
else
%>
<select name="sclassid" size="1">
<option value="" selected>选择栏目</option>
<%end if%>
</select>
三级栏目:
<%if sclassid<>"" then%>
<select class=input name="nclassid" size="1" onchange="window.open('?action=disk_add&classid=<%=classid%>&sclassid=<%=sclassid%>&nclassid='+this.options[this.selectedIndex].value,'_self')">
<option value="" <%if nclassid="" then%> selected<%end if%>>选择栏目</option>
<%
sql="select * from mv_nclass where sclassid="&sclassid
rs.open sql,conn_mv,1,1
Do while not rs.eof
%>
<option<%if cstr(request("nclassid"))=cstr(rs("nclassid")) and nclassid<>"" then%> selected<%end if%> value="<%=CStr(rs("nclassid"))%>" name=nclassid><%=rs("nclass")%></option>
<%
rs.MoveNext
Loop
rs.close
%>
<%else%>
<select name="nclassid" size="1">
<option value="" selected>选择栏目</option>
<%end if%>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr align=center>
<td width="100%" height="25" align=left>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" height="25" align="center">专辑名称:</td>
<td width="88%"><input class=input type="text" name="name" size="20"></td>
</tr>
<tr>
<td height="25" align="center">所属语言:</td>
<td><select class=input name="yuyan" size="1">
<option value="国语" selected>国语</option>
<option value="粤语">粤语</option>
<option value="英文">英文</option>
<option value="日韩">日韩</option>
<option value="韩文">韩文</option>
<option value="日语">日语</option>
<option value="国/粤语">国/粤语</option>
<option value="中/英文">中/英文</option>
<option value="中/日文">中/日文</option>
<option value="中/韩文">中/韩文</option>
</select>
</td>
</tr>
<tr>
<td height="25" align="center">所属地区:</td>
<td><select class=input name="gong" size="1">
<option value="大陆地区" selected>大陆地区</option>
<option value="港台地区">港台地区</option>
<option value="海外地区">海外地区</option>
</select>
</td>
</tr>
<tr>
<td height="25" align="center">唱片公司:</td>
<td><input class=input type="text" name="gongsi" size="20"></td>
</tr>
<tr>
<td height="25" align="center">发行日期:</td>
<td><input class=input type="text" name="times" size="20"></td>
</tr>
<tr>
<td height="25" align="center">专辑图片:</td>
<td height="25"><input class=input type="text" name="pic" size="20"> <font class=gray>* 图片地址,如:images/music/photo/nophoto.gif</font></td>
</tr>
<tr>
<td align="center">上传图片:</td>
<td height="25"><iframe frameborder=0 width='100%' height=23 scrolling=no src='music_upload.asp'></iframe></td>
</tr>
<tr>
<td height="25" align="center">专辑简介:</td>
<td><TEXTAREA class=input name="intro" rows=5 cols="60"></TEXTAREA></td>
</tr>
</table>
</td>
</tr>
<tr align=center>
<td height="25" align=center class=td>
<input type="hidden" value="add" name="act">
<%if classid="" then%>
<input type="button" class=input value=" 确 定 " name="cmdok" onclick="window.alert('请先选择栏目!')">
<%elseif nclassid="" then%>
<input type="button" class=input value=" 确 定 " name="cmdok" onclick="window.alert('请先选择子栏目!')">
<%else%>
<input type="submit" class=input value=" 确 定 " name="cmdok">
<%end if%>
<input type="reset" class=input value=" 取 消 " name="cmdcancel"></td>
</tr>
</form>
</table>
<%
end sub
sub disk_list()
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_mv.execute("SELECT * FROM mv_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
%>
<table border="0" width="98%" cellspacing="1" cellpadding="1">
<tr>
<td align=center width="100%" valign=top>
<%
if request.QueryString("nclassid")<>"" then
sql="select * from mv_special where nclassid="+cstr(nclassid)+" order by specialid desc"
elseif request.QueryString("classid")<>"" then
sql="select * from mv_special where classid="+cstr(classid)+" order by specialid desc"
else
sql="select * from mv_special order by specialid desc"
end if
rs.open sql,conn_mv,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>暂时没有任何专辑</p>"
else
maxperpage=60
pageUrl="?action=disk_list"
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
showContent
showpage totalput,maxperpage,pageUrl
else
if (currentpage-1)*maxperpage<totalput then
rs.move (currentpage-1)*maxperpage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,maxperpage,pageUrl
else
currentpage=1
showContent
showpage totalput,maxperpage,pageUrl
end if
end if
end if
rs.close
end sub
sub showContent
i=0 %>
<table class=table cellspacing=1 cellpadding=1>
<tr align=center height=30 align=center>
<td width="45%"><b>专辑名称</b></td>
<td width="25%"><b>所属歌手</b></td>
<td width="10%"><b>添加歌曲</b></td>
<td width="10%"><b>首页推荐</b></td>
<td width="5%"><b>修改</b></td>
<td width="5%"><b>删除</b></td>
</tr>
<%
do while not rs.eof
i=i+1
%>
<tr align=center height=25>
<td align=left> <%=i%>.<a href="admin_music_list.asp?classid=<%=rs("classid")%>&sclassid=<%=rs("sclassid")%>&nclassid=<%=rs("nclassid")%>&specialid=<%=rs("specialid")%>"><font color=black><%=rs("name")%></font></a></td>
<td><%=rs("nclass")%></td>
<td><a href="?action=music_add&specialid=<%=rs("specialid")%>"><FONT color="maroon">进入</FONT></a></td>
<td><a href="?action=disk_good&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><a href="?action=disk_edit&specialid=<%=rs("specialid")%>&askclassid=<%=rs("classid")%>&asksclassid=<%=rs("sclassid")%>&asknclassid=<%=rs("nclassid")%>&page=<%=Currentpage%>">修改</a></td>
<td><a title="不到万一请不要用此功能" href="?action=disk_del&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>张专辑
<%if Currentpage<2 then%>
首页 上一页
<%else%>
 <a href="<%=filename%>?page=1&classid=<%=classid%>&nclassid=<%=nclassid%>">首页</a>
<a href="<%=filename%>?page=<%=Currentpage-1%>&classid=<%=classid%>&nclassid=<%=nclassid%>">上一页</a>
<%
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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -