Example #1
0
function get_apply_jobs($offset, $perpage, $joinsql, $wheresql)
{
    global $db;
    $limit = " LIMIT " . intval($offset) . ',' . intval($perpage);
    $get_sql = $joinsql . $wheresql;
    //申请的普通职位
    $select = " a.*,j.addtime,j.company_id,j.companyname,j.company_addtime,j.wage_cn,j.district_cn,j.deadline,j.refreshtime,j.click";
    $sql = "SELECT {$select} FROM " . table('personal_jobs_apply') . " AS a {$get_sql} ORDER BY a.did DESC " . $limit;
    $result = $db->query($sql);
    while ($row = $db->fetch_array($result)) {
        //标识一下普通职位
        $row['is_senior_job'] = '0';
        if (empty($row['companyname'])) {
            $jobs = $db->getone("select * from " . table('jobs_tmp') . " WHERE id='{$row['jobs_id']}' LIMIT 1");
            $row['addtime'] = $jobs['addtime'];
            $row['companyname'] = $jobs['companyname'];
            $row['company_addtime'] = $jobs['company_addtime'];
            $row['company_id'] = $jobs['company_id'];
            $row['wage_cn'] = $jobs['wage_cn'];
            $row['district_cn'] = $jobs['district_cn'];
            $row['deadline'] = $jobs['deadline'];
            $row['refreshtime'] = $jobs['refreshtime'];
            $row['click'] = $jobs['click'];
        }
        $resume = $db->getone("select title from " . table('resume') . " where id=" . $row['resume_id']);
        if ($resume) {
            $row['resume_name'] = $resume['title'];
        } else {
            $row['resume_name'] = "该简历已经删除";
        }
        $row['company_url'] = url_rewrite('QS_companyshow', array('id' => $row['company_id']));
        $row['belong_name'] = $row['company_name'];
        $row['belong_url'] = $row['company_url'];
        $row['jobs_url'] = url_rewrite('QS_jobsshow', array('id' => $row['jobs_id']));
        $row['wap_jobs_url'] = m_url_rewrite("jobs-show", array("id" => $row['jobs_id']));
        //答复状态
        if ($row['personal_look'] == '1') {
            $row['reply_status'] = "企业未查看";
        } else {
            if ($row['is_reply'] == '0') {
                $row['reply_status'] = "待反馈";
            } elseif ($row['is_reply'] == '1') {
                $row['reply_status'] = "合格";
            } elseif ($row['is_reply'] == '2') {
                $row['reply_status'] = "不合格";
            } elseif ($row['is_reply'] == '3') {
                $row['reply_status'] = "待定";
            } elseif ($row['is_reply'] == '4') {
                $row['reply_status'] = "未接通";
            }
        }
        $row_arr[] = $row;
    }
    return $row_arr;
}
Example #2
0
    header("Location: ../login.php");
}
$user = get_user_info($_SESSION['uid']);
if ($_CFG['login_per_audit_mobile'] && $user['mobile_audit'] == "0") {
    $str = "<script>";
    $str .= "alert('请先验证手机!');";
    $str .= "window.location.href='account_security.php';";
    $str .= "</script>";
    echo $str;
} elseif ($act == 'interview') {
    $uid = intval($_SESSION["uid"]);
    $wheresql = " WHERE  i.resume_uid={$uid} ";
    $perpage = 5;
    $count = 0;
    $page = empty($_GET['page']) ? 1 : intval($_GET['page']);
    if ($page < 1) {
        $page = 1;
    }
    $start = ($page - 1) * $perpage;
    $total_sql = "SELECT COUNT(*) AS num FROM  " . table('company_interview') . " as i {$wheresql}";
    $count = $db->get_total($total_sql);
    $limit = " LIMIT {$start},{$perpage}";
    $sql = "select * from " . table("company_interview") . " as i {$wheresql} order by i.interview_addtime " . $limit;
    $interview = $db->getall($sql);
    foreach ($interview as $key => $value) {
        $value['job_url'] = m_url_rewrite("jobs-show", array("id" => $value['jobs_id']));
        $interview[$key] = $value;
    }
    $smarty->assign('interview', $interview);
    $smarty->display("m/personal/m-interview.html");
}