Example #1
0
require_once dirname(__FILE__) . '/personal_common.php';
$smarty->assign('leftmenu', "index");
if ($act == 'index') {
    $uid = intval($_SESSION['uid']);
    $smarty->assign('title', '个人会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('user', $user);
    require_once QISHI_ROOT_PATH . 'include/fun_user.php';
    $smarty->assign('loginlog', get_loginlog_one($uid, '1001'));
    $wheresql = " WHERE uid='" . $_SESSION['uid'] . "' ";
    $sql = "SELECT * FROM " . table('resume') . $wheresql;
    $smarty->assign('rand', rand(1, 100));
    $smarty->assign('points', get_user_points($uid));
    $smarty->assign('my_resume', get_resume_list($sql));
    $smarty->assign('count_resume', count_resume($uid));
    $smarty->assign('count_interview', count_interview($uid));
    $smarty->assign('count_apply', count_personal_jobs_apply($uid));
    $smarty->assign('count_attention_me', count_personal_attention_me($uid));
    $smarty->assign('msg_total1', $db->get_total("SELECT COUNT(*) AS num FROM " . table('pms') . " WHERE (msgfromuid='{$uid}' OR msgtouid='{$uid}') AND `new`='1' AND `replyuid`<>'{$uid}' AND msgtype=1"));
    $smarty->assign('msg_total2', $db->get_total("SELECT COUNT(*) AS num FROM " . table('pms') . " WHERE (msgfromuid='{$uid}' OR msgtouid='{$uid}') AND `new`='2' AND `replyuid`<>'{$uid}' AND msgtype=1"));
    //首页提示消息(最近两周 下载 和 面试邀请的信息)
    $message = array();
    $time = strtotime("- 14 day");
    $down_resume = $db->getall("SELECT distinct company_uid , company_name FROM " . table('company_down_resume') . " WHERE resume_uid='" . $_SESSION['uid'] . "' AND down_addtime > " . $time);
    foreach ($down_resume as $key => $value) {
        $company_id = $db->getone("SELECT id FROM " . table('company_profile') . " WHERE uid=" . $value['company_uid'] . " LIMIT 1");
        $company_url = url_rewrite('QS_companyshow', array('id' => $company_id['id']));
        $message[] = "您的简历被<a href=\"" . $company_url . "\" target=\"_black\" class=\"underline\">【" . $value['company_name'] . "】</a>下载!主动联系招聘单位更容易获得工作机会!";
    }
    $inter_resume = $db->getall("SELECT distinct company_id , company_name FROM " . table('company_interview') . " WHERE resume_uid='" . $_SESSION['uid'] . "' AND interview_addtime > " . $time . " AND personal_look=1 ");
    foreach ($inter_resume as $key => $value) {
        $company_url = url_rewrite('QS_companyshow', array('id' => $value['company_id']));
Example #2
0
        $total_sql = "SELECT COUNT(*) AS num FROM " . table('personal_hunter_jobs_apply') . " AS a {$wheresql} ";
        $total_val = $db->get_total($total_sql);
        $page = new page(array('total' => $total_val, 'perpage' => $perpage, 'getarray' => $_GET));
        $currenpage = $page->nowindex;
        $offset = ($currenpage - 1) * $perpage;
        $joinsql .= " LEFT JOIN " . table('hunter_jobs') . " AS j ON a.jobs_id=j.id ";
        $smarty->assign('jobs_apply', get_apply_hunter_jobs($offset, $perpage, $joinsql, $wheresql));
    }
    $smarty->assign('title', '已申请的职位 - 个人会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('act', $act);
    if ($total_val > $perpage) {
        $smarty->assign('page', $page->show(3));
    }
    $count[0] = count_personal_jobs_apply($jobs_type, $_SESSION['uid'], 1);
    //未查看
    $count[1] = count_personal_jobs_apply($jobs_type, $_SESSION['uid'], 2);
    //已查看
    $count[2] = $count[0] + $count[1];
    $smarty->assign('count', $count);
    $smarty->assign('resume_list', get_apply_jobs_resumes($_SESSION['uid']));
    $smarty->display('member_personal/personal_apply_jobs.htm');
} elseif ($act == 'del_jobs_apply') {
    $yid = !empty($_REQUEST['y_id']) ? $_REQUEST['y_id'] : showmsg("你没有选择项目!", 1);
    $jobs_type = intval($_GET['jobs_type']);
    if ($jobs_type == 1) {
        $n = del_hunter_jobs_apply($yid, $_SESSION['uid']);
    } else {
        $n = del_jobs_apply($yid, $_SESSION['uid']);
    }
    if (intval($n) > 0) {
        showmsg("删除成功!", 2);