:::

10. 樹狀目錄

 if(!file_exists(XOOPS_ROOT_PATH."/modules/tadtools/dtree.php")){
     redirect_header("index.php",3, _MA_NEED_TADTOOLS);
 }
 include_once XOOPS_ROOT_PATH."/modules/tadtools/dtree.php";
 $cate=block_get_news_cate();
 $home['sn']=0;
 $home['title']=”不分類”;
 $home['url']=XOOPS_URL."/modules/tadnews/index.php?ncsn=0";
 $dtree=new dtree("a",$home,$cate['title'],$cate['of_ncsn'],$cate['url']);
 $block=$dtree->render();


範例:

//取得所有類別標題
if(!function_exists("block_get_news_cate")){
 function block_get_news_cate(){

global $xoopsDB;

$sql="select ncsn,of_ncsn,nc_title from ".$xoopsDB->prefix("tad_news_cate")." where not_news!='1' order by sort";

$result=$xoopsDB->query($sql);

    while(list($ncsn,$of_ncsn,$nc_title)=$xoopsDB->fetchRow($result)){

        $cate['title'][$ncsn]=$nc_title;
             $cate['of_ncsn'][$ncsn]=$of_ncsn;
             $cate['url'][$ncsn]=XOOPS_URL."/modules/tadnews/index.php?ncsn={$ncsn}";
    }

return $cate;

 }
}


:::

搜尋

QR Code 區塊

https%3A%2F%2Fmail.tad0616.cp27.secserverpros.com%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D365%26tbsn%3D15

書籍目錄

展開 | 闔起

線上使用者

353人線上 (135人在瀏覽線上書籍)

會員: 0

訪客: 353

更多…