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


