日期:2014-05-16  浏览次数:21429 次

求助一个ASP页面的整合
<!--#include file=conn2.asp-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {font-size: 12px}
.bb {
font-size: 14px;
color: #006699;
text-decoration: underline;
}
.style2 {text-decoration: underline; color: #006699;}
-->
</style></head>

<body>
<%
if session("login")=true then 

%>
<table width="59%" height="15"  border="0" align="center">
  <tr>
    <td width="17%" nowrap><div align="center" class="style1">机构编号</div></td>
    <td width="49%" nowrap><div align="center" class="style1">机构名称</div></td>
    <td width="34%" nowrap><div align="center" class="style1">操作</div></td>
  </tr>
  <% dim i
  i=1
   sql="select * from struct" 
    rs.open sql,conn,1,1
do until rs.eof  
if i mod 2 =1 then
%>
  <tr bgcolor="#CCFFCC">
    <td height="15"><div align="center" class="style1"><%=rs("id")%></div></td>
    <td height="15"><a href="../showstruct.asp?id=<%=rs("id")%>"><span class="style1"><%=rs("name")%></span></a></td>
    <td height="15"><div align="center" class="style1"><a href="modify.asp?id=<%=rs("id")%>"><span class="style2">修改</span></a>/<a href="do.asp?id=<%=rs("id")&d_type=3 %>"><span class="style2">删除</span></a></div></td>
  </tr>
  <%
  elseif i mod 2 =0 then
  %>
  <tr bgcolor="#CCCCFF">
    <td height="15"><div align="center" class="style1"><%=rs("id")%></div></td>
    <td height="15"><a href="../showstruct.asp?id=<%=rs("id")%>"><span class="style1"><%=rs("name")%></span></a></td>
    <td height="15"><div align="center" class="style1"><a href="modify.asp?id=<%=rs("id")%>"><span class="style2">修改</span></a>/<a href="do.asp?id=<%=rs("id")&d_type=3 %>"><span class="style2">删除</span></a></div></td>
  </tr>

<%
end if
i=i+1
rs.movenext
loop
%>
</table>
</body>
</html>
<%
rs.close
conn.close
else
response.write("<script language=javascript>window.location.href='../login.asp';target='_parent'</script></body></html>") 
end if
%>

上面的这些是旧的页面,因为数据太多的缘故,现在我想把下面的这些东西跟上面的整合起来,使页面变成树型结构。
<% 
数据库连接
set conn=Server.CreateObject("ADODB.Connection")
conn.open "driver={SQL Server};server=PC-201201311344\SQL2005;DATABASE=wlgj;UID=sa;PWD=123456789"