<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<%
   	dim totalPut   
   	dim CurrentPage
   	dim TotalPages
   	dim i,j
   	dim keyword
   	dim sql
   	dim rs
	dim founderr
	dim errmsg
	dim findword
	founderr=false
	keyword=request("keyword")
	if keyword="" then
		errmsg=errmsg+"<br>"+"请输入查询条件。"
		founderr=true
	else
		if request("action")="title" then
			findword="bb like '%"&keyword&"%' "
		else
			findword="bb like '%"&keyword&"%' "
		end if
	end if
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if
 	set rs=server.createobject("adodb.recordset")
	dim classid,Nclassid
	dim classname,Nclassname

	if request("Nclassid")="" then
		Nclassid=""
		Nclassname="共找到节目"
	else
		Nclassid=" Nclassid="&cstr(request("Nclassid"))&" and  "
		sql="select Nclass from Nclass where Nclassid="&cstr(request("Nclassid"))
		rs.open sql,conn,1,1
		Nclassname="的[<font color=#008000>"&rs("Nclass")&"</font>]分类"
		rs.close
	end if

%>
<HTML><HEAD><TITLE>吴川信息港-阳光电台-节目查找结果</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<STYLE type=text/css>A {
	COLOR: #dddddd; TEXT-DECORATION: none
}
A:hover {
	COLOR: #7fff00; TEXT-DECORATION: none
}
TD {
	FONT-SIZE: 12px
}
P {
	FONT-SIZE: 12px
}
LI {
	FONT-SIZE: 12px
}
INPUT {
	FONT-SIZE: 12px
}
SELECT {
	FONT-SIZE: 12px
}
TD {
	FONT-SIZE: 12px; LINE-HEIGHT: 140%
}
TABLE.nav {
	COLOR: #000000
}
TABLE.nav A {
	COLOR: #000000; TEXT-DECORATION: none
}
TABLE.nav A:hover {
	COLOR: red; TEXT-DECORATION: none
}
A.nounderline {
	COLOR: #000000; TEXT-DECORATION: none
}
A.nounderline:hover {
	COLOR: red; TEXT-DECORATION: underline
}
FIELDSET {
	BORDER-BOTTOM: #4169e1 1.5px solid; BORDER-LEFT: #4169e1 1.5px solid; BORDER-RIGHT: #4169e1 1.5px solid; BORDER-TOP: #4169e1 1.5px solid; COLOR: #d2b48c; FONT-SIZE: 9pt; TEXT-ALIGN: left; WIDTH: 100%
}
</STYLE>
<style>
body{cursor: url('../01.ani')}}
</style>
<script language="javascript">
		<!--
		function Listen(ListenURL)
		{
		var Listen = window.open(ListenURL,"Listen","scrollbars=no,width=306,height=116");
		return false;
		}
		function Listci(ListenURL)
		{
		var Listci = window.open(ListenURL,"listci","scrollbars=yes,width=440,height=500");
		return false;
		}
		function Listhelp(ListenURL)
		{
		var Listhelp = window.open(ListenURL,"listhelp","scrollbars=yes,width=550,height=500");
		return false;
		}
