<?php
function module_comment_sheet()
{
	global $global,$smarty;
	$obj = new comment();
	$obj->set_page_size(10);
	$obj->set_page_num($global['page']);	
	$sheet = $obj->get_sheet();
	set_link($obj->get_page_sum());
	for($i = 0; $i < count($sheet); $i ++)
	{
		if($sheet[$i]['com_user_id'] != 0)
		{
			$sheet[$i]['user_name'] = get_data('users',$sheet[$i]['com_user_id'],'use_username');
		}else{
			$sheet[$i]['user_name'] = '';
		}
		
		$sheet[$i]['channel'] = $sheet[$i]['com_type'];
		$sheet[$i]['title'] = get_data($sheet[$i]['channel'],$sheet[$i]['com_page_id'],substr($sheet[$i]['channel'],0,3).'_title');
	}
	$smarty->assign('comment',$sheet);
}
//红头船
?>