<?php
/**
 * [UQcms System] Copyright uqcms.com
 * QQ: 2200631718
 * Author: gj.name
 * This is NOT a freeware
*/
defined('IN_UQ') or exit('Access Denied'); class notice_uqcms extends control { function __construct(){ $this->uid = @$_SESSION['user']['uid']; parent::__construct(); } function notice_shop(){ $order_no = isset($_GET['order_no'])?$_GET['order_no']:exit('order error'); $row = $this->db->get_one("select id,uid,shop_id,order_no,total_price,message from ".table('order_info')." where order_no = '".$order_no."'"); if($row['id']){ $addr_row = $this->db->get_one("select id,oid,address,mobile,zip from ".table('order_address')." where oid = '".$row['id']."'"); $param['mobile'] = $addr_row['mobile']; $param['price'] = $row['total_price']; $param['message'] = $row['message']; $gall = $this->db->get_all("select * from ".table('order_goods')." where oid = ".$row['id']); if($gall){ foreach($gall as $v){ $ttl[] = $v['title']; } if(isset($ttl)){ $param['title'] = cut_str(implode(',', $ttl), '15'); } } $shop_row = $this->db->get_one("select id,mobile,email from ".table('shop')." where id = ".$row['shop_id']); $param['shop_mobile'] = $shop_row['mobile']; $param['shop_email'] = $shop_row['email']; $this->module('api')->notice_sms($param['shop_mobile'], 'user_notice_sgoods', $param); $this->module('api')->notice_email($param['shop_email'], 'user_notice_sgoods', $param); $urow = $this->db->get_one("select uid,wchat_uid from ".table('member')." where uid = ".$row['uid']); if($urow['uid']){ if(!empty($urow['wchat_uid']) && $urow['wchat_uid'] != '0'){ $param['link'] = cfg('site_url').'wap.php?m=order&a=index&status=2'; $result = $this->module('api')->notice_wxtpl($urow['wchat_uid'], 'user_pay_success', $param); } } } } }