<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <TD width="191" height="1" bgcolor="#CCCCCC"></TD>
    <TD width="585" height="1" bgcolor="#CCCCCC"></TD>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="100%" height="1"></td>
  </tr>
  <tr> 

  </tr>
  <tr> 
    <td><div align="center"> 
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
          <tr> 
            <td> <table width='100%' border='0' cellspacing='2' cellpadding='0'>
                <%
sql = "SELECT top 16 * FROM link where pass_link=1 and link_class=1 ORDER BY id ASC" 
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1

do while NOT rs.EOF %>
                <tr> 
                  <%
for i=1 to 8
%>
                  <td width='20%' height="40">
                    <%
if not rs.eof then
%><a href="<%=rs("url")%>" target="_blank"><img src='<%=rs("logo")%>' alt="<%=rs("site_name")%>" width="88" height="31" border='0'></a></td>
                  <%
rs.movenext 
end if
next
%>
                </tr>
                <%
loop
rs.Close
set rs=nothing
%>
              </table>
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td> <table width='100%' border='0' cellspacing='0' cellpadding='0'>
                      <%
sql = "SELECT top 5 * FROM link where pass_link=1 and link_class=0 ORDER BY id ASC" 
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1

do while NOT rs.EOF %>
                      <tr align='center'> 
                        <%
for i=1 to 8
%>
                        <td width='20%'> 
                          <%
if not rs.eof then
%>
                          <a href="<%=rs("url")%>" target="_blank"><b><%=rs("site_name")%></b></a> 
                        </td>
                        <%
rs.movenext 
end if
next
%>
                      </tr>
                      <%
loop
rs.Close
set rs=nothing
%>
                    </table></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td></td>
          </tr>
        </table>
      </div></td>
  </tr>
</table>
