<?php
header("Content-type: text/html; charset=utf-8");
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=test_data.xls");
ini_set("date.timezone","PRC");
require_once("../config.php");
$sql = "select * from dunling_pay";
$ery = mysql_query($sql,$config);
echo   "用户名"."\t"; 
echo   "提现金额"."\t"; 
echo   "状态"."\t"; 
echo   "收款人"."\t"; 
echo   "支付宝账号"."\t"; 
echo   "付款人"."\t"; 
echo   "流水号"."\t"; 
echo   "支付时间"."\t";
echo    "\n";
while($i = mysql_fetch_array($ery)){
    echo $i['username']."\t";

    echo $i['money']."\t";
    $shenhe = $i['zt'];
 switch($shenhe){
        case '0':
        echo '待审核'."\t";
        break;
        case '1':
        echo '已支付'."\t";
        break;
        case '2':
        echo '已驳回'."\t";
        break;
        default:
        echo '无'."\t";
        break;
    }
    echo $i['payname']."\t";
    echo $i['alipay']."\t";
    echo $i['fukuanren']."\t";
    echo $i['liushuihao']."\t";
    $time = $i['time'];
    echo date("Y-m-d H:i:s",$time)."\t";
    echo "\n";
}

?>