• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_user_points函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_user_points函数的典型用法代码示例。如果您正苦于以下问题:PHP get_user_points函数的具体用法?PHP get_user_points怎么用?PHP get_user_points使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_user_points函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: define

 * 使用;不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
define('IN_QISHI', true);
require_once dirname(__FILE__) . '/personal_common.php';
$smarty->assign('leftmenu', "index");
if ($act == 'index') {
    $uid = intval($_SESSION['uid']);
    $smarty->assign('title', '个人会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('user', $user);
    require_once QISHI_ROOT_PATH . 'include/fun_user.php';
    $smarty->assign('loginlog', get_loginlog_one($uid, '1001'));
    $wheresql = " WHERE uid='" . $_SESSION['uid'] . "' ";
    $sql = "SELECT * FROM " . table('resume') . $wheresql;
    $smarty->assign('rand', rand(1, 100));
    $smarty->assign('points', get_user_points($uid));
    $smarty->assign('my_resume', get_resume_list($sql));
    $smarty->assign('count_resume', count_resume($uid));
    $smarty->assign('count_interview', count_interview($uid));
    $smarty->assign('count_apply', count_personal_jobs_apply($uid));
    $smarty->assign('count_attention_me', count_personal_attention_me($uid));
    $smarty->assign('msg_total1', $db->get_total("SELECT COUNT(*) AS num FROM " . table('pms') . " WHERE (msgfromuid='{$uid}' OR msgtouid='{$uid}') AND `new`='1' AND `replyuid`<>'{$uid}' AND msgtype=1"));
    $smarty->assign('msg_total2', $db->get_total("SELECT COUNT(*) AS num FROM " . table('pms') . " WHERE (msgfromuid='{$uid}' OR msgtouid='{$uid}') AND `new`='2' AND `replyuid`<>'{$uid}' AND msgtype=1"));
    //首页提示消息(最近两周 下载 和 面试邀请的信息)
    $message = array();
    $time = strtotime("- 14 day");
    $down_resume = $db->getall("SELECT distinct company_uid , company_name FROM " . table('company_down_resume') . " WHERE resume_uid='" . $_SESSION['uid'] . "' AND down_addtime > " . $time);
    foreach ($down_resume as $key => $value) {
        $company_id = $db->getone("SELECT id FROM " . table('company_profile') . " WHERE uid=" . $value['company_uid'] . " LIMIT 1");
        $company_url = url_rewrite('QS_companyshow', array('id' => $company_id['id']));
        $message[] = "您的简历被<a href=\"" . $company_url . "\" target=\"_black\" class=\"underline\">【" . $value['company_name'] . "】</a>下载!主动联系招聘单位更容易获得工作机会!";
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:personal_index.php


示例2: update_user_info

/**
 *
 * 更新用户信息
 *
 *
 */
function update_user_info($uid, $record = true, $setcookie = true, $cookie_expire = NULL)
{
    global $timestamp, $online_ip, $db, $QS_cookiepath, $QS_cookiedomain, $_CFG;
    //3.4升级修改 引入变量$_CFG
    $user = get_user_inid($uid);
    if (empty($user)) {
        return false;
    } else {
        unset($_SESSION['no_self']);
        $_SESSION['uid'] = intval($user['uid']);
        $_SESSION['username'] = addslashes($user['username']);
        $_SESSION['utype'] = intval($user['utype']);
    }
    if ($setcookie) {
        $expire = intval($cookie_expire) > 0 ? time() + 3600 * 24 * $cookie_expire : 0;
        setcookie('QS[uid]', $user['uid'], $expire, $QS_cookiepath, $QS_cookiedomain);
        setcookie('QS[username]', addslashes($user['username']), $expire, $QS_cookiepath, $QS_cookiedomain);
        setcookie('QS[password]', $user['password'], $expire, $QS_cookiepath, $QS_cookiedomain);
        setcookie('QS[utype]', $user['utype'], $expire, $QS_cookiepath, $QS_cookiedomain);
    }
    if ($record) {
        $last_login_time = $timestamp;
        $remind_email_time = strtotime("+" . $_CFG['user_unlogin_time'] . " day");
        $last_login_ip = $online_ip;
        $sql = "UPDATE " . table('members') . " SET last_login_time = '{$last_login_time}', remind_email_time = '{$remind_email_time}', last_login_ip = '{$last_login_ip}' WHERE uid='{$_SESSION['uid']}'  LIMIT 1";
        $db->query($sql);
        if (($_CFG['operation_mode'] == '1' || $_CFG['operation_mode'] == '3') && $_SESSION['utype'] == "1") {
            $rule = get_cache('points_rule');
            if ($rule['userlogin']['value'] > 0) {
                $time = time();
                $today = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
                $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='userlogin' AND addtime>{$today}  LIMIT 1");
                if (empty($info)) {
                    $members_handsel_arr['uid'] = $_SESSION['uid'];
                    $members_handsel_arr['htype'] = "userlogin";
                    $members_handsel_arr['addtime'] = $time;
                    $db->inserttable(table("members_handsel"), $members_handsel_arr);
                    require_once QISHI_ROOT_PATH . 'include/fun_company.php';
                    report_deal($_SESSION['uid'], $rule['userlogin']['type'], $rule['userlogin']['value']);
                    $user_points = get_user_points($_SESSION['uid']);
                    $operator = $rule['userlogin']['type'] == "1" ? "+" : "-";
                    $_SESSION['handsel_userlogin'] = $operator . $rule['userlogin']['value'];
                    write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], date("Y-m-d") . " 第一次登录,({$operator}{$rule['userlogin']['value']}),(剩余:{$user_points})", 1, 1014, "会员每天第一次登录", "{$operator}{$rule['userlogin']['value']}", "{$user_points}");
                }
            }
        } elseif ($_SESSION['utype'] == '2') {
            $rule = get_cache('points_rule');
            if ($rule['personaluserlogin']['value'] > 0) {
                $time = time();
                $today = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
                $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='userlogin' AND addtime>{$today}  LIMIT 1");
                if (empty($info)) {
                    $members_handsel_arr['uid'] = $_SESSION['uid'];
                    $members_handsel_arr['htype'] = "userlogin";
                    $members_handsel_arr['addtime'] = $time;
                    $db->inserttable(table("members_handsel"), $members_handsel_arr);
                    require_once QISHI_ROOT_PATH . 'include/fun_personal.php';
                    report_deal($_SESSION['uid'], $rule['personaluserlogin']['type'], $rule['personaluserlogin']['value']);
                    $user_points = get_user_points($_SESSION['uid']);
                    $operator = $rule['personaluserlogin']['type'] == "1" ? "+" : "-";
                    $_SESSION['handsel_userlogin'] = $operator . $rule['personaluserlogin']['value'];
                    write_memberslog($_SESSION['uid'], 2, 9001, $_SESSION['username'], date("Y-m-d") . " 第一次登录,({$operator}{$rule['personaluserlogin']['value']}),(剩余:{$user_points})");
                }
            }
        } elseif ($_CFG['operation_train_mode'] == '1' && $_SESSION['utype'] == '4') {
            $rule = get_cache('points_rule');
            if ($rule['trainuserlogin']['value'] > 0) {
                $time = time();
                $today = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
                $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='userlogin' AND addtime>{$today}  LIMIT 1");
                if (empty($info)) {
                    $members_handsel_arr['uid'] = $_SESSION['uid'];
                    $members_handsel_arr['htype'] = "userlogin";
                    $members_handsel_arr['addtime'] = $time;
                    $db->inserttable(table("members_handsel"), $members_handsel_arr);
                    require_once QISHI_ROOT_PATH . 'include/fun_train.php';
                    report_deal($_SESSION['uid'], $rule['trainuserlogin']['type'], $rule['trainuserlogin']['value']);
                    $user_points = get_user_points($_SESSION['uid']);
                    $operator = $rule['trainuserlogin']['type'] == "1" ? "+" : "-";
                    $_SESSION['handsel_userlogin'] = $operator . $rule['trainuserlogin']['value'];
                    write_memberslog($_SESSION['uid'], 4, 9101, $_SESSION['username'], date("Y-m-d") . " 第一次登录,({$operator}{$rule['trainuserlogin']['value']}),(剩余:{$user_points})");
                }
            }
        } elseif ($_CFG['operation_hunter_mode'] == '1' && $_SESSION['utype'] == '3') {
            $rule = get_cache('points_rule');
            if ($rule['hunteruserlogin']['value'] > 0) {
                $time = time();
                $today = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
                $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='userlogin' AND addtime>{$today}  LIMIT 1");
                if (empty($info)) {
                    $members_handsel_arr['uid'] = $_SESSION['uid'];
                    $members_handsel_arr['htype'] = "userlogin";
                    $members_handsel_arr['addtime'] = $time;
                    $db->inserttable(table("members_handsel"), $members_handsel_arr);
//.........这里部分代码省略.........
开发者ID:winiceo,项目名称:job,代码行数:101,代码来源:fun_user.php


示例3: sms_order_paid

function sms_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['is_paid'] == "1" && $order['payment_name'] == "points") {
            //积分充值
            report_deal($order['uid'], 2, intval($order['points']));
            $user_points = get_user_points($order['uid']);
            $user_sms_meal = get_sms_setmeal_one($order['setmeal']);
            //获取套餐中的短信数量
            $db->query("UPDATE " . table('members') . " SET `sms_num` = sms_num+" . $user_sms_meal['num'] . " WHERE `uid` = " . $order['uid'] . " LIMIT 1 ;");
            write_memberslog($_SESSION['uid'], 1, 9003, $_SESSION['username'], "积分短信充值:<strong>{$order['description']}</strong>,(- {$order['amount']}),(剩余:{$user_points})", 1, 1023, "短信充值", "- {$order['amount']}", "{$user_points}");
        } else {
            $user_sms_meal = get_sms_setmeal_one($order['setmeal']);
            //获取套餐中的短信数量
            $db->query("UPDATE " . table('members') . " SET `sms_num` = sms_num+" . $user_sms_meal['num'] . " WHERE `uid` = " . $order['uid'] . " LIMIT 1 ;");
            $user_points = get_user_points($order['uid']);
            write_memberslog($_SESSION['uid'], 1, 9003, $_SESSION['username'], "积分短信充值:<strong>{$order['description']}</strong>,(- {$order['amount']}),(剩余:{$user_points})", 1, 1023, "短信充值", "- {$order['amount']}", "{$user_points}");
        }
        //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");
        }
        return true;
    }
    return true;
}
开发者ID:winiceo,项目名称:fenzhan,代码行数:39,代码来源:fun_company.php


示例4: get_code

    //订单号
    $order['v_url'] = $_CFG['site_domain'] . $_CFG['site_dir'] . "include/payment/respond_" . $payment['typename'] . ".php";
    $order['v_amount'] = $myorder['amount'] + $fee;
    if ($myorder['payment_name'] != 'remittance' && $myorder['payment_name'] != 'weixinpay') {
        require_once QISHI_ROOT_PATH . "include/payment/" . $payment['typename'] . ".php";
        $payment_form = get_code($order, $payment);
        if (empty($payment_form)) {
            showmsg("在线支付参数错误!", 0);
        }
    } elseif ($myorder['payment_name'] == 'weixinpay') {
        require_once QISHI_ROOT_PATH . 'include/payment/native.php';
        $smarty->assign('w_url', urlencode($url2));
        fopen(QISHI_ROOT_PATH . 'data/wxpay/' . $myorder['oid'] . '.tmp', "w") or die("无法打开缓存文件!");
        $_SESSION['wxpay_no'] = $myorder['oid'];
    }
    $smarty->assign('points', get_user_points($_SESSION['uid']));
    $smarty->assign('title', '付款 - 猎头会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('fee', $fee);
    $smarty->assign('amount', $myorder['amount']);
    $smarty->assign('oid', $order['oid']);
    $smarty->assign('byname', $payment);
    $smarty->assign('payment_form', $payment_form);
    $smarty->display('member_hunter/hunter_order_pay.htm');
} elseif ($act == 'order_list') {
    require_once QISHI_ROOT_PATH . 'include/page.class.php';
    $is_paid = trim($_GET['is_paid']);
    $wheresql = " WHERE uid='" . $_SESSION['uid'] . "' ";
    if ($is_paid != '' && is_numeric($is_paid)) {
        $wheresql .= " AND is_paid='" . intval($is_paid) . "' ";
    }
    $perpage = 10;
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:hunter_service.php


示例5: exit

        if ($result) {
            exit('1');
        } else {
            exit('-2');
        }
    }
} elseif ($act == 'fortune') {
    $smarty->assign('title', '周易性格测算 - 个人会员中心 - ' . $_CFG['site_name']);
    $smarty->display('member_personal/personal_fortune.htm');
} elseif ($act == 'fotrune_save') {
    require_once QISHI_ROOT_PATH . 'genv/lib.php';
    require_once QISHI_ROOT_PATH . 'genv/Requests/library/Requests.php';
    Requests::register_autoloader();
    $name = isChineseName(trim($_POST['name'])) ? $_POST['name'] : showmsg('请输入正确姓名!', 1);
    $points_rule = get_cache('points_rule');
    $user_points = get_user_points($_SESSION["uid"]);
    if ($user_points < $points_rule['fotrune_points']['value']) {
        showmsg("积分不够,请充值", 2);
    }
    $_POST["id"] = $_POST["category"];
    $uri = 'http://192.168.1.102/mpfxsys_ajax.asp';
    $post = $_POST;
    if ($_POST["category"] == 7) {
        $post["showming"] = 1;
    } else {
        $post["showming"] = 0;
    }
    $html = Requests::post($uri, array(), $post);
    $html = $html->body;
    $html = preg_replace('~<(tr|table)\\s+?.*?>~i', '<$1>', $html);
    $html = preg_replace('~<(td).*?(colspan=["\']?\\d+["\']?|rowspan=["\']?\\d+["\']?).*?>~i', '<td $2>', $html);
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:personal_resume.php


示例6: 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


示例7: set_order

function set_order($id, $state)
{
    global $db;
    $state = intval($state);
    if (!is_array($id)) {
        $id = array($id);
    }
    $return = 0;
    foreach ($id as $value) {
        $order_show = get_order_one($value);
        if ($order_show['state'] != 0) {
            continue;
        }
        $shop_one = get_shop_one($order_show['shop_id']);
        // 审核不通过 退回企业积分
        if ($state == 2) {
            $exchange_arr['state'] = 2;
            $db->updatetable(table("shop_exchange"), $exchange_arr, array("order_id" => $order_show['id'], "shop_id" => $order_show['shop_id'], "company_uid" => $order_show['uid']));
            report_deal($order_show['uid'], 1, $order_show['order_points']);
            //写入日志
            $user_points = get_user_points($order_show['uid']);
            write_memberslog($order_show['uid'], 1, 9001, $order_show['company_name'], $order_show['company_name'] . "积分兑换商品:<strong>{$setarr['shop_title']}</strong>未通过审核,并且返回积分:({$order_show['order_points']})。", 1, 2008, "返回积分", "+{$order_show['order_points']}", "{$user_points}");
        } else {
            $shop_stock = $shop_one['shop_stock'] - $order_show['shop_num'];
            $click = $shop_one['click'] + $order_show['shop_num'];
            $db->query("update " . table("shop_goods") . " set shop_stock={$shop_stock},click={$click} where id={$order_show['shop_id']}");
            $exchange_arr['state'] = 1;
            $db->updatetable(table("shop_exchange"), $exchange_arr, array("order_id" => $order_show['id'], "shop_id" => $order_show['shop_id'], "company_uid" => $order_show['uid']));
        }
        if ($db->query("update " . table("shop_order") . " set state={$state} where id={$value}")) {
            $return++;
        }
    }
    return $return;
}
开发者ID:winiceo,项目名称:job,代码行数:35,代码来源:admin_shop_fun.php


示例8: check_pass_add_point

function check_pass_add_point($uid, $pid)
{
    global $db;
    $sql = "select * from " . table('members') . " where uid = '{$uid}' LIMIT 1";
    $user = $db->getone($sql);
    if ($user) {
        // 简历审核通过积分处理
        $rule = get_cache('points_rule');
        if ($rule['resume_checked']['value'] > 0) {
            $time = time();
            report_deal($uid, $rule['resume_checked']['type'], $rule['resume_checked']['value']);
            $user_points = get_user_points($uid);
            $operator = $rule['resume_checked']['type'] == "1" ? "+" : "-";
            $url = "<a href=/resume/resume-show.php?id=" . $pid . " target=_blank>查看简历</a>";
            write_memberslog($uid, 1, 9001, $user["username"], " 简历通过审核{$url},{$_CFG['points_byname']}({$operator}{$rule['company_logo_points']['value']}),(剩余:{$user_points})", 1, 1016, "简历审核通过", "{$operator}{$rule['resume_checked']['value']}", "{$user_points}");
        }
    }
}
开发者ID:winiceo,项目名称:fenzhan,代码行数:18,代码来源:func_resume_upload.php


示例9: gift_points

function gift_points($uid, $gift, $ptype, $points)
{
    global $db;
    $operator = $ptype == "1" ? "+" : "-";
    $time = time();
    if (preg_match("/^(\\d{1,10},)*(\\d{1,10})\$/", $uid)) {
        $uid = explode(',', $uid);
    }
    if (!is_array($uid)) {
        $uid = array($uid);
    }
    if (!empty($uid) && is_array($uid)) {
        foreach ($uid as $vuid) {
            $vuid = intval($vuid);
            if ($gift == 'companyauth') {
                $com = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$vuid}' AND htype='{$gift}'  LIMIT 1");
                if (empty($com)) {
                    report_deal($vuid, $ptype, $points);
                    $user = get_user($vuid);
                    $mypoints = get_user_points($vuid);
                    write_memberslog($vuid, 1, 9001, $user['username'], " 成为已认证企业({$operator}{$points}),(剩余:{$mypoints})", 1, 1013, "认证营业执照", "{$operator}{$points}", "{$mypoints}");
                    $db->query("INSERT INTO " . table('members_handsel') . " (uid,htype,addtime) VALUES ('{$vuid}', '{$gift}','{$time}')");
                }
            }
        }
    }
}
开发者ID:dalinhuang,项目名称:yy,代码行数:27,代码来源:admin_company_fun.php


示例10: die

 * 使用;不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
if (!defined('IN_QISHI')) {
    die('Access Denied!');
}
require_once dirname(__FILE__) . '/../include/common.inc.php';
require_once QISHI_ROOT_PATH . 'include/mysql.class.php';
require_once QISHI_ROOT_PATH . 'include/fun_shop.php';
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
if ($_CFG['operation_mode'] == 2) {
    $link[0]['text'] = "网站首页";
    $link[0]['href'] = url_rewrite('QS_index');
    showmsg('套餐模式不能使用积分商城', 1, $link);
}
if ($_SESSION['utype'] == '1') {
    $smarty->assign("com_point", get_user_points($_SESSION['uid']));
    $smarty->assign("com_info", get_company($_SESSION['uid']));
} elseif ($_SESSION['utype'] == '2') {
    $smarty->assign("com_point", get_user_points($_SESSION['uid']));
} elseif ($_SESSION['utype'] != '' && $_SESSION['utype'] != '1') {
    $link[0]['text'] = "网站首页";
    $link[0]['href'] = url_rewrite('QS_index');
    showmsg('积分商城仅对企业开放!', 1, $link);
}
// 积分规则
$smarty->assign("points_rule", get_cache("points_rule"));
// 热门关键字
$smarty->assign("hotword", get_shop_hotword(6));
// 最新兑换记录
$smarty->assign("exchange_list", get_exchange_index(4));
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:shop_common.php


示例11: add_points

            add_points($user_id, $amount);
            subtract_points($userdata['user_id'], $amount);
            //Send doation email if the user wants it
            $sql = "SELECT username, user_lang, user_email, user_notify_donation \r\n\t\t\t\tFROM " . USERS_TABLE . "\r\n\t\t\t\tWHERE user_id = {$user_id}";
            if (!($result = $db->sql_query($sql))) {
                message_die(GENERAL_ERROR, "Could not get username & user_notify_donation & user_lang & user_email", '', __LINE__, __FILE__, $sql);
            }
            $to_userdata = $db->sql_fetchrow($result);
            if ($to_userdata['user_notify_donation']) {
                include $phpbb_root_path . 'includes/emailer.' . $phpEx;
                $emailer = new emailer($board_config['smtp_delivery']);
                $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
                $emailer->use_template('user_notify_donation', $to_userdata['user_lang']);
                $emailer->email_address($to_userdata['user_email']);
                $emailer->extra_headers($email_headers);
                $emailer->assign_vars(array('DONATOR' => $userdata['username'], 'USERNAME' => $to_userdata['username'], 'AMOUNT_DONATE' => $amount, 'TOTAL_POINTS' => get_user_points($user_id), 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']), 'L_POINTS' => $board_config['points_name']));
                $emailer->send();
                $emailer->reset();
            }
            $loc = !empty($HTTP_POST_VARS['location']) ? $HTTP_POST_VARS['location'] : append_sid("pointscp.{$phpEx}?mode=donate");
            $template->assign_vars(array('META' => '<meta http-equiv="refresh" content="3;url=' . $loc . '">'));
            $msg = $lang['Points_thanks_donation'] . '<br /><br />' . sprintf($lang['Click_return_points_donate'], '<a href="' . append_sid("pointscp.{$phpEx}?mode=donate") . '">', '</a> ') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.{$phpEx}") . '">', '</a>');
            message_die(GENERAL_MESSAGE, $msg);
        }
    }
    $s_username = !empty($user_id) ? get_username_from_id($user_id) : '';
    $location = empty($HTTP_POST_VARS['location']) ? $HTTP_SERVER_VARS['HTTP_REFERER'] : $location;
    $s_hidden_fields = '<input type="hidden" name="location" value="' . $location . '">';
    $template->assign_vars(array('L_FIND_USERNAME' => $lang['Find_username'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], 'L_POINTS_TITLE' => $lang['Points_donation'], 'L_DONATE_TO' => sprintf($lang['Points_donate_to'], $board_config['points_name']), 'L_AMOUNT' => $lang['Points_amount'], 'L_AMOUNT_GIVE' => sprintf($lang['Points_give'], $board_config['points_name']), 'USERNAME' => $s_username, 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_POST_ACTION' => append_sid("pointscp.{$phpEx}?mode=donate", true), 'U_SEARCH_USER' => append_sid("search.{$phpEx}?mode=searchuser")));
    $template->assign_block_vars('switch_points_donate', array());
} else {
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:pointscp.php


示例12: 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'], 3, 9201, $user['username'], $notes);
            //会员套餐变更记录。会员购买成功。2表示:会员自己购买
            write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 1, 3);
        } 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'], 3, 9202, $user['username'], $notes);
            //会员套餐变更记录。会员购买成功。2表示:会员自己购买
            write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 2, 1, 3);
        }
        //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:winiceo,项目名称:job,代码行数:46,代码来源:fun_hunter.php


