示例#1
0
        }
        refresh_jobs($yid, $_SESSION['uid']);
        write_memberslog($_SESSION['uid'], 3, 8504, $_SESSION['username'], "刷新职位");
        write_refresh_log($_SESSION['uid'], 3001);
        showmsg("刷新职位成功!", 2);
    } elseif ($delete) {
        if ($n = del_jobs($yid, $_SESSION['uid'])) {
            showmsg("删除成功!共删除 {$n} 行", 2);
        } else {
            showmsg("删除失败!", 0);
        }
    } elseif (!empty($_REQUEST['display1'])) {
        activate_jobs($yid, 1, $_SESSION['uid']);
        showmsg("设置成功!", 2);
    } elseif (!empty($_REQUEST['display2'])) {
        activate_jobs($yid, 2, $_SESSION['uid']);
        showmsg("设置成功!", 2);
    }
} elseif ($act == 'edit_jobs') {
    $jobs = get_jobs_one(intval($_GET['id']), $_SESSION['uid']);
    if (empty($jobs)) {
        showmsg("参数错误!", 1);
    }
    $smarty->assign('user', $user);
    $smarty->assign('title', '修改职位 - 猎头会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('points_total', get_user_points($_SESSION['uid']));
    $smarty->assign('points', get_cache('points_rule'));
    $smarty->assign('jobs', $jobs);
    $smarty->display('member_hunter/hunter_editjobs.htm');
} elseif ($act == 'editjobs_save') {
    $id = intval($_POST['id']);
示例#2
0
    $id = intval($_POST['id']);
    $uid = intval($_SESSION["uid"]);
    activate_jobs($id, 2, $_SESSION['uid']);
    exit("ok");
} elseif ($act == "jobs_regain") {
    $smarty->cache = false;
    $id = intval($_POST['id']);
    $uid = intval($_SESSION["uid"]);
    $jobs_num = $db->get_total("select count(*) num from " . table("jobs") . " where uid={$_SESSION['uid']} and audit=1 and display=1 ");
    $jobs_tmp_num = $db->get_total("select count(*) num from " . table("jobs_tmp") . " where uid={$_SESSION['uid']} and audit<>3 and display=1 ");
    $com_jobs_num = $jobs_num + $jobs_tmp_num;
    $setmeal = get_user_setmeal($_SESSION['uid']);
    if ($com_jobs_num >= $setmeal['jobs_ordinary']) {
        exit("当前显示的职位已经超过了最大限制,请升级服务套餐,或将不招聘的职位设为关闭!");
    } else {
        activate_jobs($id, 1, $_SESSION['uid']);
        exit("ok");
    }
} elseif ($act == "jobs_del") {
    $smarty->cache = false;
    $id = intval($_POST['id']);
    del_jobs($id, intval($_SESSION['uid'])) ? exit("ok") : exit("err");
} elseif ($act == "set_promotion") {
    $catid = intval($_GET['catid']) ? intval($_GET['catid']) : 1;
    $jobid = intval($_GET['jobid']) ? intval($_GET['jobid']) : exit("参数错误!");
    $uid = intval($_SESSION['uid']) ? intval($_SESSION['uid']) : exit("参数错误!");
    $jobinfo = get_jobs_one($jobid);
    $promotion = get_promotion_category_one($catid);
    if ($_CFG['operation_mode'] == '2') {
        $setmeal = get_user_setmeal($uid);
        //获取会员套餐