<!--#include file="inc.asp"-->
<!--#include file="check.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="images/Admin_Style.css">
<title>福建音乐视听网 管理中心</title>
</HEAD>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<%
Response.CacheControl = "no-cache"
keyword=replace(replace(trim(request("keyword")),"'",""),"(","")
keyword=replace(replace(keyword," ",""),"[","")
stype=request("stype")
fs=request("fs")
if keyword="" then
Response.write "<center>查找字符不能为空，请重输入查找的信息!"
Response.End 
end if
%><table class=en9pt cellpadding=0 cellspacing=0 border=0 width=100% align=center valign=middle> 
<tr>
<td align=center width="80%"> 
<table width="778" border="0" cellpadding="0" cellspacing="0">
        <tr>
      <td>                                               
            <table width="780" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">                                               
              <tr>                                               
            <td>  <table border="0" width="100%" cellspacing="0" cellpadding="0">                                               
<td>                                               
                    <div align="center">                                               
                    <%
Set rs= Server.CreateObject("ADODB.Recordset")
if stype="1" then
sql="select * from musiclist order by Specialid desc"
elseif stype="2" then
sql="select * from nclass order by nclassid desc"
elseif stype="3" then
sql="select * from Special order by Specialid desc"
else
Response.write "stype参数有误"
Response.End                                                   
end if                                                
rs.open sql,conn,1,1 
if fs="1" then
  if stype="1" or stype="3" then 
     rs.filter = "name='"&keyword&"'" 
  elseif stype="2" then   
     rs.filter = "nclass='"&keyword&"'" 
  end if 
elseif fs="" then
  if stype="1" or stype="3" then 
     rs.filter = "name Like '%"&keyword&"%'" 
  elseif stype="2" then   
     rs.filter = "nclass like '%"&keyword&"%'" 
  end if                                                       
else
Response.write "fs参数有误  <a href=""javascript:window.close()"">返回重查</a>"&fs
Response.End
end if
                                               
if not isempty(request.QueryString("page")) then                                                       
currentPage=cint(request.QueryString("page"))                                                       
else                                                       
currentPage=1
end if
if rs.eof and rs.bof then
if stype="1" then
response.write "没有找到您搜索的歌曲"
elseif stype="2" then
response.write "没有找到您搜索的歌手"
elseif stype="3" then
response.write "没有找到您搜索的专集"
end if                                                       
else                                                       
totalPut=rs.recordcount                                                       
MaxPerPage=20                                                       
PageUrl="Search.asp"                                                       
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                                                       
search                                                       
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                                                       
search                                                       
else                                                       
currentPage=1                                                       
showpage totalput,MaxPerPage,PageUrl                                                       
showContent                                                       
showpage totalput,MaxPerPage,PageUrl                                                       
search                                                       
end if                                                       
end if                                                       
rs.close                                                       
end if                                                       
                                                       
sub showContent

pagenub=request("page")
if pagenub="" then
pagenub="1"
end if                                                        
i=1                                                        
%>                                               
                      <!-----------------------搜索歌手----------------------------->                                               
                      <%if stype="2" then%>                                               
                      <table border="1" width="99%" cellspacing="0" cellpadding="3" class="TableLine" bordercolor="#56B0F4" bordercolordark="#FFFFFF"><%do while not rs.eof%>                                       
<%                                               
Set Trs= Server.CreateObject("ADODB.Recordset")                 
Tsql="SELECT * FROM Special where nclassid="+cstr(rs("nclassid"))                                               
Trs.open Tsql,conn,1,1                                               
TotalSNum=Trs.recordcount                                               
Trs.close                                     
%><tr>
<td width="18%">&nbsp;&nbsp;<%=i+(pagenub-1)*20%>.&nbsp;<%=rs("NClass")%></td>
<td width="327">
<p>
[收录歌曲 <%=TotalSNum%> 首]
<font color="#6699FF">
<a href="0hao_Song_show.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("NClassid")%>">[浏览该歌手的所有MTV]</a></font>&nbsp;&nbsp;<a href='0hao_Song_add.asp?act=add&Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("NClassID")%>'>添加歌曲</a></p>
</td>
<td width="49">
<p align="center"><a href='0hao_Nclass_save.asp?act=SetIsGood&NClassid=<%=rs("NClassID")%>&Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>'><font color="red"><%if rs("IsGood")=true then%></font><font color="black">撤消</font><font color="red"><%else%>推荐<%end if%></font></a></p>
</td>
<td width="52" align="right">
<p align="center"><a href='0hao_geshou_ade.asp?NClassid=<%=rs("NClassID")%>&Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>'><font color="red">修
改</font></a></td>
<td width="46" align="right">
<p align="center"><a title="慎重! 删除后可是不能恢复了哦!" href='0hao_Nclass_save.asp?act=del&NClassid=<%=rs("NClassID")%>'><font color="red">删
除</font></a></td>
</tr>
<%
i=i+1                                               
if i>MaxPerPage then exit do
rs.movenext
loop
set Trs=nothing
%>
</table>

