function member_login_qq($qq_openid) { if (!empty($qq_openid)) { $qq_fans = mysqld_select("SELECT * FROM " . table('qq_qqfans') . " WHERE qq_openid=:qq_openid ", array(':qq_openid' => $qq_openid)); if (!empty($qq_fans['qq_openid'])) { $member = mysqld_select("SELECT * FROM " . table('member') . " where openid=:openid limit 1", array(':openid' => $qq_fans['openid'])); if (!empty($member['openid'])) { $_SESSION[MOBILE_ACCOUNT] = $member; } else { clearloginfrom(); header("location:" . create_url('mobile', array('name' => 'shopwap', 'do' => 'regedit', 'third_login' => 'true'))); } } } }
$payment = mysqld_select("select * from " . table("payment") . " where enabled=1 and code=:payment", array(':payment' => $_GP['payment'])); if (empty($payment['id'])) { message("没有获取到付款方式"); } $paytype = $this->getPaytypebycode($payment['code']); $data = array('openid' => $openid, 'ordersn' => $ordersns, 'price' => $goodsprice + $dispatchprice, 'dispatchprice' => $dispatchprice, 'goodsprice' => $goodsprice, 'credit' => $goodscredit, 'status' => 0, 'paytype' => $paytype, 'sendtype' => intval($dispatchitem['sendtype']), 'dispatchexpress' => $dispatchitem['express'], 'dispatch' => $dispatchid, 'paytypecode' => $payment['code'], 'paytypename' => $payment['name'], 'remark' => $_GP['remark'], 'address_mobile' => $address['mobile'], 'address_realname' => $address['realname'], 'address_province' => $address['province'], 'address_city' => $address['city'], 'address_area' => $address['area'], 'address_address' => $address['address'], 'createtime' => time()); mysqld_insert('shop_order', $data); $orderid = mysqld_insertid(); //插入订单商品 foreach ($allgoods as $row) { if (empty($row)) { continue; } $d = array('goodsid' => $row['id'], 'orderid' => $orderid, 'total' => $row['total'], 'price' => $row['marketprice'], 'createtime' => time(), 'optionid' => $row['optionid']); $o = mysqld_select("select title from " . table('shop_goods_option') . " where id=:id limit 1", array(":id" => $row['optionid'])); if (!empty($o)) { $d['optionname'] = $o['title']; } //获取商品id $ccate = $row['ccate']; mysqld_insert('shop_order_goods', $d); } //清空购物车 if (!$direct) { mysqld_delete("shop_cart", array("session_id" => $openid)); } $this->setOrderStock($orderid); clearloginfrom(); header("Location:" . mobile_url('pay', array('orderid' => $orderid, 'topay' => '1'))); } include themePage('confirm');