當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。