Dede织梦dede:channel标签调用文章

  247 次阅读

CONTENT

  1. {dede:channel type='son' noself='yes'}
  2. [field:id runphp=yes]
  3. global $dsql;
  4. $sql = "SELECT arc.* FROM `dede_archives` arc where arc.arcrank>-1 AND arc.typeid = @me ORDER BY arc.id desc limit 10";
  5. $dsql->SetQuery($sql);
  6. $dsql->Execute('t');
  7. $result = '';
  8. while($row = $dsql->GetArray('t'))
  9. {
  10. $arcurl = GetOneArchive($row['id']);
  11. $pubdate = MyDate('m-d',$row['pubdate']);
  12. $result .= <<< TPL
  13. <dt><a href="{$arcurl['arcurl']}"><span class="aa2">{$row['title']}</span><span class="aa3">{$pubdate}</span><img src="{$row['litpic']}" alt="{$row['title']}" width="650" height="385" /></a></dt>
  14. TPL;
  15. }
  16. @me = $result;
  17. [/field:id]
  18. {/dede:channel}

Comments | NOTHING

暂无评论...