<?php
/**
 * 表示层顶部导航类
 *
 * @author Wzb
 *        
 */
class USL_TopNav {
	/**
	 * 系列单页导航
	 *
	 * @param int $sortId 类别ID
	 * @param string $tag 标签
	 * @return array
	 */
	public static function _IntroNews($sortId, $tag) {
		$topNav = array ();
		$datalist = BLL_News::getList ( $sortId, false, 'id,title' );
		foreach ( $datalist as $row ) {
			$temp = array ();
			$temp ['title'] = $row ['title'];
			$temp ['url'] = "IntroNews.php?tag=$tag&theId=$row[id]";
			$topNav [] = $temp;
		}
		return $topNav;
	}
	
	/**
	 * 新闻类别导航
	 *
	 * @param int $sortId 类别ID
	 * @param string $tag 标签
	 */
	public static function _NewsSortList($rootSortId, $tag) {
		$datalist = BLL_NewsSort::getList ( $rootSortId, 'id,pid,sortName,serialNum', 1 );
		$topNav = array ();
		foreach ( $datalist as $row ) {
			$temp = array ();
			$temp ['title'] = $row ['sortName'];
			$temp ['url'] = "News_List.php?tag=$tag&theId=$row[id]";
			$topNav [] = $temp;
		}
		return $topNav;
	}
}
?>