<?php
    $conf_basedir	= "../../";	//相对主目录的位置
    $conf_where		= "admin";	//选择调用相应模块
    $directory		= basename(dirname(__FILE__));	//定义当前所在的目录，引入模块公用函数
    include_once($conf_basedir."base.inc.php");
    checkAuth('23');	//判断登录和权限

    //顶部查询部分结束

    $tbl='esf_20131230_new_year_prize';

    //获得数据当前页面数据
    $sql = "select * from $tbl order by id asc ";
    $data_info = $dbback->GetAll($sql);
$ss = "<table border='1' align= 'center'><tr>";
$ss .= "<td>编号</td><td>奖项</td><td>状态</td><td>IP</td><td>联系电话</td><td>中奖时间</td><td>操作</td>";
$ss .= "</tr>";
 foreach($data_info as $key=>$value){ 
							$ss .= '<tr class="line">';
							//$ss .='<td style="width: 5%;"></td>';
							$ss .='<td style="width: 5%;">'.$value['id'].'</td>';
							$ss .='<td style="width: 5%;">'.$value['name'].'</td>';
							$ss .='<td style="width: 10%;">'.getPrizeStatus($value['ip'],$value['status']).'</td>';
							$ss .='<td style="width: 10%;">'.$value['ip'].'</td>';
							$ss .='<td style="width: 10%;">'.$value['phone'].'</td>';
							$ss .='<td style="width: 10%;">'.$value['winTime'].'</td>';
							    
							$ss .='	<td style="width: 10%;">'.sendBtn($value['id'],$value['ip'],$value['status'],$value['send']).'</td>';
							$ss .='</tr>';
						 } 

$ss .= '</table>';
header("Content-Type: application/vnd.ms-execl;charset=utf-8");
header("Content-Disposition: attachment; filename=data.xls"); 
echo $ss;
?>