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


PHP Job::GetInfo方法代码示例

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


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

示例1: PostIsSpam

    public function PostIsSpam()
    {
        global $db;
        if ($this->mCanReport) {
            $sql = 'INSERT INTO ' . DB_PREFIX . 'spam_reports (the_time, ip, job_id)
			                    VALUES (NOW(), "' . $this->mIp . '", ' . $this->mJobId . ')';
            if ($db->query($sql)) {
                if ($this->GetTotalVotesPerPost() > REPORT_POST_NOTIFY_ON) {
                    $job = new Job($this->mJobId);
                    $mihai = new Postman();
                    $mihai->MailReportSpam($job->GetInfo());
                }
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
开发者ID:bklein01,项目名称:jobberbase,代码行数:20,代码来源:class.SpamReport.php

示例2: 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

示例3: Job

<?php

/**
 * @author putypuruty
 * 
 * Business logic for editing a post.
 */
//Note: $id is a job ID
if ($id != 0) {
    $job = new Job($id);
} else {
    $job = new Job();
}
$jobToEdit = $job->GetInfo();
$smarty->assign('show_preview', false);
$smarty->assign('editor', true);
if (!empty($_POST)) {
    // validation
    $errors = array();
    if (!isset($_POST['type_id']) || !is_numeric($_POST['type_id'])) {
        $errors['input_id'] = $translations['jobs']['type_error'];
        $_POST['type_id'] = 0;
    }
    if ($_POST['title'] == '') {
        $errors['title'] = $translations['jobs']['title_error'];
    }
    if ($_POST['description'] == '') {
        $errors['description'] = $translations['jobs']['description_error'];
    }
    if ($_POST['poster_email'] == '') {
        $errors['poster_email'] = $translations['jobs']['email_error'];
开发者ID:zeamxie,项目名称:jobberbase,代码行数:31,代码来源:page_edit_post.php

示例4: GetPaginatedJobsForOtherCities

    public function GetPaginatedJobsForOtherCities($type_id = false, $firstLimit = false, $lastLimit = false)
    {
        global $db;
        $jobs = array();
        $conditions = '';
        // if $type_id is, in fact, the type's var_name,
        // get the type's id
        if (!is_numeric($type_id)) {
            $type_id = $this->GetTypeId($type_id);
        }
        if (is_numeric($type_id) && $type_id != 0) {
            $conditions .= ' AND type_id = ' . $type_id;
        }
        if ($firstLimit >= 0 && $lastLimit >= 0) {
            $sql_limit = 'LIMIT ' . $firstLimit . ', ' . $lastLimit;
        } else {
            $sql_limit = '';
        }
        $sql = 'SELECT id
		               FROM ' . DB_PREFIX . 'jobs
		               WHERE city_id IS NULL' . $conditions . ' AND is_temp = 0 AND is_active = 1
		               ORDER BY created_on DESC ' . $sql_limit;
        $result = $db->query($sql);
        while ($row = $result->fetch_assoc()) {
            $current_job = new Job($row['id']);
            $jobs[] = $current_job->GetInfo();
        }
        return $jobs;
    }
开发者ID:bklein01,项目名称:jobberbase,代码行数:29,代码来源:class.Job.php

示例5: Job

<?php

$j = new Job($id);
// if auth code used, check it and allow activating
if (isset($_SESSION['later_edit']) && $_SESSION['later_edit'] == $j->GetAuth() || $extra != '' && $extra == $j->GetAuth()) {
    $activator = $j->Activate();
    $vali = new Postman();
    $vali->MailPostActivatedToUser($j->GetInfo());
    $_SESSION['status'] = $translations['jobs']['activated_success'];
    redirect_to(BASE_URL . URL_JOB . '/' . $id . '/');
    exit;
} else {
    redirect_to(BASE_URL);
    exit;
}
开发者ID:Kuzy,项目名称:jobberbase,代码行数:15,代码来源:page_activate.php

示例6: Job

<?php

$j = new Job($_POST['job_id']);
$activator = $j->Activate();
$vali = new Postman();
$vali->MailPostActivatedToUser($j->GetInfo(), BASE_URL_ORIG);
echo 1;
exit;
开发者ID:Kuzy,项目名称:jobberbase,代码行数:8,代码来源:page_activate.php

示例7: Job

        $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);
}
// this branch executes after first writing a post and hitting the submit button
if (!empty($_POST['action']) && $_POST['action'] == 'publish') {
    escape($_POST);
    $errors = array();
    $_SESSION['user_ip'] = $_SERVER['REMOTE_ADDR'];
    $_SESSION['referer'] = BASE_URL . 'post/';
    // validation
    if ($captcha_enabled) {
        $resp = recaptcha_check_answer(CAPTCHA_PRIVATE_KEY, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
开发者ID:Kuzy,项目名称:jobberbase,代码行数:31,代码来源:page_write.php


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