<h3 style="border-bottom:1px solid #ccc;margin-bottom:10px;padding:5px">效果内容标识</h3>


<?php
 $sqlmain = "SELECT * from ".TABLE_CATE." where  pid='0' and modtype='blockdh' $andlangbh order by pos desc,id";
 $rowlistmain = getall($sqlmain);
 if($rowlistmain=='no') {
  echo '<p>&nbsp;&nbsp;还没有分类，请添加...</p>';
  }
  else{

  echo '<ul class="seolist ">';
   foreach($rowlistmain as $vmain){
        $pidnamemain=$vmain['pidname'];
        $namemain='<strong>'.decode($vmain['name']).'</strong>';

         echo '<li>';
       // echo '<h3><a target="_blank" href="../mod_category/mod_fefilecate.php?lang='.LANG.'">'.$namemain.'</a> - <span class="cgray">'.$pidnamemain.' </span></h3>';

 $sqlsub = "SELECT * from ".TABLE_CATE." where  pid='$pidnamemain' $andlangbh order by pos desc,id";
 $rowlistsub = getall($sqlsub);
 if($rowlistsub=='no') {
  echo '<p>&nbsp;&nbsp;还没有子分类，请添加...</p>';
  }
  else{
  ?>

 <?php
 echo '<ul class="seolist seolistcate">';
   foreach($rowlistsub as $vsub){

       $pidname=$vsub['pidname'];
       $name='<strong>'.decode($vsub['name']).'</strong>';


       echo '<li>';
        echo '<h3> '.$name .' - <span class="cgray">'.$pidname.' </span></h3>';


//----if sub sub cat------------------------
         $sqlsub_sub = "SELECT  *  from ".TABLE_CATE." where  pid='$pidname' $andlangbh order by pos desc,id";
         $row_sub = getall($sqlsub_sub);

      //----if sub sub cat------------------------
         if($row_sub<>'no'){
           echo '<ul>';
              foreach($row_sub as $v2_sub){
           $nameSub=decode($v2_sub['name']);
           $subpidname=$v2_sub['pidname'];

          echo '<li>';
          echo '<h3> '.$nameSub.' - <span class="cgray">'.$subpidname.' </span></h3>';
          echo '</li>';

        }
         echo '</ul>';

  }
  echo '</li>';
  }
  echo '</ul>';
}
//--------------
echo '</li>';
}
echo '</ul>';
}

?>

 