<?php

	require(VI_ROOT."/module/member/config.php");
		
	//mysql open
	reader_mysql();
	
	$sql="SELECT * FROM ".VI_DBMODPRE."values where fid=".$fid." ";
	
    //排序
    $sql.=" order BY id desc";	
    
    //查询数据库_总记录数
    $row_count = $db -> getValue( str_replace("*","count(id)",$sql) );
    
    $Project["queries"]++;

    //分页参数
    $page=GetPage("page");
    $page_start=$Global["pagesize"]*($page-1);
    $sql=$sql." limit $page_start,".$Global["pagesize"];	
    
    //分页链接
    $url="?action=status&id=".$fid."&page=";
	
	$result = $db->getAll( $sql );
	
	$tr = '';	

	//查询结果
	$smarty->assign("sign", $Modules["member"]["sign"] );
	
	//查询结果
	$smarty->assign("result", $result );
	
    //mysql close
    reader_mysql(true);	
	
	//分页链接
	$smarty->assign("pages", GetPageLink($page,$row_count,$Global["pagesize"],$url,"page") );


?>