全部的.
<!-- #include file ="adovbs.inc"-->
<%
Sub ShowOnePage(rs,Page) '过程
Response.Write"<left><table width=761 class=ba height=20 border=0 cellpadding=0 cellspacing=0 bordercolor=#000000 >"
response.write"<tr bgcolor=#666666>"
'response.write"<td>编号</td>" '添加编号
'for i=0 to 2'rs.fields.count-1 '0到2列.表示有3列.多列用rs.fields.count-1 表示(循环语句)
response.write"<td width=551><font color=#ffffff><strong>软件名称</strong></font></td><td width=70><font color=#ffffff>加入时间</font></td><td width=70><font color=#ffffff>软件大小</font></td><td width=70><font color=#ffffff>软件等级</font></td>"
'next ,对应(for i.......)
response.write"</tr>"
response.write"</table></left>"
response.write"<left><table height=20 border=0 cellpadding=0 cellspacing=0>"
rs.AbsolutePage=Page
for iPage=1 to rs.pageSize
response.write"<tr>"
RecNo=(Page-1)*rs.pageSize +iPage
'response.write"<td>"&RecNo&"</td>"'自动生成添加编号
'for i=0 to rs.fields.count-1
response.write"<td width=551 class=ba height=40>"&rs.Fields(0).Value&"<br> • "&rs.Fields(4).Value&"....</td><td width=70 class=ba>"&rs.Fields(1).Value&"</td><td width=70 class=ba>"&rs.Fields(2).Value&"</td><td width=70 class=ba>"&rs.Fields(3).Value&"</td>"'对应字段值
response.write"</tr>"
'next
rs.moveNext
if rs.eof then exit for
next
response.write"</table></left>"
end Sub
%>
<%
function openOrGet_Database(DbPath,SessionName)
dim objconn
if not IsObject(session(SessionName)) then '如果还没有连接数据库时,则创建连接
set objconn=server.createobject("adodb.connection")
'dbpath =server.mappath("Secretary.mdb")
''objconn.open "driver={microsoft access driver (*.mdb)};DefaultDir=;dbq=" & dbpath
' 与数据库建立连接
'--------------------SQL连接的开始
dim ConnStr
ConnStr = "Provider = Sqloledb; User ID =ati; Password = 7758; Initial Catalog =ati; Data Source =(local);"
objconn.open ConnStr
'--------------------SQL连接的结束
set session(SessionName)=objconn
end if
set openOrGet_Database=session(SessionName)
end function
%>
<%
function openOrGet_RsAndPageSize(objconn,sql,SessionName,pagesize)
dim rs
if not IsObject(session(SessionName)) then '如果还没有连接数据库时,则创建连接
set rs=server.createobject("adodb.recordset")
rs.open sql,objconn,adOpenStatic
set session(SessionName)=rs
rs.pagesize=pagesize
end if
set openOrGet_RsAndPageSize=session(SessionName)
end function
%>
<%
function open_RsAndPageSize(objconn,sql,SessionName,pagesize)
dim rs
set rs=server.createobject("adodb.recordset")
rs.open sql,objconn,adOpenKeyset
set session(SessionName)=rs
rs.pagesize=pagesize'一页的行数
set open_RsAndPageSize=session(SessionName)
end function
%>
<%
dim strSQL,v_name
v_name=request.form("name") '定义接收表单结果
strSQL="select soft_three_name,soft_time,soft_size,soft_grading,substring(soft_explain,1,40) soft_url from soft_three where soft_three_name like '%"+v_name+"%'"
'set objconn=openOrGet_Database(server.mappath("Secretary.mdb"),"ly")
set objconn=openOrGet_Database("","ly") '连接SQL SERVER 数据库
if request("page")="" then
set rs=open_RsAndPageSize(objconn,strSQL,"ly",6)
else
set rs=openOrGet_RsAndPageSize(objconn,strSQL,"ly",6)
end if
page=CLng(request("page"))
if page<1 then page=1
if page>rs.pagecount then page=rs.pagecount
%>
<html>
<head>
<title>搜索结果</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #666666;
}
body {
margin-left: 2px;
margin-right: 2px;
margin-top: 2px;
}
a:link {
text-decoration: none;
color: #0033CC;
}
a:visited {
text-decoration: none;
color: #0033CC;
}
a:hover {
text-decoration: underline;
color: #333333;
}
a:active {
text-decoration: none;
color: red;
}
.unnamed1 {
height: 18px;
font-size: 11px;
}
.unnamed2 {
height: 12px;
}
.unnamed3 {
height: 20px;
}
.style1 {color: #FFFFFF}
.style2 {color: #000000}
.style3 {font-family: Wingdings}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function addToFavorite(favTitle){
if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
window.external.AddFavorite(location.href, unescape(favTitle));
}
}
//-->
</script>
<link href="../css/link.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style6 {font-family: Wingdings; color: #999999; }
.style7 {color: #FF9966}
.color1 {
color: #000000;
}
.ba {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #E48707;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100%" height="403" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100%" height="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="1" height="2"></td>
<td width="100%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100%" height="2"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="554" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="109" height="501"> </td>
<td width="761" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="24" colspan="2" valign="top"><!-- #BeginLibraryItem "/Library/navigation.lbi" --><table width="760" height="24" border="0" cellpadding="0" cellspacing="0" bgcolor="#999999">
<tr>
<td width="540" class="style1"> <strong><a href="#"><font color="#ffffff">首页</font></a></strong> <span class="style2">| </span> <a href="#"><font color="#ffffff">软件分类</font></a> <span class="style2">| </span> <a href="#"><font color="#ffffff">最新更新</font></a> <span class="style2">| </span> <a href="#"><font color="#ffffff">下载排行</font></a> <span class="style2">| </span> <a href="http://www2.fixdown.com/ip/" target="_blank"><font color="#ffffff">IP地址查询</font></a> <span class="style2">| </span> <a href="http://www.fixdown.com/speed.asp" target="_parent"><font color="#ffffff">网速测试</font></a> <span class="style2">| </span> <a href="http://www2.fixdown.com/weather/index.asp" target="_blank"><font color="#ffffff">天气预报</font></a></td>
<td width="220"><div align="right">
<div align="right"><span class="style1"><a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('#');"><font color="#cc0033">设为主页</font></a>
<a href="#" onClick="addToFavorite('星零软件站')"><font color="#cc0033">加入收藏</font></a> </span></div>
</div></td>
</tr>
</table><!-- #EndLibraryItem --></td>
</tr>
<tr>
<td height="4" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="760" height="4"></td>
</tr>
</table></td>
</tr>
<tr>
<td width="180" height="60" valign="top"><!-- #BeginLibraryItem "/Library/logo.lbi" --><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="180" height="60"><img src="../tp1/logo.jpg" width="180" height="60"></td>
</tr>
</table><!-- #EndLibraryItem --></td>
<td width="581" valign="top"><!-- #BeginLibraryItem "/Library/ad1.lbi" --><table width="580" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="460" height="60" valign="top"><table width="460" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="460" height="60"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="460" height="60">
<param name="movie" value="../tp1/ggt.swf">
<param name="quality" value="high">
<embed src="../tp1/ggt.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="460" height="60"></embed>
</object></td>
</tr>
</table></td>
<td width="120" valign="top"><table width="120" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="120" height="60"><img src="../tp1/gg2.jpg" width="120" height="40"></td>
</tr>
</table></td>
</tr>
</table><!-- #EndLibraryItem --></td>
</tr>
<tr>
<td height="4" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="760" height="4"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" colspan="2" valign="top"><!-- #BeginLibraryItem "/Library/navigation2.lbi" --><table width="760" height="22" border="0" cellpadding="0" cellspacing="0" class="link">
<tr>
<td bgcolor="#666666"><div align="center"><span class="style12 style1">
<a href="../network/index.htm"><font color="#ffffff">网络工具</font></a> |
<a href="../sys/index.htm"><font color="#ffffff">系统工具</font></a> |
<a href="../media/index.htm"><font color="#ffffff">多媒体类</font></a> |
<a href="../image/index.htm"><font color="#ffffff">图形图象</font></a> |
<a href="../apply/index.htm"><font color="#ffffff">应用软件</font></a> |
<a href="../industry/index.htm"><font color="#ffffff">行业软件</font></a> |
<a href="../chat/index.htm"><font color="#ffffff">网络聊天</font></a> |
<a href="../safety/index.htm"><font color="#ffffff">安全相关</font></a> |
<a href="../programme/index.htm"><font color="#ffffff">编程开发</font></a> |
<a href="../code/index.htm"><font color="#ffffff"> 源码下载</font></a> |
<a href="../book/index.htm"><font color="#ffffff">电子书库</font></a></span></div></td>
</tr>
</table><!-- #EndLibraryItem --></td>
</tr>
<tr>
<td height="2" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="760" height="2"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="24" colspan="2" valign="top"><!-- #BeginLibraryItem "/Library/search.lbi" -->
<link href="../css/sosu.css" rel="stylesheet" type="text/css">
<form action="search.asp" method="post" name="form" target="_blank" style="margin:0px;">
<table width="760" height="22" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#CCCCCC"> 站内搜索:
<input name="text" type="text" class="sosu" size="14" maxlength="60">
<select name="select" class="unnamed1">
<option selected>软件下载</option>
</select>
<input name="Submit" type="submit" class="unnamed3" value="搜索"></td>
</tr>
</table>
</form>
<!-- #EndLibraryItem --></td>
</tr>
<tr>
<td height="3" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="760" height="3"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="60" colspan="2" valign="top"><!-- #BeginLibraryItem "/Library/ad2.lbi" --><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="760" height="60" valign="top"><img src="../tp1/gg3.jpg" width="760" height="60"></td>
</tr>
</table><!-- #EndLibraryItem --></td>
</tr>
<tr>
<td height="3" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="760" height="3"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="295" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="761" height="295" valign="top"><table width="761" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<%
ShowOnePage rs,Page
%>
<table width="760" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><form action="search.asp?" method="get">
<%
if page<>1 then
response.write"<a href=search.asp?page=1>第一页</a> "
response.write"<a href=search.asp?page="&(page-1)&">上一页</a> "
end if
if page<>rs.pagecount then
response.write"<a href=search.asp?page="&(page+1)&">下一页</a> "
response.write"<a href=search.asp?page="&rs.pagecount&">最后一页</a> "
end if
%>
输入页数:
<input name="page" type="text" id="page" size="3">
页数:<font color= face=""#FF0000""><%=page%>/<%=rs.pagecount%></font>
</form></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="118"> </td>
</tr>
<tr>
<td height="13"> </td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="761" height="13"> </td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td height="20"> </td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="761" height="20"> </td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td height="20"> </td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="761" height="20"> </td>
</tr>
</table></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="12"> </td>
</tr>
</table>
</body>
</html>