<META HTTP-EQUIV="expires" CONTENT="0">
<% Response.Expires = -1
  Response.ExpiresAbsolute = Now() - 1
  Response.cachecontrol = "no-cache"
 %>

<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="function.asp"-->
<%CheckAdmin1%>
<%
stype=request.Form("stype")
keyword=trim(request("keyword")) 
keyword=replace(keyword,"'","''") 
if keyword="" then
errmsg=errmsg+"您要找什么？？您没有输入任何字符，请输入要查找的字符"
call error()
Response.End 
end if

%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100%" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td width="100%" height="19" valign="bottom" bgcolor="#FFB5D2" class="bgTitle">&nbsp; <b> 搜 索 结 果 :::...</b></td>
          <td width="0%" bgcolor="#FFB5D2" class="bgTitle"></td>
        </tr>
        <tr>
          <td width="100%" colspan="2"><%
'////////////////////////////■■■■■888wang.com 为你提供好音乐网站！■■■■///////////////////////////////////////
select case stype
  case "Singer"
    sql="select * from NClass where Nclass Like '%"& keyword &"%'"
  case "Music"
   ' sql="select * from musiclist where musicname Like '%"& keyword &"%'"
    sql="select id,classid,sclassid,wma,musicname,hits,IsGood,url from musiclist where InStr(1,LCase(MusicName),LCase('"&keyword&"'),0)<>0 order by id desc" 
  case "Special"
    sql="select * from Special where Name Like '%"& keyword &"%' order by SpecialID desc"
  case "Word"
    sql="select * from TextWord where MusicName Like '%"& keyword &"%'"
end select

set rs = conn.execute(sql)
'////////////////////////////////////////■■■■■把以上部分复制到你搜索文件的相应部分■■■■■■■////////////////////////////


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="Singer" then
		response.write "<p align='center'><br><br>Sorry,  未 找 到 你 想 要 的 歌 手<br><br><a href=""javascript:history.go(-1)"">点 此 返 回</a><br><br></p>"
	elseif stype="Music" then 
		response.write "<p align='center'><br><br>Sorry,  未 找 到 你 想 要 的 歌 曲<br><br><a href=""javascript:history.go(-1)"">点 此 返 回</a><br><br></p>"
    elseif stype="Special" then
		response.write "<p align='center'><br><br>Sorry,  未 找 到 你 想 要 的 专 辑<br><br><a href=""javascript:history.go(-1)"">点 此 返 回</a><br><br></p>"
	elseif stype="User" then
		response.write "<p align='center'><br><br>Sorry,  未 找 到 你 想 找 的 用 户<br><br><a href=""javascript:history.go(-1)"">点 此 返 回</a><br><br></p>"
	end if
else
	totalPut=rs.recordcount
	MaxPerPage=50
	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 
i=0 
%>
          </td>
        </tr>
      </table>
      <!-----------------------搜索歌手----------------------------->
      <%if stype="Singer" then%>
	  <table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" class="bordercolor">
            <tr>
                <td width="26%" height=22 align=center ><b>歌手名称</b></td>
				 <td width="19%" height=22 align=center ><b>点击量</b></td>
				 <td width="15%" height=22 align=center ><b>此歌手专集</b></td>
                <td width="12%" height=22 align=center ><b>生成此歌手专集</b></td>
				<td width="15%" height=22 align=center ><b>首页推荐</b></td>
				<td width="13%" height=22 align=center ><b>删除此歌手</b></td>
            </tr>
        <%
	Set Trs= Server.CreateObject("ADODB.Recordset")
	do while not rs.eof
		i=i+1
		Tsql="SELECT * FROM MusicList where Nclassid="+cstr(rs("Nclassid"))
		Trs.open Tsql,conn,1,1
		TotalMNum=Trs.recordcount
		Trs.close
		Tsql="SELECT * FROM Special where Nclassid="+cstr(rs("Nclassid"))
		Trs.open Tsql,conn,1,1
		TotalSNum=Trs.recordcount
		Trs.close
		Tsql="SELECT * FROM Nclass where Nclassid="+cstr(rs("Nclassid"))
		Trs.open Tsql,conn,1,1
		Trs.close
%>
              <tr>
                <td width="26%" height=22>&nbsp;<%=i%>.<a href="888wang_special_all.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("NClassid")%>"><font color=black><%=rs("nclass")%></font></a>&nbsp; </td>
				<td width="19%">
	  <form name="form2" method="post" action="888wang_singer_all_m.asp?act=edithits&NClassID=<%=rs("NClassID")%>">
	  <input type="text" name="hits" size="5" value="<%=rs("hits")%>">
	    <input type="submit" name="Submit2" value="go">
      </form>
    </td>
				<td width="15%" height=22 align=center><a href=888wang_special_all.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("NClassid")%>>此歌手的所有专辑</a></td>
               <td width="12%" align="center">&nbsp;<a title=" <%=rs("nclass")%> 的专辑列表" href="make_special.asp?888wang=<%=rs("nclassid")%>"><font color=blue>生成此歌手专集</font></a></td>
					  
					  <td width="15%" align="center"><a href="888wang_singer_all_m.asp?act=IsGoodThis&NClassID=<%=rs("NClassID")%>&page=<%=currentPage%>">
			    <%if rs("IsGood")=true then%><font color=red>已推荐</font><%else%>未推荐<%end if%></a></td>
					  
                      <td width="13%" align="center">&nbsp;&nbsp;<a title="不到万一不要用此功能! 删除后可不能恢复的!" href="888wang_singer_all_m.asp?act=del&NClassID=<%=rs("NClassID")%>&page=<%=currentPage%>" onClick="{if(confirm('确定要删除记录吗?')){return true;}return false;}"><font color=red>删除</font></a>&nbsp;</td>
              </tr>
        <%
		if i>=MaxPerPage then exit do
	rs.movenext
	loop
	set Trs=nothing
%>
     </table>
	 
      <!-----------------------搜索歌曲----------------------------->
      <%elseif stype="Music" then

	  %>
	  <table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" class="bordercolor">
  <tr>
    <td width="24%" align=center ><b>歌曲名字</b></td>
	<td width="7%" height=22 align=center><b>路径ID</b></td>
	<td width="11%" align=center ><b>点击量</b></td>
		<td width="23%" align=center ><b>生成</b></td>
    <td width="13%" align=center ><b>推荐</b></td>
    <td width="10%" align=center ><b>修改</b></td>
    <td width="12%" align=center ><b>删除</b></td>
  </tr>
  <%do while not rs.eof%>
  <tr>
    <td width="24%"><%=(i+1)%>.<a href=urlPlay(rs("id")) target="_blank&play"><%=rs("MusicName")%></a></td>
	<td align=center><%=rs("url")%></td>
	<td width="11%">
	  <form name="form2" method="post" action="888wang_song_hits.asp?act=edithits&id=<%=rs("id")%>">
	  <input type="text" name="hits" size="5" value="<%=rs("hits")%>">
	    <input type="submit" name="Submit2" value="go">
      </form>
    </td>
  
   <td align=center><a href="make_play.asp?jim=<%=rs("id")%>">生成此音乐html</a></td>
    <td width="13%" align=center><a href="888wang_song_isgood.asp?act=SetIsGood&id=<%=rs("id")%>&Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&page=<%=CurrentPage%>">
      <%if rs("IsGood")=true then%>
      <font color=red>已推荐</font>
      <%else%>
      未推荐
      <%end if%>
    </a></td>
    <td width="10%" align=center><a href="888wang_song_modify.asp?id=<%=rs("id")%>&AskClassid=<%=rs("classid")%>&page=<%=CurrentPage%>">修改</a></td>
    <td width="12%" align=center><a href="888wang_song_del.asp?id=<%=rs("id")%>&classid=<%=classid%>&SClassid=<%=SClassid%>&page=<%=CurrentPage%>" onClick="{if(confirm('确定要删除记录吗?')){return true;}return false;}">删除</a></td>
  </tr>
        <%
	i=i+1
	if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>

      <!---------
		  --------------搜索专辑----------------------------->
      <%elseif stype="Special" then%>
	  
	  <table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" class="bordercolor">
            <tr>
                <td width="30%" height=22 align=center background="tt90/bgleft.gif"><b>专辑名称</b></td>
				
				<td width="13%" height=22 align=center background="tt90/bgleft.gif"><b>点击量</b></td>
                <td width="11%" height=22 align=center background="tt90/bgleft.gif"><b>所属歌手</b></td>
                <td width="10%" height=22 align=center background="tt90/bgleft.gif"><b>批量添歌</b></td>
                <td width="11%" height=22 align=center background="tt90/bgleft.gif"><b>首页推荐</b></td>
                <td width="7%" height=22 align=center background="tt90/bgleft.gif"><b>修改</b></td>
                <td width="11%" height=22 align=center background="tt90/bgleft.gif"><b>生成HTM</b></td>
                <td width="7%" height=22 align=center background="tt90/bgleft.gif"><b>删除</b></td>
            </tr>
        <%
Set Trs= Server.CreateObject("ADODB.Recordset")
do while not rs.eof
	i=i+1
	Tsql="SELECT * FROM MusicList where Specialid="+cstr(rs("Specialid"))
	Trs.open Tsql,conn,1,1
	TotalMNum=Trs.recordcount
	Trs.close
%>
              <tr>
                <td width="30%" height=22　>&nbsp;<%=i%>.<a href="888wang_song_main.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("NClassid")%>&specialid=<%=rs("specialid")%>"><font color=black><%=rs("name")%></font></a>&nbsp; <a href="888wang_special_add_song.asp?Classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&NClassid=<%=rs("NClassid")%>&specialid=<%=rs("specialid")%>">[添歌]</a></td>
				<td><%=url%></td>
					<td width="13%">
	  <form name="form2" method="post" action="888wang_special_hits.asp?act=edithits&SpecialID=<%=rs("SpecialID")%>">
	  <input type="text" name="hits" size="5" value="<%=rs("hits")%>">
	    <input type="submit" name="Submit2" value="go">
      </form>
    </td>
	
                <td width="11%" height=22　align=center ><a title="生成 <%=rs("nclass")%> 的专辑列表" href="make_special.asp?888wang=<%=rs("nclassid")%>"><%=rs("Nclass")%></a></td>
                <td width="10%"  height=22　align=center align="center" ><a href="888wang_special_add_batch.asp?specialid=<%=rs("specialid")%>">批量加歌</a></td>
                <td width="11%"  height=22　align=center align="center" ><a href="888wang_special_isgood.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="7%"  height=22　align=center align="center"><a href="888wang_special_modify.asp?Specialid=<%=rs("Specialid")%>&AskClassid=<%=rs("Classid")%>&AskSClassid=<%=rs("SClassid")%>&AskNClassid=<%=rs("NClassid")%>&page=<%=CurrentPage%>">修改</a></td> 
                <td width="11%"  height=22　align=center align="center"><a title="生成 <%=rs("nclass")%> → <%=rs("name")%> 歌曲列表" href="make_musiclist.asp?tt90=<%=rs("Specialid")%>"><font color=blue>生成此专辑</font></a></td>
                <td width="7%"  height=22　align=center align="center"><a title="不到万一请不要用此功能" href="888wang_special_del.asp?Specialid=<%=rs("Specialid")%>&classid=<%=rs("Classid")%>&SClassid=<%=rs("SClassid")%>&Nclassid=<%=rs("NClassid")%>&page=<%=CurrentPage%>" onClick="{if(confirm('确定要删除记录吗?')){return true;}return false;}"><font color=red>删除</font></a></td> 
              </tr>
        <%
	if i>=MaxPerPage then exit do
rs.movenext
loop
Set Trs=nothing
%>
    </table>
      <%
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
%>
      
      <%        
end function
function Search
%>
    </td>
  </tr>
</table>
</tr>
</table>
<%end function%>
<%
set rs=nothing
conn.close
set conn=nothing
%>
</body>
</html>






