本文整理汇总了PHP中Job::getAllJobs方法的典型用法代码示例。如果您正苦于以下问题:PHP Job::getAllJobs方法的具体用法?PHP Job::getAllJobs怎么用?PHP Job::getAllJobs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Job
的用法示例。
在下文中一共展示了Job::getAllJobs方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: job_board_news
function job_board_news()
{
global $db;
$news = array();
$job = new Job();
$result = $job->getAllJobs('created_date', 'desc');
if (is_array($result)) {
foreach ($result as $row) {
$title = htmlentities_utf8($row['title']);
$news[] = array('time' => $row['revised_date'], 'object' => $row, 'thumb' => AT_JB_BASENAME . 'images/jb_icon_tiny.png', 'link' => '<span title="' . strip_tags($title) . '"><a href="' . AT_JB_BASENAME . 'view_post.php?jid=' . $row['id'] . '">' . $title . "</a></span>");
}
}
return $news;
}
示例2: Job
/* modify it under the terms of the GNU General Public License */
/* as published by the Free Software Foundation. */
/****************************************************************/
// $Id$
$_user_location = 'public';
define(AT_INCLUDE_PATH, '../../include/');
include AT_INCLUDE_PATH . 'vitals.inc.php';
include AT_JB_INCLUDE . 'classes/Job.class.php';
include AT_JB_INCLUDE . 'classes/Employer.class.php';
$_custom_css = $_base_path . AT_JB_BASENAME . 'module.css';
// use a custom stylesheet
//initialize
$job = new Job();
$page = intval($_GET['p']);
$page = $page == 0 ? 1 : $page;
$all_job_posts = $job->getAllJobs($_GET['col'], $_GET['order']);
$bookmark_posts = $job->getBookmarkJobs();
//handle order
if ($_GET['order'] == '') {
$order = 'DESC';
} else {
//flip the ordre
$order = $_GET['order'] == 'ASC' ? 'DESC' : 'ASC';
$page_string = 'col=' . $_GET['col'] . SEP . 'order=' . $_GET['order'];
}
//handle search
if (isset($_GET['jb_submit'])) {
$search_input['general'] = trim($_GET['jb_search_general']);
// $search_input['title'] = trim($_GET['jb_search_title']);
// $search_input['email'] = $_GET['jb_search_email'];
// $search_input['description'] = trim($_GET['jb_search_description']);
示例3: Job
/* Inclusive Design Institute */
/* http://atutor.ca */
/* */
/* This program is free software. You can redistribute it and/or */
/* modify it under the terms of the GNU General Public License */
/* as published by the Free Software Foundation. */
/***********************************************************************/
// $Id$
if (!defined('AT_INCLUDE_PATH')) {
exit;
}
include AT_JB_INCLUDE . 'classes/Job.class.php';
global $db;
//init
$link_limit = 3;
$cnt = 0;
$job = new Job();
$result = $job->getAllJobs('created_date', 'desc');
if (is_array($result)) {
foreach ($result as $row) {
if ($cnt >= $link_limit) {
break;
}
$cnt++;
$title = htmlentities_utf8($row['title']);
$list[] = '<span title="' . strip_tags($title) . '">' . '<a href="' . $_base_path . 'mods/job_board/view_post.php?jid=' . $row['id'] . '">' . $title . '</a></span>';
}
return $list;
} else {
return 0;
}
示例4: getJobList
public function getJobList()
{
$data = \Input::has('data') ? \Input::get('data') : [];
$jsonData = [];
$model = \Job::getAllJobs($data);
try {
if ($model) {
foreach ($model as $mData) {
if ($mCompany = $mData->company) {
$mData->company_name = $mCompany->name;
}
if ($mAgency = $mData->agency) {
$mData->agency_name = $mAgency->name;
} else {
$mData->agency_name = "<label class='label label-danger'>Not an agency job</label>";
}
if ($mData->is_active) {
$mData->is_active = "<label class='label label-success'>Active</label>";
} else {
$mData->is_active = "<label class='label label-danger'>Not Active</label>";
}
$mData->removeLink = route('admin.job.remove') . '?i=' . $mData->id;
array_push($jsonData, $mData);
}
}
return \Response::json($jsonData);
} catch (\Exception $e) {
return $e->getMessage();
}
}