- php文件
require_once(dirname(__FILE__)."/../../include/common.inc.php");
require_once DEDEINC.'/arc.partview.class.php';
$arc = new PartView();
$tempfile = $cfg_basedir.$cfg_templets_skin.'/mood_ranking.htm';//模板文件
$arc->SetTemplet($tempfile);
$arc->Display();
- 模板文件
{dede:php}
$refObj->Fields['ranktime'] = time()-($day*86400);
{/dede:php}
{dede:sql sql="SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `dede_archives` arc LEFT JOIN `dede_arctype` tp ON arc.typeid=tp.id where arc.arcrank>-1 AND arc.typeid=8 ORDER BY arc.id desc limit 0, 10"}
[field:id runphp=yes]$id=@me;@me='';$url=GetOneArchive($id);@me=$url['arcurl'];[/field:id] - [field:title/]
{/dede:sql}