denise92 发表于 2012-3-30 14:58
多谢 跳海想自尽的鱼 的分享~~ 之前没留意到,哈哈^^
退还金额的部分我是直接在资料库新增了几个栏位,把 ...
我是修改程序,直接在取消那个动作那添加退还金币的操作,这个很好弄- //退还金币
- $orderdata = DB::fetch(DB::query("SELECT * FROM ".DB::table('market_order')." WHERE id = $_G[gp_orderid]"));
- $goodid = $orderdata['gid'];
- $query = DB::query("SELECT * FROM ".DB::table('market_goods')." WHERE id =$goodid AND available = 1");
- $log = DB::fetch($query);
- $log['price'] = explode('|',$log['price']);
- $price = $log['price'][1];
- $cutcreditsarray = array($log['price'][0] => $price);
- updatemembercount($_G[uid], $cutcreditsarray, 1, 'BGO', $goodid);
- DB::update("market_order",array('status'=>'userdel'),"uid = $_G[uid] AND id = $_G[gp_orderid]");
- //更新库存
- if($log['iscard'] == 1){
- DB::query("UPDATE ".DB::table('market_goods')." SET num = num + '1',card = '$log[newcard]' WHERE id = $goodid");
- } else {
- DB::query("UPDATE ".DB::table('market_goods')." SET num = num + '1' WHERE id = $goodid");
- }
复制代码 |