Example #1
0
 * 74cms ajax 会员中心
 * ============================================================================
 * 版权所有: 骑士网络,并保留所有权利。
 * 网站地址: http://www.74cms.com;
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用;不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
define('IN_QISHI', true);
require_once dirname(dirname(__FILE__)) . '/include/plus.common.inc.php';
$act = !empty($_GET['act']) ? trim($_GET['act']) : '';
if ($act == 'edit_apply') {
    $id = intval($_GET['id']);
    if ($id > 0) {
        $setsqlarr['personal_look'] = 2;
        $db->updatetable(table('personal_jobs_apply'), $setsqlarr, " did='" . $id . "' LIMIT 1");
        $sql = "select m.username from " . table('personal_jobs_apply') . " AS a JOIN " . table('members') . " AS m ON a.personal_uid=m.uid WHERE a.did='{$id}' LIMIT 1";
        $user = $db->getone($sql);
        write_memberslog($_SESSION['uid'], 1, 2006, $_SESSION['username'], "查看了 {$user['username']} 的职位申请");
        exit("ok");
    }
} elseif ($act == 'edit_interview') {
    $id = intval($_GET['id']);
    if ($id > 0) {
        $setsqlarr['personal_look'] = 2;
        if ($db->updatetable(table('company_interview'), $setsqlarr, " did='" . $id . "' LIMIT 1")) {
            exit("ok");
        }
    }
}
Example #2
0
                    $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}");
                }
            }
            if ($rule['per_verifyweixin']['value'] > 0 && $usinfo['utype'] == 2) {
                $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='per_verifyweixin' LIMIT 1");
                if (empty($info)) {
                    $time = time();
                    $db->query("INSERT INTO " . table('members_handsel') . " (uid,htype,addtime) VALUES ('{$_SESSION['uid']}', 'per_verifyweixin','{$time}')");
                    require_once QISHI_ROOT_PATH . 'include/fun_comapny.php';
                    report_deal($_SESSION['uid'], $rule['per_verifyweixin']['type'], $rule['per_verifyweixin']['value']);
                    $user_points = get_user_points($_SESSION['uid']);
                    $operator = $rule['per_verifyweixin']['type'] == "1" ? "+" : "-";
                    $_SESSION['handsel_per_verifyweixin'] = $_CFG['points_byname'] . $operator . $rule['per_verifyweixin']['value'];
                    write_memberslog($_SESSION['uid'], 2, 9001, $_SESSION['username'], " 绑定微信,{$_CFG['points_byname']}({$operator}{$rule['per_verifyweixin']['value']}),(剩余:{$user_points})", 2, 1016, "绑定微信", "{$operator}{$rule['per_verifyweixin']['value']}", "{$user_points}");
                }
            }
            unlink(QISHI_ROOT_PATH . "data/weixin/" . $event_key % 10 . '/' . $event_key . ".txt");
            exit("1");
        } else {
            exit("-1");
        }
    }
} elseif ($act == "sel_subsite") {
    if (empty($_GET['query'])) {
        exit;
    }
    $gbk_query = trim($_GET['query']);
    if (strcasecmp(QISHI_DBCHARSET, "utf8") != 0) {
        $gbk_query = utf8_to_gbk($gbk_query);
Example #3
0
        $ptype = $resumeshow['talent'] == '2' ? $points_rule['resume_download_advanced']['type'] : $points_rule['resume_download']['type'];
        $mypoints = get_user_points($_SESSION['uid']);
        if ($mypoints < $points) {
            exit("err");
        }
        if (add_down_resume($id, $_SESSION['uid'], $resumeshow['uid'], $resumeshow['resume_name'])) {
            if ($points > 0) {
                report_deal($_SESSION['uid'], $ptype, $points);
                $user_points = get_user_points($_SESSION['uid']);
                $operator = $ptype == "1" ? "+" : "-";
                if ($resumeshow['talent'] == '2') {
                    write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "下载了 {$ruser['username']} 发布的简历({$operator}{$points}),(剩余:{$user_points})", 1, 1005, "下载高级简历", "{$operator}{$points}", "{$user_points}");
                } elseif ($resumeshow['talent'] == '1') {
                    write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "下载了 {$ruser['username']} 发布的简历({$operator}{$points}),(剩余:{$user_points})", 1, 1004, "下载普通简历", "{$operator}{$points}", "{$user_points}");
                }
                write_memberslog($_SESSION['uid'], 1, 4001, $_SESSION['username'], "下载了 {$ruser['username']} 发布的简历");
                //站内信
                if ($pms_notice == '1') {
                    $company = $db->getone("select id,companyname  from " . table('company_profile') . " where uid ={$_SESSION['uid']} limit 1");
                    // $user=$db->getone("select username from ".table('members')." where uid ={$resumeshow['uid']} limit 1");
                    $resume_url = url_rewrite('QS_resumeshow', array('id' => $id));
                    $company_url = url_rewrite('QS_companyshow', array('id' => $company['id']));
                    $message = $_SESSION['username'] . "下载了您发布的简历:<a href=\"{$resume_url}\" target=\"_blank\">{$resumeshow['resume_name']}</a>,<a href=\"{$company_url}\" target=\"_blank\">点击查看公司详情</a>";
                    write_pmsnotice($resumeshow['uid'], $ruser['username'], $message);
                }
            }
            exit("ok");
        }
    }
}
function get_resume_basic_one($id)
Example #4
0
    $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);
}
unset($smarty);
Example #5
0
    $addarr['mobile'] = $mobile;
    $addarr['personal_uid'] = intval($_SESSION['uid']);
    $addarr['course_id'] = $course['id'];
    $addarr['course_name'] = $course['course_name'];
    $addarr['train_id'] = $course['train_id'];
    $addarr['train_name'] = $course['trainname'];
    $addarr['train_uid'] = $course['uid'];
    $addarr['notes'] = $notes;
    if (strcasecmp(QISHI_DBCHARSET, "utf8") != 0) {
        $addarr['notes'] = utf8_to_gbk($addarr['notes']);
        $addarr['realname'] = utf8_to_gbk($addarr['realname']);
        $addarr['mobile'] = utf8_to_gbk($addarr['mobile']);
    }
    $addarr['apply_addtime'] = time();
    $addarr['personal_look'] = 1;
    if ($db->inserttable(table('personal_course_apply'), $addarr)) {
        $mailconfig = get_cache('mailconfig');
        $course['contact'] = $db->getone("select notify  from " . table('course_contact') . " where pid='{$course['id']}' LIMIT 1 ");
        $sms = get_cache('sms_config');
        $trainuser = get_user_info($course['uid']);
        if ($mailconfig['set_applycou'] == '1' && $trainuser['email_audit'] == '1' && $course['contact']['notify'] == '1') {
            dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_mail.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_applycou&course_id={$course['id']}&coursename={$course['course_name']}&personal_fullname={$realname}&email={$trainuser['email']}");
        }
        //sms
        if ($sms['open'] == "1" && $sms['set_applycou'] == "1" && $trainuser['mobile_audit'] == "1") {
            dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_applycou&course_id={$course['id']}&coursename={$course['course_name']}&personal_fullname={$realname}&mobile={$trainuser['mobile']}");
        }
        write_memberslog($_SESSION['uid'], 2, s, $_SESSION['username'], "申请课程,课程:{$course['course_name']}");
    }
    exit("ok");
}
Example #6
0
    $smarty->assign('title', '用户反馈 - 个人会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('feedback', get_feedback($_SESSION['uid']));
    $smarty->display('member_personal/personal_feedback.htm');
} 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'];
    $setsqlarr['usertype'] = $_SESSION['utype'];
    $setsqlarr['username'] = $_SESSION['username'];
    $setsqlarr['addtime'] = $timestamp;
    write_memberslog($_SESSION['uid'], 2, 7001, $_SESSION['username'], "添加反馈信息");
    !$db->inserttable(table('feedback'), $setsqlarr) ? showmsg("添加失败!", 0) : showmsg("添加成功,请等待管理员回复!", 2);
} elseif ($act == 'del_feedback') {
    $id = intval($_GET['id']);
    del_feedback($id, $_SESSION['uid']) ? showmsg('删除成功!', 2) : showmsg('删除失败!', 1);
} elseif ($act == 'pm') {
    require_once QISHI_ROOT_PATH . 'include/page.class.php';
    $perpage = 10;
    $uid = intval($_SESSION['uid']);
    $wheresql = " WHERE (p.msgfromuid='{$uid}' OR p.msgtouid='{$uid}') ";
    $joinsql = " LEFT JOIN  " . table('members') . " AS i  ON  p.msgfromuid=i.uid ";
    $orderby = " order by p.pmid desc";
    $total_sql = "SELECT COUNT(*) AS num FROM " . table('pms') . ' AS p ' . $wheresql;
    $total_val = $db->get_total($total_sql);
    $page = new page(array('total' => $total_val, 'perpage' => $perpage, 'getarray' => $_GET));
    $currenpage = $page->nowindex;
Example #7
0
        $addarr['job_id'] = $jobs['id'];
        $addarr['job_name'] = $jobs['jobs_name'];
        $addarr['company_id'] = $jobs['company_id'];
        $addarr['company_name'] = $jobs['companyname'];
        $addarr['company_uid'] = $jobs['uid'];
        $addarr['link_name'] = $link_name;
        $addarr['link_telephone'] = $link_telephone;
        $addarr['remark'] = $remark;
        if (strcasecmp(QISHI_DBCHARSET, "utf8") != 0) {
            $addarr['remark'] = utf8_to_gbk($addarr['remark']);
            $addarr['link_name'] = utf8_to_gbk($link_name);
            $addarr['link_telephone'] = utf8_to_gbk($link_telephone);
        }
        $addarr['addtime'] = time();
        $addarr['uid'] = $_SESSION["uid"];
        if ($db->inserttable(table('jobs_reward_clue'), $addarr)) {
            write_memberslog($_SESSION['uid'], 2, 1301, $_SESSION['username'], "提交了人才线索,职位:{$jobs['jobs_name']}");
        }
        $i = $i + 1;
    }
    if ($i == 0) {
        exit("repeat");
    } else {
        exit("ok");
    }
}
function reduce_user_sms($uid)
{
    global $db;
    $db->query("UPDATE " . table('members') . " SET `sms_num` = sms_num - 1 WHERE `uid` = " . $uid . " LIMIT 1 ;");
}
Example #8
0
    !$db->updatetable(table('resume'), $setsqlarr, " uid='{$uid}' AND  id='{$pid}'");
    $setsqlarrdisplay['display'] = intval($_POST['display']);
    !$db->updatetable(table('resume_search_key'), $setsqlarrdisplay, " uid='{$uid}' AND  id='{$pid}'");
    !$db->updatetable(table('resume_search_rtime'), $setsqlarrdisplay, " uid='{$uid}' AND  id='{$pid}'");
    write_memberslog($_SESSION['uid'], 2, 1104, $_SESSION['username'], "设置简历隐私({$pid})");
} elseif ($act == 'talent_save') {
    $uid = intval($_SESSION['uid']);
    $pid = intval($_REQUEST['pid']);
    $resume = get_resume_basic($uid, $pid);
    if ($resume['complete_percent'] < $_CFG['elite_resume_complete_percent']) {
        showmsg("简历完整指数小于{$_CFG['elite_resume_complete_percent']}%,禁止申请!", 0);
    }
    $setsqlarr['talent'] = 3;
    $wheresql = " uid='{$uid}' AND id='{$pid}' ";
    $db->updatetable(table('resume'), $setsqlarr, $wheresql);
    write_memberslog($uid, 2, 1107, $_SESSION['username'], "申请高级人才");
    showmsg('申请成功,请等待管理员审核!', 2);
} elseif ($act == 'resume_outward') {
    $captcha = get_cache('captcha');
    $smarty->assign('verify_resume_outward', $captcha['verify_resume_outward']);
    $smarty->assign('act', $act);
    $smarty->assign('resume_list', get_auditresume_list($_SESSION['uid']));
    $smarty->assign('title', '外发简历 - 个人会员中心 - ' . $_CFG['site_name']);
    $smarty->display('member_personal/personal_resume_outward.htm');
} elseif ($act == 'outward_save') {
    //保存外发记录
    $captcha = get_cache('captcha');
    $postcaptcha = trim($_POST['postcaptcha']);
    if ($captcha['verify_resume_outward'] == '1' && empty($postcaptcha)) {
        showmsg("请填写验证码", 1);
    }
Example #9
0
    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);
Example #10
0
        adminmsg("此职位正在执行此推广!请选择其他职位或者其他推广方案", 1);
    } else {
        if ($setsqlarr['cp_promotionid'] == "4") {
            $setsqlarr['cp_val'] = !empty($_POST['val']) ? $_POST['val'] : adminmsg("请选择颜色", 1);
        }
        $setsqlarr['cp_starttime'] = time();
        $setsqlarr['cp_endtime'] = strtotime("{$setsqlarr['cp_days']} day");
        $setsqlarr['cp_available'] = 1;
        $setsqlarr['cp_hour_cn'] = trim($_POST['hour']);
        $setsqlarr['cp_hour'] = intval($_POST['hour']);
        $jobs = get_jobs_one($setsqlarr['cp_jobid']);
        $setsqlarr['cp_uid'] = $jobs['uid'];
        if ($db->inserttable(table('promotion'), $setsqlarr)) {
            $u = get_user($setsqlarr['cp_uid']);
            $promotion = get_promotion_cat_one($setsqlarr['cp_promotionid']);
            write_memberslog($u['uid'], 1, 3004, $u['username'], "管理员增加推广:{$promotion['cat_name']},职位ID:{$setsqlarr['cp_jobid']}");
            set_job_promotion($setsqlarr['cp_jobid'], $setsqlarr['cp_promotionid'], $setsqlarr['cp_val']);
            write_log("添加推广:{$promotion['cat_name']},职位ID:{$setsqlarr['cp_jobid']}", $_SESSION['admin_name'], 3);
            $link[0]['text'] = "返回列表";
            $link[0]['href'] = "?act=list";
            adminmsg("添加成功", 2, $link);
        }
    }
} elseif ($act == 'promotion_edit') {
    get_token();
    $id = intval($_GET['id']);
    $show = get_promotion_one($id);
    $jobs = get_jobs_one($show['cp_jobid']);
    $promotion = get_promotion_cat_one($show['cp_promotionid']);
    $smarty->assign('time', time());
    $smarty->assign('show', $show);
Example #11
0
function del_down_manager($del_id, $uid)
{
    global $db;
    $uid = intval($uid);
    $uidsql = " AND user_uid='{$uid}'";
    if (!is_array($del_id)) {
        $del_id = array($del_id);
    }
    $sqlin = implode(",", $del_id);
    $return = 0;
    if (preg_match("/^(\\d{1,10},)*(\\d{1,10})\$/", $sqlin)) {
        if (!$db->query("Delete from " . table('user_down_manager_resume') . " WHERE did IN ({$sqlin}) {$uidsql}")) {
            return false;
        }
        $return = $return + $db->affected_rows();
        write_memberslog($_SESSION['uid'], $_SESSION['utype'], 4002, $_SESSION['username'], "删除经理人简历下载记录({$sqlin})");
        return $return;
    }
}
Example #12
0
    } elseif ($_CFG['operation_mode'] == '2' || $_CFG['operation_mode'] == '3') {
        $setmeal = get_user_setmeal($_SESSION['uid']);
        //获取会员套餐
        $link[0]['text'] = "返回上一页";
        $link[0]['href'] = 'javascript:history.go(-1)';
        $link[1]['text'] = "重新开通服务";
        $link[1]['href'] = 'company_service.php?act=setmeal_list';
        if ($setmeal['endtime'] < time() && $setmeal['endtime'] != "0") {
            showmsg("您的服务已经到期,请重新开通", 1, $link);
        }
        if ($setmeal['change_templates'] == '0') {
            showmsg("你的套餐{$setmeal['setmeal_name']},没有自由切换模板的权限,请尽快开通新套餐", 1, $link);
        }
    }
    $setsqlarr['tpl'] = $seltpl;
    $db->updatetable(table('company_profile'), $setsqlarr, " uid='{$_SESSION['uid']}'");
    $db->updatetable(table('jobs'), $setsqlarr, " uid='{$_SESSION['uid']}'");
    $db->updatetable(table('jobs_tmp'), $setsqlarr, " uid='{$_SESSION['uid']}'");
    if ($_CFG['operation_mode'] == '1') {
        if ($comtpl['tpl_val'] > 0) {
            report_deal($_SESSION['uid'], 2, $comtpl['tpl_val']);
            $user_points = get_user_points($_SESSION['uid']);
            write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "设置企业模版:{$comtpl['tpl_name']},(-{$comtpl['tpl_val']}),(剩余:{$user_points})", 1, 1022, "选择模板", "-{$comtpl['tpl_val']}", "{$user_points}");
        }
    } elseif ($_CFG['operation_mode'] == '2' || $_CFG['operation_mode'] == '3') {
        write_memberslog($_SESSION['uid'], 1, 9002, $_SESSION['username'], "套餐:{$setmeal['setmeal_name']},可自由切换模板,设置企业模版:{$comtpl['tpl_name']}", 2, 1022, "选择模板", "0", "0");
    }
    write_memberslog($_SESSION['uid'], 1, 8007, $_SESSION['username'], "设置企业模版:{$comtpl['tpl_name']}");
    showmsg("设置成功!", 2);
}
unset($smarty);
Example #13
0
             write_memberslog($order['uid'], 1, 9002, $user['username'], $notes);
             //会员套餐变更记录。会员购买成功。2表示:会员自己购买
             write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 2, 1);
         }
     } elseif ($order['pay_type'] == '2') {
         $order_name = "广告位订单";
         write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "申请广告位:<strong>{$order['description']}</strong>,(花费: {$order['amount']})。", 1, 1020, "申请广告位", "-{$order['amount']}", "{$user_points}");
     } elseif ($order['pay_type'] == '3') {
         $order_name = "短信套餐订单";
         $user = get_user_info($order['uid']);
         if ($order['setmeal'] > 0) {
             //查看短信套餐
             set_members_sms($order['uid'], intval($order['setmeal']));
             //支付成功,向用户增加短信条数
             $user_points = get_user_setmeal($order['uid']);
             write_memberslog($_SESSION['uid'], 1, 9003, $_SESSION['username'], "短信充值套餐:<strong>{$order['description']}</strong>,(- {$order['amount']}),(剩余:{$user_points['set_sms']})", 1, 1020, "申请广告位", "- {$order['amount']}", "{$user_points['set_sms']}");
         }
     }
     //sendemail
     $mailconfig = get_cache('mailconfig');
     if ($mailconfig['set_payment'] == "1" && $user['email_audit'] == "1" && $order['amount'] > 0) {
         dfopen("{$_CFG['site_domain']}{$_CFG['site_dir']}plus/asyn_mail.php?uid={$order['uid']}&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
     }
     //sms
     $sms = get_cache('sms_config');
     if ($sms['open'] == "1" && $sms['set_payment'] == "1" && $user['mobile_audit'] == "1" && $order['amount'] > 0) {
         dfopen("{$_CFG['site_domain']}{$_CFG['site_dir']}plus/asyn_sms.php?uid={$order['uid']}&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
     }
     //return true;
 }
 // else
Example #14
0
        $setsqlarr['refreshtime'] = $timestamp;
        $_CFG['audit_edit_hunter'] != "-1" ? $setsqlarr['audit'] = intval($_CFG['audit_edit_hunter']) : '';
        if ($db->updatetable(table('hunter_profile'), $setsqlarr, " uid='{$uid}'")) {
            unset($setsqlarr);
            write_memberslog($_SESSION['uid'], $_SESSION['utype'], 8501, $_SESSION['username'], "修改猎头资料");
            showmsg("保存成功!", 2, $link);
        } else {
            showmsg("保存失败!", 0);
        }
    } else {
        $setsqlarr['audit'] = intval($_CFG['audit_add_hunter']);
        $setsqlarr['addtime'] = $timestamp;
        $setsqlarr['refreshtime'] = $timestamp;
        $insertid = $db->inserttable(table('hunter_profile'), $setsqlarr, 1);
        if ($insertid) {
            write_memberslog($_SESSION['uid'], $_SESSION['utype'], 8500, $_SESSION['username'], "完善猎头资料");
            baidu_submiturl(url_rewrite('QS_hunter_show', array('id' => $insertid)), 'addhunter');
            showmsg("保存成功!", 2, $link);
        } else {
            showmsg("保存失败!", 0);
        }
    }
} elseif ($act == 'photo') {
    if (empty($hunter_profile)) {
        showmsg('请先完善猎头基本资料!', 0);
    }
    $smarty->assign('title', '照片认证 - 猎头会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('points', get_cache('points_rule'));
    $smarty->assign('hunter_profile', $hunter_profile);
    $smarty->display('member_hunter/hunter_photo.htm');
} elseif ($act == 'photo_save') {
Example #15
0
        $db->query("UPDATE " . table('jobs_tmp') . " SET emergency='0' WHERE id='{$row['cp_jobid']}' LIMIT 1 ");
        $db->query("UPDATE " . table('jobs_search_hot') . " SET emergency='0' WHERE id='{$row['cp_jobid']}' LIMIT 1");
        $db->query("UPDATE " . table('jobs_search_key') . " SET emergency='0' WHERE id='{$row['cp_jobid']}' LIMIT 1");
        $db->query("UPDATE " . table('jobs_search_rtime') . " SET emergency='0' WHERE id='{$row['cp_jobid']}' LIMIT 1");
        $db->query("UPDATE " . table('jobs_search_scale') . " SET emergency='0' WHERE id='{$row['cp_jobid']}' LIMIT 1");
        $db->query("UPDATE " . table('jobs_search_stickrtime') . " SET emergency='0' WHERE id='{$row['cp_jobid']}' LIMIT 1");
        $db->query("UPDATE " . table('jobs_search_wage') . " SET emergency='0' WHERE id='{$row['cp_jobid']}' LIMIT 1");
    } elseif ($row['cp_promotionid'] == "3") {
        $db->query("UPDATE " . table('jobs') . " SET stick=0 WHERE id='{$row['cp_jobid']}' LIMIT 1");
        $db->query("UPDATE " . table('jobs_tmp') . " SET stick=0 WHERE id='{$row['cp_jobid']}' LIMIT 1");
        $db->query("UPDATE " . table('jobs_search_stickrtime') . " SET stick='0' WHERE id='{$row['cp_jobid']}' LIMIT 1");
    } elseif ($row['cp_promotionid'] == "4") {
        $db->query("UPDATE " . table('jobs') . " SET highlight='' WHERE id='{$row['cp_jobid']}' LIMIT 1");
        $db->query("UPDATE " . table('jobs_tmp') . " SET highlight='' WHERE id='{$row['cp_jobid']}' LIMIT 1");
    }
    write_memberslog($row['cp_uid'], 1, 3006, $row['username'], "推广到期,自动删除,职位ID:{$row['cp_jobid']},方案ID:{$row['cp_id']}");
    $proid[] = $row['cp_id'];
}
if (is_array($proid) && !empty($proid)) {
    $sqlin = implode(",", $proid);
    $db->query("Delete from " . table('promotion') . " WHERE cp_id IN ({$sqlin})");
}
//更新任务时间表
if ($crons['weekday'] >= 0) {
    $weekday = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
    $nextrun = strtotime("Next " . $weekday[$crons['weekday']]);
} elseif ($crons['day'] > 0) {
    $nextrun = strtotime('+1 months');
    $nextrun = mktime(0, 0, 0, date("m", $nextrun), $crons['day'], date("Y", $nextrun));
} else {
    $nextrun = time();
Example #16
0
                    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_train.php';
                        report_deal($_SESSION['uid'], $rule['train_verifyemail']['type'], $rule['train_verifyemail']['value']);
                        $user_points = get_user_points($_SESSION['uid']);
                        $operator = $rule['train_verifyemail']['type'] == "1" ? "+" : "-";
                        $_SESSION['handsel_verifyemail'] = $_CFG['train_points_byname'] . $operator . $rule['train_verifyemail']['value'];
                        write_memberslog($_SESSION['uid'], 4, 9101, $_SESSION['username'], " 邮箱通过验证,{$_CFG['train_points_byname']}({$operator}{$rule['train_verifyemail']['value']}),(剩余:{$user_points})");
                    }
                }
            } elseif ($_CFG['operation_hunter_mode'] == '1' && $_SESSION['utype'] == '3') {
                $rule = get_cache('points_rule');
                if ($rule['hunter_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_hunter.php';
                        report_deal($_SESSION['uid'], $rule['hunter_verifyemail']['type'], $rule['hunter_verifyemail']['value']);
                        $user_points = get_user_points($_SESSION['uid']);
                        $operator = $rule['hunter_verifyemail']['type'] == "1" ? "+" : "-";
                        $_SESSION['handsel_verifyemail'] = $_CFG['hunter_points_byname'] . $operator . $rule['hunter_verifyemail']['value'];
                        write_memberslog($_SESSION['uid'], 3, 9201, $_SESSION['username'], " 邮箱通过验证,{$_CFG['hunter_points_byname']}({$operator}{$rule['hunter_verifyemail']['value']}),(剩余:{$user_points})");
                    }
                }
            }
            exit("success");
        }
    }
}
Example #17
0
        } 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");
        }
    }
}
Example #18
0
            adminmsg('该用户名已经被使用或者用户名非法!', 1);
            exit;
        } elseif (uc_user_checkemail($sql['email']) != "1") {
            adminmsg('该 Email已经被使用或者非法!', 1);
            exit;
        } else {
            uc_user_register($sql['username'], $sql['password'], $sql['email']);
        }
    }
    $sql['pwd_hash'] = randstr();
    $sql['password'] = md5(md5($sql['password']) . $sql['pwd_hash'] . $QS_pwdhash);
    $sql['reg_time'] = time();
    $sql['reg_ip'] = $online_ip;
    $insert_id = inserttable(table('members'), $sql, true);
    if ($insert_id) {
        write_memberslog($insert_id, 1, 1000, $sql['username'], "管理员在后台新增会员");
        $link[0]['text'] = "返回列表";
        $link[0]['href'] = "?act=members_list";
        adminmsg('添加成功!', 2, $link);
    }
} elseif ($act == 'resume_show') {
    check_permissions($_SESSION['admin_purview'], "resume_show");
    $id = !empty($_REQUEST['id']) ? intval($_REQUEST['id']) : adminmsg("你没有选择简历!", 1);
    $uid = intval($_REQUEST['uid']);
    $smarty->assign('pageheader', "查看简历");
    $resume = get_resume_basic($uid, $id);
    if (empty($resume)) {
        $link[0]['text'] = "返回简历列表";
        $link[0]['href'] = '?act=list';
        adminmsg('简历不存在或已经被删除!', 1, $link);
    }
Example #19
0
    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();
    check_permissions($_SESSION['admin_purview'], "com_user_edit");
Example #20
0
function edit_username($arr, $check = true)
{
    global $db, $QS_pwdhash, $QS_cookiepath, $QS_cookiedomain;
    if (!is_array($arr)) {
        return false;
    }
    $row = $db->getone("SELECT * FROM " . table('members') . " WHERE uid='{$arr['uid']}' LIMIT 1");
    if (empty($row)) {
        return -1;
    }
    if ($db->query("UPDATE " . table('members') . " SET username = '******'newusername']}'  WHERE uid='" . $arr['uid'] . "'")) {
        write_memberslog($_SESSION['uid'], $_SESSION['utype'], 1004, $_SESSION['username'], "修改了用户名");
        //修改session 值中的用户名
        $_SESSION['username'] = $arr['newusername'];
        $expire = 0;
        setcookie('QS[username]', $arr['newusername'], $expire, $QS_cookiepath, $QS_cookiedomain);
        return $arr['newusername'];
    }
    return false;
}
Example #21
0
                } else {
                    exit("您累计参加的招聘会已经超过了最大限制,请升级服务套餐!");
                }
            }
        }
        $company_profile = get_company($_SESSION['uid']);
        $setsqlarr['jobfairid'] = $id;
        $setsqlarr['uid'] = intval($_SESSION['uid']);
        $setsqlarr['etypr'] = 1;
        $setsqlarr['eaddtime'] = $timestamp;
        $setsqlarr['companyname'] = $company_profile['companyname'];
        $setsqlarr['company_id'] = $company_profile['id'];
        $setsqlarr['company_addtime'] = $company_profile['addtime'];
        $setsqlarr['jobfair_title'] = $jobfair['title'];
        $setsqlarr['jobfair_addtime'] = $jobfair['addtime'];
        $setsqlarr['note'] = "{$_SESSION['username']} 预定了招聘会 《{$jobfair['title']}》 的展位,已成功扣除积分 {$jobfair['predetermined_point']}";
        if ($db->inserttable(table('jobfair_exhibitors'), $setsqlarr)) {
            if ($jobfair['predetermined_point'] > 0 && $_CFG['operation_mode'] == '1') {
                report_deal($_SESSION['uid'], 2, $jobfair['predetermined_point']);
                $user_points = get_user_points($_SESSION['uid']);
                write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "预定了招聘会 《{$jobfair['title']}》 的展位,(-{$jobfair['predetermined_point']}),(剩余:{$user_points})", 1, 1019, "预定招聘会展位", "-{$jobfair['predetermined_point']}", "{$user_points}");
            } elseif ($_CFG['operation_mode'] == '2') {
                action_user_setmeal($_SESSION['uid'], 'jobsfair_num');
                $jobsfair_num = $setmeal['jobsfair_num'] - 1;
                write_memberslog($_SESSION['uid'], 1, 9002, $_SESSION['username'], "预定了招聘会 《{$jobfair['title']}》 的展位,剩余参加招聘会{$jobsfair_num}场次", 2, 1019, "预定招聘会展位", "1", "{$jobsfair_num}");
            }
            write_memberslog($_SESSION['uid'], 1, 1401, $_SESSION['username'], "预定了招聘会 《{$jobfair['title']}》 的展位");
            exit("预定成功!");
        }
    }
}
Example #22
0
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;
}
Example #23
0
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, "周易算命");
    }
}
Example #24
0
    check_token();
    check_permissions($_SESSION['admin_purview'], "hun_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['hunter_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['hunter_uid']), 3, 9201, $user['username'], " 管理员操作积分({$t}{$_POST['points']}),(剩余:{$points}),备注:" . $_POST['points_notes']);
    //会员积分变更记录。管理员后台修改会员的积分。3表示:管理员后台修改
    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['hunter_uid'], $user['username'], $notes, 3, $amount, $ismoney, 1, 3);
    write_log("修改会员uid为" . intval($_POST['hunter_uid']) . "的积分", $_SESSION['admin_name'], 3);
    adminmsg('保存成功!', 2);
} elseif ($act == 'edit_setmeal_save') {
    check_token();
    check_permissions($_SESSION['admin_purview'], "hun_user_edit");
Example #25
0
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;
}
Example #26
0
        if ($setsqlarr['cp_promotionid'] == "4" && empty($setsqlarr['cp_val'])) {
            showmsg("请选择颜色!", 1);
        }
        if (inserttable(table('promotion'), $setsqlarr)) {
            set_job_promotion($jobsid, $setsqlarr['cp_promotionid'], $_GET['val']);
            if ($_CFG['operation_mode'] == '1' && $pro_cat['cat_points'] > 0) {
                report_deal($_SESSION['uid'], 2, $points);
                $user_points = get_user_points($_SESSION['uid']);
                write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "{$pro_cat['cat_name']}:<strong>{$jobs['jobs_name']}</strong>,推广 {$days} 天,(-{$points}),(剩余:{$user_points})");
            } elseif ($_CFG['operation_mode'] == '2') {
                $user_pname = trim($_GET['pro_name']);
                action_user_setmeal($_SESSION['uid'], $user_pname);
                //更新套餐中相应推广方式的条数
                $setmeal = get_user_setmeal($_SESSION['uid']);
                //获取会员套餐
                write_memberslog($_SESSION['uid'], 1, 9002, $_SESSION['username'], "{$pro_cat['cat_name']}:<strong>{$jobs['jobs_name']}</strong>,推广 {$days} 天,套餐内剩余{$pro_cat['cat_name']}条数:{$setmeal[$user_pname]}条。");
                //9002是套餐操作
            }
            write_memberslog($_SESSION['uid'], 1, 3004, $_SESSION['username'], "{$pro_cat['cat_name']}:<strong>{$jobs['jobs_name']}</strong>,推广 {$days} 天。");
            if ($_GET['golist']) {
                exit("1");
                // showmsg("推广成功!",2,$link);
            } else {
                exit("1");
            }
        }
    } else {
        exit("0");
        //showmsg("参数错误",0);
    }
}
Example #27
0
    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");
        }
    }
}
Example #28
0
     $points = $resume['talent'] == '2' ? $points_rule['interview_invite_advanced']['value'] : $points_rule['interview_invite']['value'];
     $ptype = $resumeshow['talent'] == '2' ? $points_rule['interview_invite_advanced']['type'] : $points_rule['interview_invite']['type'];
     if ($mypoints < $points) {
         exit("您的积分不足,不能进行邀请面试!");
     }
     $db->inserttable(table('company_interview'), $addarr);
     if ($points > 0) {
         report_deal($_SESSION['uid'], $ptype, $points);
         $user_points = get_user_points($_SESSION['uid']);
         $operator = $ptype == "1" ? "+" : "-";
         if ($resume['talent'] == '2') {
             write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "邀请 {$resume_user['username']} 面试({$operator}{$points}),(剩余:{$user_points})", 1, 1007, "邀请高级人才面试", "{$operator}{$points}", "{$user_points}");
         } else {
             write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "邀请 {$resume_user['username']} 面试({$operator}{$points}),(剩余:{$user_points})", 1, 1006, "邀请普通人才面试", "{$operator}{$points}", "{$user_points}");
         }
         write_memberslog($_SESSION['uid'], 1, 6001, $_SESSION['username'], "邀请 {$resume_user['username']} 面试");
     }
 }
 /*
 	发送短信提示 操作 
 */
 $sms = get_cache('sms_config');
 if ($sms['open'] == "1" && $sms['set_invite'] == "1" && $sms_notice == "1") {
     $user = get_user_info($_SESSION['uid']);
     if ($_CFG['company_sms'] == 1 && $user['sms_num'] > 0) {
         $success = dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_invite&companyname={$jobs['companyname']}&mobile={$resume['telephone']}");
         if ($success == "success") {
             reduce_user_sms($_SESSION['uid']);
         }
     } else {
         dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_invite&companyname={$jobs['companyname']}&mobile={$resume['telephone']}");
Example #29
0
    $arr['password'] = trim($_POST['password']) ? trim($_POST['password']) : exit('请输入新密码!');
    if ($arr['password'] != trim($_POST['password1'])) {
        exit('两次输入密码不相同,请重新输入!');
    }
    //edit_password()修改密码的方法
    $info = edit_password($arr);
    if ($info == -1) {
        exit('旧密码输入错误,请重新输入!');
    }
    if ($info == $_SESSION['username']) {
        //发送邮件
        $mailconfig = get_cache('mailconfig');
        if ($mailconfig['set_editpwd'] == "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_editpwd&newpassword="******"1" && $sms['set_editpwd'] == "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_editpwd&newpassword="******"修改密码");
        exit('密码修改成功!');
    }
}
Example #30
0
        $json["success_amount"] = $interview_success_money;
        $json["block_balance"] = $block_balance;
        $setsqlarr['cp_json'] = json_encode($json);
        $db->inserttable(table('promotion'), $setsqlarr);
        //        $setsqlarr['addtime'] = time();
        //        $setsqlarr['interview_num'] = $interview_num;
        //        $setsqlarr['interview_money'] = $interview_money;
        //        $setsqlarr['interview_success_money'] = $interview_success_money;
        //
        //        if ($db->inserttable(table('jobs_reward'), $setsqlarr)) {
        //标注简历推广
        set_job_reward($jobid, $setsqlarr['cp_promotionid'], $val_code);
        //锁定金额
        block_balance_reward($uid, $block_balance);
        $can_balance = get_user_can_balance($uid);
        write_memberslog($uid, 1, 9200, $_SESSION['username'], "{$pro_cat['cat_name']}:<strong>{$jobs['jobs_name']}</strong>,悬赏简历冻结 {$block_balance} ,(可用:{$can_balance})", 1, 1018, "{$pro_cat['cat_name']}", "-{$block_balance}", "{$can_balance}");
        exit('推广成功!');
    } else {
        exit("推广失败!");
    }
} elseif ($act == 'img_title') {
    global $_CFG;
    $id = intval($_GET['id']);
    $uid = intval($_SESSION['uid']);
    $img = $db->getone("SELECT * FROM " . table('company_img') . " WHERE uid ='{$uid}' AND id='{$id}' LIMIT 1");
    $tpl = '../../templates/' . $_CFG['template_dir'] . "member_company/ajax_set_img_title.htm";
    $contents = file_get_contents($tpl);
    $contents = str_replace('{#$id#}', $id, $contents);
    $contents = str_replace('{#$title#}', $img['title'], $contents);
    $contents = str_replace('{#$addtime#}', date('Y-m-d', $img['addtime']), $contents);
    $contents = str_replace('{#$site_template#}', $_CFG['site_template'], $contents);