📄 query.asp
字号:
<!--#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
keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","<"),">",">")," "," ")
if request("action")="title" then
findword="showname like '%"&keyword&"%' "
else
findword="note 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("classid")="" then
classid=""
classname="所有软件"
' classid="classid=1 and "
' sql="select class from Dclass where classid=1"
' rs.open sql,conn,1,1
' classname=rs("class")
' 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 from Nclass where Nclassid="&cstr(request("Nclassid"))
rs.open sql,conn,1,1
Nclassname=rs("Nclass")
rs.close
end if
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0052)http://www.ActiveEdu.net -->
<HTML><HEAD><TITLE>搜索</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<META content=FrontPage.Editor.Document name=ProgId>
<link rel="stylesheet" href="images/style.css">
<SCRIPT language=javascript>
function popwin2(id,path)
{ window.open("openarticle.asp?id="+id+"&ppath="+path,"");
}
</SCRIPT>
</HEAD>
<BODY bgcolor=#ffffff topmargin="0" >
<!--#include file="head_music.asp"-->
<table width=778 border=0 align="center" cellpadding=0 cellspacing=2 background="../images/bg2.gif">
<tr>
<td align=left valign=top width=22% height="150"><br>
<table width="140" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="426DB4">
<tr>
<td height="20" background="../images/biao_t.gif"> <font color="#FFFFFF"> </font><FONT
color=#ffffff>今日下载Top10</FONT></td>
</tr>
<tr>
<td bgcolor="#F7F7F7" height="20" valign="top"><br> <TABLE border=0 cellpadding=4 cellspacing=0 width=120 height="100" align="center">
<TR>
<TD background=images/a-27.gif bgcolor=#ffffff
valign=top width="120"><FONT style=line-height:150%>
<%
dim tdate
tdate=year(Now()) & "-" & month(Now()) & "-" & day(Now())
sql="select top 10 id,showname 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
%>
本日没有下载
<%else%>
<%do while not rs.eof%>
<LI><A href="list.asp?id=<%=rs("id")%>"><%=rs("showname")%></A></LI>
<%
rs.movenext
loop
end if
rs.close
%>
</FONT> </TD>
</TR>
</TABLE></td>
</tr>
</table>
<br>
<table width="140" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="426DB4">
<tr>
<td height="20" background="../images/biao_t.gif"> <font color="#FFFFFF"> </font><FONT
color=#ffffff>本周下载Top10</FONT></td>
</tr>
<tr>
<td bgcolor="#F7F7F7" height="20" valign="top"><br> <TABLE border=0 cellpadding=4 cellspacing=0 width=120 height="101" align="center">
<TR>
<TD width="120" height="101"
valign=top background=images/a-27.gif bgcolor=#ffffff><FONT style=line-height:150%>
<%
OldWeek = WeekDay(Date())-1
If OldWeek = 0 Then OldWeek = 7
OldWeek = Date()-OldWeek
NewWeek = Date()+(9-WeekDay(Date()))
sql="select top 10 id,showname from download where "
sql=sql&" (lasthits < #" & NewWeek & "#) And (lasthits > #" & OldWeek & "#) and stop=0 and weekhits>0 "
sql=sql&" order by weekhits desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
本周没有下载
<%else%>
<%do while not rs.eof%>
<LI><A href="list.asp?id=<%=rs("id")%>"><%=rs("showname")%></A></LI>
<%
rs.movenext
loop
end if
rs.close
%>
</FONT><FONT style=line-height:150%> </FONT> </TD>
</TR>
</TABLE></td>
</tr>
</table>
<br>
<table width="140" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="426DB4">
<tr>
<td height="20" background="../images/biao_t.gif"> <font color="#FFFFFF"> 软件搜索</font></td>
</tr>
<tr>
<td bgcolor="#F7F7F7" height="40" valign="top"><TABLE border=0 cellpadding=4 cellspacing=0 width=120 height="100" align="center">
<TR>
<TD background=images/a-27.gif bgcolor=#ffffff valign=top width="191">
<%
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from Nclass 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> <form method="post" name="myform" action="query.asp">
<input type="radio" name="action" value="title" checked>
名称
<input type="radio" name="action" value="content">
简介<br>
栏目:
<SELECT name="classid" size="1" id="classid" style="color:#008080;font-size: 9pt" onChange="changelocation(document.myform.classid.options[document.myform.classid.selectedIndex].value)">
<OPTION selected value="">未指定条件</OPTION>
<% sql = "select * from class"
rs.open sql,conn,1,1
do while not rs.eof
%>
<OPTION value="<%=trim(rs("classid"))%>"><%=trim(rs("class"))%></OPTION>
<%
rs.movenext
loop
rs.close
%>
</SELECT>
<BR>
分类:
<SELECT name="Nclassid" id="Nclassid" style="color:#008080;font-size: 9pt">
<OPTION selected value="">未指定条件</OPTION>
</SELECT>
<br>
<input type="text" name="keyword" class=smallinput size=14 value="关键字" maxlength="50" style="color:#008080;font-size: 9pt">
<input type="submit" name="Submit2" value="搜索" class="buttonface">
</form></TD>
</TR>
</TABLE></td>
</tr>
</table> </td>
<td width=78% height="160" align=middle valign=top bgcolor="#FFFFFF">
<TABLE border="0" width=90% align=center cellspacing="0" cellpadding="1">
<TR>
<TD valign="top" align="center" bgcolor="#FFFFFF">
<TABLE border="0" width="98%" cellspacing="0" cellpadding="0" align="center">
<TR bgcolor="#FFFFFF">
<TD width="3%" bgcolor="#FFFFFF" height="22"><IMG src="../images/arrow.gif" width="20" height="9"></TD>
<TD bgcolor="#FFFFFF" height="22" colspan="2"><a href="../default.asp">生活者姿态</a>>>
<%
response.write "查询条件:<font color=red>"&keyword&"</font>"
response.write "在"&classname&"的"&Nclassname&"中"
%>
</TD>
<TD colspan="3" bgcolor="#FFFFFF" height="22" background="images/n_line02.gif" width="29%"> </TD>
</TR>
<TR bgcolor="#FFFFFF">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -