<?php $catid = $route_param['catids']; //var_dump($catid); //var_dump($num); //include 时 $catid = 8值来自第一次获取参数 转换之前 //转换之后的$catid 并不会传递 这个是php机制问题 暂时不管 ?> <link rel="stylesheet" href="/template/mobile/components/text/style_5.css?v=<?php echo rand(1,100000); ?>" media="all"> <div class="sx-content-1"> <div class="sx-box-1"> <div class="layui-row"> <div class="layui-col-xs6"> <span> <?php /* */ if((int)$parentid === 38){ //大类 $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number<$num and topid=38 and parentid=38 and is_del=0 and type=1 and area_id=$areaid ORDER BY number DESC LIMIT 1)"; //echo $sql; }else{ $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number<$num and topid=38 and parentid=$parentid and is_del=0 and type=1 and area_id=0 ORDER BY number DESC LIMIT 1)"; } ?> {eyou:if condition='((int)$parentid === 38)'} {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'} {eyou:type typeid='$kp.aid' empty='暂时没有数据'} <a href="{:get_tid_url_2($field['typeurl'],0,0,0,$field['type'],$field['topid'],$field['area_id'])}" title="{$field.typename}"> {$field.typename} </a> {/eyou:type} {/eyou:sql} {eyou:else /} {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'} <?php $sql2 = "select * from ey_arctype_cat where id=".$kp['aid']; ?> {eyou:sql sql="$sql2" cachetime='3600' empty='没有数据' id='kp2'} <a href="/id{$cid}/sid{$kp.number}" title="{$kp2.typename}"> {$kp2.typename} </a> {/eyou:sql} {/eyou:sql} {/eyou:if} </span> <a href="" class="upo">上一篇</a> </div> <div class="layui-col-xs6"> <a href="" class="upo">下一篇</a> <span> <?php if((int)$parentid === 38){ //大类 $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number>$num and topid=38 and parentid=38 and is_del=0 and type=1 and area_id=$areaid ORDER BY number asc LIMIT 1)"; }else{ $sql = "SELECT * FROM ey_seo_number WHERE id = (SELECT id FROM ey_seo_number WHERE number>$num and topid=38 and parentid=$parentid and is_del=0 and type=1 and area_id=0 ORDER BY number asc LIMIT 1)"; } ?> {eyou:if condition='((int)$parentid === 38)'} {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'} {eyou:type typeid='$kp.aid' empty='暂时没有数据'} <a href="{:get_tid_url_2($field['typeurl'],0,0,0,$field['type'],$field['topid'],$field['area_id'])}" title="{$field.typename}"> {$field.typename} </a> {/eyou:type} {/eyou:sql} {eyou:else /} {eyou:sql sql="$sql" cachetime='3600' empty='没有数据' id='kp'} <?php $sql2 = "select * from ey_arctype_cat where id=".$kp['aid']; ?> {eyou:sql sql="$sql2" cachetime='3600' empty='没有数据' id='kp2'} <a href="/id{$cid}/sid{$kp.number}" title="{$kp2.typename}">{$kp2.typename} </a> {/eyou:sql} {/eyou:sql} {/eyou:if} </span> </div> </div> </div> </div>