当前位置: 首页>>代码示例>>PHP>>正文


PHP report_deal函数代码示例

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


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

示例1: table

 if ($sql['utype'] == "4") {
     $db->query("INSERT INTO " . table('members_points') . " (uid) VALUES ('{$insert_id}')");
     $db->query("INSERT INTO " . table('members_train_setmeal') . " (uid) VALUES ('{$insert_id}')");
     if (intval($_POST['is_money']) && $_POST['log_amount']) {
         $amount = round($_POST['log_amount'], 2);
         $ismoney = 2;
     } else {
         $amount = '0.00';
         $ismoney = 1;
     }
     $regpoints_num = intval($_POST['regpoints_num']);
     if ($_POST['regpoints'] == "y") {
         write_memberslog($insert_id, 4, 9101, $sql['username'], "<span style=color:#FF6600>注册会员系统自动赠送!(+{$regpoints_num})</span>");
         $notes = "操作人:{$_SESSION['admin_name']},说明:后台添加机构会员并赠送(+{$regpoints_num})积分,收取费用:{$amount}元";
         write_setmeallog($insert_id, $sql['username'], $notes, 4, $amount, $ismoney, 1, 4);
         report_deal($insert_id, 1, $regpoints_num);
     }
     $reg_service = intval($_POST['train_reg_service']);
     if ($reg_service > 0) {
         $service = get_setmeal_one($reg_service);
         write_memberslog($insert_id, 4, 9102, $sql['username'], "开通服务({$service['setmeal_name']})");
         set_members_setmeal($insert_id, $reg_service);
         $notes = "操作人:{$_SESSION['admin_name']},说明:后台添加机构会员并开通服务({$service['setmeal_name']}),收取费用:{$amount}元";
         write_setmeallog($insert_id, $sql['username'], $notes, 4, $amount, $ismoney, 2, 4);
     }
     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, 4);
     }
 }
 write_log("添加会员:" . $sql['username'], $_SESSION['admin_name'], 3);
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:admin_train.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: get_access_token

    if ($openid) {
        $access_token = get_access_token();
        $w_url = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=" . $access_token . "&openid=" . $openid . "&lang=zh_CN";
        $w_result = https_request($w_url);
        $w_userinfo = json_decode($w_result, true);
        $w_userinfo = array_map('utf8_to_gbk', $w_userinfo);
        global $db;
        $result = $db->query("update " . table('members') . " set weixin_openid='" . $openid . "',weixin_nick='" . $w_userinfo['nickname'] . "' where uid=" . $_SESSION['uid'] . " and weixin_openid IS NULL");
        if ($result) {
            // 绑定微信 获得积分
            $rule = get_cache('points_rule');
            if ($rule['company_wx_points']['value'] > 0) {
                $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='company_wx_points' LIMIT 1");
                if (empty($info)) {
                    $time = time();
                    $db->query("INSERT INTO " . table('members_handsel') . " (uid,htype,addtime) VALUES ('{$_SESSION['uid']}', 'company_wx_points','{$time}')");
                    require_once QISHI_ROOT_PATH . 'include/fun_comapny.php';
                    report_deal($_SESSION['uid'], $rule['company_wx_points']['type'], $rule['company_wx_points']['value']);
                    $user_points = get_user_points($_SESSION['uid']);
                    $operator = $rule['company_wx_points']['type'] == "1" ? "+" : "-";
                    $_SESSION['handsel_company_wx_points'] = $_CFG['points_byname'] . $operator . $rule['company_wx_points']['value'];
                    write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], " 绑定微信,{$_CFG['points_byname']}({$operator}{$rule['company_wx_points']['value']}),(剩余:{$user_points})", 1, 1016, "绑定微信", "{$operator}{$rule['company_wx_points']['value']}", "{$user_points}");
                }
            }
            unlink(QISHI_ROOT_PATH . "data/weixin/" . $event_key % 10 . '/' . $event_key . ".txt");
            exit("1");
        } else {
            exit("-1");
        }
    }
}
开发者ID:source-hunter,项目名称:74cms,代码行数:31,代码来源:ajax_common.php

