⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search.asp

📁 网络电视免费版
💻 ASP
字号:
<!--#include file="Config.asp" -->
<%
   	dim totalPut   
   	dim CurrentPage
   	dim TotalPages
   	dim i,j
   	dim keyword
   	dim sql
   	dim rs
	dim founderr
	dim errmsg
	dim findword
	Const MaxPerPage=15
	founderr=false
	keyword=Trim(Request("keyword"))
	if keyword="" then
		response.write "请输入查询条件。"
		response.end
	else
		keyword=replace(replace(replace(keyword,"'","‘"),"<","&lt;"),">","&gt;")
		if request("action")="title" then
			findword="SoftName like '%"&keyword&"%' "
			else
			findword="Content 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 CateID,SubCateID
	dim CateName,SubCateName

	if request("CateID")="" then
		CateID=""
		CateName="所有栏目"
	else
		CateID="CateID="&cstr(request("CateID"))&" and  "
		sql="select CateName from "&CategoryName&"_Cate where CateID="&cstr(request("CateID"))
		rs.open sql,conn,1,1
		CateName=rs("CateName")
		rs.close
	end if
	if request("SubCateID")="" then
		SubCateID=""
		SubCateName="所有分类"
	else
		SubCateID=" SubCateID="&cstr(request("SubCateID"))&" and  "
		sql="select SubCateName from "&CategoryName&"_SubCate where SubCateID="&cstr(request("SubCateID"))
		rs.open sql,conn,1,1
		SubCateName=rs("SubCateName")
		rs.close
	end if
%>
<HTML><HEAD><TITLE><%= Title_Name %><%= CategoryName_CHS %> ==>> 节目搜索 </TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=keywords content="视听新时空(网络电视,网络广播,免费电影:全球最大的中文网络电视,广播网站)">
<LINK href="style.css" type=text/css rel=stylesheet>
</HEAD>
<BODY text=#003300 vLink=#002200 bgColor=#cccccc leftMargin=0 topMargin=0>
<!--#include file="head.asp" -->
<!--#include file="navbar.asp" -->
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td colspan="7" valign="top" bgcolor="#FFFFFF" ><table width="98%" border="0" align="center">
        <tr> 
          <td><img src="images/dotdb.gif" width="10" height="10" align="absmiddle"> 
            当前位置:<a class=white_bg 
            href="/">首页</a> &gt;&gt; <a class=white_bg 
            href="./"><%= CategoryName_CHS %></a> &gt;&gt; 
            <%
	response.write "查询条件 <font color=red>"&keyword&"</font> "
	response.write "在"&CateName&"的"&SubCateName&"中"
%>
          </td>
        </tr>
      </table>
	  <% 
	if request("CateID")="" and request("SubCateID")="" then
		sql="select * from "&CategoryName&"_SoftInfo where "&findword&" "
		sql=sql&" order by SoftTime desc"
	elseif request("SubCateID")="" then
		sql="select * from "&CategoryName&"_SoftInfo where "&CateID&" "&findword&" "
		sql=sql&" order by SoftTime desc"
	else
		sql="select * from "&CategoryName&"_SoftInfo where "&CateID&" "&SubCateID&" "&findword&" "
		sql=sql&" order by SoftTime desc"
	end if
'	response.write ""&sql&""
'	response.end
	rs.open sql,conn,1,1 
  	if rs.eof and rs.bof then 
       		response.write "<p align='center'>没有或没有找到任何节目</p><br><br>" 
   	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 
	set rs=nothing
   	end if 
	         
   	sub showContent 
       	dim i
								i=0
								dim j 
	   	j=(currentpage-1)*MaxPerPage+1 
%>
      <table width="98%" border=0 align="center" cellpadding=2 cellspacing=1>
        <tr> 
          <td   height="22" colspan="2" align="center" background="images/index-t.gif" > 
            节目名称 </td>
          <td width=65   height="22" align=center nowrap background="images/index-t.gif" >整理日期</td>
          <td width=50   height="22" align=center nowrap background="images/index-t.gif" >节目大小</td>
          <td width=40   height="22" align=center nowrap background="images/index-t.gif" >人气</td>
          <td width=75   height="22" align=center nowrap background="images/index-t.gif" >节目等级</td>
        </tr>
        <%do while not rs.eof%>
        <tr> 
          <td colspan="2"><%=j%>.<img src="images/list.gif" width="11" height="11" align="absmiddle"><a href="SoftView.Asp?SoftID=<%=rs("SoftID")%>" class="articlelist"> 
            <%=replace(rs("SoftName"),""&keyword&"","<font color=red>"&keyword&"</font>")&" "&rs("SoftVer")%></a> 
          </td>
          <td align=middle width=65 nowrap><%=rs("SoftTime")%></td>
          <td align=middle width=50 nowrap><% if rs("SoftSize")>1024 then 
		  Response.Write(round(rs("SoftSize")/1024,2)&" MB")
		  else
		  Response.Write(rs("SoftSize")&" KB") 
		  end if
		  %></td>
          <td align=middle width=40 nowrap><%=rs("AllHits")%></td>
          <td align=center width=75 nowrap> 
            <%for img=1 to trim(rs("Rank"))
                    response.write "<img src=""images/star_green.gif"">"
                    next %>
          </td>
        </tr>
        <tr> 
          <td colspan="6"> ·<font color="#666666"><%=left(replace(trim(rs("Content")),""&keyword&"","<font color=red>"&keyword&"</font>"),120)%>......</font>[<%=rs("SoftTime")%>]</td>
        </tr>
        <tr> 
          <td height="20" nowrap><font color="green">运行平台:</font><%=trim(rs("System"))%> 
          </td>
          <td height="20" nowrap><font color="green">授权类型:</font><%=trim(rs("LicenceType"))%></td>
          <td colspan="4" height="20" nowrap>本日下载:<%=trim(rs("DayHits"))%> 本周:<%=trim(rs("WeekHits"))%> 
            本月:<%=trim(rs("MonthHits"))%></td>
        </tr>
        <tr> 
          <td colspan="6" height="1" background="images/bgline.gif" ></td>
        </tr>
        <%
	 j=j+1
		i=i+1
		 	rs.movenext
				 if i>=MaxPerPage then exit do
	 loop
%>
      </table>
      <%   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 "<table width='98%' border='0' align='center'><form method=Post action="&filename&"?CateID="&request("CateID")&"&SubCateID="&request("SubCateID")&"&action="&request("action")&"&keyword="&keyword&"><tr><td align='center'> "
  	response.write "<font color='red'>"&SubCateName&"</font>"

  	if CurrentPage<2 then
    		response.write ""&totalnumber&"个&nbsp;首页 上一页&nbsp;"
  	else
    		response.write ""&totalnumber&"个&nbsp;<a href="&filename&"?page=1&CateID="&request("CateID")&"&SubCateID="&request("SubCateID")&"&action="&request("action")&"&keyword="&keyword&">首页</a>&nbsp;"
    		response.write "<a href="&filename&"?page="&CurrentPage-1&"&CateID="&request("CateID")&"&SubCateID="&request("SubCateID")&"&action="&request("action")&"&keyword="&keyword&">上一页</a>&nbsp;"
  	end if

  	if n-currentpage<1 then
    		response.write "下一页 尾页"
  	else
    		response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&CateID="&request("CateID")&"&SubCateID="&request("SubCateID")&"&action="&request("action")&"&keyword="&keyword&">"
    		response.write "下一页</a> <a href="&filename&"?page="&n&"&CateID="&request("CateID")&"&SubCateID="&request("SubCateID")&"&action="&request("action")&"&keyword="&keyword&">尾页</a>"
  	end if
   	response.write "&nbsp;页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
    	response.write "&nbsp;<b>"&maxperpage&"</b>个节目/页 "
%>
      转到: 
      <select name='page' size='1' onChange='javascript:submit()'>
        <%for i = 1 to n%>
        <option value='<%=i%>' <%if CurrentPage=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
        <%next%>
      </select> 
      <%response.write "</td></tr></form></table>"%>
      <%     
end function
%>
    </td>
  </tr>
</table>
<!--#include file="foot.asp" -->
</BODY></HTML>
<%
  set rs=nothing
  set Subrs=nothing
CloseDatabase
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -