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

📄 query.asp

📁 ASP源程序采用天空软件小偷中心核件制成
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<%	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="id"
		updown="desc"
	end select
	
	keyword=request("keyword")
	if keyword="" then
		errmsg=errmsg+"<br>"+"请输入查询条件。"
		founderr=true
	else
		keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","&lt;"),">","&gt;")," ","&nbsp;")
		if request("action")="title" then
			findword="showname like '%"&keyword&"%' "
		else
			findword="note like '%"&keyword&"%' "
		end if
	end if
	
 	set rs=server.createobject("adodb.recordset")
	dim classid,Nclassid
	dim classname,Nclassname
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=classname%></title>
<LINK rel="stylesheet" href="style.css">
<script language="JavaScript">
<!--
function Showvote(id)
{
	var filename="vote2.asp?id="+id;
	window.open(filename,"显示窗口","scrollbars=yes,width=378,height=180");
}
function tofriend(id)
{
	var filename="tofriend.asp?id="+id;
	window.open(filename,"显示窗口","scrollbars=yes,width=433,height=330");
}
//-->
</SCRIPT>
<script language=JavaScript>
function moveOn(url)
<!--
{
	var detail = window.open(url, "detail", "scrollbars=auto,width=298,height=240");
}

function MM_displayStatusMsg(msgStr) { //v2.0
  status=msgStr;
  document.MM_returnValue = true;
}
//-->
</script>
<script type="text/javascript">
<!--

document.onmouseover = handleOver;
document.onmouseout  = handleOut;

function handleOver() {
	el = window.event.srcElement;
	if (el.tagName == "IMG") { //Check if over image
		if ((el.getAttribute("oversrc") != null) && (el.getAttribute("oversrc") != "")) { //check if valid overSrc
			el.srcBackup = el.src;		//Back up the src
			el.src = el.getAttribute("oversrc");
		}
	}
}

function handleOut() {
	el = window.event.srcElement;
	if (el.tagName == "IMG") { //Check if over image
		if ((el.getAttribute("oversrc") != null) && (el.getAttribute("oversrc") != "") && (el.srcBackup != null)) { //Also check for valid backup
			el.src = el.srcBackup;
		}
	}
}
//-->
  </script>
</head>

