<table width=170 border=1 align="center" cellPadding=1 cellSpacing=0 borderColor=#f6f6f6 borderColorLight=#ffcc00>
  <tbody> 
  <TR> 
      <TD height="20" align="center" bgcolor="#ffcc00">·ÖÀàµ¼º½</TD>
           </TR> 
   <tr>     
                <td valign="top" height="34" width="%100"> 
                  <table width="176" border="0" cellspacing="3" align="center">
                            <tr> 
                              <td height="90"> 
                                <?
$result = $DB->query("select * from buys_class where classid='$classid'",$dbbase);
while ($classrows=mysql_fetch_array($result))
{
?>
                                <table cellspacing=0 cellpadding=2 width="100%" border=0>
                                        <tbody>
                                          <tr align=middle> 
                                            
                              
                    <td height=30 colspan="2"><font color="#FF0000"><IMG height=15 
                                src="../mainimg/dot.gif" width=15><a 
                  href="../buy_class.php?classid=<?=$classrows[classid] ?>"><strong> 
                      <?=$classrows[classname] ?>
                      </strong></a></font></td>
                                          </tr>
                                          <?
$result2 = $DB->query("select class2id,classname from buys_class where cid='$cid'",$dbbase);
$i=1;
while ($sclassrows=mysql_fetch_array($result2))
{
if($cid==$sclassrows[class2id]) $classname=$sclassrows[classname];
if (($i+1)%2==0)
{
?>
                                          <tr align=left> 
                                            <td width="55%">&nbsp;<a 
                  href="../buy_class2.php?classid=<?=$classrows[classid] ?>&class2id=<?=$sclassrows[class2id] ?>"> 
                                              <?=$sclassrows[classname] ?>
                                              </a></td>
                                            <td> 
                                              <?
}
else
{
?>
                                              <a 
                  href="../buy_class2.php?classid=<?=$classrows[classid] ?>&class2id=<?=$sclassrows[class2id] ?>"> 
                                              <?=$sclassrows[classname] ?>
                                              </a></td>
                                          </tr>
                                          <?
}
$i++;
}
?>
                                        </tbody>
                                      </table>
                                <?
}
?>
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                      </tbody> 
                    </table>
