<!--#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 updown
	dim order_name
	order_name=Request("Order")
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if
	if request("updown")<>"" then
		updown="desc"
	else
		updown=""
	end if
	select case order_name
		case "showname"
		order_name="showname"
		case "hot"
		order_name="hot"
		case "dateandtime"
		order_name="dateandtime"
		case "hits"
		order_name="hits"
		case "orders"
		order_name="orders"
		case "size"
		order_name="size"
		case else
		order_name="dateandtime"
		updown="desc"
	end select
 	set rs=server.createobject("adodb.recordset")
	dim classid,Nclassid
	dim classname,Nclassname

	if request("classid")="" then
'		classid=""
'		classname="本类共有节目"
		classid="classid=1 and  "
		sql="select class from class where classid=1"
		rs.open sql,conn,1,1
		if rs.bof and rs.eof then
			response.write "还没有任何栏目，请到管理页面添加"
			response.end
		else
		classname=rs("class")
		end if
		rs.close
	else
		classid="classid="&cstr(request("classid"))&" and  "
		sql="select class from class where classid="&cstr(request("classid"))
		rs.open sql,conn,1,1
		classname=rs("class")
		rs.close
	end if
	if request("Nclassid")="" then
		Nclassid=""
		Nclassname="本类共有节目"
	else
		Nclassid=" Nclassid="&cstr(request("Nclassid"))&" and  "
		sql="select Nclass.Nclass,class.class from Nclass,class where Nclass.classid=class.classid and Nclass.Nclassid="&cstr(request("Nclassid"))
		rs.open sql,conn,1,1
		classname=rs("class")
		Nclassname=rs("Nclass")
		rs.close
	end if

%>
<HTML><HEAD><TITLE>吴川信息港-阳光电台</TITLE>
<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>
<body topmargin="0" leftmargin="0" bgcolor="#C60000" text="#FFFFFF">
<!--#include file="topMain.asp"-->
 
<div align="center">
  <center>
 
<table width="750" cellspacing cellpadding>
  <tr>
    <td width="161" valign="top">
      <table width="100%" cellspacing cellpadding height="6">
        <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>
              <hr size="1" color="#FF6699" 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/classtop10.gif"></td>
        <center>
                </tr>
                  <tr>
                  <td width="154" height="15" bordercolorlight="#000000" bordercolordark="#C60000"> 
                                    <table>    
      
       <%if request("Nclassid")="" then
	sql="select top 10 id,showname,bb from download where download.classid="&request("classid")                   
	sql=sql&" order by download.id desc"
	else
	sql="select top 10 id,showname,bb from download where download.Nclassid="&request("Nclassid")              
	sql=sql&" order by download.id desc" 
	end if                  
	rs.open sql,conn,1,1                   
	if rs.eof and rs.bof then
response.write ("没有")
else
do while not rs.eof
response.write ("<tr><td><img border=0 src=images/jian.gif>&nbsp;<A href=play.asp?id="&rs("id")&" onclick='return Listen(this.href);'>"&rs("bb")&"</A><img border=0 src=images/hot1.gif></td></tr>")
	rs.movenext                                     
	loop                                     
	end if                                     
	rs.close                                     
