时间:2021-07-01 10:21:17 帮助过:6人阅读
define('NOROBOT', true);
define('CURSCRIPT', 'charge');
require_once './include/common.inc.php';
header("Content-type:application/vnd.ms-excel;charset=utf-8");
header("Content-Disposition:attachment;filename=充值卡.xls");
$page = $page ?: 1;
$results = array();
$condition = '';
echo "被充值手机号"."\t";
echo "充值卡序列号"."\t";
echo "充值金额"."\t";
echo "实充额度"."\t";
echo "充值时间"."\t";
$query = $mysqli->multi_query('CALL UP_User_GetCardInfo("'.$condition.'","'.$page.'","900000")') or die($mysqli->error);
$query = $mysqli->store_result();
while ($record = mysqli_fetch_array($query, MYSQLI_BOTH)){
$phone = $record['phone'];
$cardid = $record['cardid'];
$charge = $record['charge'];
$achieve = $record['achieve'];
$chgdate = $record['useDate'];
echo "\n";
echo $phone."\t";
echo $cardid."\t";
echo $charge."\t";
echo $achieve."\t";
echo $chgdate."\t";
}
if(is_object($query)) $query->free_result();
$mysqli->next_result();
?>