12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- //查询城市是否 自定义
- $sql = "select id,seo_title,seo_keywords,seo_description from ey_citysite where domain='".$city_domain."' ";
- ?>
- {eyou:sql sql='$sql' cachetime='3600' id='seo_cat'}
- {eyou:notempty name='$seo_cat' /}
- {eyou:assign name='cityid' value="$seo_cat.id" /}
- {eyou:php}
- $seo_title = $seo_cat['seo_title'];
- $seo_keywords = $seo_cat['seo_keywords'];
- $seo_description = $seo_cat['seo_description'];
- {/eyou:php}
- {/eyou:notempty}
- {/eyou:sql}
-
- {eyou:if condition='(empty($seo_title) && isset($seo_title))'}
- <?php
- //一定存在省 二级域名
- $area_name = '';
- $sql2 = "SELECT id,name FROM ey_citysite WHERE domain = '".$site."'";
- ?>
- {eyou:sql sql='$sql2' cachetime='3600' id='area'}
- {eyou:php}
- $area_name = ''.$area['name'].'';
- $area_id = ''.$area['id'].'';
- {/eyou:php}
- {/eyou:sql}
-
- <?php
-
- if($site == "www"){
- $sql1 = "SELECT aid,seo_title,seo_keywords,seo_description FROM ey_archives WHERE typeid=139 and province_id=5290 and is_del=0 and status=1 and arcrank=0";
- }else{
- //查询默认设置 市级入口 栏目id139 的内容管理
- $sql1 = "SELECT aid,seo_title,seo_keywords,seo_description FROM ey_archives WHERE typeid=139 and province_id=$area_id and is_del=0 and status=1 and arcrank=0";
- }
-
- ?>
-
- {eyou:sql sql='$sql1' cachetime='3600' id='seo_cat2'}
- {eyou:notempty name='$seo_cat2' /}
- {eyou:php}
- $seo_title = $seo_cat2['seo_title'];
- $seo_keywords = $seo_cat2['seo_keywords'];
- $seo_description = $seo_cat2['seo_description'];
- {/eyou:php}
- {/eyou:notempty}
- {/eyou:sql}
-
- {eyou:else /}
-
- {/eyou:if}
|