当前位置: 首页>>代码示例>>PHP>>正文


PHP Job::GetAuth方法代码示例

本文整理汇总了PHP中Job::GetAuth方法的典型用法代码示例。如果您正苦于以下问题:PHP Job::GetAuth方法的具体用法?PHP Job::GetAuth怎么用?PHP Job::GetAuth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Job的用法示例。


在下文中一共展示了Job::GetAuth方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Job

<?php

$job = new Job($id);
if ($extra != '' && $extra == $job->GetAuth()) {
    $later_edit = true;
    $_SESSION['later_edit'] = $extra;
} else {
    $later_edit = false;
    $_SESSION['later_edit'] = '';
}
if ($_SESSION['referer'] != BASE_URL . 'post/') {
    if (!$_SESSION['later_edit']) {
        redirect_to(BASE_URL . URL_JOB . '/' . $id . '/');
        exit;
    }
}
$jobInfo = $job->GetInfo();
if (strstr($jobInfo['description'], '*')) {
    $jobInfo['description'] = $textile->TextileThis($jobInfo['description']);
} else {
    $jobInfo['description'] = str_replace(array("\r\n", "\r", "\n"), "<br />", $jobInfo['description']);
}
$smarty->assign('job', $jobInfo);
$html_title = stripslashes($jobInfo['title']) . ' at ' . stripslashes($jobInfo['company']) . ' / ' . SITE_NAME;
$template = 'publish-verify.tpl';
开发者ID:Kuzy,项目名称:jobberbase,代码行数:25,代码来源:page_verify.php

示例2: 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;
}
开发者ID:zeamxie,项目名称:jobberbase,代码行数:25,代码来源:page_deactivate.php

示例3: Job

<?php

$job = new Job($id);
if ($job->Exists() && $extra != '' && $extra == $job->GetAuth()) {
    $posterEmail = $job->getPosterEmail();
    $jobCount = $job->CountJobs(false, false, false, $posterEmail);
    $smarty->assign('jobs_count', $jobCount);
    $paginatorLink = BASE_URL . "manage/" . $id . "/" . $extra . "/";
    $paginator = new Paginator($jobCount, JOBS_PER_PAGE, @$_REQUEST['p']);
    $paginator->setLink($paginatorLink);
    $paginator->paginate();
    $firstLimit = $paginator->getFirstLimit();
    $lastLimit = $paginator->getLastLimit();
    $the_jobs = array();
    $the_jobs = $job->GetPaginatedJobsForPoster($posterEmail, $firstLimit, JOBS_PER_PAGE);
    $smarty->assign("pages", $paginator->pages_link);
    $smarty->assign('jobs', $the_jobs);
    $smarty->assign('poster_email', $posterEmail);
    $html_title = $translator->translate("manage.html_title") . ' / ' . SITE_NAME;
    $template = 'manage.tpl';
} else {
    redirect_to(BASE_URL . URL_JOB . '/' . $id . '/');
    exit;
}
开发者ID:zeamxie,项目名称:jobberbase,代码行数:24,代码来源:page_manage.php

示例4: Job

 // actually publish the job post
 case 'publish':
     if (!ENABLE_NEW_JOBS) {
         redirect_to(BASE_URL);
         exit;
     }
     require_once 'page_publish.php';
     break;
 case 'confirm':
     if (!ENABLE_NEW_JOBS) {
         redirect_to(BASE_URL);
         exit;
     }
     $job = new Job($id);
     $job_title = BASE_URL . URL_JOB . '/' . $job->mId . '/' . $job->mUrlTitle . '/';
     $smarty->assign('auth', $job->GetAuth());
     $smarty->assign('job_url', $job_title);
     $smarty->assign('postRequiresModeration', $extra);
     $smarty->assign('laterEdit', $_SESSION['later_edit']);
     unset($_SESSION['later_edit'], $_SESSION['referer']);
     $template = 'publish-confirmation.tpl';
     break;
     // deactivate a post
 // deactivate a post
 case 'deactivate':
     require_once 'page_deactivate.php';
     break;
     // activate a post
 // activate a post
 case 'activate':
     require_once 'page_activate.php';
开发者ID:zeamxie,项目名称:jobberbase,代码行数:31,代码来源:index.php

示例5: Job

<?php

$captcha_enabled = ENABLE_RECAPTCHA && ENABLE_CAPTCHA_ON_POST_PAGE;
$smarty->assign('ENABLE_RECAPTCHA', $captcha_enabled);
if ($captcha_enabled) {
    $smarty->assign('the_captcha', recaptcha_get_html(CAPTCHA_PUBLIC_KEY));
}
$later_edit = false;
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/';
开发者ID:Kuzy,项目名称:jobberbase,代码行数:31,代码来源:page_write.php


注:本文中的Job::GetAuth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。