

<tr style="background:#dce8f4">
        <td class="tr fb">效果文件：</td>
        <td>
 <?php

 
  $filedir1 = BLOCKROOT.$typecur.'/';
  $filearr1 = getFile($filedir1);

  //$filearr3 = array('nofile'=>'无文件');
 
 if($ppid4<>'comm') {

    if($ppid4=='dmre')  $filedir2 = REGIONROOT.$ppid.'/dmreblock/'.$typecur.'/';
    if($ppid4=='styl')  $filedir2 = TPLCURROOT.'selfblock/'.$typecur.'/';

if(is_dir($filedir2)){
 $filearr2 = getFile($filedir2); 
 $filearr = array_merge($filearr2,$filearr1);
}
else  $filearr = $filearr1 ;

 }
 else  $filearr = $filearr1 ;

//pre($filearr);
 //$filedirself = TPLCURROOT.'selfblock/'.$type.'/';
 //echo $filedirself;
// if(is_dir($filedirself)) {
 //$filearr2 = getFile($filedirself);
 //$filearr = array_merge($filearr,$filearr2);
 // }

//$filedir = BLOCKROOT.$type.'/';
//$filedirself = TPLCURROOTADMIN.'mbblock/'.$type.'/';
echo  '<select name="template">';
select_from_arr2($filearr,$template,'');
 //select_from_filearr($filedir,$template);
//select_from_filearr2($filedir,$filedirself,$template);
echo '</select>';


if($template<>''){
 if(substr($template,0,5)=='self_')  $file =  TPLCURROOT.'selfblock/'.$typecur.'/'.$template;
 else  if(substr($template,0,5)=='dmre_')   $file = REGIONROOT.$ppid.'/dmreblock/'.$typecur.'/'.$template;
 else    $file =  BLOCKROOT.$typecur.'/'.$template;
 
   checkfile($file) ;

}
    ?>



</td>
    </tr>
