本文整理汇总了PHP中get_setmeal_one函数的典型用法代码示例。如果您正苦于以下问题:PHP get_setmeal_one函数的具体用法?PHP get_setmeal_one怎么用?PHP get_setmeal_one使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_setmeal_one函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: user_register
function user_register($username, $password, $member_type = 0, $email, $uc_reg = true)
{
global $db, $timestamp, $_CFG, $online_ip, $QS_pwdhash;
$member_type = intval($member_type);
$ck_username = get_user_inusername($username);
$ck_email = get_user_inemail($email);
if ($member_type == 0) {
return -1;
} elseif (!empty($ck_username)) {
return -2;
} elseif (!empty($ck_email)) {
return -3;
}
$pwd_hash = randstr();
$password_hash = md5(md5($password) . $pwd_hash . $QS_pwdhash);
$setsqlarr['username'] = $username;
$setsqlarr['password'] = $password_hash;
$setsqlarr['pwd_hash'] = $pwd_hash;
$setsqlarr['email'] = $email;
$setsqlarr['utype'] = intval($member_type);
$setsqlarr['reg_time'] = $timestamp;
$setsqlarr['reg_ip'] = $online_ip;
$insert_id = inserttable(table('members'), $setsqlarr, true);
if ($member_type == "1") {
if (!$db->query("INSERT INTO " . table('members_points') . " (uid) VALUES ('{$insert_id}')")) {
return false;
}
if (!$db->query("INSERT INTO " . table('members_setmeal') . " (uid) VALUES ('{$insert_id}')")) {
return false;
}
$points = get_cache('points_rule');
include_once QISHI_ROOT_PATH . 'include/fun_company.php';
set_consultant($insert_id);
if ($points['reg_points']['value'] > 0) {
report_deal($insert_id, $points['reg_points']['type'], $points['reg_points']['value']);
$operator = $points['reg_points']['type'] == "1" ? "+" : "-";
write_memberslog($insert_id, 1, 9001, $username, "新注册会员,({$operator}{$points['reg_points']['value']}),(剩余:{$points['reg_points']['value']})", 1, 1010, "注册会员系统自动赠送积分", "{$operator}{$points['reg_points']['value']}", "{$points['reg_points']['value']}");
//积分变更记录
write_setmeallog($insert_id, $username, "注册会员系统自动赠送:({$operator}{$points['reg_points']['value']}),(剩余:{$points['reg_points']['value']})", 1, '0.00', '1', 1, 1);
}
if ($_CFG['reg_service'] > 0) {
set_members_setmeal($insert_id, $_CFG['reg_service']);
$setmeal = get_setmeal_one($_CFG['reg_service']);
write_memberslog($insert_id, 1, 9002, $username, "注册会员系统自动赠送:{$setmeal['setmeal_name']}", 2, 1011, "开通服务(系统赠送)", "-", "-");
//套餐变更记录
write_setmeallog($insert_id, $username, "注册会员系统自动赠送:{$setmeal['setmeal_name']}", 1, '0.00', '1', 2, 1);
}
}
if (defined('UC_API') && $uc_reg) {
include_once QISHI_ROOT_PATH . 'uc_client/client.php';
$uc_reg_uid = uc_user_register($username, $password, $email);
}
write_memberslog($insert_id, $member_type, 1000, $username, "注册成为会员");
return $insert_id;
}
开发者ID:dalinhuang,项目名称:yy,代码行数:55,代码来源:fun_user.php
示例2: order_paid
function order_paid($v_oid)
{
global $db, $timestamp, $_CFG;
$order = $db->getone("select * from " . table('order') . " WHERE oid ='{$v_oid}' AND is_paid= '1' LIMIT 1 ");
if ($order) {
$user = get_user($order['uid']);
$sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
if (!$db->query($sql)) {
return false;
}
if ($order['amount'] == '0.00') {
$ismoney = 1;
} else {
$ismoney = 2;
}
if ($order['points'] > 0) {
report_deal($order['uid'], 1, $order['points']);
$user_points = get_user_points($order['uid']);
$notes = "操作人:{$_SESSION['admin_name']},说明:确认收款。收款金额:{$order['amount']} 。" . date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元,(+{$order['points']}),(剩余:{$user_points}),订单:{$v_oid}";
write_memberslog($order['uid'], 4, 9101, $user['username'], $notes);
write_setmeallog($order['uid'], $user['username'], $notes, 4, $order['amount'], $ismoney, 1, 4);
}
if ($order['setmeal'] > 0) {
set_members_setmeal($order['uid'], $order['setmeal']);
$setmeal = get_setmeal_one($order['setmeal']);
$notes = "操作人:{$_SESSION['admin_name']},说明:确认收款,收款金额:{$order['amount']} 。" . date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元并开通{$setmeal['setmeal_name']}";
write_memberslog($order['uid'], 4, 9102, $user['username'], $notes);
write_setmeallog($order['uid'], $user['username'], $notes, 4, $order['amount'], $ismoney, 2, 4);
}
//发送邮件
$mailconfig = get_cache('mailconfig');
if ($mailconfig['set_payment'] == "1" && $user['email_audit'] == "1") {
dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_mail.php?uid=" . $order['uid'] . "&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
}
//发送邮件完毕
//sms
$sms = get_cache('sms_config');
if ($sms['open'] == "1" && $sms['set_payment'] == "1" && $user['mobile_audit'] == "1") {
dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid=" . $order['uid'] . "&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
}
//sms
write_log("将订单号为" . $v_oid . "的订单设置为确认收款", $_SESSION['admin_name'], 3);
return true;
}
return true;
}
开发者ID:winiceo,项目名称:job,代码行数:46,代码来源:admin_train_fun.php
示例3: intval
$ismoney = 2;
} else {
$amount = '0.00';
$ismoney = 1;
}
$regpoints_num = intval($_POST['regpoints_num']);
if ($_POST['regpoints'] == "y") {
write_memberslog($insert_id, 1, 9001, $sql['username'], "<span style=color:#FF6600>注册会员系统自动赠送!(+{$regpoints_num})</span>", 1, 1010, "注册会员系统自动赠送", "+{$regpoints_num}", "{$regpoints_num}");
//会员积分变更记录。管理员后台修改会员的积分。3表示:管理员后台修改
$notes = "操作人:{$_SESSION['admin_name']},说明:后台添加企业会员并赠送(+{$regpoints_num})积分,收取费用:{$amount}元";
write_setmeallog($insert_id, $sql['username'], $notes, 4, $amount, $ismoney, 1, 1);
report_deal($insert_id, 1, $regpoints_num);
}
$reg_service = intval($_POST['reg_service']);
if ($reg_service > 0) {
$service = get_setmeal_one($reg_service);
write_memberslog($insert_id, 1, 9002, $sql['username'], "开通服务({$service['setmeal_name']})", 2, 1011, "开通服务", "", "");
set_members_setmeal($insert_id, $reg_service);
//会员积分变更记录。管理员后台修改会员的积分。3表示:管理员后台修改
$notes = "操作人:{$_SESSION['admin_name']},说明:后台添加企业会员并开通服务({$service['setmeal_name']}),收取费用:{$amount}元";
write_setmeallog($insert_id, $sql['username'], $notes, 4, $amount, $ismoney, 2, 1);
}
if (intval($_POST['is_money']) && $_POST['log_amount'] && !$notes) {
$notes = "操作人:{$_SESSION['admin_name']},说明:后台添加企业会员,未赠送积分,未开通套餐,收取费用:{$amount}元";
write_setmeallog($insert_id, $sql['username'], $notes, 4, $amount, 2, 2, 1);
}
}
$link[0]['text'] = "返回列表";
$link[0]['href'] = "?act=members_list";
$link[1]['text'] = "继续添加";
$link[1]['href'] = "?act=members_add";
开发者ID:dalinhuang,项目名称:yy,代码行数:31,代码来源:admin_company.php
示例4: order_paid
function order_paid($v_oid)
{
global $db, $timestamp, $_CFG;
$order = $db->getone("select * from " . table('order') . " WHERE oid ='{$v_oid}' AND is_paid= '1' LIMIT 1 ");
//判断是否支付完成(防止支付完立即关闭页面 从而导致未开通服务)
if (intval($order['is_paid']) == 1) {
$sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
if (!$db->query($sql)) {
return false;
}
//套餐、积分支付
if ($order['pay_type'] == '1' || $order['pay_type'] == '4') {
$order_name = "套餐积分订单";
$user = get_user_info($order['uid']);
if ($order['amount'] == '0.00') {
$ismoney = 1;
} else {
$ismoney = 2;
}
if ($order['points'] > 0) {
report_deal($order['uid'], 1, $order['points']);
$user_points = get_user_points($order['uid']);
$notes = date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元,(+{$order['points']}),(剩余:{$user_points}),订单:{$v_oid}";
write_memberslog($order['uid'], 1, 9001, $user['username'], $notes);
//会员套餐变更记录。会员购买成功。2表示:会员自己购买
write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 1);
} elseif ($order['setmeal'] > 0) {
set_members_setmeal($order['uid'], $order['setmeal']);
$setmeal = get_setmeal_one($order['setmeal']);
$notes = date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元并开通{$setmeal['setmeal_name']}";
write_memberslog($order['uid'], 1, 9002, $user['username'], $notes);
//会员套餐变更记录。会员购买成功。2表示:会员自己购买
write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 2, 1);
}
} elseif ($order['pay_type'] == '2') {
$order_name = "广告位订单";
write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "申请广告位:<strong>{$order['description']}</strong>,(花费: {$order['amount']})。", 1, 1020, "申请广告位", "-{$order['amount']}", "{$user_points}");
} elseif ($order['pay_type'] == '3') {
$order_name = "短信套餐订单";
$user = get_user_info($order['uid']);
if ($order['setmeal'] > 0) {
//查看短信套餐
set_members_sms($order['uid'], intval($order['setmeal']));
//支付成功,向用户增加短信条数
$user_points = get_user_setmeal($order['uid']);
write_memberslog($_SESSION['uid'], 1, 9003, $_SESSION['username'], "短信充值套餐:<strong>{$order['description']}</strong>,(- {$order['amount']}),(剩余:{$user_points['set_sms']})", 1, 1020, "申请广告位", "- {$order['amount']}", "{$user_points['set_sms']}");
}
}
//sendemail
$mailconfig = get_cache('mailconfig');
if ($mailconfig['set_payment'] == "1" && $user['email_audit'] == "1" && $order['amount'] > 0) {
dfopen("{$_CFG['site_domain']}{$_CFG['site_dir']}plus/asyn_mail.php?uid={$order['uid']}&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
}
//sms
$sms = get_cache('sms_config');
if ($sms['open'] == "1" && $sms['set_payment'] == "1" && $user['mobile_audit'] == "1" && $order['amount'] > 0) {
dfopen("{$_CFG['site_domain']}{$_CFG['site_dir']}plus/asyn_sms.php?uid={$order['uid']}&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
}
//微信通知
set_payment($order['uid'], $order_name, $order['oid'], $order['amount']);
return true;
} else {
return true;
}
}
开发者ID:winiceo,项目名称:fenzhan,代码行数:65,代码来源:fun_company.php
示例5: user_register
//.........这里部分代码省略.........
$setsqlarr['reg_time'] = $timestamp;
$setsqlarr['reg_ip'] = $online_ip;
$setsqlarr['reg_type'] = 1;
if ($weixin_openid != '') {
$setsqlarr['weixin_nick'] = $weixin_nickname;
$setsqlarr['weixin_openid'] = $weixin_openid;
$setsqlarr['bindingtime'] = $setsqlarr['reg_time'];
$w_uid = $db->getone("select uid from " . table("members") . " where weixin_openid='" . $weixin_openid . "'");
if ($w_uid) {
return $w_uid['uid'];
}
}
$insert_id = $db->inserttable(table('members'), $setsqlarr, true);
if ($member_type == "1") {
$setarr['uid'] = $insert_id;
if (!$db->inserttable(table("members_points"), $setarr)) {
return false;
}
if (!$db->inserttable(table("members_setmeal"), $setarr)) {
return false;
}
$points = get_cache('points_rule');
include_once QISHI_ROOT_PATH . 'include/fun_company.php';
set_consultant($insert_id);
if ($points['reg_points']['value'] > 0) {
report_deal($insert_id, $points['reg_points']['type'], $points['reg_points']['value']);
$operator = $points['reg_points']['type'] == "1" ? "+" : "-";
write_memberslog($insert_id, 1, 9001, $username, "新注册会员,({$operator}{$points['reg_points']['value']}),(剩余:{$points['reg_points']['value']})", 1, 1010, "注册会员系统自动赠送积分", "{$operator}{$points['reg_points']['value']}", "{$points['reg_points']['value']}");
//积分变更记录
write_setmeallog($insert_id, $username, "注册会员系统自动赠送:({$operator}{$points['reg_points']['value']}),(剩余:{$points['reg_points']['value']})", 1, '0.00', '1', 1, 1);
}
if ($_CFG['reg_service'] > 0) {
set_members_setmeal($insert_id, $_CFG['reg_service']);
$setmeal = get_setmeal_one($_CFG['reg_service']);
write_memberslog($insert_id, 1, 9002, $username, "注册会员系统自动赠送:{$setmeal['setmeal_name']}", 2, 1011, "开通服务(系统赠送)", "-", "-");
//套餐变更记录
write_setmeallog($insert_id, $username, "注册会员系统自动赠送:{$setmeal['setmeal_name']}", 1, '0.00', '1', 2, 1);
}
} elseif ($member_type == '2') {
$setarr['uid'] = $insert_id;
if (!$db->inserttable(table("members_points"), $setarr)) {
return false;
}
$points = get_cache('points_rule');
include_once QISHI_ROOT_PATH . 'include/fun_personal.php';
if ($points['reg_per_points']['value'] > 0) {
report_deal($insert_id, $points['reg_per_points']['type'], $points['reg_per_points']['value']);
$operator = $points['reg_per_points']['type'] == "1" ? "+" : "-";
write_memberslog($insert_id, 2, 9001, $username, "新注册会员,({$operator}{$points['reg_per_points']['value']}),(剩余:{$points['reg_per_points']['value']})", 2, 1010, "注册会员系统自动赠送积分", "{$operator}{$points['reg_per_points']['value']}", "{$points['reg_per_points']['value']}");
}
} elseif ($member_type == '4') {
$setarr['uid'] = $insert_id;
if (!$db->inserttable(table("members_points"), $setarr)) {
return false;
}
if (!$db->inserttable(table("members_train_setmeal"), $setarr)) {
return false;
}
$points = get_cache('points_rule');
if ($points['trainreg_points']['value'] > 0) {
include_once QISHI_ROOT_PATH . 'include/fun_train.php';
report_deal($insert_id, $points['trainreg_points']['type'], $points['trainreg_points']['value']);
$operator = $points['trainreg_points']['type'] == "1" ? "+" : "-";
write_memberslog($insert_id, 4, 9101, $username, "新注册会员,({$operator}{$points['trainreg_points']['value']}),(剩余:{$points['trainreg_points']['value']})");
write_setmeallog($insert_id, $username, "注册会员系统自动赠送:({$operator}{$points['trainreg_points']['value']}),(剩余:{$points['trainreg_points']['value']})", 1, '0.00', '1', 1, 4);
}
开发者ID:winiceo,项目名称:job,代码行数:67,代码来源:fun_user.php
示例6: get_payment
$smarty->assign('payment', get_payment());
$smarty->display('member_hunter/hunter_order_add_setmeal.htm');
} elseif ($act == 'setmeal_order_add_save' && $_CFG['operation_hunter_mode'] == "2") {
if (empty($hunter_profile['huntername'])) {
$link[0]['text'] = "填写猎头资料";
$link[0]['href'] = 'hunter_info.php?act=hunter_profile';
showmsg("请先填写您的猎头资料!", 1, $link);
}
$myorder = get_user_order($_SESSION['uid'], 1);
$myorder = count($myorder);
if ($myorder >= 5) {
$link[0]['text'] = "立即查看";
$link[0]['href'] = '?act=order_list&is_paid=1';
showmsg("未处理的订单不能超过 5 条,请先处理后再次申请!", 1, $link, true, 8);
}
$setmeal = get_setmeal_one($_POST['setmealid']);
if ($setmeal && $setmeal['apply'] == "1") {
$payment_name = empty($_POST['payment_name']) ? showmsg("请选择付款方式!", 1) : $_POST['payment_name'];
$paymenttpye = get_payment_info($payment_name);
if (empty($paymenttpye)) {
showmsg("支付方式错误!", 0);
}
$fee = number_format($setmeal['expense'] / 100 * $paymenttpye['fee'], 1, '.', '');
//手续费
$order['oid'] = strtoupper(substr($paymenttpye['typename'], 0, 1)) . "-" . date('ymd', time()) . "-" . date('His', time());
//订单号
$order['v_url'] = $_CFG['site_domain'] . $_CFG['site_dir'] . "include/payment/respond_" . $paymenttpye['typename'] . ".php";
$order['v_amount'] = $setmeal['expense'] + $fee;
//金额
$order_id = add_order($_SESSION['uid'], $order['oid'], $setmeal['expense'], $payment_name, "开通服务:" . $setmeal['setmeal_name'], $timestamp, "", $setmeal['id'], 3, 1);
if ($order_id) {
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:hunter_service.php
示例7: intval
//2015-01-09薪资短信设置 set_sms
$setsqlarr['set_sms'] = intval($_POST['set_sms']);
if ($db->inserttable(table('setmeal'), $setsqlarr)) {
//填写管理员日志
write_log("后台成功添加套餐", $_SESSION['admin_name'], 3);
$link[0]['text'] = "返回套餐设置";
$link[0]['href'] = "?act=set_meal";
adminmsg("添加成功!", 2, $link);
} else {
//填写管理员日志
write_log("后台添加套餐失败", $_SESSION['admin_name'], 3);
adminmsg("添加失败!", 0);
}
} elseif ($act == 'set_meal_edit') {
get_token();
$smarty->assign('show', get_setmeal_one(intval($_GET['id'])));
$smarty->assign('navlabel', "set_meal");
$smarty->display('set_com/admin_mode_meal_edit.htm');
} elseif ($act == 'set_meal_edit_save') {
check_token();
$setsqlarr['setmeal_name'] = trim($_POST['setmeal_name']) ? trim($_POST['setmeal_name']) : adminmsg('套餐名称不能为空!', 1);
$setsqlarr['days'] = intval($_POST['days']);
$setsqlarr['original_price'] = intval($_POST['original_price']);
$setsqlarr['expense'] = intval($_POST['expense']);
$setsqlarr['jobs_ordinary'] = intval($_POST['jobs_ordinary']);
$setsqlarr['download_resume_ordinary'] = intval($_POST['download_resume_ordinary']);
$setsqlarr['download_resume_senior'] = intval($_POST['download_resume_senior']);
$setsqlarr['interview_ordinary'] = intval($_POST['interview_ordinary']);
$setsqlarr['interview_senior'] = intval($_POST['interview_senior']);
$setsqlarr['talent_pool'] = intval($_POST['talent_pool']);
$setsqlarr['recommend_num'] = intval($_POST['recommend_num']);
开发者ID:source-hunter,项目名称:74cms,代码行数:31,代码来源:admin_set_com.php
示例8: order_paid
function order_paid($v_oid)
{
global $db, $timestamp, $_CFG;
$order = $db->getone("select * from " . table('order') . " WHERE oid ='{$v_oid}' AND is_paid= '1' LIMIT 1 ");
if ($order) {
$user = get_user_info($order['uid']);
$sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
if (!$db->query($sql)) {
return false;
}
if ($order['amount'] == '0.00') {
$ismoney = 1;
} else {
$ismoney = 2;
}
if ($order['points'] > 0) {
report_deal($order['uid'], 1, $order['points']);
$user_points = get_user_points($order['uid']);
$notes = date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元,(+{$order['points']}),(剩余:{$user_points}),订单:{$v_oid}";
write_memberslog($order['uid'], 1, 9001, $user['username'], $notes);
//会员套餐变更记录。会员购买成功。2表示:会员自己购买
write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 1);
} elseif ($order['setmeal'] > 0) {
set_members_setmeal($order['uid'], $order['setmeal']);
$setmeal = get_setmeal_one($order['setmeal']);
$notes = date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元并开通{$setmeal['setmeal_name']}";
write_memberslog($order['uid'], 1, 9002, $user['username'], $notes);
//会员套餐变更记录。会员购买成功。2表示:会员自己购买
write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 2, 1);
}
//sendemail
$mailconfig = get_cache('mailconfig');
if ($mailconfig['set_payment'] == "1" && $user['email_audit'] == "1" && $order['amount'] > 0) {
dfopen("{$_CFG['site_domain']}{$_CFG['site_dir']}plus/asyn_mail.php?uid={$order['uid']}&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
}
//sendemail
//sms
$sms = get_cache('sms_config');
if ($sms['open'] == "1" && $sms['set_payment'] == "1" && $user['mobile_audit'] == "1" && $order['amount'] > 0) {
dfopen("{$_CFG['site_domain']}{$_CFG['site_dir']}plus/asyn_sms.php?uid={$order['uid']}&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
}
//sms
return true;
}
return true;
}
开发者ID:dalinhuang,项目名称:yy,代码行数:46,代码来源:fun_company.php
示例9: get_user_info
$user = get_user_info($order['uid']);
if ($order['amount'] == '0.00') {
$ismoney = 1;
} else {
$ismoney = 2;
}
if ($order['points'] > 0) {
report_deal($order['uid'], 1, $order['points']);
$user_points = get_user_points($order['uid']);
$notes = date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元,(+{$order['points']}),(剩余:{$user_points}),订单:{$v_oid}";
write_memberslog($order['uid'], 1, 9001, $user['username'], $notes);
//会员套餐变更记录。会员购买成功。2表示:会员自己购买
write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 1);
} elseif ($order['setmeal'] > 0) {
set_members_setmeal($order['uid'], $order['setmeal']);
$setmeal = get_setmeal_one($order['setmeal']);
$notes = date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元并开通{$setmeal['setmeal_name']}";
write_memberslog($order['uid'], 1, 9002, $user['username'], $notes);
//会员套餐变更记录。会员购买成功。2表示:会员自己购买
write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 2, 1);
}
} elseif ($order['pay_type'] == '2') {
$order_name = "广告位订单";
write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "申请广告位:<strong>{$order['description']}</strong>,(花费: {$order['amount']})。", 1, 1020, "申请广告位", "-{$order['amount']}", "{$user_points}");
} elseif ($order['pay_type'] == '3') {
$order_name = "短信套餐订单";
$user = get_user_info($order['uid']);
if ($order['setmeal'] > 0) {
//查看短信套餐
set_members_sms($order['uid'], intval($order['setmeal']));
//支付成功,向用户增加短信条数
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:respond_weixinpay.php
示例10: order_paid
function order_paid($v_oid)
{
global $db, $timestamp, $_CFG;
$order = $db->getone("select * from " . table('order') . " WHERE oid ='{$v_oid}' AND is_paid= '1' LIMIT 1 ");
if ($order['pay_type'] == '1' || $order['pay_type'] == '4') {
$order_name = "套餐积分订单";
$user = get_user($order['uid']);
$sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
if (!$db->query($sql)) {
return false;
}
if ($order['amount'] == '0.00') {
$ismoney = 1;
} else {
$ismoney = 2;
}
if ($order['points'] > 0) {
report_deal($order['uid'], 1, $order['points']);
$user_points = get_user_points($order['uid']);
$notes = "操作人:{$_SESSION['admin_name']},说明:确认收款。收款金额:{$order['amount']} 。" . date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元,(+{$order['points']}),(剩余:{$user_points}),订单:{$v_oid}";
write_memberslog($order['uid'], 1, 9001, $user['username'], $notes);
//会员套餐变更记录。管理员后台设置会员订单购买成功。4表示:管理员后台开通
write_setmeallog($order['uid'], $user['username'], $notes, 4, $order['amount'], $ismoney, 1, 1);
}
if ($order['setmeal'] > 0) {
set_members_setmeal($order['uid'], $order['setmeal']);
$setmeal = get_setmeal_one($order['setmeal']);
$notes = "操作人:{$_SESSION['admin_name']},说明:确认收款,收款金额:{$order['amount']} 。" . date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元并开通{$setmeal['setmeal_name']}";
write_memberslog($order['uid'], 1, 9002, $user['username'], $notes);
//会员套餐变更记录。管理员后台设置会员订单购买成功。4表示:管理员后台开通
write_setmeallog($order['uid'], $user['username'], $notes, 4, $order['amount'], $ismoney, 2, 1);
}
} elseif ($order['pay_type'] == '2') {
$order_name = "广告位订单";
$sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
//is_paid =2 为确定支付
if (!$db->query($sql)) {
return false;
}
write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "申请广告位:<strong>{$order['description']}</strong>,(花费: {$order['amount']})。", 1, 1020, "申请广告位", "-{$order['amount']}", "{$user_points}");
} elseif ($order['pay_type'] == '3') {
$order_name = "短信订单";
$user = get_user($order['uid']);
$sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
if (!$db->query($sql)) {
return false;
}
if ($order['setmeal'] > 0) {
//查看短信套餐
set_members_sms($order['uid'], intval($order['setmeal']));
//支付成功,向用户增加短信条数
$user_points = get_user_setmeal($order['uid']);
write_memberslog($_SESSION['uid'], 1, 9003, $_SESSION['username'], "短信充值套餐:<strong>{$order['description']}</strong>,(- {$order['amount']}),(剩余:{$user_points['set_sms']})", 1, 1020, "申请广告位", "- {$order['amount']}", "{$user_points['set_sms']}");
}
} elseif ($order['pay_type'] == '7') {
if ($order['amount'] == '0.00') {
$ismoney = 1;
} else {
$ismoney = 2;
}
balance_deal($order['uid'], 1, $order['amount']);
$user_balance = get_user_balance($order['uid']);
$sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
//is_paid =2 为确定支付
if (!$db->query($sql)) {
return false;
}
$note = "余额充值:<strong>{$order['description']}</strong>,(: {$order['amount']})。当前余额为:{$user_balance}";
write_memberslog($_SESSION['uid'], 1, 9101, $_SESSION['username'], $note, 4, $order['amount'], $ismoney, 1, 1);
} elseif ($order['pay_type'] == '9') {
if ($order['amount'] == '0.00') {
$ismoney = 1;
} else {
$ismoney = 2;
}
if (get_user_can_balance($order['uid']) < $order['amount']) {
adminmsg('余额不足', 1);
return false;
}
balance_deal($order['uid'], 2, $order['amount']);
$user_balance = get_user_balance($order['uid']);
$sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
//is_paid =2 为确定支付
if (!$db->query($sql)) {
return false;
}
$note = "余额提现:<strong>{$order['description']}</strong>,(: {$order['amount']})。当前余额为:{$user_balance}";
write_memberslog($_SESSION['uid'], 1, 9101, $_SESSION['username'], $note, 4, $order['amount'], $ismoney, 1, 1);
}
//发送邮件
$mailconfig = get_cache('mailconfig');
if ($mailconfig['set_payment'] == "1" && $user['email_audit'] == "1") {
dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_mail.php?uid=" . $order['uid'] . "&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
}
//发送邮件完毕
//sms
$sms = get_cache('sms_config');
if ($sms['open'] == "1" && $sms['set_payment'] == "1" && $user['mobile_audit'] == "1") {
dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid=" . $order['uid'] . "&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
}
//.........这里部分代码省略.........
开发者ID:winiceo,项目名称:job,代码行数:101,代码来源:admin_company_fun.php
示例11: locoyspider_user_register
function locoyspider_user_register($email = NULL, $utype = '1')
{
global $db, $locoyspider, $QS_pwdhash, $_CFG;
$setsqlarr['username'] = $locoyspider['reg_usname'] . uniqid() . time();
$setsqlarr['pwd_hash'] = res_randstr();
//reg_password
if ($locoyspider['reg_password_tpye'] == "1") {
$pwd = $setsqlarr['username'];
} elseif ($locoyspider['reg_password_tpye'] == "3") {
$pwd = $locoyspider['reg_password'];
} else {
$pwd = res_randstr(7);
//长度为7的随机字符串
}
//email
if (empty($email) || !preg_match("/^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$/", $email)) {
$email = time() . uniqid() . $locoyspider['reg_email'];
}
$setsqlarr['password'] = md5(md5($pwd) . $setsqlarr['pwd_hash'] . $QS_pwdhash);
$setsqlarr['email'] = $email;
$setsqlarr['utype'] = $utype;
$setsqlarr['reg_time'] = time();
$setsqlarr['robot'] = 1;
//标记为采集
$reg_id = $db->inserttable(table('members'), $setsqlarr, true);
if (!$reg_id) {
return false;
}
if ($utype == '1') {
if (!$db->query("INSERT INTO " . table('members_points') . " (uid) VALUES ('{$reg_id}')")) {
return false;
}
if (!$db->query("INSERT INTO " . table('members_setmeal') . " (uid) VALUES ('{$reg_id}')")) {
return false;
}
$points = get_cache('points_rule');
include_once QISHI_ROOT_PATH . 'include/fun_company.php';
set_consultant($reg_id);
if ($points['reg_points']['value'] > 0) {
report_deal($reg_id, $points['reg_points']['type'], $points['reg_points']['value']);
$operator = $points['reg_points']['type'] == "1" ? "+" : "-";
write_memberslog($reg_id, 1, 9001, $username, "新注册会员,({$operator}{$points['reg_points']['value']}),(剩余:{$points['reg_points']['value']})", 1, 1010, "注册会员系统自动赠送积分", "{$operator}{$points['reg_points']['value']}", "{$points['reg_points']['value']}");
//积分变更记录
write_setmeallog($reg_id, $username, "注册会员系统自动赠送:({$operator}{$points['reg_points']['value']}),(剩余:{$points['reg_points']['value']})", 1, '0.00', '1', 1, 1);
}
if ($_CFG['reg_service'] > 0) {
set_members_setmeal($reg_id, $_CFG['reg_service']);
$setmeal = get_setmeal_one($_CFG['reg_service']);
write_memberslog($reg_id, 1, 9002, $username, "注册会员系统自动赠送:{$setmeal['setmeal_name']}", 2, 1011, "开通服务(系统赠送)", "-", "-");
//套餐变更记录
write_setmeallog($reg_id, $username, "注册会员系统自动赠送:{$setmeal['setmeal_name']}", 1, '0.00', '1', 2, 1);
}
}
return $reg_id;
}
开发者ID:winiceo,项目名称:job,代码行数:55,代码来源:admin_locoyspider_fun.php
注:本文中的get_setmeal_one函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论