<?php
// $Id: catlist.php,v 1.3 2005/10/28 11:56:02 ohwada Exp $

// 2004-11-28 K.OHWADA
// write fair, delete unnecessary comments

// 2004/08/10 K.OHWADA
// use class weblinksCatlink
// enable to install this module two or more. 

// 2004/08/10 K.OHWADA
// weblinks07

//================================================================
// category list
// use class weblinksCategory, weblinksLink
// 2004/01/14 K.OHWADA
//================================================================

include "header.php";
include XOOPS_ROOT_PATH."/header.php";

// enable to install this module two or more. 
$xoopsOption['template_main'] = $MODULE_DIRNAME."_catlist.html";

assignIndex();

// --- category list ---
$tbl_category->getAll();
$tree_array = $tbl_category->getTreeArray();
foreach ($tree_array as $cid) 
{
	$catpath = $tbl_category->makeCatpath($cid);
	$catpath = $myts->makeTboxData4Show($catpath);
	$count   = $tbl_catlink->getLinkNumByCid($cid);

	$xoopsTpl->append(
		'categories',
		array(
			'cid'   => $cid,
			'path'  => $catpath,
			'count' => $count
		));
}

include XOOPS_ROOT_PATH.'/footer.php';

?>
