function tpl_function_qishi_curriculum_show($params, &$smarty)
{
    global $db, $timestamp, $_CFG;
    $arr = explode(',', $params['set']);
    foreach ($arr as $str) {
        $a = explode(':', $str);
        switch ($a[0]) {
            case "¿Î³ÌID":
                $aset['id'] = $a[1];
                break;
            case "ÁбíÃû":
                $aset['listname'] = $a[1];
                break;
            case "ÃèÊö³¤¶È":
                $aset['brieflylen'] = $a[1];
                break;
            case "Ìî²¹×Ö·û":
                $aset['dot'] = $a[1];
                break;
        }
    }
    $aset = array_map("get_smarty_request", $aset);
    $aset['id'] = $aset['id'] ? intval($aset['id']) : 0;
    $aset['brieflylen'] = isset($aset['brieflylen']) ? intval($aset['brieflylen']) : 0;
    $aset['listname'] = $aset['listname'] ? $aset['listname'] : "list";
    $wheresql = " WHERE id={$aset['id']} ";
    $sql = "select id,subsite_id,uid,setmeal_deadline,add_mode,train_id,contents,refreshtime,teacher_id,teacher_cn,trainname,course_name,addtime,click,favour_expenses,train_expenses,classhour,category_cn,starttime,classtype_cn,district_cn,train_object,train_certificate from " . table('course') . $wheresql . " LIMIT 1";
    $val = $db->getone($sql);
    if (empty($val)) {
        header("HTTP/1.1 404 Not Found");
        $smarty->display("404.htm");
        exit;
    } else {
        check_url($val['subsite_id'], $smarty, $_CFG['train_url']);
        if ($val['setmeal_deadline'] < time() && $val['setmeal_deadline'] != "0" && $val['add_mode'] == "2") {
            $val['deadline'] = $val['setmeal_deadline'];
        }
        $val['course_url'] = url_rewrite('QS_courseshow', array('id' => $val['id']), 1, $val['subsite_id']);
        $profile = GetTainProfile($val['train_id']);
        $val['train'] = $profile;
        $val['expire'] = sub_day($val['deadline'], time());
        $val['countapply'] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('personal_course_apply') . " WHERE course_id= '{$val['id']}'");
        if ($aset['brieflylen'] > 0) {
            $val['briefly'] = cut_str(strip_tags($val['contents']), $aset['brieflylen'], 0, $aset['dot']);
        } else {
            $val['briefly'] = strip_tags($val['contents']);
        }
        $val['refreshtime_cn'] = daterange(time(), $val['refreshtime'], 'Y-m-d', "#FF3300");
        $val['train_url'] = url_rewrite('QS_train_agencyshow', array('id' => $val['train_id']));
        $val['teacher_url'] = url_rewrite('QS_train_lecturershow', array('id' => $val['teacher_id']));
        if ($val['train']['logo']) {
            $val['train']['logo'] = $_CFG['site_dir'] . "data/train_logo/" . $val['train']['logo'];
        } else {
            $val['train']['logo'] = $_CFG['site_dir'] . "data/train_logo/no_logo.gif";
        }
    }
    $smarty->assign($aset['listname'], $val);
}
Пример #2
0
function get_jobs_one($id, $uid = '')
{
    global $db, $timestamp;
    $id = intval($id);
    if (!empty($uid)) {
        $wheresql = " AND uid=" . intval($uid);
    }
    $tb1 = $db->getone("select * from " . table('jobs') . " where id='{$id}' {$wheresql} LIMIT 1");
    $tb2 = $db->getone("select * from " . table('jobs_tmp') . " where id='{$id}' {$wheresql} LIMIT 1");
    $val = !empty($tb1) ? $tb1 : $tb2;
    if (empty($val)) {
        return false;
    }
    $val['contact'] = $db->getone("select * from " . table('jobs_contact') . " where pid='{$val['id']}' LIMIT 1 ");
    $val['deadline_days'] = $val['deadline'] - $timestamp > 0 ? "距到期时间还有<strong style=\"color:#FF0000\">" . sub_day($val['deadline'], $timestamp) . "</strong>" : "<span style=\"color:#FF6600\">目前已过期</span>";
    return $val;
}
function tpl_function_qishi_jobs_show($params, &$smarty)
{
    global $db, $timestamp, $_CFG;
    $arr = explode(',', $params['set']);
    foreach ($arr as $str) {
        $a = explode(':', $str);
        switch ($a[0]) {
            case "职位ID":
                $aset['id'] = $a[1];
                break;
            case "列表名":
                $aset['listname'] = $a[1];
                break;
            case "描述长度":
                $aset['brieflylen'] = $a[1];
                break;
            case "填补字符":
                $aset['dot'] = $a[1];
                break;
        }
    }
    $aset = array_map("get_smarty_request", $aset);
    $aset['id'] = $aset['id'] ? intval($aset['id']) : 0;
    $aset['brieflylen'] = isset($aset['brieflylen']) ? intval($aset['brieflylen']) : 0;
    $aset['listname'] = $aset['listname'] ? $aset['listname'] : "list";
    $wheresql = " WHERE id={$aset['id']} ";
    $sql = "select id,uid,setmeal_deadline,add_mode,amount,company_id,district_cn,contents,refreshtime,tag_cn,category,subclass,sdistrict,jobs_name,companyname,wage_cn,nature_cn,category_cn,sex_cn,age,education_cn,experience_cn,graduate from " . table('jobs') . $wheresql . " LIMIT 1";
    $val = $db->getone($sql);
    if (empty($val)) {
        $sql_tmp = "select id,uid,setmeal_deadline,add_mode,amount,company_id,district_cn,contents,refreshtime,tag_cn,category,subclass,sdistrict,jobs_name,companyname,wage_cn,nature_cn,category_cn,sex_cn,age,education_cn,experience_cn from " . table('jobs_tmp') . $wheresql . " LIMIT 1";
        $val = $db->getone($sql_tmp);
        if (empty($val)) {
            header("HTTP/1.1 404 Not Found");
            $smarty->display("404.htm");
            exit;
        } elseif ($val['deadline'] < time()) {
            $val['jobs_gq'] = 1;
        } else {
            $val['jobs_gq'] = 2;
        }
        $val['contents'] = htmlspecialchars_decode($val['contents'], ENT_QUOTES);
    } else {
        if (intval($_SESSION['uid']) > 0 && intval($_SESSION['utype']) == 2) {
            //检查该职位是否对此会员发起面试邀请,并且此会员没看
            $check_int = check_interview(intval($_SESSION['uid']), $val['id']);
            if ($check_int) {
                update_interview(intval($_SESSION['uid']), $val['id']);
            }
            //检查该职位是否被此会员收藏过
            $check_fav = check_favorites(intval($_SESSION['uid']), $val['id']);
            if ($check_fav) {
                $val['check_fav'] = 1;
            }
        }
        if ($val['setmeal_deadline'] < time() && $val['setmeal_deadline'] != "0" && $val['add_mode'] == "2") {
            $val['deadline'] = $val['setmeal_deadline'];
        }
        $val['amount'] = $val['amount'] == "0" ? '若干' : $val['amount'];
        $val['jobs_url'] = url_rewrite('QS_jobsshow', array('id' => $val['id']));
        $profile = GetJobsCompanyProfile($val['company_id']);
        $val['company'] = $profile;
        $val['contact'] = GetJobsContact($val['id']);
        $district_cn = $val['district_cn'];
        $d_arr = explode("/", $district_cn);
        $val['district_ch'] = $d_arr[0];
        $val['sdistrict_ch'] = $d_arr[1];
        $val['expire'] = sub_day($val['deadline'], time());
        $val['countresume'] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('personal_jobs_apply') . " WHERE jobs_id= '{$val['id']}'");
        if ($aset['brieflylen'] > 0) {
            $val['briefly'] = cut_str(strip_tags($val['contents']), $aset['brieflylen'], 0, $aset['dot']);
        } else {
            $val['briefly'] = strip_tags($val['contents']);
        }
        $val['contents'] = htmlspecialchars_decode($val['contents'], ENT_QUOTES);
        $val['refreshtime_cn'] = daterange(time(), $val['refreshtime'], 'Y-m-d', "#FF3300");
        $val['company_url'] = url_rewrite('QS_companyshow', array('id' => $val['company_id']));
        if ($val['company']['logo']) {
            $val['company']['logo'] = $_CFG['site_dir'] . "data/logo/" . $val['company']['logo'];
        } else {
            $val['company']['logo'] = $_CFG['site_dir'] . "data/logo/no_logo.gif";
        }
        if ($val['company']['website']) {
            if (strstr($val['company']['website'], "http://") === false) {
                $val['company']['website'] = "http://" . $val['company']['website'];
            }
        }
        if (intval($_SESSION['utype']) == 2) {
            $interest_id = get_interest_jobs_id(intval($_SESSION['uid']));
        }
        if ($val['tag_cn']) {
            $tag_cn = explode(',', $val['tag_cn']);
            $val['tag_cn'] = $tag_cn;
        } else {
            $val['tag_cn'] = array();
        }
    }
    $user = get_jobs_username($val['uid']);
    $hashstr = substr(md5($user['username']), 8, 16);
    $smarty->assign('hashstr', $hashstr);
    $smarty->assign($aset['listname'], $val);
}
Пример #4
0
    $setmeal = get_user_setmeal($_SESSION['uid']);
    if ($setmeal['endtime'] > 0) {
        $setmeal_endtime = sub_day($setmeal['endtime'], time());
    } else {
        $setmeal_endtime = "无限期";
    }
    $smarty->assign('user_setmeal', $setmeal);
    $smarty->assign('setmeal_endtime', $setmeal_endtime);
    $smarty->assign('title', '服务列表 - 猎头会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('setmeal', get_setmeal());
    $smarty->display('member_hunter/hunter_setmeal_list.htm');
} elseif ($act == 'setmeal_order_add' && $_CFG['operation_hunter_mode'] == "2") {
    $setmealid = intval($_GET['setmealid']) ? intval($_GET['setmealid']) : showmsg("请选择服务套餐!", 1);
    $setmeal = get_user_setmeal($_SESSION['uid']);
    if ($setmeal['endtime'] > 0) {
        $setmeal_endtime = sub_day($setmeal['endtime'], time());
    } else {
        $setmeal_endtime = "无限期";
    }
    $smarty->assign('user_setmeal', $setmeal);
    $smarty->assign('setmeal_endtime', $setmeal_endtime);
    $smarty->assign('setmeal', get_setmeal_one($setmealid));
    $smarty->assign('title', '申请服务 - 猎头会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('payment', get_payment());
    $smarty->display('member_hunter/hunter_order_add_setmeal.htm');
} elseif ($act == 'setmeal_order_add_save' && $_CFG['operation_hunter_mode'] == "2") {
    if (empty($hunter_profile['huntername'])) {
        $link[0]['text'] = "填写猎头资料";
        $link[0]['href'] = 'hunter_info.php?act=hunter_profile';
        showmsg("请先填写您的猎头资料!", 1, $link);
    }
Пример #5
0
function get_jobs_one($id, $uid = '')
{
    global $db, $timestamp;
    $id = intval($id);
    if (!empty($uid)) {
        $wheresql = " AND uid=" . intval($uid);
    }
    $val = $db->getone("select * from " . table('hunter_jobs') . " where id='{$id}' {$wheresql} LIMIT 1");
    if (empty($val)) {
        return false;
    }
    $val['user'] = get_user($val['uid']);
    $val['jobs_url'] = url_rewrite('QS_hunter_jobsshow', array('id' => $val['id']), 1, $val['subsite_id']);
    if ($val['utype'] == '1') {
        $company = $db->getone('select id from ' . table('company_profile') . ' where uid = ' . $val['uid'] . ' limit 1 ');
        $val['company_url'] = url_rewrite('QS_companyshow', array('id' => $company['id']));
    }
    $val['deadline_days'] = $val['deadline'] - $timestamp > 0 ? "距到期时间还有<strong style=\"color:#FF0000\">" . sub_day($val['deadline'], $timestamp) . "</strong>" : "<span style=\"color:#FF6600\">目前已过期</span>";
    return $val;
}
Пример #6
0
function tpl_function_qishi_jobs_show($params, &$smarty)
{
    global $db, $timestamp, $_CFG;
    $arr = explode(',', $params['set']);
    foreach ($arr as $str) {
        $a = explode(':', $str);
        switch ($a[0]) {
            case "职位ID":
                $aset['id'] = $a[1];
                break;
            case "列表名":
                $aset['listname'] = $a[1];
                break;
            case "描述长度":
                $aset['brieflylen'] = $a[1];
                break;
            case "填补字符":
                $aset['dot'] = $a[1];
                break;
        }
    }
    $aset = array_map("get_smarty_request", $aset);
    $aset['id'] = $aset['id'] ? intval($aset['id']) : 0;
    $aset['brieflylen'] = isset($aset['brieflylen']) ? intval($aset['brieflylen']) : 0;
    $aset['listname'] = $aset['listname'] ? $aset['listname'] : "list";
    $wheresql = " WHERE id={$aset['id']} ";
    $sql = "select * from " . table('jobs') . $wheresql . " LIMIT 1";
    $val = $db->getone($sql);
    if (empty($val)) {
        $sql_tmp = "select * from " . table('jobs_tmp') . $wheresql . " LIMIT 1";
        $val_tmp = $db->getone($sql_tmp);
        if ((intval($_SESSION['admin_id']) > 0 || intval($_SESSION['uid']) == $val_tmp['uid']) && !empty($val_tmp)) {
            $val = $val_tmp;
        }
    }
    if (empty($val)) {
        header("HTTP/1.1 404 Not Found");
        $smarty->display("404.htm");
        exit;
    } else {
        if (intval($_SESSION['uid']) > 0 && intval($_SESSION['utype']) == 2) {
            //检查该职位是否对此会员发起面试邀请,并且此会员没看
            $check_int = check_interview(intval($_SESSION['uid']), $val['id']);
            if ($check_int) {
                update_interview(intval($_SESSION['uid']), $val['id']);
            }
        }
        if ($val['setmeal_deadline'] < time() && $val['setmeal_deadline'] != "0" && $val['add_mode'] == "2") {
            $val['deadline'] = $val['setmeal_deadline'];
        }
        $val['amount'] = $val['amount'] == "0" ? '若干' : $val['amount'];
        $val['jobs_url'] = url_rewrite('QS_jobsshow', array('id' => $val['id']), false);
        $profile = GetJobsCompanyProfile($val['company_id']);
        $val['company'] = $profile;
        $val['contact'] = GetJobsContact($val['id']);
        $district_cn = $val['district_cn'];
        $d_arr = explode("/", $district_cn);
        $val['district_ch'] = $d_arr[0];
        $val['sdistrict_ch'] = $d_arr[1];
        $val['expire'] = sub_day($val['deadline'], time());
        $wheresql = " WHERE company_uid='{$row['uid']}' AND jobs_id= '{$row['id']}'";
        $val['countresume'] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('personal_jobs_apply') . " WHERE jobs_id= '{$val['id']}'");
        if ($aset['brieflylen'] > 0) {
            $val['briefly'] = cut_str(strip_tags($val['contents']), $aset['brieflylen'], 0, $val['dot']);
        } else {
            $val['briefly'] = strip_tags($val['contents']);
        }
        $val['refreshtime_cn'] = daterange(time(), $val['refreshtime'], 'Y-m-d', "#FF3300");
        $val['company_url'] = url_rewrite('QS_companyshow', array('id' => $val['company_id']));
        if ($val['company']['logo']) {
            $val['company']['logo'] = $_CFG['main_domain'] . "data/logo/" . $val['company']['logo'];
        } else {
            $val['company']['logo'] = $_CFG['main_domain'] . "data/logo/no_logo.gif";
        }
        if ($val['company']['website']) {
            if (strstr($val['company']['website'], "http://") === false) {
                $val['company']['website'] = "http://" . $val['company']['website'];
            }
        }
        if (intval($_SESSION['utype']) == 2) {
            $interest_id = get_interest_jobs_id(intval($_SESSION['uid']));
        }
        if ($val['tag']) {
            $tag = explode('|', $val['tag']);
            $taglist = array();
            if (!empty($tag) && is_array($tag)) {
                foreach ($tag as $t) {
                    $tli = explode(',', $t);
                    $taglist[] = array($tli[0], $tli[1]);
                }
            }
            $val['tag'] = $taglist;
        } else {
            $val['tag'] = array();
        }
    }
    $smarty->assign($aset['listname'], $val);
}
Пример #7
0
function tpl_function_qishi_jobs_show($params, &$smarty)
{
    global $db, $timestamp, $_CFG;
    $arr = explode(',', $params['set']);
    foreach ($arr as $str) {
        $a = explode(':', $str);
        switch ($a[0]) {
            case "职位ID":
                $aset['id'] = $a[1];
                break;
            case "列表名":
                $aset['listname'] = $a[1];
                break;
            case "描述长度":
                $aset['brieflylen'] = $a[1];
                break;
            case "填补字符":
                $aset['dot'] = $a[1];
                break;
        }
    }
    $aset = array_map("get_smarty_request", $aset);
    $aset['id'] = $aset['id'] ? intval($aset['id']) : 0;
    $aset['brieflylen'] = isset($aset['brieflylen']) ? intval($aset['brieflylen']) : 0;
    $aset['listname'] = $aset['listname'] ? $aset['listname'] : "list";
    $smarty->assign("is_reward", get_jobs_is_reward($_SESSION["uid"], $aset['id']));
    $wheresql = " WHERE id={$aset['id']} ";
    $sql = "select id,uid,audit,display,setmeal_deadline,add_mode,amount,company_id,district_cn,contents,refreshtime,tag_cn,category,subclass,sdistrict,jobs_name,companyname,wage_cn,nature_cn,category_cn,sex_cn,age,education_cn,experience_cn,deadline,graduate from " . table('jobs') . $wheresql . " LIMIT 1";
    $val = $db->getone($sql);
    if (empty($val)) {
        $sql_tmp = "select id,uid,audit,display,setmeal_deadline,add_mode,amount,company_id,district_cn,contents,refreshtime,tag_cn,category,subclass,sdistrict,jobs_name,companyname,wage_cn,nature_cn,category_cn,sex_cn,age,education_cn,deadline,experience_cn from " . table('jobs_tmp') . $wheresql . " LIMIT 1";
        $val = $db->getone($sql_tmp);
    }
    if (empty($val)) {
        header("HTTP/1.1 404 Not Found");
        $smarty->display("404.htm");
        exit;
    }
    if ($val['deadline'] < time()) {
        $val['jobs_gq'] = 1;
    } elseif ($val['audit'] != '1' || $val['display'] != '1' || $val['setmeal_deadline'] != '0' && $val['setmeal_deadline'] < time()) {
        $val['jobs_gq'] = 2;
    }
    setcookie('QS[view_jobs_log][' . $val['id'] . ']', $val['id'], 0, $QS_cookiepath, $QS_cookiedomain);
    if (intval($_SESSION['uid']) > 0 && intval($_SESSION['utype']) == 2) {
        //检查是否看过该职位
        $check = check_view_log(intval($_SESSION['uid']), $val['id']);
        if (!$check) {
            add_view_log(intval($_SESSION['uid']), $val['id']);
        }
        //检查该职位是否对此会员发起面试邀请,并且此会员没看
        $check_int = check_interview(intval($_SESSION['uid']), $val['id']);
        if ($check_int) {
            update_interview(intval($_SESSION['uid']), $val['id']);
        }
        //检查该职位是否被此会员收藏过
        $check_fav = check_favorites(intval($_SESSION['uid']), $val['id']);
        if ($check_fav) {
            $val['check_fav'] = 1;
        }
    }
    if ($val['setmeal_deadline'] < time() && $val['setmeal_deadline'] != "0" && $val['add_mode'] == "2") {
        $val['deadline'] = $val['setmeal_deadline'];
    }
    $val['amount'] = $val['amount'] == "0" ? '若干' : $val['amount'];
    $val['jobs_url'] = url_rewrite('QS_jobsshow', array('id' => $val['id']));
    $profile = GetJobsCompanyProfile($val['company_id']);
    $val['company'] = $profile;
    $val['contact'] = GetJobsContact($val['id']);
    $district_cn = $val['district_cn'];
    $d_arr = explode("/", $district_cn);
    $val['district_ch'] = $d_arr[0];
    $val['sdistrict_ch'] = $d_arr[1];
    $val['expire'] = sub_day($val['deadline'], time());
    $val['countresume'] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('personal_jobs_apply') . " WHERE jobs_id= '{$val['id']}'");
    if ($aset['brieflylen'] > 0) {
        $val['briefly'] = cut_str(strip_tags($val['contents']), $aset['brieflylen'], 0, $aset['dot']);
    } else {
        $val['briefly'] = strip_tags($val['contents']);
    }
    $val['contents'] = htmlspecialchars_decode($val['contents'], ENT_QUOTES);
    $val['refreshtime_cn'] = daterange(time(), $val['refreshtime'], 'Y-m-d', "#FF3300");
    $val['company_url'] = url_rewrite('QS_companyshow', array('id' => $val['company_id']));
    if ($val['company']['logo']) {
        $val['company']['logo'] = $_CFG['site_dir'] . "data/logo/" . $val['company']['logo'];
    } else {
        $val['company']['logo'] = $_CFG['site_dir'] . "data/logo/no_logo.gif";
    }
    if ($val['company']['website']) {
        if (strstr($val['company']['website'], "http://") === false) {
            $val['company']['website'] = "http://" . $val['company']['website'];
        }
    }
    if (intval($_SESSION['utype']) == 2) {
        $view_log = get_view_log(intval($_SESSION['uid']));
        foreach ($view_log as $key => $value) {
            $jobs_info = $db->getone("select id,company_id,jobs_name,companyname from " . table('jobs') . " where id=" . $value['jobsid']);
            $val['view_log'][$key]['jobsid'] = $jobs_info['id'];
            $val['view_log'][$key]['jobs_name'] = $jobs_info['jobs_name'];
            $val['view_log'][$key]['jobs_url'] = url_rewrite('QS_jobsshow', array('id' => $jobs_info['id']));
            $val['view_log'][$key]['companyname'] = $jobs_info['companyname'];
        }
        $interest_id = get_interest_jobs_id(intval($_SESSION['uid']));
    }
    if ($val['tag_cn']) {
        $tag_cn = explode(',', $val['tag_cn']);
        $val['tag_cn'] = $tag_cn;
    } else {
        $val['tag_cn'] = array();
    }
    /*
       薪酬统计
       如果职位有三级分类 则根据职位的 subclass
       如果职位没有有三级分类 则根据职位的 category
    */
    if ($val['subclass']) {
        $salary_data = $db->getall("select c.c_name from " . table('jobs_search_wage') . " as j left join " . table('category') . " as c on c.c_id=j.wage where j.subclass=" . $val['subclass'] . " and j.sdistrict=" . $val['sdistrict']);
    } else {
        $salary_data = $db->getall("select c.c_name from " . table('jobs_search_wage') . " as j left join " . table('category') . " as c on c.c_id=j.wage where j.category=" . $val['category'] . " and j.sdistrict=" . $val['sdistrict']);
    }
    if ($salary_data) {
        $total = 0;
        $total_salary = 0;
        foreach ($salary_data as $key => $value) {
            $total_salary += intval($value['c_name']) + 500;
            $total++;
        }
        $val['salary']['value'] = intval($total_salary / $total);
        $val['salary']['px'] = $val['salary']['value'] / 12000 * 446 . "px";
    }
    /*
        薪酬统计
    */
    $user = get_jobs_username($val['uid']);
    $hashstr = substr(md5($user['username']), 8, 16);
    $smarty->assign('hashstr', $hashstr);
    $smarty->assign("is_reward", get_jobs_is_reward($aset['id']));
    $smarty->assign($aset['listname'], $val);
}
function tpl_function_qishi_hunter_jobs_show($params, &$smarty)
{
    global $db, $timestamp, $_CFG;
    $arr = explode(',', $params['set']);
    foreach ($arr as $str) {
        $a = explode(':', $str);
        switch ($a[0]) {
            case "职位ID":
                $aset['id'] = $a[1];
                break;
            case "列表名":
                $aset['listname'] = $a[1];
                break;
            case "描述长度":
                $aset['brieflylen'] = $a[1];
                break;
            case "填补字符":
                $aset['dot'] = $a[1];
                break;
        }
    }
    $aset = array_map("get_smarty_request", $aset);
    $aset['id'] = $aset['id'] ? intval($aset['id']) : 0;
    $aset['brieflylen'] = isset($aset['brieflylen']) ? intval($aset['brieflylen']) : 0;
    $aset['listname'] = $aset['listname'] ? $aset['listname'] : "list";
    $wheresql = " WHERE id={$aset['id']} ";
    $sql = "select id,uid,utype,setmeal_deadline,add_mode,contents,jobs_qualified,refreshtime,language,wage_structure,jobs_name,companyname,addtime,click,wage_cn,trade_cn,scale_cn,department,reporter,nature_cn,district_cn,category_cn,age_cn,education_cn,sex_cn,experience_cn from " . table('hunter_jobs') . $wheresql . " LIMIT 1";
    $val = $db->getone($sql);
    if (empty($val)) {
        header("HTTP/1.1 404 Not Found");
        $smarty->display("404.htm");
        exit;
    } else {
        if (intval($_SESSION['uid']) > 0 && intval($_SESSION['utype']) == 2) {
            //检查该职位是否对此会员发起面试邀请,并且此会员没看
            $check_int = check_interview(intval($_SESSION['uid']), $val['id']);
            if ($check_int) {
                update_interview(intval($_SESSION['uid']), $val['id']);
            }
        }
        if ($val['setmeal_deadline'] < time() && $val['setmeal_deadline'] != "0" && $val['add_mode'] == "2") {
            $val['deadline'] = $val['setmeal_deadline'];
        }
        $val['jobs_url'] = url_rewrite('QS_hunter_jobsshow', array('id' => $val['id']));
        $val['expire'] = sub_day($val['deadline'], time());
        if ($aset['brieflylen'] > 0) {
            $val['briefly'] = cut_str(strip_tags($val['contents']), $aset['brieflylen'], 0, $aset['dot']);
            $val['jobs_qualified'] = cut_str(strip_tags($val['jobs_qualified']), $aset['brieflylen'], 0, $aset['dot']);
        } else {
            $val['briefly'] = strip_tags($val['contents']);
            $val['jobs_qualified'] = strip_tags($val['jobs_qualified']);
        }
        $val['refreshtime_cn'] = daterange(time(), $val['refreshtime'], 'Y-m-d', "#FF3300");
        $val['company_url'] = url_rewrite('QS_companyshow', array('id' => $val['company_id']));
        $val['languagecn'] = preg_replace("/\\d+/", '', $val['language']);
        $val['languagecn'] = preg_replace('/\\,/', '', $val['languagecn']);
        $val['languagecn'] = preg_replace('/\\|/', '&nbsp;&nbsp;&nbsp;', $val['languagecn']);
        $wage_structure = explode("|", $val['wage_structure']);
        foreach ($wage_structure as $key => $value) {
            $wage = explode(",", $value);
            $val['structure'][$key]['value'] = $wage[1];
        }
        if ($val['utype'] == '1') {
            $company = GetJobsCompanyProfile($val['uid']);
            $val['company_id'] = $company['id'];
        }
        $wheresql = " WHERE huntet_uid='{$val['uid']}' AND jobs_id= '{$val['id']}' AND personal_look=1 ";
        $val['countresume'] = $db->get_total("SELECT COUNT(*) AS num FROM " . table('personal_hunter_jobs_apply') . $wheresql);
    }
    $smarty->assign($aset['listname'], $val);
}