function popwin2(id)
{		window.open("review.asp?id="+id,"","height=500,width=550,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
		//-->
</script>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
</HEAD><!--#include file="topMain.asp"-->
<body topmargin="0" leftmargin="0" bgcolor="#C60000" text="#FFFFFF">
<%if founderr=true then%>
<div align="center">
  <center><table border="0" width="753" cellspacing="0" cellpadding="0">
  <tr>
    <td width="164" valign="top">
      <table width="100%" height="6" cellspacing cellpadding>
        <tr>
          <td width="100%"></td>
        </tr>
      </table> <div align="left">
              <table border="1" width="154" cellspacing cellpadding bordercolorlight="#C60000" bordercolordark="#C60000" height="43">
                <tr>
                  <td width="154" height="20"><img border="0" src="images/djmusicserach.gif"></td>
        <center>
                </tr>
                  <tr>
                  <td width="157" height="15" bordercolorlight="#000000" bordercolordark="#C60000">      <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse">

        <tr>
            <td align="center">  
            &nbsp;  
            </td>
        </tr>
                <form method="post" name="myform" action="search.asp">
          <tr> 
            <td align="center"><input type="text" name="keyword" class=textfield size=10  maxlength="50"  style="font-family: Arial; background-color: #FF7979; color: #FFFFFF; border: 1 solid #000000">
              <input type="submit" name="Submit22" value="搜索" style="height='21'" class="botton">   
            </td>
          </tr>
        </form>
        <tr>
            <td align="center">  
            &nbsp;  
            </td>
        </tr>
      </table>
                  </td>
                  </tr>
              </table>
              </div>
</center><table width="100%" height="6" cellspacing cellpadding>
      <tr>
        <td width="100%"></td>
      </tr>
    </table>
    </td>
    <td width="1" bgcolor="#000000">　</td>
    <td width="588" valign="top">
      <div align="right">
        <table width="98%" cellspacing="4" cellpadding="4">
          <tr>
            <td width="100%"></td>
          </tr>
        </table>
      </div>
 <div align="right">
        <table width="98%" cellspacing="0" cellpadding="0">
          <tr>
            <td width="100%"><p align="center"><br>
              <img src="images/error.gif"><br><br>
<img src="images/zi.gif"><br><br>
</td>
          </tr>
        </table>
      </div>
    </td>
  </tr>
</table>     
</center>
</div>
<div align="center">
  <center>
  <table width="750" cellspacing cellpadding>
    <tr>
      <td width="100%"><img border="0" src="images/top-02.gif"></td>
    </tr>
  </table>
  </center>
</div>    
<%else%> 
<div align="center">
  <center><table border="0" width="753" cellspacing="0" cellpadding="0">
  <tr>
    <td width="164" valign="top">
      <table width="100%" height="6" cellspacing cellpadding>
        <tr>
          <td width="100%"></td>
        </tr>
      </table> <div align="left">
              <table border="1" width="154" cellspacing cellpadding bordercolorlight="#C60000" bordercolordark="#C60000" height="43">
                <tr>
                  <td width="154" height="20"><img border="0" src="images/djmusicserach.gif"></td>
        <center>
                </tr>
                  <tr>
                  <td width="157" height="15" bordercolorlight="#000000" bordercolordark="#C60000">      <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse">

        <tr>
            <td align="center">  
            &nbsp;  
            </td>
        </tr>
                <form method="post" name="myform" action="search.asp">
          <tr> 
            <td align="center"><input type="text" name="keyword" class=textfield size=10  maxlength="50"  style="font-family: Arial; background-color: #FF7979; color: #FFFFFF; border: 1 solid #000000">
              <input type="submit" name="Submit22" value="搜索" style="height='21'" class="botton">   
            </td>
          </tr>
        </form>
        <tr>
            <td align="center">  
            &nbsp;  
            </td>
        </tr>
      </table>
                  </td>
                  </tr>
              </table>
              </div>
</center>         <hr size="1" color="#FF3E3E" align="right">        <div align="left">
              <table border="1" width="154" cellspacing cellpadding bordercolorlight="#C60000" bordercolordark="#C60000" height="43">
                <tr>
                  <td width="154" height="20"><img border="0" src="images/jintop10.gif" width="154" height="20"></td>
        <center>
                </tr>
                  <tr>
                  <td width="154" height="15" bordercolorlight="#000000" bordercolordark="#C60000"> 
 <table width="100%">    
      
       <%                                       
	dim tdate                                       
	tdate=year(Now()) & "-" & month(Now()) & "-" & day(Now())                                       
	sql="select * from download where "                                       
	sql=sql&" lasthits=date() and stop=0 and dayhits>0 "                                       
	sql=sql&" order by dayhits desc"                                       
	rs.open sql,conn,1,1                                       
	if rs.eof and rs.bof then                                       
%>
       <td width="100%">
                  本日暂无人视听                                                     
                  <%else%>
                  <%do while not rs.eof                                                                                             
response.write "<tr><td>&nbsp;<img src=images/jian.gif>&nbsp;<A href=play.asp?id="&rs("id")&" title=点击开始播放 onclick='return Listen(this.href);'>"&rs("bb")&"</A></td></tr>"                                         
i=i+1       
if i>=10 then exit do       
rs.movenext     
loop     
i="0"     
	end if 
	rs.close 
%>
              </table> 
                                   </td>
                  </tr>
              </table>
              </div>
    </center>
    <table width="100%" height="6" cellspacing cellpadding>
      <tr>
        <td width="100%"></td>
      </tr>
    </table>
    </td>
    <td width="1" bgcolor="#000000">　</td>
    <td width="588" valign="top">
      <div align="right">
        <table width="98%" cellspacing="4" cellpadding="4">
          <tr>
            <td width="100%">您所查询的：</a>           
              <%               
	response.write "<font color=00ff00>"&keyword&"</font>"     
	response.write "&nbsp;在所有节目中"     
%>
            </td>
          </tr>
        </table>
      </div>
            <div align="right">   
<%       
	if request("Nclassid")="" then      
		sql="select id,showname,bb,note,hits,dateandtime,hot,size,system,orders from download where "&classid&" "&findword&" "      
		sql=sql&" order by id desc"      
	else      
		sql="select id,showname,bb,note,hits,dateandtime,hot,size,system,orders from download where "&classid&" "&Nclassid&" "&findword&" "      
		sql=sql&" order by id desc"      
	end if      
	rs.open sql,conn,1,1      
      
  	if rs.eof and rs.bof then       
       		response.write "<p align='center'>没有找到您要找的节目!<br><br><br><b>提示:请把您要找的节目名称到&nbsp;<a href='/bbs'><font color=00ff00>论坛</font></a>&nbsp;告诉台长!!</b><br><Br></p>"       
   	else       
      		totalPut=rs.recordcount       
      		if currentpage<1 then       
          		currentpage=1       
      		end if       
      
      		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,"search.asp"       
       		else       
          		if (currentPage-1)*MaxPerPage<totalPut then       
            			rs.move  (currentPage-1)*MaxPerPage       
            			dim bookmark       
            			bookmark=rs.bookmark       
            			showContent       
             			showpage totalput,MaxPerPage,"search.asp"       
        		else       
	        		currentPage=1       
           			showContent       
           			showpage totalput,MaxPerPage,"search.asp"       
	      		end if       
	   	end if       
   	rs.close       
   	end if       
	               
   	sub showContent       
       	dim i       
	   	i=0       
%>      
                
                    
<div align="right">
                
                    
<TABLE border="1" cellspacing="0" cellpadding="0" width="570" bordercolorlight="#000000" bordercolordark="#C60000" height="50">      
                      
<TR>       
                        
<TD width="198" height=26 background="images/bg-1.gif">
  <p align="center">节目名称</p>
</TD>          
<TD width="151" align="center" background="images/bg-1.gif" height="26">更新日期</TD>      
<TD width="94" align="center" background="images/bg-1.gif" height="26">视听次数</TD>      
<TD width="117" align="center" background="images/bg-1.gif" height="26">节目评分</TD>      
</TR>      
                      
<%do while not rs.eof%>                    
<TR>       
                        
<TD width="198" height=20>&nbsp;&nbsp;<A href="play.asp?id=<%=rs("id")%>" title="点击开始播放" onclick='return Listen(this.href);'><%=rs("bb")%></A>                                                   
</TD>       
<TD width="151" align=center height="20"><%=rs("dateandtime")%></TD>      
<TD width="94" align=center height="20"><%=rs("hits")%></TD>      
<TD width="117" align=center height="20"><%for imghot=1 to rs("hot")%><img src="images/star.gif" width="11" height="10"><%next%></TD>      
</TR>           
<%      
	 i=i+1      
	 if i>=MaxPerPage then exit do      
	 	rs.movenext      
	 loop      
%>      
                    
<tr><td colspan="4">              
    <p align="center">              <%      
   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      
  	response.write "<form method=Post action="&filename&"?classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&action="&request("action")&"&keyword="&keyword&">"      
  	response.write ""&Nclassname&""      
      
  	if CurrentPage<2 then      
    		response.write "&nbsp;<font color=00ff00>"&totalnumber&"</font>&nbsp;个&nbsp;首页 上一页&nbsp;"      
  	else      
    		response.write "<font color='00ff00'>"&totalnumber&"</font>&nbsp;个&nbsp;<a href="&filename&"?page=1&keyword="&keyword&">首页</a>&nbsp;"      
    		response.write "<a href="&filename&"?page="&CurrentPage-1&"&keyword="&keyword&">上一页</a>&nbsp;"      
  	end if      
      
  	if n-currentpage<1 then      
    		response.write "下一页 尾页"      
  	else      
    		response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&keyword="&keyword&">"      
    		response.write "下一页</a> <a href="&filename&"?page="&n&"&keyword="&keyword&">尾页</a>"      
  	end if      
   	response.write "&nbsp;页次：<strong><font color=00ff00>"&CurrentPage&"</font>/"&n&"</strong>页 "      
    	response.write "&nbsp;<b><font color='00ff00'>"&maxperpage&"</font></b>个节目/页 "      
%>
   <%           
end function      
%>
              <%      
   	set rs=nothing         
	conn.close      
	set conn=nothing      
%>
          </td></tr></TABLE>      
</div>
  </TD>      
</TR>      
            
</TABLE>      
</center>
</div>
<div align="center">
  <center>
  <table width="750" cellspacing cellpadding>
    <tr>
      <td width="100%"><img border="0" src="images/top-02.gif"></td>
    </tr>
  </table>
  </center>
</div>    
<%end if%> 
<!--#include file="CopyRight.asp"-->  





