|
- <?php
- /*
- * wechat 2.0
- * Copyright (c) 2016 yixi wei http://zhizhuchuxing.com/
- * Date: 2016.7.12
- * Something is to pay QQ1062140302
- */
- if (ALLOW_ORIGIN)
- header("Access-Control-Allow-Origin:*");
- date_default_timezone_set('PRC');
- //$userid =$_COOKIE['user_id'];
- //$openid = $_COOKIE['open_id'];
- $id = isset($_POST['id'])?$_POST['id']:'0';
- if(!$id){
- echo json_encode(array('code'=>'1','info'=>'无id','list'=>'fail'));
- }
- $sql = "update wechat_customer set cancel_flag =1 where id =".$id;
- writeLog($sql);
- $rs = $pdo->query($sql);
- if($rs){
- echo json_encode(array('code'=>'0','info'=>'0','list'=>'success'));
- }else{
- echo json_encode(array('code'=>'0','info'=>'','list'=>'fail'));
- }
|