<?php
	if( !is_array($active) ){
		ob_clean();
		header("Location: index.php?id=".$fid);	
	}
?>
<script type="text/javascript">
addLoadEvent(
	function(){
		//滚动到主体
		if( getQuery("page") ){
			
			setScroll($("result"));
		}
	}
);
</script>



<?php

	require("../veryide/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=mysql_query($sql,$mysql);
	
	$tr = '';
		
	while($row=mysql_fetch_assoc($result)){
		
		$tr .= '
			<tr class="line">
				<td>'.$row["id"].'</td>
				<td>'.$row["account"].'</td>
				<td>'.$Modules["member"]["sign"][$row["status"]].'</td>
				<td>'.date("y/m/d",$row["dateline"]).'</td>
			</tr>
		';			
		
	}
	
    //mysql close
    reader_mysql(true);	
	
	echo '<fieldset><legend>数据记录</legend>';
	echo '
	<table id="result" border="0" cellpadding="3" cellspacing="1">
		<tr class="title">
			<td class="tag-id">ID</td>
			<td><strong>用户名</strong></td>
			<td>状态</td>
			<td>参与时间</td>
		</tr>
		'.$tr.'
	</table>	
	';
	
	echo GetPageLink($page,$row_count,$Global["pagesize"],$url,"page");
	
	echo '</fieldset>';
	
	echo "
	<div id='send'>
		<p>
		<input type='button' class='submit' name='button' onclick='location.href=\"?id=".$VICACHE["mod.forms"]["id"]."\";' value='返回活动' />
		<input type='button' class='submit' name='button' onclick='window.close();' value='关闭窗口' />
		</p>
	</div>
	";

?>