Example #1
0
function del_resume_for_uid($uid)
{
    global $db;
    if (!is_array($uid)) {
        $uid = array($uid);
    }
    $sqlin = implode(",", $uid);
    if (preg_match("/^(\\d{1,10},)*(\\d{1,10})\$/", $sqlin)) {
        $result = $db->query("SELECT id FROM " . table('resume') . " WHERE uid IN (" . $sqlin . ")");
        while ($row = $db->fetch_array($result)) {
            $rid[] = $row['id'];
        }
        if (empty($rid)) {
            return true;
        } else {
            return del_resume($rid);
        }
    }
}
Example #2
0
        $total[2] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('resume') . " WHERE audit=1 AND display=2");
        $total[3] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('resume') . " WHERE audit=2 ");
        $total[4] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('resume') . " WHERE audit=3 ");
    }
    $smarty->assign('total', $total);
    $smarty->assign('pageheader', "简历列表");
    $smarty->assign('resumelist', $resumelist);
    $smarty->assign('page', $page->show(3));
    $smarty->assign('total_val', $total_val);
    $smarty->display('personal/admin_personal_resume.htm');
} elseif ($act == 'perform') {
    check_token();
    $id = !empty($_REQUEST['id']) ? $_REQUEST['id'] : adminmsg("你没有选择简历!", 1);
    if (!empty($_REQUEST['delete'])) {
        check_permissions($_SESSION['admin_purview'], "resume_del");
        if ($n = del_resume($id)) {
            adminmsg("删除成功!该删除 {$n} 行", 2);
        } else {
            adminmsg("删除失败!", 0);
        }
    }
    if (!empty($_POST['set_audit'])) {
        check_permissions($_SESSION['admin_purview'], "resume_audit");
        $audit = $_POST['audit'];
        $pms_notice = intval($_POST['pms_notice']);
        $reason = trim($_POST['reason']);
        !edit_resume_audit($id, $audit, $reason, $pms_notice) ? adminmsg("设置失败!", 0) : adminmsg("设置成功!", 2, $link);
    }
    if (!empty($_POST['set_talent'])) {
        check_permissions($_SESSION['admin_purview'], "resume_talent");
        $talent = $_POST['talent'];
Example #3
0
    $refrestime = get_last_refresh_date($_SESSION['uid'], "2001");
    $duringtime = time() - $refrestime['max(addtime)'];
    $space = $_CFG['per_refresh_resume_space'] * 60;
    $refresh_time = get_today_refresh_times($_SESSION['uid'], "2001");
    if ($_CFG['per_refresh_resume_time'] != 0 && $refresh_time['count(*)'] >= $_CFG['per_refresh_resume_time']) {
        showmsg("每天最多只能刷新" . $_CFG['per_refresh_resume_time'] . "次,您今天已超过最大刷新次数限制!", 2);
    } elseif ($duringtime <= $space) {
        showmsg($_CFG['per_refresh_resume_space'] . "分钟内不能重复刷新简历!", 2);
    } else {
        refresh_resume($resumeid, $_SESSION['uid']) ? showmsg('操作成功!', 2) : showmsg('操作失败!', 0);
    }
} elseif ($act == 'del_resume') {
    if (intval($_GET['id']) == 0) {
        exit('您没有选择简历!');
    } else {
        del_resume($_SESSION['uid'], intval($_GET['id'])) ? exit('success') : exit('fail');
    }
} elseif ($act == 'make1') {
    $uid = intval($_SESSION['uid']);
    $pid = intval($_REQUEST['pid']);
    /**
     * 3.6优化start
     * @var [type]
     */
    $total = $db->get_total("SELECT COUNT(*) AS num FROM " . table('resume') . " WHERE uid='{$uid}'");
    if ($total >= intval($_CFG['resume_max'])) {
        showmsg("您最多可以创建{$_CFG['resume_max']} 份简历,已经超出了最大限制!", 1);
    }
    /**
     * 3.6优化end
     * @var [type]
Example #4
0
    }
    $setsqlarr['uid'] = intval($_SESSION['uid']);
    $setsqlarr['pid'] = intval($_GET['pid']);
    $setsqlarr['comkeyword'] = $_GET['comkeyword'];
    $db->inserttable(table('personal_shield_company'), $setsqlarr, 1) ? exit("ok") : exit("err");
} elseif ($act == "shield_company_del") {
    $smarty->cache = false;
    $id = intval($_GET["id"]);
    $uid = intval($_SESSION["uid"]);
    $sql = "delete from " . table("personal_shield_company") . " where id={$id} and uid={$uid} ";
    $db->query($sql) ? exit("ok") : exit("err");
} elseif ($act == "resume_del") {
    $smarty->cache = false;
    $id = intval($_GET["pid"]);
    $uid = intval($_SESSION['uid']);
    del_resume($uid, $id) ? exit('ok') : exit('err');
} elseif ($act == "resume_talent") {
    $smarty->cache = false;
    $id = intval($_GET["pid"]);
    $uid = intval($_SESSION['uid']);
    $resume = get_resume_basic($uid, $id);
    if ($resume['complete_percent'] < $_CFG['elite_resume_complete_percent']) {
        exit("简历完整指数小于{$_CFG['elite_resume_complete_percent']}%,禁止申请!");
    } else {
        $setsqlarr["talent"] = 3;
        $db->updatetable(table("resume"), $setsqlarr, array("id" => $id, "uid" => intval($_SESSION['uid']))) ? exit("ok") : exit("err");
    }
} elseif ($act == 'resume_name_save') {
    $smarty->cache = false;
    $_POST = array_map("utf8_to_gbk", $_POST);
    $resume_id = intval($_POST["resume_id"]);