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

📄 search.asp

📁 971音乐站全站程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<%stats="搜索"%>
<!--#include file="home.asp"-->

<head>
<style>body,td{font-size:12px}</style></head>
<table width="779" height="570" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="1" height="570" background="images/sunny01.gif"><img src="images/b.gif" width="1" height="1"></td>
    <td width="186" valign="top"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="25" valign="top"><img src="images/amusic_0a11.gif" width="188" height="25"></td>
        </tr>
      </table>
      <!--#include file="inc/login.inc" -->
      <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="32"><img src="images/amusic_0a13.gif" width="188" height="25"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><img src="images/0394_top0.gif" width="188" height="29"></td>
        </tr>
      </table>
      <!--#include file="inc/links.inc" -->
      <table width="100%" height="23" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="23"><img src="images/0394_top1.gif" width="188" height="29"></td>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpadding="2" cellspacing="0">
        <!--#include file="inc/list_music_hot.inc"-->
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><img src="images/0394_top2.gif" width="188" height="29"></td>
        </tr>
      </table>
      <table width="98%" border="0" align="center" cellpadding="2" cellspacing="0">
        <!--#include file="inc/list_special_hot.inc"-->
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><img src="images/0394_top3.gif" width="188" height="29"></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="2" cellspacing="0">
        <tr> 
          <td height="45"> <div align="center"><img src="images/WMP9series_Free.gif" width="120" height="32"></div></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="2" cellspacing="0">
        <tr> 
          <td height="45"> <div align="center"><img src="images/real.gif" width="121" height="34"></div></td>
        </tr>
      </table></td>
    <td width="1" background="images/sunny01.gif"><img src="images/b.gif" width="1" height="1"></td>
    <td width="590" valign="top"><table width="589" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="314" height="18"> <div align="center"> 
              <!--#include file="inc/top_count.inc" -->
            </div></td>
          <td width="24"><img src="images/fink.gif" width="25" height="23"></td>
          <td width="251"> 
            <!-- 导航歌曲搜索 开始 -->
            <table width="250" border="0" cellspacing="0" cellpadding="4" align="center" height="17">
              <form action="search.asp" method="get">
                <tr align="center"> 
                  <td width="71" height="2"> <input name="key_keyword" class=input onFocus="this.value=''" value="关键字" size="10" maxlength="30" ></td>
                  <td width="79"> <select size="1" name="key_type" class=input >
                      <option selected value="music">歌曲名称</option>
                      <option value="singer">歌手名称</option>
                      <option value="special">专辑名称</option>
                    </select></td>
                  <td width="42"> <input type="submit" value="搜索" class=input  name="submit"></td>
                  <td width="42"> <input type="reset" value="清除" class=input  name="submit2"></td>
                </tr>
              </form>
            </table>
            <!-- 导航歌曲搜索 结束 -->
          </td>
        </tr>
      </table>
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr> 
          <td height="20" background="images/0394_list1.gif" bgcolor="#FFFFFF"><table width="100%" height="29" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="3%">&nbsp;</td>
                <td width="97%" valign="bottom">搜 索 结 果</td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td height="55" bgcolor="#FFFFFF"> <table width="579" height="132" border="0" align="right" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="1" bgcolor="#CCCCCC"><img src="images/b.gif" width="1" height="1"></td>
                <td width="550" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td bgcolor="#FFFFFF">
<table width="98%" height="22" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td><div align="left"><a href="index.asp"><%=HOST_NAME%></a> - 搜索结果</div></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table>
                  <TABLE width=575 height=2 
      border=0 align="center" cellPadding=0 cellSpacing=0 
      background="images/txwm_line_1.gif">
                    <TBODY>
                      <TR> 
                        <TD height=1><img src="images/b.gif" width="1" height="1"></TD>
                      </TR>
                    </TBODY>
                  </TABLE>
                  <table width="98%" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td align="center"> 
                        <%
	Dim pagesize,curpage,Music_rs,key_keyword

	pagesize=24		'设置每页显示 3的倍数

	If Request.QueryString("page")="" or not IsNumeric(Request.QueryString("page")) Then
  		curpage = 1
	Else
		curpage = cint(Request.QueryString("page"))
	End If
	
	key_keyword=replace(trim(Request("key_keyword")),"'","")
	key_type=trim(Request("key_type"))
	
	If key_keyword="" Then
		'Response.Write("<img src=images/err.gif width=128 height=128><br><br><font color=#FF0000>错误!~ 请输入搜索关键字!~</font></td></tr></table>")	
		Response.Write ("<script>alert(' 操作错误! \n\n 请输入搜索关键字!~ ');history.back();</script>")
		Response.end
	End If
	'sql = "select ID,MusicName,Singer,hits,NClassID from [MusicList] where MusicName like '%"&key_keyword&"%' ORDER BY ID desc"
	If key_type="music" Then	
		sql = "select ID,MusicName,Singer,hits,NClassID from [MusicList] where MusicName = '"&key_keyword&"'"
	ElseIf key_type="singer" Then
		sql = "select ID,MusicName,Singer,hits,NClassID from [MusicList] where Singer like '%"&key_keyword&"%'"
	ElseIf key_type="special" Then
		sql = "select SpecialID,name,Yuyan,NClass,pic,NClassID from [Special] where name like '%"&key_keyword&"%' ORDER BY SpecialID desc"
	End If
	Set Music_rs = Server.CreateObject("ADODB.Recordset")
	Music_rs.open sql,conn,1,1
	If Music_rs.eof Then
		Response.Write("<img src=images/err.gif width=128 height=128><br><br><font color=#FF0000>对不起,没有找到您搜索的内容!</font></td></tr></table>")
	Else

	Music_rs.pagesize = pagesize
	Music_rs.absolutepage = curpage
%>
                        &nbsp;共搜索到<font color=red><%=Music_rs.recordcount%></font>条记录,分成<font color=red><%=Music_rs.pagecount%></font>页,每页<font color=red><%=pagesize%></font>条记录,当前是第<font color=red><%=curpage%></font>页 
                        &nbsp; 
                        <%If curpage = 1 Then
						Response.Write ("上一页")
					Else%>
                        <a href='?page=<%=cint(curpage-1)%>&key_keyword=<%=key_keyword%>&key_type=<%=key_type%>'>上一页</a> 
                        <%                                          
					End If
					If  curpage = Music_rs.pagecount Then

⌨️ 快捷键说明

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