示例4: foreach

            $data_arr[] = $array;
        } else {
            foreach ($get_data as $key => $value) {
                $array = explode(",", $value);
                $data_arr[$key] = $array;
            }
        }
        foreach ($data_arr as $key => $value) {
            $points += $value[2];
        }
        $user_points = get_user_points($_SESSION['uid']);
        if ($points > $user_points) {
            exit("本次预约需要" . $points . "积分,您的积分为" . $user_points . ",积分不足,请充值后再进行预约!");
        } else {
            foreach ($data_arr as $key => $value) {
                $setarr['uid'] = $_SESSION['uid'];
                $setarr['jobs_id'] = $value[0];
                $setarr['appointment_time'] = $value[1];
                $setarr['appointment_time_available'] = $value[1];
                $setarr['points'] = $value[2];
                $db->inserttable(table('jobs_appointment_refresh'), $setarr);
                $jobarr['auto_refresh'] = 1;
                $db->updatetable(table('jobs'), $jobarr, array("id" => $setarr['jobs_id'], "uid" => $setarr['uid']));
                /* 操作积分  */
            }
            report_deal($_SESSION['uid'], 2, $points);
            exit("预约刷新成功!");
        }
    }
}
unset($smarty);
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:company_recruitment.php

示例5: intval

    $setsqlarr['telephone_show'] = intval($_POST['telephone_show']);
    $setsqlarr['address_show'] = intval($_POST['address_show']);
    $setsqlarr['qq_show'] = intval($_POST['qq_show']);
    if (!$db->updatetable(table('hunter_jobs'), $setsqlarr, " id='{$id}' AND uid='{$_SESSION['uid']}' ")) {
        showmsg("保存失败!", 0);
    }
    if ($_CFG['operation_hunter_mode'] == '1') {
        if ($points_rule['hunter_hunterjobs_edit']['value'] > 0) {
            report_deal($_SESSION['uid'], $points_rule['hunter_hunterjobs_edit']['type'], $points_rule['hunter_hunterjobs_edit']['value']);
            $user_points = get_user_points($_SESSION['uid']);
            $operator = $points_rule['hunter_hunterjobs_edit']['type'] == "1" ? "+" : "-";
            write_memberslog($_SESSION['uid'], 3, 9201, $_SESSION['username'], "修改职位:<strong>{$setsqlarr['jobs_name']}</strong>,({$operator}{$points_rule['hunter_hunterjobs_edit']['value']}),(剩余:{$user_points})");
        }
        if ($days > 0 && $points_rule['hunter_hunterjobs_daily']['value'] > 0) {
            $points_day = intval($_POST['days']) * $points_rule['hunter_hunterjobs_daily']['value'];
            report_deal($_SESSION['uid'], $points_rule['hunter_hunterjobs_daily']['type'], $points_day);
            $user_points = get_user_points($_SESSION['uid']);
            $operator = $points_rule['hunter_hunterjobs_daily']['type'] == "1" ? "+" : "-";
            write_memberslog($_SESSION['uid'], 3, 9201, $_SESSION['username'], "延长职位({$_POST['jobs_name']})有效期为{$_POST['days']}天,({$operator}{$points_day}),(剩余:{$user_points})");
        }
    }
    $link[0]['text'] = "职位列表";
    $link[0]['href'] = '?act=jobs';
    $link[1]['text'] = "查看修改结果";
    $link[1]['href'] = "?act=edit_jobs&id={$id}";
    $link[2]['text'] = "会员中心首页";
    $link[2]['href'] = "hunter_index.php";
    //
    write_memberslog($_SESSION['uid'], $_SESSION['utype'], 8503, $_SESSION['username'], "修改了职位:{$setsqlarr['jobs_name']},职位ID:{$id}");
    showmsg("修改成功!", 2, $link);
}
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:hunter_jobs.php

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

