标签:lan tpi return name more php cti function dedecms
/** * 取出所有分类 * @param int $channel 频道ID * @return string * 调用{dede:global.getalltype function=‘getalltype()‘/} */ function getalltype($channel=0,$line=10) { $line = empty($line) ? 10 : $line; global $dsql,$result; $dsql->SetQuery("SELECT id,typename,typenamedir,typelitpic,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath FROM `blog_arctype` WHERE reid=‘$channel‘ And ishidden<>1 order by sortrank asc limit 0, $line "); $dsql->Execute($channel); if($dsql->GetTotalRow($channel)>0) { $result .= "<ul>\r\n"; while($row = $dsql->GetArray($channel)) { $id = $row[‘id‘]; $typename = $row[‘typename‘]; $typelink = GetOneTypeUrlA($row); $result .= " <li>\r\n"; $result .= " <a href=‘{$typelink}‘ target=‘_blank‘>{$typename}</a>\r\n"; getalltype($id,$line); $result .= " </li>\r\n"; } $result .= "</ul>\r\n"; } return $result; }
标签:lan tpi return name more php cti function dedecms
原文地址:http://www.cnblogs.com/dedediy/p/6569004.html