本文整理汇总了PHP中Job::GetTempStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Job::GetTempStatus方法的具体用法?PHP Job::GetTempStatus怎么用?PHP Job::GetTempStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Job
的用法示例。
在下文中一共展示了Job::GetTempStatus方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Job
<?php
$j = new Job($id);
// if auth code used, check it and allow editing
if (isset($_SESSION['later_edit']) && $_SESSION['later_edit'] == $j->GetAuth() || $extra != '' && $extra == $j->GetAuth()) {
$deleter = $j->Deactivate();
$_SESSION['status'] = $translations['jobs']['delete_success'];
redirect_to(BASE_URL);
exit;
}
if ($_SERVER['HTTP_REFERER'] == BASE_URL . 'verify/' . $id . '/' && $id != 0 && $_SERVER['REMOTE_ADDR'] == $_SESSION['user_ip']) {
$job = new Job($id);
if ($job->GetTempStatus() == 1 || $job->GetActiveStatus() == 0) {
$info = $job->Deactivate();
$_SESSION['status'] = $translations['jobs']['confirmation_error'];
redirect_to(BASE_URL);
exit;
} else {
redirect_to(BASE_URL);
exit;
}
} else {
redirect_to(BASE_URL . URL_JOB . '/' . $id . '/');
exit;
}
示例2: unset
if ($job_flag) {
$smarty->assign('previous_results', $prev);
$smarty->assign('next_results', $next);
$smarty->assign('previous_result', $prev ? $prev[count($prev) - 1] : '');
$smarty->assign('next_result', $next ? $next[0] : '');
} else {
unset($_SESSION['search_results']);
}
// save recorded keywords, if available
if ($_SESSION['search_keywords']) {
$search = new SearchKeywords($_SESSION['search_keywords']);
$search->Save();
unset($_SESSION['search_keywords']);
}
$job = new Job($id);
if ($job->Exists() && $job->GetTempStatus() == 0 && $job->GetActiveStatus() == 1) {
$info = $job->GetInfo();
// if visitor comes from an outside website, record the referer
if (!empty($outside_referer)) {
redirect_to(BASE_URL . URL_JOB . '/' . $id . '/' . $info['url_title'] . '/');
} else {
$job->IncreaseViewCount();
}
$job_flag = true;
$url = BASE_URL . URL_JOB . '/' . $id . '/' . $info['url_title'] . '/';
$current_url = ($_SERVER["HTTPS"] == "on" ? "https" : "http") . '://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if ($current_url != $url) {
redirect_to($url, 301);
}
if (!empty($_SESSION['last_viewed_jobs'])) {
foreach ($_SESSION['last_viewed_jobs'] as $item) {
示例3: Job
<?php
$job = new Job($id);
if ($job->Exists() && $job->GetTempStatus() == 0) {
$info = $job->GetInfo();
$app = new JobApplication($id);
$info['applicants'] = $app->getAllForJob();
$smarty->assign('job', $info);
$smarty->assign('applicants', $info['applicants']);
$smarty->assign('cv_path', '/' . FILE_UPLOAD_DIR);
$category = get_category_by_id($info['category_id']);
$category_var_name = $category['var_name'];
$html_title = stripslashes($info['title']) . ' la ' . stripslashes($info['company']) . ' / ' . SITE_NAME;
if (isset($_SERVER['HTTP_REFERER'])) {
$currentLinksPage = explode('/', rtrim($_SERVER['HTTP_REFERER'], '/'));
if (strcmp(end($currentLinksPage), 'home') == 0) {
$smarty->assign('back_link', BASE_URL . 'home/');
} else {
$smarty->assign('back_link', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : BASE_URL . URL_JOBS . '/' . $category_var_name . '/');
}
} else {
$smarty->assign('back_link', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : BASE_URL . URL_JOBS . '/' . $category_var_name . '/');
}
$smarty->assign('current_category', $category_var_name);
$template = 'job.tpl';
} else {
redirect_to(BASE_URL . 'job-unavailable/');
exit;
}
示例4: Job
if ($id != 0) {
$j = new Job($id);
}
// if auth code used, check it and allow editing
if ($id != 0 && $extra != '' && $extra == $j->GetAuth()) {
$later_edit = true;
$_SESSION['later_edit'] = $extra;
} else {
if ($id != 0 && isset($_SESSION['later_edit']) && $_SESSION['later_edit'] == $j->GetAuth() && $j->GetAuth() != '') {
$later_edit = true;
}
}
// security: prevent later editing, by forced redirection
if (!$later_edit && $id != 0) {
$j = new Job($id);
if ($j->GetTempStatus() != 1 || $j->GetActiveStatus() != 0) {
redirect_to(BASE_URL . URL_JOB . '/' . $id . '/');
exit;
}
}
// this branch executes when returning to edit a post
if ($_SERVER['HTTP_REFERER'] == BASE_URL . 'verify/' . $id . '/' && $id != 0 || $later_edit) {
$_SESSION['referer'] = BASE_URL . 'post/';
$job = new Job($id);
$jobs = $job->GetInfo();
$jobs['description'] = $textile->noTextile($jobs['description']);
if (strstr($jobs['url'], 'http://')) {
$jobs['url'] = substr($jobs['url'], 7, strlen($jobs['url']));
}
$smarty->assign('job', $jobs);
}