Пример #1
0
            log_coupon($coupon_data['sn'], $msg, $query_id);
            send_use_coupon_sms(intval($coupon_data['id']));
            //发送团购券确认消息
            send_use_coupon_mail(intval($coupon_data['id']));
            //发送团购券确认消息
            header('Content-type: text/xml; charset=utf-8');
            $xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n";
            $xml .= "<coupon>\r\n";
            $xml .= "<result>true</result>\r\n";
            $xml .= "<product>" . $coupon_data['sub_name'] . "</product>\r\n";
            $xml .= "<price>" . round($coupon_data['price'], 2) . "</price>\r\n";
            $xml .= "</coupon>";
            echo $xml;
            exit;
        }
    } else {
        $msg = $GLOBALS['lang']['COUPON_USE_LOG'] . ":(" . $callerid . ")" . $GLOBALS['lang']['PASSWORD_ERROR'];
        log_coupon($sn, $msg, $query_id);
        header('Content-type: text/xml; charset=utf-8');
        $xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n";
        $xml .= "<coupon>\r\n";
        $xml .= "<result>false</result>\r\n";
        $xml .= "</coupon>";
        echo $xml;
        exit;
    }
} else {
    header("Content-Type:text/html; charset=utf-8");
    echo "非法访问";
    exit;
}
Пример #2
0
                //发送团购券确认消息
                $msg_data['dest'] = $SrcMobile;
                $msg_data['send_type'] = 0;
                $msg_data['content'] = $coupon_data['sub_name'] . "(" . $coupon_data['sn'] . ")" . sprintf($GLOBALS['lang']['COUPON_USED_OK'], to_date($now));
                $msg_data['send_time'] = 0;
                $msg_data['is_send'] = 0;
                $msg_data['create_time'] = get_gmtime();
                $msg_data['user_id'] = 0;
                $msg_data['is_html'] = 0;
                $GLOBALS['db']->autoExecute(DB_PREFIX . "deal_msg_list", $msg_data);
                //插入
                exit;
            }
        } else {
            $msg = $GLOBALS['lang']['COUPON_USE_LOG'] . ":(" . $SrcMobile . ")" . $GLOBALS['lang']['COUPON_INVALID'];
            log_coupon($sn, $msg, $RecvTime);
            $msg_data['dest'] = $SrcMobile;
            $msg_data['send_type'] = 0;
            $msg_data['content'] = $GLOBALS['lang']['COUPON_INVALID'];
            $msg_data['send_time'] = 0;
            $msg_data['is_send'] = 0;
            $msg_data['create_time'] = get_gmtime();
            $msg_data['user_id'] = 0;
            $msg_data['is_html'] = 0;
            $GLOBALS['db']->autoExecute(DB_PREFIX . "deal_msg_list", $msg_data);
            //插入
            exit;
        }
    }
    //end 使用
}
Пример #3
0
                 $msg_data['send_type'] = 0;
                 $msg_data['content'] = $coupon_data['sub_name'] . "(" . $coupon_data['sn'] . ")" . sprintf($GLOBALS['lang']['COUPON_USED_OK'], to_date($now));
                 $msg_data['send_time'] = 0;
                 $msg_data['is_send'] = 0;
                 $msg_data['create_time'] = NOW_TIME;
                 $msg_data['user_id'] = 0;
                 $msg_data['is_html'] = 0;
                 $GLOBALS['db']->autoExecute(DB_PREFIX . "deal_msg_list", $msg_data);
                 //插入
                 echo "ok";
                 exit;
             }
         }
     } else {
         $msg = $GLOBALS['lang']['COUPON_USE_LOG'] . ":(" . $SrcMobile . ")" . $GLOBALS['lang']['COUPON_INVALID'];
         if (log_coupon($sn, $msg, $RecvTime) && $SrcMobile) {
             $msg_data['dest'] = $SrcMobile;
             $msg_data['send_type'] = 0;
             $msg_data['content'] = $GLOBALS['lang']['COUPON_INVALID'];
             $msg_data['send_time'] = 0;
             $msg_data['is_send'] = 0;
             $msg_data['create_time'] = NOW_TIME;
             $msg_data['user_id'] = 0;
             $msg_data['is_html'] = 0;
             $GLOBALS['db']->autoExecute(DB_PREFIX . "deal_msg_list", $msg_data);
             //插入
             echo "ok";
             exit;
         }
     }
 }