最土整合9赢cps接口
2011-06-23 16:50 来源:www.chinab4c.com 作者:ecshop专家
1:修改最土数据库
alter table `order` add column cps_type varchar(128) default  '';
alter table `order` add column cps_value varchar(128) default  '';
2:新建立cps接口文件
require_once(dirname(__FILE__) . '/app.php');
$u_id = $_REQUEST['uid'];
if (!empty($u_id))
 {
    setcookie('9ycps',$u_id,time()+3600*24*30);
 }
 if($url == ''){
 $url = 'index.php';
 }
header("Location:$url");
 
3:team/buy.php
$9ycps = $_COOKIE['9ycps'];
  if(isset($9ycps)){
   Table::UpdateCache('order',$order_id,array('cps_type'=>'9ycps'));
   Table::UpdateCache('order',$order_id,array('cps_value'=>$9ycps));
  }
4:增加查询接口
require_once(dirname(__FILE__) . '/app.php');
$condition['cps_type'] = '9ycps';
$orders = DB::LimitQuery('order', array(
 'condition' => $condition,
 'order' => 'ORDER BY team_id DESC, id ASC',
 
));
$team_ids = Utility::GetColumn($orders, 'team_id');
$teams = Table::Fetch('team', $team_ids);
foreach($teams AS $tid=>$one){
 team_state($one);
 $teams[$tid] = $one;
}
最近更新
常用插件
- ecshop二次开发售后维修卡
                                  
插件介绍: 本插件是用于专门从事电子,信息,软件等售后服务关键比...
 - ecshop整合baidu百度开放平台
                                  
大家都知道,baidu的开放平台已经很成熟了。可以方便中小型B2C企业数据...
 - ecshop2.7.2增加商品销量排序
                                  
ecshop2.7.2虽然在用户体验方面,有些提高。但是很多根本性的东西,还是...
 - ecshop注册红包插件
                                  
ecshop的红包使用是ecshop的一大特点.ecshop注册的时候,我们可以开发一...
 - ecshop中如何判断是否微信
                                  
ecshop中如何判断是否微信浏览器,我们在ecshop手机版里面。有时候需要...
 



