0){ $sql = "SELECT aid FROM ey_seo_number WHERE number=$cid and type=1 and tid=38 and topid=38 and parentid=38 and area_id=$areaid"; }else{ $sql = "SELECT aid FROM ey_seo_number WHERE number=$num and type=1 and tid=38 and topid=38 and parentid=38 and area_id=$areaid"; } //echo $sql; ?> {eyou:sql sql='$sql' cachetime='3600' id='seo'} 0){ //再查询一次 $so_parent_id = $seo['aid']; $sql2 = "SELECT aid FROM ey_seo_number WHERE number=$num and type=1 and tid=$so_parent_id and topid=38 and parentid=$so_parent_id and area_id=0"; }else{ $route_param['catids'] = $seo['aid']; //var_dump($route_param); } ?> {/eyou:sql} {eyou:if condition='($cid > 0)'} {eyou:sql sql='$sql2' cachetime='3600' id='seo2'} {/eyou:sql} {/eyou:if} {eyou:assign name='catid' value="$route_param.catids"} {eyou:type typeid='$route_param.catids' empty='' id="catinfo"} {eyou:assign name='parentid' value="$catinfo.parent_id"} {eyou:assign name='catname' value="$catinfo.typename"} {/eyou:type} {eyou:empty name='$parentid' /} {eyou:sql sql="SELECT id,parent_id,typename FROM ey_arctype_cat WHERE id = $catid" cachetime='3600' id='field2'} {eyou:assign name='parentid' value="$field2.parent_id"} {eyou:assign name='catname' value="$field2.typename"} {/eyou:sql} {/eyou:empty} {eyou:sql sql="$sql" cachetime='3600' empty='' id='detail'} {eyou:assign name='aid' value="$detail.aid"} {eyou:arcview aid="$detail.aid" id="field"} {/eyou:arcview} {/eyou:sql} {eyou:sql sql="$sql" cachetime='3600' empty='' id='detail2'} {eyou:sql sql="$sql2" cachetime='3600' empty='' id='detail'} {eyou:assign name='aid' value="$detail.aid"} {eyou:arcview aid="$detail.aid" id="field"} {/eyou:arcview} {/eyou:sql} {/eyou:sql}