示例7: updatetable

        } else {
            $setsqlarr['email'] = $_SESSION['verify_email'];
            $setsqlarr['email_audit'] = 1;
            updatetable(table('members'), $setsqlarr, " uid='{$uid}'");
            $infoarr['email'] = $setsqlarr['email'];
            updatetable(table('members_info'), $infoarr, " uid='{$uid}'");
            if ($_SESSION['utype'] == "2") {
                $u['email'] = $_SESSION['verify_email'];
                updatetable(table('resume'), $u, " uid='{$uid}'");
            }
            unset($setsqlarr, $_SESSION['verify_email'], $_SESSION['email_rand'], $u, $infoarr);
            if ($_CFG['operation_mode'] == '1' && $_SESSION['utype'] == '1') {
                $rule = get_cache('points_rule');
                if ($rule['verifyemail']['value'] > 0) {
                    $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='verifyemail'   LIMIT 1");
                    if (empty($info)) {
                        $time = time();
                        $db->query("INSERT INTO " . table('members_handsel') . " (uid,htype,addtime) VALUES ('{$_SESSION['uid']}', 'verifyemail','{$time}')");
                        require_once QISHI_ROOT_PATH . 'include/fun_company.php';
                        report_deal($_SESSION['uid'], $rule['verifyemail']['type'], $rule['verifyemail']['value']);
                        $user_points = get_user_points($_SESSION['uid']);
                        $operator = $rule['verifyemail']['type'] == "1" ? "+" : "-";
                        $_SESSION['handsel_verifyemail'] = $_CFG['points_byname'] . $operator . $rule['verifyemail']['value'];
                        write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], " 邮箱通过验证,{$_CFG['points_byname']}({$operator}{$rule['verifyemail']['value']}),(剩余:{$user_points})", 1, 1015, "邮箱认证通过", "{$operator}{$rule['verifyemail']['value']}", "{$user_points}");
                    }
                }
            }
            exit("success");
        }
    }
}
开发者ID:dalinhuang,项目名称:yy,代码行数:31,代码来源:ajax_verify_email.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: get_cache

        $setsqlarr['map_open'] = 1;
        if (updatetable(table('company_profile'), $setsqlarr, $wheresql)) {
            //发送邮件
            $mailconfig = get_cache('mailconfig');
            if ($mailconfig['set_addmap'] == "1" && $user['email_audit'] == "1") {
                dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_mail.php?uid=" . $_SESSION['uid'] . "&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_addmap");
            }
            //sms
            $sms = get_cache('sms_config');
            if ($sms['open'] == "1" && $sms['set_addmap'] == "1" && $user['mobile_audit'] == "1") {
                dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid=" . $_SESSION['uid'] . "&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_addmap");
            }
            write_memberslog($_SESSION['uid'], 1, 8005, $_SESSION['username'], "开通了电子地图");
            if ($operation_mode == '1') {
                if ($points['company_map']['value'] > 0) {
                    report_deal($_SESSION['uid'], $points['company_map']['type'], $points['company_map']['value']);
                    $user_points = get_user_points($_SESSION['uid']);
                    $operator = $points['company_map']['type'] == "1" ? "+" : "-";
                    write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "开通了电子地图({$operator}{$points['company_map']['value']}),(剩余:{$user_points})", 1, 1008, "开通电子地图", "{$operator}{$points['company_map']['value']}", "{$user_points}");
                }
            } elseif ($operation_mode == '2') {
                write_memberslog($_SESSION['uid'], 1, 9002, $_SESSION['username'], "使用服务套餐开通了电子地图", 2, 1008, "开通电子地图", "0", "");
            }
            header("Location: ?act=company_map_set");
        } else {
            showmsg('开通失败!', 1);
        }
    }
} elseif ($act == 'company_map_set') {
    $smarty->assign('title', '设置电子地图 - 企业会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('company_profile', $company_profile);
开发者ID:dalinhuang,项目名称:yy,代码行数:31,代码来源:company_info.php

示例10: exit

        if (empty($uid)) {
            exit("系统错误,UID丢失!");
        } else {
            $setsqlarr['mobile'] = $_SESSION['verify_mobile'];
            $setsqlarr['mobile_audit'] = 1;
            $db->updatetable(table('members'), $setsqlarr, " uid='{$uid}'");
            unset($setsqlarr, $_SESSION['verify_mobile'], $_SESSION['mobile_rand']);
            if ($_CFG['operation_mode'] == '1' || $_CFG['operation_mode'] == '3') {
                $rule = get_cache('points_rule');
                if ($rule['verifymobile']['value'] > 0) {
                    $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='verifymobile' LIMIT 1");
                    if (empty($info)) {
                        $time = time();
                        $db->query("INSERT INTO " . table('members_handsel') . " (uid,htype,addtime) VALUES ('{$_SESSION['uid']}', 'verifymobile','{$time}')");
                        require_once QISHI_ROOT_PATH . 'include/fun_comapny.php';
                        report_deal($_SESSION['uid'], $rule['verifymobile']['type'], $rule['verifymobile']['value']);
                        $user_points = get_user_points($_SESSION['uid']);
                        $operator = $rule['verifymobile']['type'] == "1" ? "+" : "-";
                        $_SESSION['handsel_verifymobile'] = $_CFG['points_byname'] . $operator . $rule['verifymobile']['value'];
                        write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], " 手机通过验证,{$_CFG['points_byname']}({$operator}{$rule['verifymobile']['value']}),(剩余:{$user_points})", 1, 1016, "手机认证通过", "{$operator}{$rule['verifymobile']['value']}", "{$user_points}");
                    }
                }
            }
            exit("success");
        }
    }
} elseif ($act == 'edit_email') {
    global $QS_pwdhash;
    $uid = intval($_SESSION['uid']);
    $send_key = trim($_POST['send_key']);
    if (empty($send_key) || $send_key != $_SESSION['send_mobile_key']) {
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:account_security.php

示例11: report_audit

function report_audit($id, $audit, $type, $rid)
{
    global $db;
    if (!is_array($id)) {
        $id = array($id);
    }
    $return = 0;
    $sqlin = implode(",", $id);
    $sqlrin = implode(",", $rid);
    $rule = get_cache('points_rule');
    if (preg_match("/^(\\d{1,10},)*(\\d{1,10})\$/", $sqlin)) {
        if ($type == 1) {
            if (!$db->query("update  " . table('report') . " SET audit='" . intval($audit) . "'  WHERE id IN (" . $sqlin . ")")) {
                return false;
            }
        } else {
            if (!$db->query("update  " . table('report_resume') . " SET audit='" . intval($audit) . "'  WHERE id IN (" . $sqlin . ")")) {
                return false;
            }
        }
        $return = $return + $db->affected_rows();
        //发送站内信
        if ($type == 1) {
            $result = $db->query("SELECT * FROM " . table('report') . " WHERE id IN ({$sqlin})");
        } else {
            $result = $db->query("SELECT * FROM " . table('report_resume') . " WHERE id IN ({$sqlin})");
        }
        while ($list = $db->fetch_array($result)) {
            $user_info = get_user($list['uid']);
            $timestring = date("Y年m月d日", time());
            // $type->1  个人举报职位
            if ($type == 1) {
                // 职位信息 企业会员信息
                $jobsurl = url_rewrite('QS_jobsshow', array('id' => $list['jobs_id']));
                $jobsinfo = $db->getone("SELECT * FROM " . table('jobs') . " WHERE id=" . intval($list['jobs_id']) . " UNION ALL SELECT * FROM " . table('jobs_tmp') . " WHERE id=" . $list['jobs_id']);
                if (!$jobsinfo) {
                    continue;
                }
                $user_info_com = get_user($jobsinfo['uid']);
                // 若属实
                if ($audit == 2) {
                    //个人积分操作
                    report_deal($user_info['uid'], $rule['report_jobs']['type'], $rule['report_jobs']['value']);
                    $user_points = get_user_points($user_info['uid']);
                    $operator = $rule['report_jobs']['type'] == "1" ? "+" : "-";
                    write_memberslog($user_info['uid'], 2, 9001, $user_info_com['username'], " 举报职位审核通过,{$_CFG['points_byname']}({$operator}{$rule['report_jobs']['value']}),(剩余:{$user_points})", 2, 7003, "举报职位审核通过", "{$operator}{$rule['report_jobs']['value']}", "{$user_points}");
                    $msg_p = ",奖励" . $rule['report_jobs']['value'] . "积分,感谢您对" . $_CFG['site_name'] . "的支持!";
                    $setsqlarr_p['message'] = "您于" . $timestring . "举报企业【" . $jobsinfo['companyname'] . "】发布的职位:【<a href=\"{$jobsurl}\" target=\"_blank\">{$list['jobs_name']}</a>】,经平台核实情况属实" . $msg_p;
                    $setsqlarr_p['msgtype'] = 1;
                    $setsqlarr_p['msgtouid'] = $user_info['uid'];
                    $setsqlarr_p['msgtoname'] = $user_info['username'];
                    $setsqlarr_p['dateline'] = time();
                    $setsqlarr_p['replytime'] = time();
                    $setsqlarr_p['new'] = 1;
                    $db->inserttable(table('pms'), $setsqlarr_p);
                    //扣除企业积分操作
                    report_deal($jobsinfo['uid'], $rule['company_jobs_report_points']['type'], $rule['company_jobs_report_points']['value']);
                    $user_points = get_user_points($jobsinfo['uid']);
                    $operator = $rule['company_jobs_report_points']['type'] == "1" ? "+" : "-";
                    write_memberslog($jobsinfo['uid'], 1, 9001, $user_info_com['username'], " 企业发布职位被举报,{$_CFG['points_byname']}({$operator}{$rule['company_jobs_report_points']['value']}),(剩余:{$user_points})", 1, 1016, "企业发布职位被举报", "{$operator}{$rule['company_jobs_report_points']['value']}", "{$user_points}");
                    $msg_c = ",扣除" . $rule['company_jobs_report_points']['value'] . "积分,如再有此类情况发生将作封号处理!";
                    $setsqlarr_c['message'] = "您发布的职位:【<a href=\"{$jobsurl}\" target=\"_blank\">{$list['jobs_name']}</a>】于" . $timestring . "被举报,经平台核实情况属实" . $msg_c;
                    $setsqlarr_c['msgtype'] = 1;
                    $setsqlarr_c['msgtouid'] = $user_info_com['uid'];
                    $setsqlarr_c['msgtoname'] = $user_info_com['username'];
                    $setsqlarr_c['dateline'] = time();
                    $setsqlarr_c['replytime'] = time();
                    $setsqlarr_c['new'] = 1;
                    $db->inserttable(table('pms'), $setsqlarr_c);
                } else {
                    $setsqlarr['message'] = "您于" . $timestring . "举报企业【" . $jobsinfo['companyname'] . "】发布的职位:【<a href=\"{$jobsurl}\" target=\"_blank\">{$list['jobs_name']}</a>】,经平台核实情况不属实";
                    $setsqlarr['msgtype'] = 1;
                    $setsqlarr['msgtouid'] = $user_info['uid'];
                    $setsqlarr['msgtoname'] = $user_info['username'];
                    $setsqlarr['dateline'] = time();
                    $setsqlarr['replytime'] = time();
                    $setsqlarr['new'] = 1;
                    $db->inserttable(table('pms'), $setsqlarr);
                }
            } else {
                // 简历信息  会员信息
                $resumeurl = url_rewrite('QS_resumeshow', array('id' => $list['resume_id']));
                $resumeinfo = $db->getone("SELECT * FROM " . table('resume') . " WHERE id=" . intval($list['resume_id']));
                if (!$resumeinfo) {
                    continue;
                }
                $user_info_per = get_user($resumeinfo['uid']);
                // 若属实
                if ($audit == 2) {
                    // 企业举报简历 获得积分
                    report_deal($user_info['uid'], $rule['company_report_resume_points']['type'], $rule['company_report_resume_points']['value']);
                    $user_points = get_user_points($user_info['uid']);
                    $operator = $rule['company_report_resume_points']['type'] == "1" ? "+" : "-";
                    write_memberslog($user_info['uid'], 1, 9001, $user_info['username'], " 企业举报简历,{$_CFG['points_byname']}({$operator}{$rule['company_report_resume_points']['value']}),(剩余:{$user_points})", 1, 7003, "企业举报简历", "{$operator}{$rule['company_report_resume_points']['value']}", "{$user_points}");
                    $msg = ",奖励" . $rule['company_report_resume_points']['value'] . "积分,感谢您对" . $_CFG['site_name'] . "的支持!";
                    $setsqlarr_c['message'] = "您于" . $timestring . "举报的简历:【<a href=\"{$resumeurl}\" target=\"_blank\">{$list['title']}</a>】,经平台核实情况属实" . $msg;
                    $setsqlarr_c['msgtype'] = 1;
                    $setsqlarr_c['msgtouid'] = $user_info['uid'];
                    $setsqlarr_c['msgtoname'] = $user_info['username'];
                    $setsqlarr_c['dateline'] = time();
//.........这里部分代码省略.........
开发者ID:winiceo,项目名称:job,代码行数:101,代码来源:admin_feedback_fun.php

示例12: dfopen

            dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_mail.php?uid=" . $_SESSION['uid'] . "&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_addmap");
        }
        //sms
        $sms = get_cache('sms_config');
        if ($sms['open'] == "1" && $sms['set_addmap'] == "1" && $user['mobile_audit'] == "1") {
            dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid=" . $_SESSION['uid'] . "&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_addmap");
        }
        //sms
        $link[0]['text'] = "设置电子地图";
        $link[0]['href'] = '?act=train_map_set';
        $link[1]['text'] = "返回会员中心首页";
        $link[1]['href'] = 'train_index.php?act=';
        write_memberslog($_SESSION['uid'], 4, 8105, $_SESSION['username'], "开通了电子地图");
        if ($_CFG['operation_train_mode'] == '1') {
            if ($points['train_map']['value'] > 0) {
                report_deal($_SESSION['uid'], $points['train_map']['type'], $points['train_map']['value']);
                $user_points = get_user_points($_SESSION['uid']);
                $operator = $points['train_map']['type'] == "1" ? "+" : "-";
                write_memberslog($_SESSION['uid'], 4, 9101, $_SESSION['username'], "开通了电子地图({$operator}{$points['train_map']['value']}),(剩余:{$user_points})");
            }
        } elseif ($_CFG['operation_train_mode'] == '2') {
            write_memberslog($_SESSION['uid'], 4, 9102, $_SESSION['username'], "使用服务套餐开通了电子地图");
        }
        showmsg('成功开通!', 2, $link);
    } else {
        showmsg('开通失败!', 1);
    }
} elseif ($act == 'train_map_set') {
    $smarty->assign('title', '设置电子地图 - 培训会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('train_profile', $train_profile);
    $smarty->display('member_train/train_map_set.htm');
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:train_info.php

示例13: table

         $db->query("INSERT INTO " . table('members_handsel') . " (uid,htype,addtime) VALUES ('{$usinfo['uid']}', 'company_wx_points','{$time}')");
         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;
 }
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:binding.php

示例14: COUNT

            }
            if ($gifts_type['t_repeat'] > 0) {
                $total = $db->get_total("SELECT COUNT(*) AS num FROM " . table('members_gifts') . " where uid='{$_SESSION['uid']}'");
                if ($total >= $gifts_type['t_repeat']) {
                    showmsg("{$gifts_type['t_name']} 每个会员仅可以使用 {$gifts_type['t_repeat']} 次。", 1);
                }
            }
            $db->query("UPDATE " . table('gifts') . " SET usettime = '" . time() . "',useuid= '{$_SESSION['uid']}'  where account='{$account}'");
            $setsqlarr['uid'] = $_SESSION['uid'];
            $setsqlarr['usetime'] = time();
            $setsqlarr['account'] = $account;
            $setsqlarr['giftsname'] = $gifts_type['t_name'];
            $setsqlarr['giftsamount'] = $gifts_type['t_amount'];
            $setsqlarr['giftstid'] = $gifts_type['t_id'];
            $db->inserttable(table('members_gifts'), $setsqlarr);
            report_deal($_SESSION['uid'], 1, $setsqlarr['giftsamount']);
            $user_points = get_user_points($_SESSION['uid']);
            $operator = "+";
            write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "使用礼品卡({$account})充值({$operator}{$setsqlarr['giftsamount']}),(剩余:{$user_points})", 1, 1021, "礼品卡充值", "{$operator}{$setsqlarr['giftsamount']}", "{$user_points}");
            showmsg("充值成功!", 2);
        }
    }
} elseif ($act == 'feedback_save') {
    $get_feedback = get_feedback($_SESSION['uid']);
    if (count($get_feedback) >= 5) {
        showmsg('反馈信息不能超过5条!', 1);
        exit;
    }
    $setsqlarr['infotype'] = intval($_POST['infotype']);
    $setsqlarr['feedback'] = trim($_POST['feedback']) ? trim($_POST['feedback']) : showmsg("请填写内容!", 1);
    $setsqlarr['uid'] = $_SESSION['uid'];
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:company_service.php

示例15: showmsg

    if (!$db->updatetable(table('course'), $setsqlarr, " id='{$id}' AND uid='{$_SESSION['uid']}' ")) {
        showmsg("保存失败!", 0);
    }
    if (!$db->updatetable(table('course_contact'), $setsqlarr_contact, " pid='{$id}' ")) {
        showmsg("保存失败!", 0);
    }
    if ($_CFG['operation_train_mode'] == '1') {
        if ($points_rule['course_edit']['value'] > 0) {
            report_deal($_SESSION['uid'], $points_rule['course_edit']['type'], $points_rule['course_edit']['value']);
            $user_points = get_user_points($_SESSION['uid']);
            $operator = $points_rule['course_edit']['type'] == "1" ? "+" : "-";
            write_memberslog($_SESSION['uid'], 4, 9101, $_SESSION['username'], "修改课程:<strong>{$setsqlarr['course_name']}</strong>,({$operator}{$points_rule['course_edit']['value']}),(剩余:{$user_points})");
        }
        if ($days > 0 && $points_rule['course_daily']['value'] > 0) {
            $points_day = intval($_POST['days']) * $points_rule['course_daily']['value'];
            report_deal($_SESSION['uid'], $points_rule['course_daily']['type'], $points_day);
            $user_points = get_user_points($_SESSION['uid']);
            $operator = $points_rule['course_daily']['type'] == "1" ? "+" : "-";
            write_memberslog($_SESSION['uid'], 4, 9101, $_SESSION['username'], "延长课程({$_POST['course_name']})有效期为{$_POST['days']}天,({$operator}{$points_day}),(剩余:{$user_points})");
        }
    }
    $link[0]['text'] = "课程列表";
    $link[0]['href'] = '?act=course';
    $link[1]['text'] = "查看修改结果";
    $link[1]['href'] = "?act=editcourse&id={$id}";
    $link[2]['text'] = "会员中心首页";
    $link[2]['href'] = "train_index.php";
    write_memberslog($_SESSION['uid'], $_SESSION['utype'], 8202, $_SESSION['username'], "修改了课程:{$setsqlarr['course_name']},课程ID:{$id}");
    showmsg("修改成功!", 2, $link);
}
unset($smarty);
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:train_course.php


注:本文中的report_deal函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。