<%
dim mdbsj,jm_conn,jm_rs,rs1
mdbsj="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("zgzm.asp")
Set jm_conn=Server.CreateObject("ADODB.CONNECTION")
Set jm_rs=Server.CreateObject("ADODB.RecordSet")
jm_conn.open mdbsj
set rs1=jm_conn.execute("select * from lb")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body topmargin=0 leftmargin=0>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
      <tr>
        <td width="100%">

  <div align="center">
    <center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  
    <tr> 
                  <th width="95"  background=../images/f_bg1.jpg height=22> 
                    <div align="center"><b><font size="2">类别</font></b></div>
    </th>
                  <th background=../images/f_bg1.jpg height=22><b><font size="2">解梦内容</font></b></th> 
  </tr>
  <%do while not(rs1.eof or rs1.bof)%>
  
    <tr> 
      <td height="4" colspan="2"> 
    </td>
  </tr>
  <tr> 
      <td width="100" valign="middle"> 
        <div align="center"><font size="2"><%=rs1("lb")%></font></div>
    </td>
    <%jm_rs.open "select id,a,b from zgjm where a="&rs1("id"),jm_conn%>
      <td height="30"> 
        <%if jm_rs.eof or jm_rs.bof then
			response.write "<font color=red><b>此类别暂无任何内容！</b></font>"
		else
			do while not (jm_rs.eof or jm_rs.bof)
				response.write "<a href='#' onClick=window.open('jm.asp?id="&jm_rs("id")&"','','scrollbars=yes,left=70,resizable=yes,width=550,height=340')>"&jm_rs("b")&"</a> "
				jm_rs.movenext
			loop
			jm_rs.close
		end if%>
      </td>
  </tr>
  <%rs1.movenext
  loop
  rs1.close
  set rs1=nothing
  set jm_rs=nothing
  jm_conn.close
  set jm_conn=nothing%>
  <tr> 
      <td width="95" height="5" valign="middle" colspan="2"> 
    </td>
  </tr>
</table>
    </center>
  </div>
        </td>
      </tr>
    </table>


