<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/include/conn.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/include/webConfig.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/member/logged_data.php';
if($act == 'pa'){
if(!$memberLogged){
echo '您没有登录,请登录后再操作!';
exit;
}
$sql = "update `h_member` set h_a1 = '" . $a1 . "',h_q1 = '" . $q1 . "',h_a2 = '" . $a2 . "',h_q2 = '" . $q2 . "',h_a3 = '" . $a3 . "',h_q3 = '" . $q3 . "' where h_userName = '{$memberLogged_userName}'";
$db->query($sql);
echo '更新成功';
}
else if($act == 'pa_qq'){
if(!$memberLogged){
echo '您没有登录,请登录后再操作!';
exit;
}
$sql = "update `h_member` set h_qq = '" . $qq . "' where h_userName = '{$memberLogged_userName}'";
$db->query($sql);
echo '更新成功';
}
else if($act == 'msg_get'){
if(!$memberLogged){
echo '您没有登录,请登录后再操作!';
exit;
}
$rs = $db->get_one("select * from `h_member_msg` where (h_userName = '{$memberLogged_userName}' or h_toUserName = '{$memberLogged_userName}' or h_toUserName = '[所有会员]') and id = '{$id}'");
if(!$rs){
echo '未找到该信息';
exit;
}
echo $rs['h_info'];
//更新为已读
if($rs['h_toUserName'] == $memberLogged_userName){
if(!$rs['h_isRead']){
$sql = "update `h_member_msg` set ";
$sql .= "h_isRead = '1', ";
$sql .= "h_readTime = '" . date('Y-m-d H:i:s') . "' ";
$db->query($sql);
}
}
}
else if($act == 'msg_post'){
if(!$memberLogged){
echo '您没有登录,请登录后再操作!';
exit;
}
if(strlen($username) <= 0){
echo '请输入正确的玩家编号';
exit;
}
if(strlen($info) <= 0){
echo '内容不可为空';
exit;
}
if($memberLogged_userName == $username){
echo '请不要写给自己';
exit;
}
if($username != '[管理员]'){
$rs = $db->get_one("select * from `h_member` where h_userName = '{$username}'");
if(!$rs){
echo '您输入的玩家编号不存在';
exit;
}
}
//写给对方
$sql = "insert into `h_member_msg` set ";
$sql .= "h_userName = '" . $memberLogged_userName . "', ";
$sql .= "h_toUserName = '" . $username . "', ";
$sql .= "h_info = '" . $info . "', ";
$sql .= "h_addTime = '" . date('Y-m-d H:i:s') . "', ";
$sql .= "h_actIP = '" . getUserIP() . "' ";
$db->query($sql);
echo '信件已发出';
}
else if($act == 'point2_shop_buy'){
if(!$memberLogged){
echo '您没有登录,请登录后再操作!';
exit;
}
if(strlen($goodsIds) <= 0){
echo '您没有选择商品';
exit;
}
if(strlen($goodsNums) <= 0){
echo '商品数量错误';
exit;
}
$goodsIdsArr = explode(',',$goodsIds);
$goodsNumsArrgoodsNumsArr = explode(',',$goodsNums);
if(count($goodsIdsArr) != count($goodsNumsArr)){
echo '拆解数据出错1';
exit;
}
$goodsIN = array();
for($ci = 0;$ci < count($goodsIdsArr);$ci++){
$id = intval($goodsIdsArr[$ci]);
$num = intval($goodsNumsArr[$ci]);
if($id <= 0 || $num <= 0){
echo '拆解数据出错2';
exit;
}
$goodsIN[$id] = $num;
}
if(strlen($address) <= 0){
echo '请填写收货地址';
exit;
}
if(strlen($postcode) <= 0){
echo '请填写邮政编码';
exit;
}
if(strlen($fullname) <= 0){
echo '请填写收货人';
exit;
}
if(strlen($tel) <= 0){
echo '请填写手机号码';
exit;
}
/*
if(strlen($pwdII) <= 0){
echo '请输入安全密码';
exit;
}
$pwdII = md5($pwdII);
*/
$rs = $db->get_one("select * from `h_member` where h_userName = '{$memberLogged_userName}'");
if(!$rs){
echo '未找到您的登录信息';
exit;
}
/*
if($rs['h_point2'] < $num){
echo '您的金币不足';
exit;
}
if($rs['h_passWordII'] != $pwdII){
echo '安全密码错误';
exit;
}
*/
//循环检测和购买
$query = "select * from `h_point2_shop` where id in ({$goodsIds})";
$result = $db->query($query);
if($db->num_rows($result) <= 0){
echo '未找到任何商品';
exit;
}
$moneySum = 0;
while($rs_list = $db->fetch_array($result)){
//先遍历金额
$moneySum += intval($rs_list['h_money']) * $goodsIN[$rs_list['id']];
//等级是否符合
if($rs_list['h_minMemberLevel'] > $rs['h_level']){
echo '您不符合' , $rs_list['h_title'] , '的购买条件';
exit;
}
}
//判断金额是否够
if($moneySum > intval($rs['h_point2'])){
echo '抱歉,您的余额(' , $rs['h_point2'] , ')不足以支付:' , $moneySum;
exit;
}
//重新遍历并购买
$oid = date('YmdHis') . rndNum(3);
$db->move_first($result);
$money = 0;
while($rs_list = $db->fetch_array($result)){
$num = intval($rs_list['h_money']) * $goodsIN[$rs_list['id']];
$money += $num;
//扣钱
$sql = "update `h_member` set ";
$sql .= "h_point2 = h_point2 - {$num} ";
$sql .= "where h_userName = '" . $memberLogged_userName . "' ";
$db->query($sql);
//记录扣钱
$sql = "insert into `h_log_point2` set ";
$sql .= "h_userName = '" . $memberLogged_userName . "', ";
$sql .= "h_price = '-" . $num . "', ";
$sql .= "h_type = '商城购物', ";
$sql .= "h_about = '" . $rs_list['h_title'] . ",数量:" . $goodsIN[$rs_list['id']] . "', ";
$sql .= "h_addTime = '" . date('Y-m-d H:i:s') . "', ";
$sql .= "h_actIP = '" . getUserIP() . "' ";
$db->query($sql);
//增加进购物车
$sql = "insert into `h_member_shop_cart` set ";
$sql .= "h_oid = '" . $oid . "', ";
$sql .= "h_userName = '" . $memberLogged_userName . "', ";
$sql .= "h_pid = '" . $rs_list['id'] . "', ";
$sql .= "h_num = '" . $goodsIN[$rs_list['id']] . "', ";
$sql .= "h_addTime = '" . date('Y-m-d H:i:s') . "', ";
$sql .= "h_title = '" . $rs_list['h_title'] . "', ";
$sql .= "h_pic = '" . $rs_list['h_pic'] . "', ";
$sql .= "h_money = '" . $rs_list['h_money'] . "' ";
$db->query($sql);
//echo $sql;
}
//记录进订单
$sql = "insert into `h_member_shop_order` set ";
$sql .= "h_oid = '" . $oid . "', ";
$sql .= "h_userName = '" . $memberLogged_userName . "', ";
$sql .= "h_addTime = '" . date('Y-m-d H:i:s') . "', ";
$sql .= "h_addrAddress = '" . $address . "', ";
$sql .= "h_addrPostcode = '" . $postcode . "', ";
$sql .= "h_addrFullName = '" . $fullname . "', ";
$sql .= "h_addrTel = '" . $tel . "', ";
$sql .= "h_remark = '" . $remark . "', ";
$sql .= "h_money = '" . $money . "', ";
$sql .= "h_state = '待发货' ";
$db->query($sql);
echo '购买成功';
}
else if($act == 'point2_withdraw'){
if(!$memberLogged){
echo '您没有登录,请登录后再操作!';
exit;
}
$num = intval($num);
if($num <= 0){
echo '提现至少要' , $webInfo['h_withdrawMinMoney'] , '金币';
exit;
}
/*
if(strlen($pwdII) <= 0){
echo '请输入安全密码';
exit;
}
$pwdII = md5($pwdII);
*/
if(strlen($alipayUserName) <= 0){
echo '请输入收款支付宝账号';
exit;
}
if(strlen($alipayFullName) <= 0){
echo '请输入收款支付宝姓名';
exit;
}
$rs = $db->get_one("select *,(select count(id) from `h_member` where h_parentUserName = a.h_userName and h_isPass = 1) as comMembers from `h_member` a where h_userName = '{$memberLogged_userName}'");
if(!$rs){
echo '未找到您的登录信息';
exit;
}
if($rs['h_point2'] < $num){
echo '您的金币不足';
exit;
}
if($rs['comMembers'] < $webInfo['h_withdrawMinCom']){
echo '您的账号至少要直推' , $webInfo['h_withdrawMinCom'] , '个人才能提现';
exit;
}
/*
if($rs['h_passWordII'] != $pwdII){
echo '安全密码错误';
exit;
}*/
//扣钱
$sql = "update `h_member` set ";
$sql .= "h_point2 = h_point2 - {$num} ";
$sql .= "where h_userName = '" . $memberLogged_userName . "' ";
$db->query($sql);
//记录扣钱
$sql = "insert into `h_log_point2` set ";
$sql .= "h_
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
种植类植物区块链理财游戏源码,源码是开源无加密的 (699个子文件)
ImageUploader.crx 568KB
bootstrap.min.css 120KB
editor_ie7.css 48KB
editor_iequirks.css 46KB
editor_ie8.css 46KB
editor_ie.css 46KB
editor_gecko.css 45KB
editor.css 45KB
wap_Lottery2.css 24KB
dialog_ie7.css 17KB
dialog_ie8.css 16KB
dialog_iequirks.css 16KB
dialog_ie.css 16KB
dialog_opera.css 16KB
dialog.css 15KB
layer.css 11KB
web.css 10KB
awesome.css 8KB
normalize.css 8KB
metroStyle.css 6KB
zTreeStyle.css 6KB
css.css 6KB
graph.css 4KB
admin.css 4KB
style.css 3KB
style.css 3KB
layer.ext.css 3KB
demo.css 2KB
contents.css 2KB
templates.css 2KB
toolbar.css 1KB
wsc.css 1KB
pc.css 676B
搭建教程.docx 33KB
adminmain01.gif 47KB
gongxi.gif 42KB
gongxi.gif 42KB
gongxi.gif 42KB
copy.gif 36KB
weboa_login_2.gif 29KB
cj.gif 24KB
weboa_login_1.gif 24KB
2016071618381329624.gif 20KB
2016071618274862160.gif 18KB
036.gif 13KB
043.gif 13KB
5.gif 13KB
041.gif 10KB
title_bg_admin.gif 9KB
019.gif 8KB
020.gif 8KB
012.gif 8KB
033.gif 7KB
050.gif 6KB
load.gif 6KB
load.gif 6KB
load.gif 6KB
loading-0.gif 6KB
032.gif 6KB
zTreeStandard.gif 5KB
047.gif 5KB
057.gif 5KB
009.gif 5KB
030.gif 5KB
weboa_login_3.gif 5KB
046.gif 5KB
metro.gif 5KB
006.gif 5KB
066.gif 4KB
034.gif 4KB
029.gif 4KB
044.gif 4KB
015.gif 4KB
title.gif 4KB
027.gif 4KB
hfico.gif 4KB
hfico.gif 4KB
hfico.gif 4KB
008.gif 4KB
011.gif 4KB
048.gif 4KB
052.gif 4KB
010.gif 3KB
042.gif 3KB
admin_left_7.gif 3KB
007.gif 3KB
018.gif 3KB
admin_left_8.gif 3KB
admin_left_1.gif 3KB
admin_left_10.gif 3KB
051.gif 3KB
admin_left_9.gif 3KB
admin_left_5.gif 3KB
023.gif 3KB
admin_left_12.gif 3KB
admin_left_6.gif 3KB
admin_left_3.gif 3KB
admin_left_4.gif 3KB
admin_left_2.gif 3KB
admin_left_11.gif 3KB
共 699 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
- 利来利往2021-10-18这能算是区块链游戏?
pengyibei
- 粉丝: 14
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Strategy Consultant’s Guide to Implementing Strategy
- 迪哲医药-U:专注小分子原始创新,差异化管线厚积薄发
- 图表作文模板@考研经验超市.pdf
- INTERNET TRENDS 2015 – CODE CONFERENCE
- SVM+HOG车牌检测含数据集
- Bain-流程优化项目总体方法-20140331-Helen.pdf
- 流程优化项目过程中流程梳理过程方法
- 量化市场追踪周报(2024W49):主力资金情绪偏弱,主动权益基金增配制造、消费板块
- 是咨询工作获取信息的一种常用方案 访谈技巧.pptx
- 价值280元帝国CMS7.5会员中心美化版V1.3GBK&UTF8 帝国cms会员中心模板
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功