📄 search_soft.asp
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!-- #include file="conn.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/function.asp" -->
<%
strTitle="高级搜索"
strHeader=replace(strHeader,"$Title$",""&strTitle&"")
strHeader=replace(strHeader,"</HEAD>","</HEAD>"&Copyright&"")
Response.Write(replace(strHeader,"../","./"))
%>
<table width="770" border="0" align="center" cellpadding="5" cellspacing="1">
<tr>
<td colspan="4"><a href="Search_Soft.asp"><img src="images/search.gif" width="79" height="32" border="0" align="absmiddle"></a></td>
</tr>
</table>
<%
set rs=server.createobject("adodb.recordset")
if Trim(Request("action"))="soft" then
if Trim(Request("keyword"))="" then
call Sysmsg("软件搜索","<li>Sorry!请输入关键字后再进行搜索。")
else
call Search_Soft()
end if
elseif Trim(Request("action"))="artilce" then
if Trim(Request("keyword"))="" then
call Sysmsg("文章搜索","<li>Sorry!请输入关键字后再进行搜索。")
else
call Search_Article()
end if
else
call main()
end if
set rs=nothing
sub main()
%>
<SCRIPT src="js/calendar.js"></SCRIPT>
<SCRIPT LANGUAGE=javascript>
function CheckForm1()
{
if (form_soft.DateTime.value !=="")
{
if (chkDate(form_soft.DateTime.value)==false) {
alert("你设置的日期格式不正确!");
form_soft.DateTime.focus();
return (false);
}
}
}
function CheckForm2()
{
if (form_article.DateTime.value !=="")
{
if (chkDate(form_article.DateTime.value)==false) {
alert("你设置的日期格式不正确!");
form_article.DateTime.focus();
return (false);
}
}
}
function chkDate(sDate){
var r=/\d{4}(?:-\d{1,2}){0,2}/
//正则表达式,判断是否为yyyy-mm-dd,yyyy-mm,yyyy格式
if(sDate.match(r)==sDate){
var arr=sDate.split("-")
switch(arr.length){
//根据不同的yyyy-mm-dd,yyyy-mm格式判断年月日数字是否正确
case 3:
var tmpDate=new Date(arr[0],arr[1],arr[2]);
if(tmpDate.getMonth()==arr[1] && tmpDate.getFullYear()==arr[0]) return true;
break;
case 2:
if(arr[1]<13) return true;
break;
default:
return false;
}
}
return false;
}
</script>
<table width="770" border="0" align="center" cellpadding="5" cellspacing="1">
<tr>
<form name="form_soft" method="post" action="" onSubmit="return CheckForm1();">
<tr bgcolor="#E7E7E7">
<td colspan="4" align="center">软件搜索
<input name="action" type="hidden" value="soft"></td>
</tr>
<tr>
<td width="15%" bgcolor="#F7F7F7">包含的关键字</td>
<td colspan="3" bgcolor="#F7F7F7">(同时查询多个条件使用'<font color=#FF0000>or</font>' 分隔关键字,查询同时满足某条件使用'<font color=#FF0000>and</font>'分隔关键字)<br>
<input name="keyword" type="text" size="50" maxlength="80"></td>
</tr>
<tr>
<td width="15%" bgcolor="#F7F7F7">软件分类为</td>
<td width="35%" bgcolor="#F7F7F7"><select name="catalog">
<% Response.Write( Catalog_Select(0,"SoftDown")) %>
</select></td>
<td width="15%" bgcolor="#F7F7F7">搜索范围</td>
<td bgcolor="#F7F7F7"><select name="selby" id="selby">
<option value="1">搜索软件名称</option>
<option value="2">搜索软件简介</option>
<option value="0">两者都搜索</option>
</select></td>
</tr>
<tr>
<td width="15%" bgcolor="#F7F7F7">软件类型为</td>
<td width="35%" bgcolor="#F7F7F7"><select name="softtype">
<option value="">所有软件</option>
<% for i = 0 to ubound(SoftType)
Response.Write("<option value="""&SoftType(i)&""">"&SoftType(i)&"</option>")
Next
%>
</select></td>
<td width="15%" bgcolor="#F7F7F7">授权类型为</td>
<td bgcolor="#F7F7F7"><select name="LicenceType">
<option value="">所有软件</option>
<% for i = 0 to ubound(LicenceType)
Response.Write("<option value="""&LicenceType(i)&""">"&LicenceType(i)&"</option>")
Next
%>
</select></td>
</tr>
<tr>
<td width="15%" bgcolor="#F7F7F7">软件语言为</td>
<td width="35%" bgcolor="#F7F7F7"><select name="Language">
<option value="">所有软件</option>
<% for i = 0 to ubound(Language)
Response.Write("<option value="""&Language(i)&""">"&Language(i)&"</option>")
Next
%>
</select></td>
<td width="15%" bgcolor="#F7F7F7">运行系统包含</td>
<td bgcolor="#F7F7F7"><select name="System">
<option value="">所有软件</option>
<% for i = 0 to ubound(System)
Response.Write("<option value="""&System(i)&""">"&System(i)&"</option>")
Next
%>
</select></td>
</tr>
<tr>
<td width="15%" bgcolor="#F7F7F7">开发商网址包含</td>
<td width="35%" bgcolor="#F7F7F7"><input name="SoftFrom" type="text" id="RegURL" size="30" maxlength="50"></td>
<td width="15%" bgcolor="#F7F7F7">作者Email包含</td>
<td bgcolor="#F7F7F7"><input name="Email" type="text" id="Email" size="30" maxlength="50"></td>
</tr>
<tr>
<td bgcolor="#F7F7F7">加入时间为</td>
<td bgcolor="#F7F7F7"><input name="DateTime" type="text" id="DateTime" size="12" maxlength="10">
以来
<input type="button" name="Submit2" value="选择日期" onclick="showCalendar(DateTime,325,220);"></td>
<td bgcolor="#F7F7F7"> </td>
<td bgcolor="#F7F7F7"> </td>
</tr>
<tr align="center">
<td colspan="4" bgcolor="#F7F7F7"><input type="submit" name="Submit" value=" 搜 索 "></td>
</tr>
</form>
</table>
<table width="770" border="0" align="center" cellpadding="5" cellspacing="1">
<form name="form_article" method="post" action="Search_Article.asp" onSubmit="return CheckForm2();">
<tr align="center" bgcolor="#E7E7E7">
<td colspan="4">文章搜索 <input name="action" type="hidden" value="article"></td>
</tr>
<tr>
<td bgcolor="#F7F7F7">包含的关键字</td>
<td colspan="3" bgcolor="#F7F7F7">(同时查询多个条件使用'<font color=#FF0000>or</font>' 分隔关键字,查询同时满足某条件使用'<font color=#FF0000>and</font>'分隔关键字)<br>
<input name="keyword" type="text" size="50" maxlength="100"></td>
</tr>
<tr>
<td width="15%" bgcolor="#F7F7F7">文章分类为</td>
<td width="35%" bgcolor="#F7F7F7"> <select name="catalog">
<% Response.Write( Catalog_Select(0,"info")) %>
</select> </td>
<td width="15%" bgcolor="#F7F7F7">搜索范围</td>
<td width="35%" bgcolor="#F7F7F7"> <select name="selby" id="selby">
<option value="1">搜索文章标题</option>
<option value="2">搜索文章内容</option>
<option value="0">两者都搜索</option>
</select> </td>
</tr>
<tr>
<td bgcolor="#F7F7F7">加入时间为</td>
<td bgcolor="#F7F7F7"><input name="DateTime" type="text" id="DateTime" size="12" maxlength="10">
以来
<input type="button" name="Submit2" value="选择日期" onclick="showCalendar(DateTime,325,400);"></td>
<td bgcolor="#F7F7F7"> </td>
<td bgcolor="#F7F7F7"> </td>
</tr>
<tr align="center">
<td colspan="4" bgcolor="#F7F7F7"><input type="submit" name="Submit" value=" 搜 索 "></td>
</tr>
</form>
</table>
<table width="770" border="0" align="center" cellpadding="5" cellspacing="1">
<tr bgcolor="#E7E7E7">
<td colspan="2" align="center">其他搜索</td>
</tr>
<form action="http://www.google.com/search" name=f target=_blank>
<tr>
<td width="15%" bgcolor="#F7F7F7"><a href="http://www.google.com/intl/zh-CN/" target="_blank"><img src="images/google.gif" width="75" height="32" border="0" align="absmiddle"></a></td>
<td bgcolor="#F7F7F7"><input maxLength=256 size=50 name=q value=""> <input name=hl type=hidden value=zh-CN>
<input type=submit value="Google搜索" name=btnG> <a href="http://www.google.com/intl/zh-CN/help.html" target="_blank">Google
搜索帮助</a> <br> <input type=radio name=lr value="" checked>
搜索所有网站 <input type=radio name=lr value=lang_zh-CN|lang_zh-TW >
搜索所有中文网页 <input type=radio name=lr value=lang_zh-CN >
搜索简体中文网页 </td>
</tr>
</form>
<SCRIPT language=javascript>
function gowhere(formname)
{
var url;
if (formname.myselectvalue.value == "0")
{
url = "http://www1.baidu.com/baidu";
document.search_form.tn.value = "zqcharm";
formname.method = "get";
}
if (formname.myselectvalue.value == "1")
{
url = "http://mp3search.baidu.com/wstsearch";
document.search_form.tn.value = "baidump3";
document.search_form.ct.value = "134217728";
document.search_form.lm.value = "-1";
formname.method = "get";
}
if (formname.myselectvalue.value == "2")
{
document.search_form.tn.value = "flash";
document.search_form.ct.value = "33554432";
url = "http://flash.baidu.com/wstsearch";
}
if (formname.myselectvalue.value == "3")
{
document.search_form.tn.value = "baiduwstui";
document.search_form.ct.value = "83886080";
url = "http://www1.baidu.com/wstsearch";
}
formname.action = url;
return true;
}
</SCRIPT>
<FORM name=search_form onsubmit="return gowhere(this)" target=_blank>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -