PodcastOrderAction.class.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Fanwe 方维直播系统
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2011 http://www.fanwe.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Author: 云淡风轻(1956838968@qq.com)
  8. // +----------------------------------------------------------------------
  9. class PodcastOrderAction extends CommonAction
  10. {
  11. public function index()
  12. {
  13. //列表过滤器,生成查询Map对象
  14. $map = $this->_search();
  15. if (!isset($_REQUEST['order_status'])) {
  16. $_REQUEST['order_status'] = -1;
  17. }
  18. $order_sn = $param['order_sn'] = strim($_REQUEST['order_sn']);
  19. $order_status = $param['order_status'] = intval($_REQUEST['order_status']);
  20. $begin_time = $param['begin_time'] = strim($_REQUEST['begin_time']);
  21. $end_time = $param['end_time'] = strim($_REQUEST['end_time']);
  22. $this->assign('param', $param);
  23. //追加默认参数
  24. if ($this->get("default_map")) {
  25. $map = array_merge($map, $this->get("default_map"));
  26. }
  27. if ($order_sn != '') {
  28. $map['order_sn'] = $order_sn;
  29. }
  30. if (isset($_REQUEST['order_status']) && $order_status >= 0) {
  31. $map['order_status'] = $order_status;
  32. }
  33. $begin_time_span = to_timespan($begin_time);
  34. $end_time_span = to_timespan($end_time);
  35. if ($begin_time != '' && $end_time == '') {
  36. $map['_string'] = "create_time >=" . $begin_time_span . " and is_p=0";
  37. } elseif ($begin_time != '' && $end_time != '') {
  38. $map['_string'] = "create_time >=" . $begin_time_span . " and create_time <=" . $end_time_span . " and is_p=0";
  39. } elseif ($begin_time == '' && $end_time != '') {
  40. $map['_string'] = "create_time <=" . $end_time_span . " and is_p=0";
  41. }else{
  42. $map['_string'] = "is_p=0";
  43. }
  44. if ($order_status == -1) {
  45. unset($map['order_status']);
  46. }
  47. if (method_exists($this, '_filter')) {
  48. $this->_filter($map);
  49. }
  50. $model = D("goods_order");
  51. $map['order_type'] = array('neq','pai');
  52. if (!empty($model)) {
  53. $this->_list($model, $map);
  54. }
  55. $list = $this->get("list");
  56. $result = array();
  57. $row = 0;
  58. foreach ($list as $k => $v) {
  59. $list[$k]['order_source'] = $v['order_source'] == 'local' ? "本地" : "远程";
  60. if($v['order_type'] == 'shop'){
  61. $list[$k]['order_type'] = '购物单';
  62. $list[$k]['goods_diamonds'] = 0;
  63. }elseif($v['order_type'] == 'pai_goods'){
  64. $list[$k]['order_type'] = '实物竞拍单';
  65. }else{
  66. $list[$k]['order_type'] = '虚拟竞拍单';
  67. }
  68. $list[$k]['no_refund_format'] = $v['no_refund'] ? "否" : "是";
  69. switch ($v['order_status']) {
  70. case '1':
  71. $list[$k]['order_status_format'] = "买家待付款";
  72. break;
  73. case '2':
  74. $list[$k]['order_status_format'] = "卖家待发货";
  75. break;
  76. case '3':
  77. $list[$k]['order_status_format'] = "买家待收货";
  78. break;
  79. case '4':
  80. $list[$k]['order_status_format'] = "已结单";
  81. break;
  82. case '5':
  83. $list[$k]['order_status_format'] = "已退货";
  84. break;
  85. case '6':
  86. $list[$k]['order_status_format'] = "超时关闭";
  87. break;
  88. case '7':
  89. $list[$k]['order_status_format'] = "结单";
  90. break;
  91. }
  92. $list[$k]['podcast_name'] = emoji_decode(M("user")->where("id=" . $v['podcast_id'] . " ")->getField("nick_name"));
  93. $list[$k]['pai_name'] = emoji_decode(M("user")->where("id=" . $v['viewer_id'] . " ")->getField("nick_name"));
  94. }
  95. $this->assign("list", $list);
  96. $this->display();
  97. return;
  98. }
  99. /**
  100. *
  101. * 订单详情
  102. */
  103. public function edit()
  104. {
  105. $this->assign("type_list", $this->type_list);
  106. $id = intval($_REQUEST['id']);
  107. if (!isset($id) || empty($id)) {
  108. $this->error('系统繁忙,参数不存在!');
  109. }
  110. $vo = M('goods_order')->where(array('id' => $id))->find();
  111. if ($vo['order_source'] == 'local') {
  112. $vo['order_source'] = '本地';
  113. } else {
  114. $vo['order_source'] = '远程';
  115. }
  116. if ($vo['order_type'] == 'shop') {
  117. $vo['order_type'] = '购物单';
  118. }elseif($vo['order_type'] == 'pai_goods'){
  119. $vo['order_type'] = '实物竞拍单';
  120. }else {
  121. $vo['order_type'] = '虚拟竞拍单';
  122. }
  123. $vo['no_refund_format'] = $vo['no_refund'] ? '否' : '是';
  124. if ($vo['order_status'] == 1) {
  125. $vo['order_status_format'] = "待付款";
  126. } elseif ($vo['order_status'] == 2) {
  127. $vo['order_status_format'] = "待发货";
  128. } elseif ($vo['order_status'] == 3) {
  129. $vo['order_status_format'] = "待收货";
  130. } elseif ($vo['order_status'] == 4) {
  131. $vo['order_status_format'] = "已收货";
  132. } elseif ($vo['order_status'] == 5) {
  133. $vo['order_status_format'] = "已退货";
  134. }
  135. if ($vo['refund_buyer_delivery'] == 0) {
  136. $vo['delivery_status_format'] = "无";
  137. } elseif ($vo['refund_buyer_delivery'] == 1) {
  138. $vo['delivery_status_format'] = "未发货";
  139. } else {
  140. $vo['delivery_status_format'] = "已发货";
  141. }
  142. if ($vo['refund_buyer_status'] == 0) {
  143. $vo['refund_buyer_status'] = "无";
  144. } elseif ($vo['refund_buyer_status'] == 1) {
  145. $vo['refund_buyer_status'] = "退款中";
  146. } elseif ($vo['refund_buyer_status'] == 2) {
  147. $vo['refund_buyer_status'] = "退货中";
  148. } elseif ($vo['refund_buyer_status'] == 3) {
  149. $vo['refund_buyer_status'] = "退款成功";
  150. } elseif ($vo['refund_buyer_status'] == 4) {
  151. $vo['refund_buyer_status'] = "主动撤销退款";
  152. } else {
  153. $vo['refund_buyer_status'] = "被动关闭";
  154. }
  155. if ($vo['refund_seller_status'] == 0) {
  156. $vo['refund_seller_status'] = "无";
  157. } else {
  158. $vo['refund_seller_status'] = "退款成功";
  159. }
  160. if ($vo['refund_platform'] == 0) {
  161. $vo['refund_platform'] = "无";
  162. } elseif ($vo['refund_platform'] == 1) {
  163. $vo['refund_platform'] = "申诉中";
  164. } else {
  165. $vo['refund_platform'] = "申诉完成";
  166. }
  167. $vo['podcast_name'] = emoji_decode(M("user")->where("id=" . $vo['podcast_id'] . " ")->getField("nick_name"));
  168. $vo['pai_name'] = emoji_decode(M("user")->where("id=" . $vo['viewer_id'] . " ")->getField("nick_name"));
  169. $vo['goods_name'] = M("pai_goods")->where("id=" . $vo['pai_id'] . " ")->getField("name");
  170. if($vo['order_type'] == '购物单'){
  171. $vo['goods_name'] = M("goods")->where("id=" . $vo['goods_id'] . " ")->getField("name");
  172. }
  173. if (!empty($vo['consignee_district'])) {
  174. $arr = json_decode(htmlspecialchars_decode($vo['consignee_district']), true);
  175. //按数组方式调用里面的数据
  176. $vo['consignee_district'] = $arr['province'].$arr['city'].$arr['area'];
  177. }
  178. $vo['pay_time'] = $vo['pay_time'] == '0000-00-00 00:00:00' ? '未付款' : $vo['pay_time'];
  179. switch ($vo['order_status']) {
  180. case '1':
  181. $vo['order_status_format'] = '买家待付款';
  182. break;
  183. case '2':
  184. $vo['order_status_format'] = '卖家待发货';
  185. break;
  186. case '3':
  187. $vo['order_status_format'] = '买家待收货';
  188. break;
  189. case '4':
  190. $vo['order_status_format'] = '已结单';
  191. break;
  192. case '5':
  193. $vo['order_status_format'] = '退款成功';
  194. break;
  195. case '6':
  196. $vo['order_status_format'] = '未付款';
  197. break;
  198. case '7':
  199. $vo['order_status_format'] = '结单';
  200. break;
  201. }
  202. $this->assign('vo', $vo);
  203. $this->display();
  204. }
  205. public function update()
  206. {
  207. $id = intval($_REQUEST['id']);
  208. $order_status = intval($_REQUEST['order_status']);
  209. $courier_offic = strim($_REQUEST['courier_offic']);
  210. $courier_number = strim($_REQUEST['courier_number']);
  211. $this->assign("jumpUrl", u(MODULE_NAME . "/edit", array("id" => $id)));
  212. if (!$id) {
  213. $this->error("参数错误");
  214. }
  215. $mod = M('goods_order');
  216. $order = $mod->field('order_sn,order_status,viewer_id,pai_id')->find($id);
  217. $log_info = $order['order_sn'];
  218. $delivery_time = date("Y-m-d H:i:s");
  219. if($order['order_status'] == 3){
  220. $this->error(L("店家已经发货"));
  221. return;
  222. }elseif($order['order_status'] == 4){
  223. $this->error(L("订单已完成"));
  224. return;
  225. }elseif($order['order_status'] == 1){
  226. $this->error(L("等待买家付款"));
  227. return;
  228. }elseif($order['order_status'] > 4){
  229. $this->error(L("订单已关闭"));
  230. return;
  231. }
  232. if($courier_number == 0){
  233. $this->error(L("请输入物流单号"));
  234. return;
  235. }
  236. $res = $mod->save(array('id' => $id, 'order_status' => $order_status,'delivery_time'=>$delivery_time,'courier_offic'=>$courier_offic,'courier_number'=>$courier_number));
  237. $courier = M('courier')->add(array('id'=>'','order_sn'=>$log_info,'courier_number' => $courier_number,"courier_offic"=>$courier_offic));
  238. if(intval($order['pai_id']) !=0){
  239. $pai_goods = M('pai_goods')->save(array('id'=>$order['pai_id'],'order_status' => $order_status));
  240. $pai_join = M('pai_join')->where('order_id='.$id)->save(array('order_status' => $order_status));
  241. }
  242. if (false === $res) {
  243. //错误提示
  244. save_log($log_info . L("UPDATE_FAILED"), 0);
  245. $this->error(L("UPDATE_FAILED"), 0, $log_info . L("UPDATE_FAILED"));
  246. } else {
  247. //成功提示
  248. clear_auto_cache("banner_list");
  249. load_auto_cache("banner_list");
  250. save_log($log_info . L("UPDATE_SUCCESS"), 1);
  251. $this->success(L("UPDATE_SUCCESS"));
  252. }
  253. }
  254. //导出订单
  255. public function export_dd($page=1){
  256. $pagesize = 10;
  257. set_time_limit(0);
  258. $limit = (($page - 1)*intval($pagesize)).",".(intval($pagesize));
  259. //列表过滤器,生成查询Map对象
  260. $map = $this->_search();
  261. if (!isset($_REQUEST['order_status'])) {
  262. $_REQUEST['order_status'] = -1;
  263. }
  264. $order_sn = $param['order_sn'] = strim($_REQUEST['order_sn']);
  265. $order_status = $param['order_status'] = intval($_REQUEST['order_status']);
  266. $begin_time = $param['begin_time'] = strim($_REQUEST['begin_time']);
  267. $end_time = $param['end_time'] = strim($_REQUEST['end_time']);
  268. $this->assign('param', $param);
  269. //追加默认参数
  270. if ($this->get("default_map")) {
  271. $map = array_merge($map, $this->get("default_map"));
  272. }
  273. if ($order_sn != '') {
  274. $map['order_sn'] = $order_sn;
  275. }
  276. if (isset($_REQUEST['order_status']) && $order_status >= 0) {
  277. $map['order_status'] = $order_status;
  278. }
  279. $begin_time_span = to_timespan($begin_time);
  280. $end_time_span = to_timespan($end_time);
  281. if ($begin_time != '' && $end_time == '') {
  282. $map['_string'] = "create_time >=" . $begin_time_span . " and is_p=0";
  283. } elseif ($begin_time != '' && $end_time != '') {
  284. $map['_string'] = "create_time >=" . $begin_time_span . " and create_time <=" . $end_time_span . " and is_p=0";
  285. } elseif ($begin_time == '' && $end_time != '') {
  286. $map['_string'] = "create_time <=" . $end_time_span . " and is_p=0";
  287. }else{
  288. $map['_string'] = "is_p=0";
  289. }
  290. if ($order_status == -1) {
  291. unset($map['order_status']);
  292. }
  293. if (method_exists($this, '_filter')) {
  294. $this->_filter($map);
  295. }
  296. // $model = D("goods_order");
  297. $map['order_type'] = array('neq','pai');
  298. $list = M("goods_order")->where($map)->order('id desc')->select();
  299. // if (!empty($model)) {
  300. // $this->_list($model, $map);
  301. // }
  302. //
  303. // $list = $this->get("list");
  304. if($list)
  305. {
  306. // register_shutdown_function(array(&$this, 'export_dd'), $page+1);
  307. $refund_value = array(
  308. 'id' => '""',
  309. 'order_source' => '""',
  310. 'order_type' => '""',
  311. 'order_sn' => '""',
  312. 'order_status' => '""',
  313. 'no_refund' => '""',
  314. 'refund_buyer_status' => '""',
  315. 'refund_buyer_delivery' => '""',
  316. 'refund_seller_status' => '""',
  317. 'refund_platform' => '""',
  318. 'refund_over_time' => '""',
  319. 'refund_reason' => '""',
  320. 'number' => '""',
  321. 'total_diamonds' => '""',
  322. 'goods_diamonds' => '""',
  323. 'podcast_ticket' => '""',
  324. 'refund_diamonds' => '""',
  325. 'freight_diamonds' => '""',
  326. 'memo' => '""',
  327. 'consignee' => '""',
  328. 'consignee_mobile' => '""',
  329. 'consignee_district' => '""',
  330. 'consignee_address' => '""',
  331. 'create_date' => '""',
  332. 'podcast_id' => '""',
  333. 'viewer_id' => '""',
  334. 'goods_id' => '""',
  335. 'pay_time' => '""',
  336. 'delivery_time' => '""',
  337. 'courier_number' => '""',
  338. 'courier_offic' => '""',
  339. 'buy_type' => '""'
  340. );
  341. if($page == 1)
  342. {
  343. $content = iconv("utf-8","gbk","购物订单ID,订单来源,订单类型,订单编号,订单状态,是否允许退款,退款买方状态,退款买方配货状态,退款卖方状态,退款平台申诉,退款完成时间,退款原因,商品数量,订单总金额(含运费),商品的单价,主播抽取佣金(印票),退款金额,运费,订单备注,收货人,收货人手机号,收货人所在地区信息,详细地址,下单时间,主播人id,购买人id,商品id,付款时间,发货时间,物流单号,物流公司,订单拥有者");
  344. $content = $content . "\n";
  345. }
  346. foreach($list as $key => $value){
  347. if($value['order_source'] == 'local'){
  348. $list[$key]['order_source'] = '本地';
  349. }else{
  350. $list[$key]['order_source'] = '远程';
  351. }
  352. if($value['order_type'] == 'shop'){
  353. $list[$key]['order_type'] = '购物单';
  354. }elseif($value['order_type'] == 'pai_goods'){
  355. $list[$key]['order_type'] = '实物竞拍单';
  356. }
  357. if($value['order_status'] == 1){
  358. $list[$key]['order_status'] = '待付款';
  359. }elseif($value['order_status'] == 2){
  360. $list[$key]['order_status'] = '待发货';
  361. }elseif($value['order_status'] == 3){
  362. $list[$key]['order_status'] = '待收货';
  363. }elseif($value['order_status'] == 4){
  364. $list[$key]['order_status'] = '已收货';
  365. }elseif($value['order_status'] == 5){
  366. $list[$key]['order_status'] = '已退货';
  367. }elseif($value['order_status'] == 6){
  368. $list[$key]['order_status'] = '未付款';
  369. }elseif($value['order_status'] == 7){
  370. $list[$key]['order_status'] = '结单';
  371. }
  372. if($value['no_refund'] == 0){
  373. $list[$key]['no_refund'] = '是';
  374. }else{
  375. $list[$key]['no_refund'] = '否';
  376. }
  377. if($value['refund_buyer_status'] == 0){
  378. $list[$key]['refund_buyer_status'] = '无';
  379. }elseif($value['refund_buyer_status'] == 1){
  380. $list[$key]['refund_buyer_status'] = '退款中';
  381. }elseif($value['refund_buyer_status'] == 2){
  382. $list[$key]['refund_buyer_status'] = '退货中';
  383. }elseif($value['refund_buyer_status'] == 3){
  384. $list[$key]['refund_buyer_status'] = '退款成功';
  385. }elseif($value['refund_buyer_status'] == 4){
  386. $list[$key]['refund_buyer_status'] = '主动撤销退款';
  387. }elseif($value['refund_buyer_status'] == 5){
  388. $list[$key]['refund_buyer_status'] = '被动关闭';
  389. }
  390. if($value['refund_buyer_delivery'] == 0){
  391. $list[$key]['refund_buyer_delivery'] = '无';
  392. }elseif($value['refund_buyer_delivery'] == 1){
  393. $list[$key]['refund_buyer_delivery'] = '未发货';
  394. }elseif($value['refund_buyer_delivery'] == 2){
  395. $list[$key]['refund_buyer_delivery'] = '已发货';
  396. }
  397. if($value['refund_seller_status'] == 0){
  398. $list[$key]['refund_seller_status'] = '无';
  399. }else{
  400. $list[$key]['refund_seller_status'] = '退款成功';
  401. }
  402. if($value['refund_platform'] == 0){
  403. $list[$key]['refund_platform'] = '无';
  404. }elseif($value['refund_platform'] == 1){
  405. $list[$key]['refund_platform'] = '申诉中(卖方)';
  406. }elseif($value['refund_platform'] == 2){
  407. $list[$key]['refund_platform'] = '(卖方)申诉完成';
  408. }elseif($value['refund_platform'] == 3){
  409. $list[$key]['refund_platform'] = '买方申诉';
  410. }elseif($value['refund_platform'] == 4){
  411. $list[$key]['refund_platform'] = '买方申诉完成';
  412. }
  413. if($value['consignee_district']){
  414. $value['consignee_district'] = json_decode(htmlspecialchars_decode($value['consignee_district']), true);
  415. $list[$key]['consignee_district'] =$value['consignee_district']['province'].$value['consignee_district']['city'].$value['consignee_district']['area'];
  416. }
  417. if($value['buy_type'] == 0){
  418. $list[$key]['buy_type'] = '买给自己';
  419. }else{
  420. $list[$key]['buy_type'] = '买给主播';
  421. }
  422. $refund_value['id'] = '"' . iconv('utf-8','gbk',$list[$key]['id']) . '"';
  423. $refund_value['order_source'] = '"' . iconv('utf-8','gbk',$list[$key]['order_source']) . '"';
  424. $refund_value['order_type'] = '"' . iconv('utf-8','gbk',$list[$key]['order_type']) . '"';
  425. $refund_value['order_sn'] = '"' . iconv('utf-8','gbk','\''.+$list[$key]['order_sn']) . '"';
  426. $refund_value['order_status'] = '"' . iconv('utf-8','gbk',$list[$key]['order_status']) . '"';
  427. $refund_value['no_refund'] = '"' . iconv('utf-8','gbk',$list[$key]['no_refund']) . '"';
  428. $refund_value['refund_buyer_delivery'] = '"' . iconv('utf-8','gbk',$list[$key]['refund_buyer_status']) . '"';
  429. $refund_value['refund_buyer_delivery'] = '"' . iconv('utf-8','gbk',$list[$key]['refund_buyer_delivery']) . '"';
  430. $refund_value['refund_seller_status'] = '"' . iconv('utf-8','gbk',$list[$key]['refund_seller_status']) . '"';
  431. $refund_value['refund_platform'] = '"' . iconv('utf-8','gbk',$list[$key]['refund_platform']) . '"';
  432. $refund_value['refund_over_time'] = '"' . iconv('utf-8','gbk',$list[$key]['refund_over_time']) . '"';
  433. $refund_value['refund_reason'] = '"' . iconv('utf-8','gbk',$list[$key]['refund_reason']) . '"';
  434. $refund_value['number'] = '"' . iconv('utf-8','gbk',$list[$key]['number']) . '"';
  435. $refund_value['total_diamonds'] = '"' . iconv('utf-8','gbk',$list[$key]['total_diamonds']) . '"';
  436. $refund_value['goods_diamonds'] = '"' . iconv('utf-8','gbk',$list[$key]['goods_diamonds']) . '"';
  437. $refund_value['podcast_ticket'] = '"' . iconv('utf-8','gbk',$list[$key]['podcast_ticket']) . '"';
  438. $refund_value['refund_diamonds'] = '"' . iconv('utf-8','gbk',$list[$key]['refund_diamonds']) . '"';
  439. $refund_value['freight_diamonds'] = '"' . iconv('utf-8','gbk',$list[$key]['freight_diamonds']) . '"';
  440. $refund_value['memo'] = '"' . iconv('utf-8','gbk',$list[$key]['memo']) . '"';
  441. $refund_value['consignee'] = '"' . iconv('utf-8','gbk',$list[$key]['consignee']) . '"';
  442. $refund_value['consignee_mobile'] = '"' . iconv('utf-8','gbk','\''.+$list[$key]['consignee_mobile']) . '"';
  443. $refund_value['consignee_district'] = '"' . iconv('utf-8','gbk',$list[$key]['consignee_district']) . '"';
  444. $refund_value['consignee_address'] = '"' . iconv('utf-8','gbk',$list[$key]['consignee_address']) . '"';
  445. $refund_value['create_date'] = '"' . iconv('utf-8','gbk',$list[$key]['create_date']) . '"';
  446. $refund_value['podcast_id'] = '"' . iconv('utf-8','gbk',$list[$key]['podcast_id']) . '"';
  447. $refund_value['viewer_id'] = '"' . iconv('utf-8','gbk',$list[$key]['viewer_id']) . '"';
  448. $refund_value['goods_id'] = '"' . iconv('utf-8','gbk',$list[$key]['goods_id']) . '"';
  449. $refund_value['pay_time'] = '"' . iconv('utf-8','gbk',$list[$key]['pay_time']) . '"';
  450. $refund_value['delivery_time'] = '"' . iconv('utf-8','gbk',$list[$key]['delivery_time']) . '"';
  451. $refund_value['courier_number'] = '"' . iconv('utf-8','gbk',"\t".$list[$key]['courier_number']) . '"';
  452. $refund_value['courier_offic'] = '"' . iconv('utf-8','gbk',$list[$key]['courier_offic']) . '"';
  453. $refund_value['buy_type'] = '"' . iconv('utf-8','gbk',$list[$key]['buy_type']) . '"';
  454. $content .= implode(",", $refund_value) . "\n";
  455. }
  456. header("Content-Disposition: attachment; filename=shop_order.csv");
  457. echo $content ;
  458. }
  459. else
  460. {
  461. if($page==1)
  462. $this->error(L("NO_RESULT"));
  463. }
  464. }
  465. }