企业站群网站调用栏目的一级类别和二级类别同时调用方法

日期: 2021-09-23 12:32:45 人气: -

  • <ul class="yiji">    


  •     <?php


  • $dosql->Execute("SELECT * FROM `#@__infoclass` WHERE parentid=5  ORDER BY orderid ASC");


  • while($row = $dosql->GetArray())


  • {


  • if($cfg_isreurl=='Y')


  • $gourl = 'product-'.$row['id'].'-1.html';


  • else


  • $gourl = 'product.php?cid='.$row['id'];




  • echo '<li><a href="'.$gourl.'"';


  • if($tid == $row['id']) echo '';


  •                                         echo '><h3>'.$row['classname'].'</h3></a><ul>';



  • $dosql->Execute("SELECT * FROM `#@__infoclass` WHERE `parentid`=".$row['id']." AND `checkinfo`=true ORDER BY orderid ASC",$row['id']);


  • while($row2 = $dosql->GetArray($row['id']))


  • {


  • if($cfg_isreurl=='Y')


  • $gourl = 'product-'.$row2['id'].'-1.html';


  • else


  • $gourl = 'product.php?cid='.$row2['id'];




  • echo '<li><a href="'.$gourl.'"';


  • if($tid == $row2['id']) echo 'class="on"';


  • echo '>'.$row2['classname'].'</a></li>';


  • }



  • echo '</ul></li>';


  • }


  • ?>


  • </ul>