<!-----------------------搜索歌曲----------------------------->
<%elseif stype="1" then%>
<table border="1" width="99%" cellspacing="0" cellpadding="3" class="TableLine" bordercolor="#56B0F4" bordercolordark="#FFFFFF"><tr>
<td width="35%" height=22 align=center bgcolor="#B4DEF8">歌曲名称</td>
<td width="20%" height=22 align=center bgcolor="#B4DEF8">所属歌手</td>
<td width="15%" height=22 align=center bgcolor="#B4DEF8">首页推荐</td>                                               
<td width="10%" height=22 align=center bgcolor="#B4DEF8">浏览数</td>
<td width="10%" height=22 align=center bgcolor="#B4DEF8">修 改</td>
<td width="10%" height=22 align=center bgcolor="#B4DEF8">删 除</td> 
</tr>
<%do while not rs.eof%>
<tr>
                <td width="35%" height=22　>&nbsp;<%=MaxPerPage*(currentPage-1)+i%>.<font color=black><%=rs("name")%></font></td>
                <td width="20%" height=22 align=center><%if request("Nclassid")<>"" then%><a title="点击该歌手资料" href="0hao_geshou_ade.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("Nclassid")%>"><%else%><a title="点击浏览该歌手所有MTV" href="0hao_Song_show.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("Nclassid")%>"><%end if%><%=rs("Nclass")%></a></td>
                <td width="15%"  height=22 align=center><a href="0hao_song_save.asp?act=SetIsGood&Specialid=<%=rs("Specialid")%>&classid=<%=classid%>&SClassid=<%=SClassid%>&Nclassid=<%=Nclassid%>&page=<%=CurrentPage%>"><%if rs("IsGood")=true then%><font color=red>撤销</font> <%else%> 推荐 <%end if%></a></td> 
                <td width="10%" height=22 align=center><font color=blue><%=rs("hits")%></font></td>
                <td width="10%" height=22 align=center><a href="0hao_song_add.asp?act=edit&Specialid=<%=rs("Specialid")%>&Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("NClassid")%>&page=<%=CurrentPage%>">修改</a></td>
                <td width="10%" height=22 align=center><a title="不到万一请不要用此功能" href="0hao_song_save.asp?act=del&musicid=<%=rs("musicid")%>&page=<%=CurrentPage%>"><font color=red>删除</font></a></td> 
              </tr>
<%
i=i+1
if i>MaxPerPage then exit do
rs.movenext
loop
%>
                                           
</table> 

