Exemple #1
0
        if (empty($days)) {
            adminmsg("请填写要延长的天数!", 0);
        }
        if ($n = delay_jobs($yid, $days)) {
            distribution_jobs($yid);
            adminmsg("延长有效期成功!响应行数 {$n}", 2);
        } else {
            adminmsg("操作失败!", 0);
        }
    }
} elseif ($act == 'edit_jobs') {
    get_token();
    check_permissions($_SESSION['admin_purview'], "jobs_edit");
    $id = !empty($_REQUEST['id']) ? intval($_REQUEST['id']) : adminmsg("你没有选择职位!", 1);
    $smarty->assign('pageheader', "职位管理");
    $jobs = get_jobs_one($id);
    $smarty->assign('url', $_SERVER["HTTP_REFERER"]);
    $smarty->assign('jobs', $jobs);
    $smarty->assign('jobsaudit', get_jobsaudit_one($id));
    $smarty->display('company/admin_company_jobs_edit.htm');
} elseif ($act == 'editjobs_save') {
    check_token();
    check_permissions($_SESSION['admin_purview'], "jobs_edit");
    $id = intval($_POST['id']);
    $company_id = intval($_POST['company_id']);
    $company_profile = get_company_one_id($company_id);
    $setsqlarr['jobs_name'] = trim($_POST['jobs_name']) ? trim($_POST['jobs_name']) : adminmsg('您没有填写职位名称!', 1);
    $setsqlarr['nature'] = intval($_POST['nature']);
    $setsqlarr['nature_cn'] = trim($_POST['nature_cn']);
    $setsqlarr['topclass'] = intval($_POST['topclass']);
    $setsqlarr['category'] = intval($_POST['category']);
Exemple #2
0
        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']);
    $add_mode = trim($_POST['add_mode']);
    $days = intval($_POST['days']);
    if ($_CFG['operation_hunter_mode'] == '1') {
        $points_rule = get_cache('points_rule');
Exemple #3
0
	$("#jobsid").val(id);
	$(".jobtit").html(title);
	$('.dropdown-list').slideUp('fast');
});
</script>
<?php 
} elseif ($act == "invited_save") {
    $jobs_id = isset($_GET['jobs_id']) ? intval($_GET['jobs_id']) : exit("err");
    $notes = isset($_GET['notes']) ? trim($_GET['notes']) : "";
    $pms_notice = intval($_GET['pms_notice']);
    $sms_notice = intval($_GET['sms_notice']);
    $interview_time = trim($_GET['interview_time']);
    if (check_interview($id, $jobs_id, $_SESSION['uid'])) {
        exit("您已对该简历经行过面试邀请,不能重复邀请!");
    }
    $jobs = get_jobs_one($jobs_id);
    $addarr['resume_id'] = $resume['id'];
    $addarr['resume_addtime'] = $resume['addtime'];
    if ($resume['display_name'] == "2") {
        $addarr['resume_name'] = "N" . str_pad($resume['id'], 7, "0", STR_PAD_LEFT);
    } elseif ($resume['display_name'] == "3") {
        if ($resume['sex'] == 1) {
            $addarr['resume_name'] = cut_str($resume['fullname'], 1, 0, "先生");
        } elseif ($resume['sex'] == 2) {
            $addarr['resume_name'] = cut_str($resume['fullname'], 1, 0, "女士");
        }
    } else {
        $addarr['resume_name'] = $resume['fullname'];
    }
    $addarr['resume_uid'] = $resume['uid'];
    $addarr['company_id'] = $jobs['company_id'];
Exemple #4
0
    <input name="jobsid" id="jobsid" type="hidden" value="' . $jobsid . '" />
    <input name="promotionid" id="promotionid" type="hidden" value="' . $promotion["cat_id"] . '" />
	<input name="pdays" id="pdays" type="hidden" value="' . $data["days"] . '" />
	<input name="pro_name" id="pro_name" type="hidden" value="' . $data["name"] . '" />
     <tr>
      <td height="25">&nbsp;</td>
      <td>
	  <input type="button" name="set_promotion" value="确定" class="user_submit set_promotion"/>
 </td>
    </tr>';
        }
    }
    exit($html);
} elseif ($act == "promotion_save") {
    $jobsid = intval($_GET['jobsid']) == 0 ? exit("0") : intval($_GET['jobsid']);
    $jobs = get_jobs_one($jobsid, $_SESSION['uid']);
    $jobs = array_map("addslashes", $jobs);
    if ($jobs['deadline'] < time()) {
        exit("-1");
        // showmsg("该职位已到期,请先延期!",1);
    }
    $days = intval($_GET['pdays']);
    $_GET['val'] = "#" . trim($_GET['val']);
    if ($operation_mode == 1) {
        if ($promotion["cat_minday"] > 0 && $days < $promotion["cat_minday"]) {
            exit("-5");
            //小于最少天数
        } elseif ($promotion["cat_maxday"] > 0 && $days > $promotion["cat_maxday"]) {
            exit("-6");
            //大于最大天数
        }
Exemple #5
0
        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);
    $smarty->assign('jobs', $jobs);
    $smarty->assign('promotion', $promotion);
    $smarty->display('promotion/admin_promotion_edit.htm');
} elseif ($act == 'promotion_edit_save') {
    check_token();
    $setsqlarr['cp_id'] = intval($_POST['id']);
    $setsqlarr['cp_promotionid'] = intval($_POST['promotionid']);
    $setsqlarr['cp_hour_cn'] = trim($_POST['hour']);
    $setsqlarr['cp_hour'] = intval($_POST['hour']);
    $days = intval($_POST['days']);
    if ($setsqlarr['cp_promotionid'] == "4") {
        $setsqlarr['cp_val'] = trim($_POST['val']);
Exemple #6
0
        }
    }
    exit($contents);
} elseif ($act == "promotion_add_save") {
    $catid = intval($_POST['catid']) ? intval($_POST['catid']) : exit("-1");
    $jobid = intval($_POST['jobid']) ? intval($_POST['jobid']) : exit("-1");
    $days = intval($_POST['days']) ? intval($_POST['days']) : exit("-1");
    $uid = intval($_SESSION['uid']) ? intval($_SESSION['uid']) : exit("-1");
    if ($catid == 4) {
        $val = intval($_POST['val']) ? intval($_POST['val']) : exit("-1");
        $color = get_color_one($val);
        $val_code = $color['value'];
    } else {
        $val_code = "";
    }
    $jobs = get_jobs_one($jobid, $uid);
    $jobs = array_map("addslashes", $jobs);
    if ($jobs['deadline'] < time()) {
        exit("该职位已到期,请先延期!");
    }
    if ($jobid > 0 && $days > 0) {
        $pro_cat = get_promotion_category_one($catid);
        if ($_CFG['operation_mode'] == '3') {
            $setmeal = get_setmeal_promotion($uid, $catid);
            //获取会员套餐
            $num = $setmeal['num'];
            if ($setmeal['endtime'] < time() && $setmeal['endtime'] != '0' || $num <= 0) {
                if ($_CFG['setmeal_to_points'] == 1) {
                    if ($pro_cat['cat_points'] > 0) {
                        $points = $pro_cat['cat_points'] * $days;
                        $user_points = get_user_points($uid);
Exemple #7
0
    echo $pid;
} elseif ($act == "addjobs_save_succeed") {
    $smarty->cache = false;
    $jobs_id = intval($_GET["id"]);
    $jobs = jobs_one($jobs_id);
    $sql = "select * from " . table("resume") . " as r left join " . table("resume_jobs") . " as rj on rj.pid=r.id where rj.category={$jobs['category']} limit 5 ";
    $resume_list = $db->getall($sql);
    foreach ($resume_list as $key => $val) {
        $val['age'] = date("Y") - $val['birthdate'];
        $resume_list[$key] = $val;
    }
    $smarty->assign('resume_list', $resume_list);
    $smarty->display("wap/company/wap-create-job-success.html");
} elseif ($act == "jobs_edit") {
    $smarty->cache = false;
    $jobs = get_jobs_one($_GET['id'], $_SESSION['uid']);
    $company_info = get_company($_SESSION['uid']);
    $smarty->assign('company_info', $company_info);
    $smarty->assign('jobs', $jobs);
    $smarty->display("wap/company/wap-jobs_edit.html");
} elseif ($act == "jobs_edit_save") {
    $smarty->cache = false;
    $company_info = get_company($_SESSION['uid']);
    $company_info = array_map("addslashes", $company_info);
    $id = intval($_POST['id']);
    $days = intval($_POST['days']);
    $_POST = array_map("utf8_to_gbk", $_POST);
    // var_dump($_POST);die;
    $add_mode = trim($_POST['add_mode']);
    if ($add_mode == '1') {
        $points_rule = get_cache('points_rule');