<body bgcolor="#FFFFFF" topmargin="0">
<!--#include file="webtop.asp"-->
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="760" align="center">
  <tr>
    <td width="100%">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="760">
      <tr>
        <td width="760" colspan="5">
        </td>
      </tr>
      <tr>
        <td width="27"> </td>
        <td width="717" valign="top"><table border="0" cellpadding="5" cellspacing="3" style="border-collapse: collapse" width="100%" background="images/zbg.gif">
          <tr>
            <td width="100%" align="center" colspan="2"><script language=javascript src="newpage/js/sms1.js"></script></td>
          </tr>
          <tr>
            <td width="100%" align="center" colspan="2"><font class="cn" color="#00A0E0"><b>- > <font color=red><%=request("keyword")%></font> < - </b></font><u><a href="http://www.baidu.com/index.php?tn=decadance"><font class="cn" color="#FF0000">如果没有找到您想要的 请点这里!</font></a></u></td> 
          </tr><form method="post" name="myform" action="query.asp">
          <tr>
            <td width="68%" align="center" height="6"><%
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from ANclass order by Nclassid asc"
rs.open sql,conn,1,1
%>
                          <script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= trim(rs("classid"))%>","<%= trim(rs("Nclassid"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.Nclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
                          </script>
                          <p align="right">
                          <input type="radio" name="action" value="title" checked>名称<input type="radio" name="action" value="content">歌手 
                          <input type="text" name="keyword" size=16 maxlength="50" style="border-style:solid; border-width:1px; " value="输入关键字"> <input type="submit" name="Submit2" value="搜索" style='BORDER-RIGHT: #330000 1px solid; BORDER-TOP: #ffffcc 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #ffffcc 1px solid; CURSOR: hand; COLOR: #000000; BORDER-BOTTOM: #330000 1px solid; HEIGHT: 14pt '></td>
            <td width="32%" height="6"><A href="http://www.baidu.com/index.php?tn=decadance" target=_blank><img border="0" src="images/qls.gif" width="70" height="19"></a></td>
          </tr></form>
          <tr>
            <td width="100%" colspan="2">
<table border=0 cellpadding=0 cellspacing=0 width="80%" align="center">
                    <tbody> 
                    <tr> 
                      <td align=middle height=172 colspan="2"><% 
	if request("Nclassid")="" then
		sql="select id,filename1,filename2,showname,note,hits,dateandtime,hot,size,system,orders from download where "&classid&" "&findword&" "
		sql=sql&" order by id desc"
	else
		sql="select id,filename1,filename2,showname,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 "<li> <font class='cn' color='#3E3E3E'><b>没有找到相关的FLASH,下边有没有您喜欢的?</b></font><p><script language='JavaScript' src='jjs.asp?list=6&max=10&kind=hits'></script><p><script language='JavaScript' src='jjs.asp?list=6&max=10&kind=dateandtime'></script><p><script language='JavaScript' src='jjs.asp?list=6&max=10&hots=1'></script><p><a href='http://www.baidu.com/index.php?tn=decadance'>>>百度搜索!</a>" 
   	else 
      		totalPut=rs.recordcount 
      		if currentpage<1 then 
          		currentpage=1 
      		end if 

      		if (currentpage-1)*MaxPerPage2>totalput then 
	   		if (totalPut mod MaxPerPage2)=0 then 
	     			currentpage= totalPut \ MaxPerPage2 
	   		else 
	      			currentpage= totalPut \ MaxPerPage2 + 1 
	   		end if 
      		end if 
       		if currentPage=1 then 
            		showContent 
            		showpage totalput,MaxPerPage2,"query.asp" 
       		else 
          		if (currentPage-1)*MaxPerPage2<totalPut then 
            			rs.move  (currentPage-1)*MaxPerPage2 
            			dim bookmark 
            			bookmark=rs.bookmark 
            			showContent 
             			showpage totalput,MaxPerPage2,"query.asp" 
        		else 
	        		currentPage=1 
           			showContent 
           			showpage totalput,MaxPerPage2,"query.asp" 
	      		end if 
	   	end if 
   	rs.close 
   	end if 
	         
   	sub showContent 
       	dim i 
	   	i=0 
%>
                      <div align="center">
                        <center>
<table border="0" cellspacing="1" cellpadding="5" width="100%" style="border-collapse: collapse">
                          <tr bgcolor="#f8df9f" > 
                            <td width="33%" align="center" bgcolor="#6BC331" height="25" colspan="2">名 称</td>
                            <td width="11%" align="center" bgcolor="#6BC331" height="25">作 者</td>
                            <td width="9%" align="center" bgcolor="#6BC331" height="25">人 气</td>
                            <td width="11%" align="center" bgcolor="#6BC331" height="25">歌 手</td>
                            <td width="9%" align="center" bgcolor="#6BC331" height="25">送 友</td>
                            <td width="10%" align="center" bgcolor="#6BC331" height="25">预 览</td>
                            <td width="10%" align="center" bgcolor="#6BC331" height="25">投 票</td>
                            <td width="8%" align="center" bgcolor="#6BC331" height="25">
                            铃声</td>
        </tr>
        <%do while not rs.eof%>
                          <tr bgcolor="#f8df9f" > 
                            <td width="3%" height=22 bgcolor="#EEEEEE">&nbsp;<img border="0" src="images/j2.gif" width="8" height="11"></td>
                            <td width="30%" height=22 bgcolor="#F6F6F6"><a href="view.asp?id=<%=rs("id")%>"><FONT color=#00749f><%=rs("showname")%></FONT></a> ( <%=rs("size")%> ) <%if rs("hot")>3 then%> 
                              <font color=red>荐</font>  
                              <%end if%></td> 
                            <td width="11%" align=center bgcolor="#EEEEEE"><a href="mailto:<%=rs("filename2")%>"><FONT color=#00749f><%=rs("filename1")%></font></a></td>
                            <td width="9%" align=center bgcolor="#F6F6F6"><%=rs("hits")%></td>
                            <td width="11%" align=center bgcolor="#EEEEEE"><%if rs("note")="(无)" then%>无歌手<%else%><a href="http://www.7k7k.com/query.asp?keyword=<%=rs("note")%>"><%=rs("note")%></a><%end if%></td>
                            <td width="9%" align=center bgcolor="#F6F6F6"><a href="javascript:tofriend('<%=rs("id")%>')">送友</a></td>
                            <td width="10%" align=center bgcolor="#EEEEEE"><a href="JavaScript:moveOn('spic.asp?id=<%=rs("id")%>')"><img border="0" src="images/yl.gif" width="25" height="18" alt="查看预览"></a></td>
                            <td width="10%" align=center bgcolor="#F6F6F6"><a href="javascript:Showvote('<%=rs("id")%>')"><img border="0" src="images/pl.gif" width="25" height="18" alt="评论打分"></a></td>
                            <td width="8%" align=center bgcolor="#F6F6F6"><a href="http://mysms.tom.com/smslist/smsearch.php?inc=3&keyword=<%=rs("showname")%>&user_id=59856" target="_blank"><img src="images/sms.gif" width="27" height="18" border="0" alt="下载铃声"></a></td></tr><%
	 i=i+1
	 if i>=MaxPerPage3 then exit do
	 	rs.movenext
	 loop
%>
        <tr> 
          <td background=images/line-2.gif height=1 colspan="9" width="100%"></td>
        </tr>
        
      </table></center>
                      </div>
      <%
   end sub 

	function showpage(totalnumber,MaxPerPage2,filename)
  	dim n

  	if totalnumber mod MaxPerPage2=0 then
     		n= totalnumber \ MaxPerPage2
  	else
     		n= totalnumber \ MaxPerPage2+1
  	end if
  	response.write "<form method=Post action="&filename&"?classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&action="&request("action")&"&keyword="&keyword&">"
  	response.write "<font color='red'>"&Nclassname&"</font>"

  	if CurrentPage<2 then
    		response.write ""&totalnumber&"个&nbsp;首页 上一页&nbsp;"
  	else
    		response.write ""&totalnumber&"个&nbsp;<a href="&filename&"?page=1&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&action="&request("action")&"&keyword="&keyword&">首页</a>&nbsp;"
    		response.write "<a href="&filename&"?page="&CurrentPage-1&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&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)&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&action="&request("action")&"&keyword="&keyword&">"
    		response.write "下一页</a> <a href="&filename&"?page="&n&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&action="&request("action")&"&keyword="&keyword&">尾页</a>"
  	end if
   	response.write "&nbsp;页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
    	response.write "&nbsp;<b>"&MaxPerPage2&"</b>个作品/页 "
%>
      转到:  
      <select name='page' size='1' style="color:#ff0000;font-size: 9pt" onChange='javascript:submit()'>
        <%for i = 1 to n%>
        <option value='<%=i%>' <%if cint(currentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
        <%next%>
      </select>
      <%      
end function
%>
 </td></tr>
                    <tr>
                      <td align=middle><script language=javascript src="http://usms.tom.com/jdxw.js?tomuserid=59856"></script></td>
                      <td align=middle><script language=javascript src="http://usms.tom.com/qqxh300.js?tomuserid=59856"></script></td>
                    </tr>
                    </tbody> 
                  </table>
</td>
          </tr>
          </table>
        </td>
        <td width="16" valign="top"></td>
      </tr>
      <tr>
        <td width="760" colspan="5" height="10"></td>
        </tr>
      <tr>
        <td width="760" colspan="5">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
          <tr>
            <td width="44">
            </td>
            <td width="684" bgcolor="#FFFFFF"><!--#include file="CopyRight.asp"--></td>
            <td width="32">
            <p align="right">
            </td>
          </tr>
        </table>
        </td>
        </tr>
    </table>
    </td>
  </tr>
</table>
</body>

</html>

⌨️ 快捷键说明

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