function checkCatFunction($data, $cat_list)
{
$flag_checkCatFunction = false;
if(substr_count($data[1],","))
{
$cat_array = array();
$cat_array = explode(",", $data[1]);
foreach($cat_array as $value)
{
if(in_array($value, $cat_list))
$flag_checkCatFunction = true;
}
}
else
{
if(in_array($data[1], $cat_list))
$flag_checkCatFunction = true;
}
return ($flag_checkCatFunction == true) ? $data[2] : "";
}
function catFunction($data, $cat_list, $config)
{
$get_cat = array();
if(substr_count($data[1],","))
{
$cat_array = array();
$cat_array = explode(",", $data[1]);
foreach($cat_array as $value)
{
if(in_array($value, $cat_list))
$get_cat[] = getCatInfo($value, $config);
}
}
else
{
if(in_array($data[1], $cat_list))
$get_cat[] = getCatInfo($data[1], $config);
}
return implode($config['category_separator'] . ' ', $get_cat);
}
function getCatInfo($id, $config)
{
global $cat_info, $PHP_SELF;
if( $config['allow_alt_url'] ) $catInfo = "<a href=\"" . $config['http_home_url'] . get_url( $id ) . "/\">{$cat_info[$id]['name']}</a>";
else $catInfo = "<a href=\"$PHP_SELF?do=cat&category={$cat_info[$id]['alt_name']}\">{$cat_info[$id]['name']}</a>";
return $catInfo;
}