{dede:channelartlist row=5 typeid=‘top‘} <li><a class="hide" href="{dede:field name=‘typeurl‘/}" title="{dede:field name=‘typename‘/}">{dede:field name=‘typename‘/}</a> {dede:field name=‘id‘ runphp=‘yes‘} global $dsql; $sql = "Select typedir,typename from dede_arctype where reid="[email protected]" order by sortrank limit 0,11"; $dsql->SetQuery($sql);//将SQL查询语句格式化 $dsql->Execute();//执行SQL操作 $ns = $dsql->GetTotalRow(); if($ns>0){ //通过循环输出执行查询中的结果 $xinfo=‘<ul>‘; while($row = $dsql->GetArray()){ $xinfo.=‘<li><a href="‘.str_replace(‘{cmspath}‘,‘‘,$row[‘typedir‘]).‘">‘.$row[‘typename‘].‘</a></li>‘; } $xinfo.=‘</ul>‘; @me=$xinfo; }else{@me=‘‘;} {/dede:field} </li> {/dede:channelartlist}
时间: 2024-10-03 23:48:26