cps 领克特广告联盟 查询接口
2016-07-07 15:01 来源:www.chinab4c.com 作者:ecshop专家
<?php header('Content-Type: text/html; charset=utf-8'); define('IN_ECS', true); require($_SERVER['DOCUMENT_ROOT']. '/includes/init.php'); //获得日期进行处理 $d = $_GET['yyymmdd']; if(strpos($d,'-')){ $d_arr = explode('-',$d); if(strlen($d_arr['0'])==4&&strlen($d_arr['1'])==2&&strlen($d_arr['2'])==2){ $min = mktime('0','0','0',$d_arr['1'],$d_arr['2'],$d_arr['0'])-28800; $max = mktime('0','0','0',$d_arr['1'],$d_arr['2']+1,$d_arr['0'])-28800; }else{exit('日期格式错误');} }else{ $d = intval($d); $Y = substr($d,0,4); $M = substr($d,4,2); $D = substr($d,6,2); if(strlen($Y)==4&&strlen($M)==2&&strlen($D)==2){ $min = mktime('0','0','0',$M,$D,$Y)-28800; $max = mktime('0','0','0',$M,$D+1,$Y)-28800; }else{exit('日期格式错误');} } //根据日期筛选订单 $sql = 'SELECT order_id,order_sn,add_time,goods_amount,cps_extension,order_status,shipping_status,pay_status FROM '.$GLOBALS['ecs']->table('order_info')." WHERE from_ad=47 and add_time>$min and add_time<$max"; $order_info = $GLOBALS['db']->getAll($sql); if($order_info){ foreach($order_info as $key=>$val){ if($val['order_status']==0){$o_stat = 100;}else if($val['order_status']==5&&$val['shipping_status']==1&&$val['pay_status']==1){$o_stat = 200;}else{$o_stat = 300;} //获得订单中商品的信息 $goods_info_all = $GLOBALS['db']->getAll('SELECT * FROM '.$GLOBALS['ecs']->table('order_goods')." WHERE order_id=$val[order_id]"); foreach($goods_info_all as $key=>$vals){ echo "2\t".date('His',$val['add_time']+28800)."\t".$val['cps_extension']."\t".$val['order_sn']."\t".$vals['goods_sn']."\t1\t".$vals['goods_number']."\t".$vals['goods_price']."\t1"."\t".$o_stat."\n"; } } } ?> |
回答:
WHERE from_ad=47 and add_time>$min and add_time<$max"; from_ad=47请问这个是怎么来的啊? |
不错,对于刚开始写接口的应该有帮助。 |
最近更新
常用插件
- ecshop二次开发详细页面生
插件介绍: ECSHOP系统,在很多时候,很多商品没有人购买,不但购买的人...
- ecshop2.7.1打印发货单插件
ecshop2.7.1打印发货单插件介绍:ecshop2.7.1和以前的ecshop版本不一样,ecs...
- ecshop分类批量扩展插件
ecshop分类批量扩展插件,这个插件是ecshop插件里面比较核心的插件。我们...
- ecshop商品分类名称增加样
ecshop插件介绍:本插件可以方便在后台管理,为ecshop商品分类名称增加样...
- ecshop二次商品订购人信息
ecshop二次商品订购人信息填写插件,有时候给朋友送花,或者是送礼品的...
ecshop热门问答
ecshop热门资料
ecshop人民币
ecshop留空
ecshop行动
ecshopattempt
ecshop模板制作
ecshop想赚钱
ecshop白开水
ecshop价格表
ecshopamount
ecshop添加新商品
ecshop我是医生
ecshop品牌分类。地区调用
ecshop初学者
ecshop搜索栏
ecshop实惠
ecshopopen
ecshop清单
ecshop乱跑
ecshopErrcode
ecshop成人用品
ecshopphpcms
ecshop附图
ecshop加号
ecshopPNG
ecshop夺宝网
ecshop流行女包
ecshop换行
ecshop首页商品显示
ecshop爱宠一号店
ecshop一行数量