示例13: report_deal

             require_once QISHI_ROOT_PATH . 'include/fun_company.php';
             report_deal($usinfo['uid'], $rule['company_wx_points']['type'], $rule['company_wx_points']['value']);
             $user_points = get_user_points($usinfo['uid']);
             $operator = $rule['company_wx_points']['type'] == "1" ? "+" : "-";
             $_SESSION['handsel_company_wx_points'] = $_CFG['points_byname'] . $operator . $rule['company_wx_points']['value'];
             write_memberslog($usinfo['uid'], 1, 9001, $usinfo['username'], " 绑定微信,{$_CFG['points_byname']}({$operator}{$rule['company_wx_points']['value']}),(剩余:{$user_points})", 1, 1016, "绑定微信", "{$operator}{$rule['company_wx_points']['value']}", "{$user_points}");
         }
     }
     if ($rule['per_verifyweixin']['value'] > 0 && $usinfo['utype'] == 2) {
         $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$usinfo['uid']}' AND htype='per_verifyweixin' LIMIT 1");
         if (empty($info)) {
             $time = time();
             $db->query("INSERT INTO " . table('members_handsel') . " (uid,htype,addtime) VALUES ('{$usinfo['uid']}', 'per_verifyweixin','{$time}')");
             require_once QISHI_ROOT_PATH . 'include/fun_personal.php';
             report_deal($usinfo['uid'], $rule['per_verifyweixin']['type'], $rule['per_verifyweixin']['value']);
             $user_points = get_user_points($usinfo['uid']);
             $operator = $rule['per_verifyweixin']['type'] == "1" ? "+" : "-";
             $_SESSION['handsel_per_verifyweixin'] = $_CFG['points_byname'] . $operator . $rule['per_verifyweixin']['value'];
             write_memberslog($usinfo['uid'], 2, 9001, $usinfo['username'], " 绑定微信,{$_CFG['points_byname']}({$operator}{$rule['per_verifyweixin']['value']}),(剩余:{$user_points})", 2, 1016, "绑定微信", "{$operator}{$rule['per_verifyweixin']['value']}", "{$user_points}");
         }
     }
     if (wap_user_login($username, $password)) {
         if (!empty($_SESSION['url'])) {
             header("location:" . $_SESSION['url']);
             unset($_SESSION['url']);
             die;
         }
         $smarty->display('m/binding-success.html');
         die;
     }
 } else {
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:binding.php


示例14: define

 * ----------------------------------------------------------------------------
 * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用;不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
define('IN_QISHI', true);
require_once dirname(__FILE__) . '/company_common.php';
$smarty->assign('leftmenu', "index");
require_once QISHI_ROOT_PATH . 'genv/func_company.php';
if ($act == 'index') {
    $uid = intval($_SESSION['uid']);
    $smarty->assign('title', '企业会员中心 - ' . $_CFG['site_name']);
    //首页顶部提示信息(套餐或者积分已失效或快失效时提醒)
    $message = array();
    if ($_CFG['operation_mode'] == '1' || $_CFG['operation_mode'] == '3') {
        $my_points = get_user_points($uid);
        if ($my_points < $_CFG['points_min_remind'] && intval($my_points) > 0 && !empty($_CFG['points_min_remind'])) {
            $message[] = '提醒:您的积分不足,为避免造成不必要的麻烦,请<a href="company_service.php?act=order_add">立即充值</a>';
        } elseif (intval($my_points) <= 0 && !empty($_CFG['points_min_remind'])) {
            $message[] = '提醒:您的积分已为0,为避免造成不必要的麻烦,请<a href="company_service.php?act=order_add">立即充值</a>';
        }
        $smarty->assign('points', $my_points);
    }
    if ($_CFG['operation_mode'] == '2' || $_CFG['operation_mode'] == '3') {
        $my_setmeal = get_user_setmeal($uid);
        if (time() > $my_setmeal['endtime'] && $my_setmeal['endtime'] > 0 && !empty($_CFG['meal_min_remind'])) {
            $message[] = '提醒:您的套餐已到期,为避免造成不必要的麻烦,请<a href="company_service.php?act=setmeal_list" target="_blank">升级套餐</a>';
        } elseif (($my_setmeal['endtime'] - time()) / 86400 <= $_CFG['meal_min_remind'] && $my_setmeal['endtime'] > 0 && !empty($_CFG['meal_min_remind'])) {
            $message[] = '提醒:您的套餐快到期,为避免造成不必要的麻烦,请<a href="company_service.php?act=setmeal_list" target="_blank">升级套餐</a>';
        }
        $smarty->assign('setmeal', $my_setmeal);
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:company_index.php


示例15: elseif

} elseif ($act == 'userpoints_edit') {
    check_token();
    check_permissions($_SESSION['admin_purview'], "com_user_edit");
    if (intval($_POST['points']) < 1) {
        adminmsg('请输入积分!', 1);
    }
    if (trim($_POST['points_notes']) == '') {
        adminmsg('请填写积分操作说明!', 1);
    }
    $link[0]['text'] = "返回列表";
    $link[0]['href'] = $_POST['url'];
    $user = get_user($_POST['company_uid']);
    $points_type = intval($_POST['points_type']);
    $t = $points_type == 1 ? "+" : "-";
    report_deal($user['uid'], $points_type, intval($_POST['points']));
    $points = get_user_points($user['uid']);
    write_memberslog(intval($_POST['company_uid']), 1, 9001, $user['username'], " 管理员操作积分({$t}{$_POST['points']}),(剩余:{$points}),备注:" . $_POST['points_notes'], 1, 1012, "管理员操作积分", "{$t}{$_POST['points']}", "{$points}");
    //会员积分变更记录。管理员后台修改会员的积分。3表示:管理员后台修改
    $user = get_user($_POST['company_uid']);
    if (intval($_POST['is_money']) && $_POST['log_amount']) {
        $amount = round($_POST['log_amount'], 2);
        $ismoney = 2;
    } else {
        $amount = '0.00';
        $ismoney = 1;
    }
    $notes = "操作人:{$_SESSION['admin_name']},说明:修改会员 {$user['username']} 积分 ({$t}{$_POST['points']})。收取积分金额:{$amount} 元,备注:{$_POST['points_notes']}";
    write_setmeallog($_POST['company_uid'], $user['username'], $notes, 3, $amount, $ismoney, 1, 1);
    adminmsg('保存成功!', 2);
} elseif ($act == 'set_setmeal_save') {
    check_token();
开发者ID:dalinhuang,项目名称:yy,代码行数:31,代码来源:admin_company.php


示例16: report_deal

function report_deal($uid, $i_type = 1, $points = 0)
{
    global $db, $timestamp;
    $points = intval($points);
    $uid = intval($uid);
    $points_val = get_user_points($uid);
    if ($i_type == 1) {
        $points_val = $points_val + $points;
    }
    if ($i_type == 2) {
        $points_val = $points_val - $points;
        $points_val = $points_val < 0 ? 0 : $points_val;
    }
    $sql = "UPDATE " . table('members_points') . " SET points= '{$points_val}' WHERE uid='{$uid}' LIMIT 1";
    if (!$db->query($sql)) {
        return false;
    }
    return true;
}
开发者ID:dalinhuang,项目名称:yy,代码行数:19,代码来源:fun_company.php


示例17: fortune

function fortune($uid, $username, $pid, $type = "2")
{
    $uid = intval($_SESSION['uid']);
    $username = trim($_SESSION['username']);
    $type = intval($type);
    $points_rule = get_cache('points_rule');
    $user_points = get_user_points($uid);
    if ($points_rule['fotrune_company_points']['value'] > 0) {
        report_deal($uid, $type, $points_rule['fotrune_company_points']['value']);
        $user_points = get_user_points($uid);
        $operator = $type == "1" ? "+" : "-";
        write_memberslog($uid, 2, 9001, $username, "周易算命 ({$operator}{$points_rule['perfect_resume']['value']}),(剩余:{$user_points})", 2, 1105, "周易算命", "{$operator}{$points_rule['perfect_resume']['value']}", "{$user_points}");
    } else {
        write_memberslog($uid, 2, 1105, $username, "周易算命");
    }
}
开发者ID:winiceo,项目名称:fenzhan,代码行数:16,代码来源:company_fortune.php


示例18: define


                      

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_user_position函数代码示例发布时间:2022-05-15
下一篇:
PHP get_user_organization函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap