<!--数据库表
if exists (select * from dbo.sysobjects where id = object_id(n[dbo].[cat]) and objectproperty(id, nisusertable) = 1)
drop table [dbo].[cat]
go
create table [dbo].[cat] (
[cat_id] [int] identity (1, 1) not null ,
[cat_name] [nvarchar] (50) collate chinese_prc_ci_as null ,
[cat_parent] [int] null
) on [primary]
go
-->
<%
mm_v2boy_string = "driver={microsoft access driver (*.mdb)};dbq=d:\v2boy.mdb"
dim rscat__mmcolparam
rscat__mmcolparam = "1"
if (request.querystring("cat_parent") <> "") then rscat__mmcolparam = request.querystring("cat_parent")(1)
response.write request.querystring & "<hr>" & rscat__mmcolparam
response.end
%>
<%
set rscat = server.createobject("adodb.recordset")
rscat.activeconnection = mm_v2boy_string
rscat.source = "select cat_id, cat_name, cat_parent from cat where cat_parent = " + replace(rscat__mmcolparam, "", "") + ""
rscat.cursortype = 0
rscat.cursorlocation = 2
rscat.locktype = 3
rscat.open()
rscat_numrows = 0
%>
<%
dim repeat1__numrows
repeat1__numrows = -1
dim repeat1__index
repeat1__index = 0
rscat_numrows = rscat_numrows + repeat1__numrows
%>
<html>
<head>
<title>îäµµ×êáï</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#ffffff" text="#000000">
<%
dim request_all
if request.querystring <> "" then request_all = "&" & request.querystring
%>
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<td><a href="data.asp">îäµµ×êáï</a>
<%
dim i,j,h
j = request.querystring("cat_parent").count
for i = 1 to j
for i = j to 1 step -1
response.write "<a href=data.asp?"
for h = (j - i + 1) to j
for h = j to (j - i + 1) step -1
response.write "cat_parent=" & request.querystring("cat_parent")(h) & "&cat_name=" & request.querystring("cat_name")(h)
if h <> j then
response.write("&")
end if
next
response.write "<br>"
response.write ">" & request.querystring("cat_name")(j-i+1) & "</a> "
next
response.write "<br>"
while ((repeat1__numrows <> 0) and (not rscat.eof))
%>
<% if not rscat.eof or not rscat.bof then %>
<a href="data.asp?cat_parent=<%=(rscat.fields.item("cat_id").value)%>&cat_name=<%=(rscat.fields.item("cat_name").value)%><%=request_all%>"><%=(rscat.fields.item("cat_name").value)%></a>
<% end if end not rscat.eof or not rscat.bof %>
<%
repeat1__index=repeat1__index+1
repeat1__numrows=repeat1__numrows-1
rscat.movenext()
wend
%>
</td>
</tr>
</table>
</body>
</html>
<%
rscat.close()
%>
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!


