model('regions'); if($params["p_region_id"]){ $filter_arr = array("p_region_id"=>$params["p_region_id"]); }else{ //新增或无p_region_id,则只需显示一级区域的checkbox列表即可 $filter_arr = array("region_grade"=>1); } $html = ''; $rows = $regionsObj->getList("*",$filter_arr); if ($rows){ foreach ($rows as $item){ if ($item['region_grade'] <= app::get('eccommon')->getConf('system.area_depth')){ $html.= '
  • '.$item['local_name'].'
  • '; }else{ $no = true; } } if($no) $html=""; return $html; }else{ return "
  • 无下级地区
  • "; } } }