Exemple #1
0
 }
 $data['avg_price'] = intval($_GPC['avg_price']);
 if (empty($_GPC['open_time_start']) || empty($_GPC['open_time_end'])) {
     message('营业时间不能为空');
 } else {
     $data['open_time'] = $_GPC['open_time_start'] . '-' . $_GPC['open_time_end'];
 }
 $data['recommend'] = urlencode(trim($_GPC['recommend']));
 $data['special'] = trim($_GPC['special']) ? urlencode(trim($_GPC['special'])) : message('特色服务不能为空');
 $data['introduction'] = urlencode(trim($_GPC['introduction']));
 $data['offset_type'] = 1;
 $maxid = pdo_fetchcolumn('SELECT MAX(id) FROM ' . tablename('coupon_location'));
 $data['sid'] = $maxid + 1;
 load()->classs('coupon');
 $acc = new coupon($acid);
 $status = $acc->LocationAdd($data);
 if (is_error($status)) {
     message($status['message'], '', 'error');
 }
 $insert['uniacid'] = $_W['uniacid'];
 $insert['acid'] = $acid;
 $insert['business_name'] = trim($_GPC['business_name']);
 $insert['branch_name'] = trim($_GPC['branch_name']);
 $insert['category'] = iserializer($in_cate);
 $insert['province'] = trim($_GPC['reside']['province']);
 $insert['city'] = trim($_GPC['reside']['city']);
 $insert['district'] = trim($_GPC['reside']['district']);
 $insert['address'] = trim($_GPC['address']);
 $insert['longitude'] = trim($_GPC['baidumap']['lng']);
 $insert['latitude'] = trim($_GPC['baidumap']['lat']);
 $insert['telephone'] = trim($_GPC['telephone']);