<!-----------------------搜索专集----------------------------->
<%elseif stype="3" then%>
<table border="1" width="99%" cellspacing="0" cellpadding="3" class="TableLine" bordercolor="#56B0F4" bordercolordark="#FFFFFF"><tr>
<td width="35%" height=22 align=center bgcolor="#B4DEF8">专集名称</td>
<td width="20%" height=22 align=center bgcolor="#B4DEF8">所属歌手</td>
<td width="15%" height=22 align=center bgcolor="#B4DEF8">首页推荐</td>                                               
<td width="10%" height=22 align=center bgcolor="#B4DEF8">浏览数</td>
<td width="10%" height=22 align=center bgcolor="#B4DEF8">修 改</td>
<td width="10%" height=22 align=center bgcolor="#B4DEF8">删 除</td> 
</tr>
<%do while not rs.eof%>
<tr>
                <td width="35%" height=22　>&nbsp;<%=MaxPerPage*(currentPage-1)+i%>.<font color=black><%=rs("name")%></font></td>
                <td width="20%" height=22 align=center><%if request("Nclassid")<>"" then%><a title="点击该歌手资料" href="0hao_geshou_ade.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("Nclassid")%>"><%else%><a title="点击浏览该歌手所有MTV" href="0hao_Song_show.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("Nclassid")%>"><%end if%><%=rs("Nclass")%></a></td>
                <td width="15%"  height=22 align=center><a href="0hao_song_save.asp?act=SetIsGood&Specialid=<%=rs("Specialid")%>&classid=<%=classid%>&SClassid=<%=SClassid%>&Nclassid=<%=Nclassid%>&page=<%=CurrentPage%>"><%if rs("IsGood")=true then%><font color=red>撤销</font> <%else%> 推荐 <%end if%></a></td> 
                <td width="10%" height=22 align=center><font color=blue><%=rs("hits")%></font></td>
                <td width="10%" height=22 align=center><a href="0hao_song_add.asp?act=edit&Specialid=<%=rs("Specialid")%>&Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("NClassid")%>&page=<%=CurrentPage%>">修改</a></td>
                <td width="10%" height=22 align=center><a title="不到万一请不要用此功能" href="0hao_song_save.asp?act=del&musicid=<%=rs("musicid")%>&page=<%=CurrentPage%>"><font color=red>删除</font></a></td> 
              </tr>
<%
i=i+1
if i>MaxPerPage then exit do
rs.movenext
loop
%>
                                           
</table>                                              
</div>                      
<%                      
else                      
end if                      
%>                      
<%                      
end sub                       
                      
function showpage(totalnumber,maxperpage,filename)                      
dim n                      
if totalnumber mod maxperpage=0 then                      
n= totalnumber \ maxperpage                      
else                      
n= totalnumber \ maxperpage+1                      
end if                      
%>                      
<BR><div align="center">                      
<center>                      
<table width=99% border="1" cellpadding="2" cellspacing="0" bordercolor="#56B0F4" bordercolordark="#FFFFFF">                      
<tr><form method=Post action="<%=filename%>?keyword=<%=keyword%>&stype=<%=stype%>">                      
<td bgcolor="#B4DEF8" width="100%" align="center">共找到<font color="<%=AlertFColor%>"><b><%=totalnumber%></b></font>项记录                                               
&nbsp;分<strong><font color="<%=AlertFColor%>"><%=n%></font></strong>页显示                                               
&nbsp;当前第<strong><font color="<%=AlertFColor%>"><%=CurrentPage%></font></strong>页                                                
<%if CurrentPage<2 then%>                                               
&nbsp;首页&nbsp;上一页&nbsp;                                               
<%else%>                                               
&nbsp<a href="<%=filename%>?page=1&keyword=<%=keyword%>&stype=<%=stype%>">首页</a>&nbsp;                                               
<a href="<%=filename%>?page=<%=CurrentPage-1%>&keyword=<%=keyword%>&stype=<%=stype%>"><font color="red"><b>上一页</b></font></a>&nbsp;                                               
<%                                               
end if                                               
if n-currentpage<1 then                                               
%>                                               
下一页&nbsp;末页                                               
<%else%>                                               
<a href="<%=filename%>?page=<%=CurrentPage+1%>&keyword=<%=keyword%>&stype=<%=stype%>"><font color="red"><b>下一页</b></font></a>&nbsp;                    
  <a href="<%=filename%>?page=<%=n%>&keyword=<%=keyword%>&stype=<%=stype%>">末页</a>                                              
<%end if%>                                                
</td></form>                                                
                                               
</tr>                                               
</table>                                               
</center>                                               
</div><BR>                                               
<%                                                
end function                                               
function Search                                               
%>                                               
<%end function%>                                               
</td>                                                
</table>                                             
			</td>                                               
          </tr>                                               
        </table>                                               
        </table>                                               
                                               
</table>                                               
                                               
<%                                               
set rs=nothing                                               
conn.close                                               
set conn=nothing                                               
%> </BODY></HTML>
                       