table('order_info'). " AS o ". "LEFT JOIN " .$GLOBALS['ecs']->table('users'). " AS u ON u.user_id=o.user_id ". "LEFT JOIN " .$GLOBALS['ecs']->table('region'). " AS ra ON ra.region_id=o.country ". "LEFT JOIN " .$GLOBALS['ecs']->table('region'). " AS rb ON rb.region_id=o.province ". "LEFT JOIN " .$GLOBALS['ecs']->table('region'). " AS rc ON rc.region_id=o.city ". "LEFT JOIN " .$GLOBALS['ecs']->table('region'). " AS rd ON rd.region_id=o.district ". "WHERE 1 $where ORDER BY o.order_id DESC"; header("Content-type:application/vnd.ms-excel"); header("Accept-Ranges:bytes"); header("Content-Disposition:filename=".time().".xls"); header("Pragma: no-cache"); echo '
'; echo '| 订单号 | '; echo '会员名 | '; echo '下单时间 | '; echo '收货人 | '; echo '国家 | '; echo '省 | '; echo '市 | '; echo '区 | '; echo '地址 | '; echo '电话 | '; echo '手机 | '; echo '总金额 | '; echo '应付金额 | '; echo '支付方式 | '; echo '配送方式 | '; echo '付款状态 | '; echo '发货状态 | '; echo '|
| $row[order_sn] | "; echo "$row[user_name] | "; echo "".date("Y-m-d H:i:s",$row['add_time']+8*3600)." | "; echo "$row[consignee] | "; echo "$row[country_name] | "; echo "$row[province_name] | "; echo "$row[city_name] | "; echo "$row[district_name] | "; echo "$row[address] | "; echo "$row[tel] | "; echo "$row[mobile] | "; echo "$row[email] | "; echo "$row[total_fee] | "; echo "$row[order_amount] | "; echo "$row[pay_name] | "; echo "$row[shipping_name] | "; echo "".$_LANG['ps'][$row['pay_status']]." | "; echo "".$_LANG['ss'][$row['shipping_status']]." | "; echo '