
  <table class="formtab"> 

 <tr>
    <td class="tl" colspan="2" style="border:0">
      <div class="" style="display:inline-block">
        <ul  class="nav nav-tabs" >
       
          <li class="active"> <a href="#a2" data-toggle="tab"> 组合区块 </a> </li>
          <li class=""> <a href="#a3" data-toggle="tab"> prog文件 </a> </li>
         
        </ul>
      </div>
</td>
</tr>

<tr>
    <td class="tl" colspan="2" style="border:0">
        <div   class="tab-content">
         
 


<div class="tab-pane fade  in  active" id="a2">
 
<?php

//-----group block-------------
 $sql = "SELECT name,pidname,pidstylebh from ".TABLE_BLOCKGROUP." where pid='0' $andlangbh  order by pidstylebh ,pos desc,id desc";
 
  if(getnum($sql)>0){
 $rowlist = getall($sql);
 
 echo '<ul>';
      
     foreach($rowlist as $v){
         
         
           $name = $v['name'];
           $pidname = $v['pidname'];  
            
      
          echo '<li>'.admblockid($pidname).' '.adm_previewlink($pidname).$name.'</li>';
     
             }
             echo '</ul>';
           }
  else { echo '没有记录...';}
  ?>
</div><!--end tab-pane-->

<div class="tab-pane fade" id="a3">

            <?php
           
                  $filedir = SYSBLOCKROOT.'prog/';
                  if(is_dir($filedir)){
                    $filearr = getFile($filedir);
                    echo '<ul>';
                        foreach ($filearr as $v) {
                            $v = substr($v,0,-4);
                             echo '<li> '.admblockid($v).' </li>';
                        }

                        echo '</ul>';

                    }
                    else{
                        echo '<option>'.$filedir.' 目录不存在</option>';
                    }

              ?>


</div><!--end tab-pane-->
 


  </div> <!--end tab-content-->
</td>
</tr>
 </table>

 