<?php  
 //Global $andlangbh;    
			 $sql2 = "SELECT * from ".TABLE_REGION." where pidname='$regionpidname'    $andlangbh order by id";
			 if(getnum($sql2)>0){
				$row2 = getrow($sql2);
			   // pre($row2);
				$cssnamepar = $row2['cssname'];
				//$regioneffect = $row2['effect']; 
				$regioneffect = 'default.php';
				$haswow = $row2['haswow'];
				$addcss_reg2 = $row2['addcss'];
				$addjs_reg2 = $row2['addjs'];
				if($addcss_reg2<>'') getcssjs($addcss_reg2,'');
				if($addjs_reg2<>'') getcssjs($addjs_reg2,'');
				 echo '<div class="regionwrap '.$cssnamepar.'" data-effect="'.$regioneffect.'">'; 				
					  //---------------------
					    $sqlsubreg = "SELECT * from ".TABLE_REGION." where pid='$regionpidname'  and sta_visible='y'  $andlangbh order by pos desc,id";
							 //echo $sqlbuju;
						 
							 if(getnum($sqlsubreg)>0){  
							      $result_subreg = getall($sqlsubreg);
									 // if(substr($regioneffect,0,5)=='self_')  $file =  TPLCURROOT.'selfblock/region/'.$regioneffect;         
									  //else  $file =  BLOCKROOT.'region/'.$regioneffect; 
									  $file =  SYSBLOCKROOT.'region/'.$regioneffect;
									  if(checkfile($file))    require $file;    
								}
								else { 
								   echo  '<p class="errorfont">出错，没有找到这个区域下的子记录。-- '.$region.'，或者是它的子记录都隐藏了。(至少要有一个是显示的) (注意前后台语言是否一致。)</p>';
								}
					//----------------------------					  
				
				echo '</div>';			
				}					 
			 else{ 
					echo  '<p class="errorfont">出错，没有这个区域： '.$pidname.' (注意前后台语言是否一致。)</p>';
			 }	
			  
		?>

 