<?php

/*
*	Copyright VeryIDE,2007-2010
*	http://www.veryide.com/
*
*	$Id: api/index.php,v2.5 19:47 2009-04-01 Leilei $
*/

//载入依赖库以及配置
require("../include/global.php");

require("../function/client.php");
	
$do = GetQuery("do");

switch ($do){
	
	//用户表下载
	case "admins":
	
		//mysql open
		reader_mysql();
	
		$subject= '用户列表';
		$report= '用户名	QQ	电话号码	电子邮箱	个人主页'.chr(13);
		
		$sql="SELECT * FROM ".VI_DBMANPRE."admin order BY id desc";
		$result=mysql_query($sql,$mysql);
	
		while($row=mysql_fetch_assoc($result)){
			
			$report.= $row["account"].'	'.$row["qq"].'	'.$row["phone"].'	'.$row["email"].'	'.$row["blog"].chr(13);
			
		}
		
		//mysql close
		reader_mysql(true);
	
	break;

}

//判断登录
if( $_SESSION["Manager"]["id"] && $report ){		
	report( $subject, $report );
}
	
?>