%></table></td>
                  </tr>
              </table>
              </div>
              <table width="100%" height="6" cellspacing cellpadding>
                <tr>
                  <td width="100%"></td>
                </tr>
              </table>
              </center></center>
    </td>
    <td width="1" bgcolor="#000000">　</td>
    <td width="568" valign="top">
      <table border="0" width="100%" cellpadding="2" height="6">
        <tr>
          <td width="100%"></td>
        </tr>
        <tr>
          <td width="100%">你当前所在位置 -> <a href="index.asp">电台首页</a> -> <a href="sort.asp?classid=<%=request("classid")%>"><%=classname%></a> </td>     
        </tr>
      </table>
      <div align="center">
        <center>
 <%                           
	if request("Nclassid")="" then                          
		sql="select id,showname,bb,note,dayhits,weekhits,lasthits,hits,dateandtime,hot,system,size,orders from download where download.classid="&request("classid")                           
		sql=sql&" order by "&order_name&" "&updown                          
	else                          
		sql="select id,showname,bb,note,dayhits,weekhits,lasthits,hits,dateandtime,hot,system,size,orders from download where download.Nclassid="&request("Nclassid")                          
		sql=sql&" order by "&order_name&" "&updown                          
	end if                          
	rs.open sql,conn,1,1                           
                          
  	if rs.eof and rs.bof then                           
       		response.write "<table border=0 width=100% height=100 cellpadding=0><tr><td width='100%'><p align=center>没有找到任何节目</td></tr></table>"                           
   	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,"sort.asp"                           
       		else                           
          		if (currentPage-1)*MaxPerPage<totalPut then                           
            			rs.move  (currentPage-1)*MaxPerPage                           
            			dim bookmark                           
            			bookmark=rs.bookmark                           
            			showContent                           
             			showpage totalput,MaxPerPage,"sort.asp"                           
        		else                           
	        		currentPage=1                           
           			showContent                           
           			showpage totalput,MaxPerPage,"sort.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="560" bordercolor="#000000" style="border-collapse: collapse" height="114">
                    <%if request("updown")="" then%>
                    <tr> 
                      <td width="201" align="right" height="25" background="images/bg-1.gif"> 
                        <div align="center">节目名称</div>
                      </td>
                      <td width="144" align=center height="25" background="images/bg-1.gif"><a href="sort.asp?classid=<%=request("classid")%>&order=dateandtime&updown=desc" title="点击按日期排列">添加日期</font></td>
                      <td width="76" align=center height="25" background="images/bg-1.gif">
                        <p align="center"><a href="sort.asp?classid=<%=request("classid")%>&order=hits&updown=desc"  title="点击按视听排列">视听次数</a></p>
                      </td>
                      <td width="129" align=center height="25" background="images/bg-1.gif"><a href="sort.asp?classid=<%=request("classid")%>&order=hot&updown=desc"  title="点击按评分排列">节目评分</a></td>
                    </tr>
                    <%else%>
                    <tr> 
                      <td width="201" align="right" height="25" background="images/bg-1.gif"> 
                        <div align="center">节目名称：</div>
                      </td>
                      <td width="144" align=center height="25" background="images/bg-1.gif"><a href="sort.asp?classid=<%=request("classid")%>&order=dateandtime" title="点击按日期排列">节目日期</a></td>
                      <td width="76" align=center height="25" background="images/bg-1.gif">
                        <p align="center"><a href="sort.asp?classid=<%=request("classid")%>&order=hits"  title="点击按视听排列">视听次数</a></p>
                      </td>
                      <td width="129" align=center height="25" background="images/bg-1.gif"><a href="sort.asp?classid=<%=request("classid")%>&order=hot"  title="点击按评分排列">站内评分</a></td>
                    </tr>
                    <%end if%>
                    <%do while not rs.eof%>
                    <tr> 
                      <td width="201" height="24">
&nbsp;&nbsp;<img border="0" src="images/jian.gif">&nbsp;<A href="play.asp?id=<%=rs("id")%>" title="点击开始播放" onclick='return Listen(this.href);'><%=rs("bb")%></a></td>
                      <td width="144" align=center height="24"><%=year(rs("dateandtime"))%>年<%=month(rs("dateandtime"))%>月<%=day(rs("dateandtime"))%>日</td>
                      <td width="76" align=center height="24"><p align="center"><%=rs("hits")%></td>
                      <td width="129" align=center height="24"><%for imghot=1 to rs("hot")%><img src="images/star.gif"><%next%></td>
                    </tr>
                    <%     
	 i=i+1     
	 if i>=MaxPerPage then exit do     
	 	rs.movenext     
	 loop     
%>
                                        <tr> 
                      <td colspan="6" width="556" height="23"> 
                        <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")&"&order="&request("order")&"&updown="&request("updown")&">"     
  	response.write ""&Nclassname&"&nbsp;"     
     
  	if CurrentPage<2 then     
    		response.write "<font color='ffff00'>"&totalnumber&"</font>&nbsp;首&nbsp;&nbsp;首页 上一页&nbsp;"     
  	else     
    		response.write "<font color='ffff00'>"&totalnumber&"</font>首&nbsp;<a href="&filename&"?page=1&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">首页</a>&nbsp;"     
    		response.write "<a href="&filename&"?page="&CurrentPage-1&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">上一页</a>&nbsp;"     
  	end if     
     
  	if n-currentpage<1 then     
    		response.write "下一页 尾页"     
  	else     
    		response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">"     
    		response.write "下一页</a> <a href="&filename&"?page="&n&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">尾页</a>"     
  	end if     
   	response.write "&nbsp;页次：<strong><font color=ffff00>"&CurrentPage&"</font>/"&n&"</strong>页 "     
    	response.write "&nbsp;<b><font color=ffff00>"&maxperpage&"</font></b>个节目/页 "     
%>
<%            
end function       
%>
                        </p
                      </td>
                    </tr>
                  </table></center>
      </div> <table width="100%" height="6" cellspacing cellpadding>
          <tr>
            <td width="100%"></td>
          </tr>
        </table>
    </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>

              <!--#include file="CopyRight.asp"-->  
</HTML>






