123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
-
-
- <?php
- //技术员、助理、中级、高级、正高级
- if(!empty($route_param['pa'])){
- /*if((int)$route_param['pa'] === 1){
- $level = '助理';
- }elseif((int)$route_param['pa'] === 2){
- $level = '中级';
- }elseif((int)$route_param['pa'] === 3){
- $level = '高级';
- }elseif((int)$route_param['pa'] === 4){
- $level = '正高级';
- }else{
- $level = '技术员';
- }*/
- $level33 = (int)$route_param['pa']; //级别对应排序即可
- $level = $level33;
- /*if((int)$level33 === 0){
- $level = 1;
- }else if((int)$level33 === 1){
- $level = 0;
- }else{
- $level = $level33;
- }*/
- }else{
- /*$level = '技术员';*/
- $level = 0;
- //$level = 1;
- }
- //查找文档id
- //var_dump($level);
- ?>
- <?php
- if($site == 'www'){
- $areaid = 10000;
- }else{
- //$sql = "SELECT id FROM ey_citysite WHERE domain = '$site'";
- //echo $sql;
- /*
- * {eyou:if condition='($site != "www")'}
- {eyou:sql sql='$sql' cachetime='3600' id='city'}
- {eyou:php}
- $areaid = $city['id'];
- {/eyou:php}
- {/eyou:sql}
- {/eyou:if}
- */
- //从area.htm获取到区域id
- $areaid = $area_id;
- }
- ?>
- <?php
- $num = (int)$route_param['catids'];
- $cid = $route_param['cid']?(int)$route_param['cid']:0;
- //var_dump($cid);
- if($cid > 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'}
- <?php
- if($cid > 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)'}
- <?php
- //var_dump($sql2);
- ?>
- {eyou:sql sql='$sql2' cachetime='3600' id='seo2'}
- <?php
- $route_param['catids'] = $seo2['aid'];
- //var_dump($route_param);
- ?>
- {/eyou:sql}
- {/eyou:if}
-
-
- <?php
- //栏目信息 获取二级或者三级
- //var_dump($route_param);
- ?>
- {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}
-
- <?php
- //var_dump($catid);
- ?>
- {eyou:empty name='$parentid' /}
- <?php
- //查找小类 获取到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}
-
-
- <?php
- $level_pa = (int)$level+1; //对应后台 要加 1
- if((int)$parentid === 38){
- //大类 二级
- $sql = "select aid from ey_archives where typeid=".$catid." and product_id=0 and level=".$level_pa." and is_del=0";
- //echo $sql;
- ?>
-
- {eyou:sql sql="$sql" cachetime='3600' empty='' id='detail'}
- {eyou:assign name='aid' value="$detail.aid"}
- {eyou:arcview aid="$detail.aid" id="field"}
- <?php
- //获取到文档详情
- $eyou['field'] = $field;
- ?>
- {/eyou:arcview}
- {/eyou:sql}
-
- <?php
- }else{
- //小类 三级
- $sql = "select id,parent_id from ey_arctype_cat where id=".$catid." and is_del=0";
- ?>
-
- {eyou:sql sql="$sql" cachetime='3600' empty='' id='detail2'}
- <?php
- $sql2 = "select aid from ey_archives where typeid=".$detail2['parent_id']." and product_id=".$catid." and level=".$level_pa." and is_del=0";
- //echo $sql2;die;
- ?>
- {eyou:sql sql="$sql2" cachetime='3600' empty='' id='detail'}
- {eyou:assign name='aid' value="$detail.aid"}
- {eyou:arcview aid="$detail.aid" id="field"}
- <?php
- //获取到文档详情
- $eyou['field'] = $field;
- ?>
- {/eyou:arcview}
- {/eyou:sql}
- {/eyou:sql}
- <?php
- }
- ?>
|