代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>久久网文搜索--分类文档</title>
<link href="/php/modpage/img/base.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {color: #000000}
-->
</style>

</head>

<body>
<table width="752" height="0%" border="0" align="center" cellpadding="0" cellspacing="0">
  <form action="/php/search.php" name="form1" method="get">
    <tr>
      <td width="19%" height="4"></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="26" rowspan="2" align="center"><div align="left">
          <div align="center"><a href="../index.html"><img src="../images/logo.gif" width="180" height="80" border="0"></a></div>
      </div></td>
      <td width="81%" height="22"><div align="center">
          <script src="/js/head.js" language="javascript"></script>
      </div></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td><div align="center"> 关 键 字:
              <input name="keyword" type="text" id="keyword" size="30">
  
          <input type="submit" name="Submit" value="开 始 搜 索 文 档">
      </div></td>
    </tr>
    <tr>
      <td colspan="6" height="4"></td>
    </tr>
  </form>
</table><table width="752"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#FFFFFF" class="style2">您的位置: <strong><a href="../index.html">首页</a> >>网络文档分类</strong></td>
  </tr>
</table>

<table width="752" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td> </td>
  </tr>
</table>
<?
require_once("config.php");
$conn = connectMySql();
$sql = "";
$sql = "Select id,typename,typedir,defaultname  From dede_arttype where reID= 0";
$rs = mysql_query($sql,$conn);
$id1 = 1;
echo "<table width='752' border='0' align='center' cellpadding='0' cellspacing='0'>\r\n";
while($row=mysql_fetch_object($rs))
       {
               $id = $row->id;
              $typename = $row->typename;
                $typedir = $row->typedir;
                 $defaultname = $row->defaultname;
                 echo "<td width='15' height='15'><div align='center'><img src='../images/star.gif' width='15' height='15'></div></td>\r\n";
              echo "<td width='349' valign='middle'><div align='left'><a href='/html/$typedir/$defaultname'>$typename</a></div></td>\r\n";
              echo " <tr>";
           echo "<td height='46' colspan='2'>";
           $sql2 = "Select id,typename,typedir,defaultname  From dede_arttype where reID= $id";
           $rs1 = mysql_query($sql2,$conn);
           $id1++;
              while($row=mysql_fetch_object($rs1))
                  {
              $rtypename = $row->typename;
                $rtypedir = $row->typedir;
                 $rdefaultname = $row->defaultname;
                 echo "<a href='/html/$rtypedir/$rdefaultname'>[$rtypename]</a>  " ;
                  }        
           echo "</td>";
                echo "</tr>";

                 }
       
       echo "</table>";
?>
</body>
</html>