织梦内页读取栏目banner图

<img src="
{dede:field name='typeid' runphp='yes'}
global $dsql;
$typeid = @me;
$query = 'SELECT topid,typename FROM na_arctype where id = $typeid';
$rs = $dsql->GetOne($query);
$topid = $rs['topid'];
$typename1 = '/aiweini/uploads/151128/1-15112Q04645W3.jpg';
$query2 = 'SELECT * FROM na_arctype where id = $topid';
$row = $dsql->GetOne($query2);
$typename = $row['litpic'];
if($typename==''||$typename==null){
@me= $typename1;
}else{
@me= $typename;
}
{/dede:field}" alt="" style='max-height:379px;max-width:1024px'/>

posted @ 2015-11-28 17:51  绿尘枫  阅读(384)  评论(0编辑  收藏  举报